[Q] DHCP Lease very short - Desire Q&A, Help & Troubleshooting

Hi there
My IP adress keeps on changing on my Android (Cyanogen 6.1.1) Desire and so I keep on hopping between different IP addresses. The IP adress of the only other system on my network has not changed.
I would prefer not to use a static address but to understand and fix the cause of this. I have a laptop which does'nt hop around so frequently so
I think it must be related to a phone/Android setting but so far i've been unable to find out where this is configured.
My link speed is 54 Mbps so I have a good connection to my wireless router.
How can I fix this ? Perhaps I just need to install an extra application.
Elixir displays the lease in binary for some reason, 10101000110000000 (86400 base 10). 86400 seconds is a lease time of 1 day.
And this is confirmed on the OS itself.
Code:
# getprop dhcp.eth0.leasetime
86400
# dhcpcd --version
dhcpcd 4.0.15
Copyright (c) 2006-2008 Roy Marples
# pgrep -lf dhcpcd
1486 /system/bin/dhcpcd -ABKL -h android_dddddddddddddddd eth0
dhcpdcd options if they are the same on Android : http://roy.marples.name/cgi-bin/man-cgi?dhcpcd
-A, --noarp
Don't request or claim the address by ARP. This also disables
IPv4LL.
-B, --nobackground
Don't run in the background when we acquire a lease. This is
mainly useful for running under the control of another process,
such as a debugger or a network manager.
-K, --nolink
Don't receive link messages for carrier status. You should only
have to use this with buggy device drivers or running dhcpcd
through a network manager.
-L, --noipv4ll
Don't use IPv4LL (aka APIPA, aka Bonjour, aka ZeroConf).

Related

Looking for tun.ko vermagic=2.6.32.15-g746f4f0

Has anyone compiled tun.ko under the 2.2 stock?
Bill T
I have TUN vermagic=2.6.32.15-g746f4f0
Since nobody seemed to have it
I compiled TUN from the HTC sources, It loads,
** BUT ** looks like it is creating the TUN device as /dev/tun
vpnc seems to be looking in /dev/net/tun
I Will get vpnc working on a rooted stock 2.2 if it kills me
# ls /system/lib/modules
sequans_sdio.ko
bcm4329.ko
tun.ko
# strings /system/lib/modules/tun.ko | grep vermagic
vermagic=2.6.32.15-g746f4f0 preempt mod_unload ARMv7
# lsmod
tun 10734 0 - Live 0xbf000000
Tun is attached
how do you get the source + compile tun.ko? i am using Fresh's 3.2.0.0 rom with the new HTC stock kernel that is supposed to save batter life. The kernel # is 2.6.32.15-g3a8614e
HTC EVO Source
When I build the HTC code - it did not completely build everything but it did go get past tun so that is all I needed
I did this under fedora linux
you can download the HTC EVO source here
http://developer.htc.com/
you will need the google android build here is the instruction page
http://source.android.com/source/download.html
the google android source download included prebuilt compile binaries for the cross compile. I had to add the directories to my path so make could find them.
needed to edit Makefile change
EXTRAVERSION = .15-
== to ==
EXTRAVERSION = .15-g746f4f0
then did a make -j4 and waited
Bill
btedeski said:
When I build the HTC code - it did not completely build everything but it did go get past tun so that is all I needed
I did this under fedora linux
you can download the HTC EVO source here
http://developer.htc.com/
you will need the google android build here is the instruction page
http://source.android.com/source/download.html
the google android source download included prebuilt compile binaries for the cross compile. I had to add the directories to my path so make could find them.
needed to edit Makefile change
EXTRAVERSION = .15-
== to ==
EXTRAVERSION = .15-g746f4f0
then did a make -j4 and waited
Bill
Click to expand...
Click to collapse
yikes... i do have a linux box but this seems like a huge task, any way you can build tun.ko for my kernel?
<< yikes... i do have a linux box but this seems like a huge task, any way you can build tun.ko for my kernel?
post your Kernel string here and I will see about doing it.
btedeski said:
<< yikes... i do have a linux box but this seems like a huge task, any way you can build tun.ko for my kernel?
post your Kernel string here and I will see about doing it.
Click to expand...
Click to collapse
Kernel Version:
2.6.32.15-g3a8614e
[email protected] #7
don't worry if you don't have time.. thanks if you do!
I am able to connect from the EVO to the work Cisco 3030 VPN
concentrator (I am the concentrator admin) so I am able to see the connection on the 3030 as well.
The 3030 sees the conneciton
I have been able to connect in the following modes
IPSec/UDP 3DES-168
IPSec 3DES-168
IPSec/NAT-T 3DES-168
But the VPN concentrator is reporting 0 bytes sent or received,
seeing the following messages when I start vpnc
/data/data/org.codeandroid.vpnc_frontend/files/vpnc --natt-mode force-natt /etc/
vpnc/vpnc.conf
Usage: ip link set DEVICE { up | down |
arp { on | off } |
dynamic { on | off } |
multicast { on | off } |
allmulticast { on | off } |
promisc { on | off } |
trailers { on | off } |
txqueuelen PACKETS |
name NEWNAME |
address LLADDR | broadcast LLADDR |
mtu MTU }
ip link show [ DEVICE ]
/etc/vpnc/vpnc-script: cannot create : directory nonexistent
backing up dns and resolve.conf
/etc/vpnc/vpnc-script: cannot create /etc/vpnc/dns1.txt: read-only file system
/etc/vpnc/vpnc-script: cannot create /etc/vpnc/dns2.txt: read-only file system
cp: cannot stat '/etc/resolv.conf': No such file or directory
vpnc-script ran to completion
VPNC started in background (pid: 4079)...
#
busybox route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
63.117.98.165 174.146.29.245 255.255.255.255 UGH 0 0 0 rmnet0
174.146.29.244 * 255.255.255.252 U 0 0 0 rmnet0
198.182.130.128 * 255.255.255.128 U 0 0 0 tun0
default * 0.0.0.0 U 0 0 0 tun0
busybox ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8439 errors:0 dropped:0 overruns:0 frame:0
TX packets:8439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:507599 (495.7 KiB) TX bytes:507599 (495.7 KiB)
rmnet0 Link encap:Ethernet HWaddr 42:9C7:E2:B3:C4
inet addr:174.146.29.246 Bcast:174.146.29.247 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1472 Metric:1
RX packets:1165 errors:0 dropped:0 overruns:0 frame:0
TX packets:1686 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:538348 (525.7 KiB) TX bytes:234465 (228.9 KiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
-00
inet addr:198.182.130.158 P-t-P:198.182.130.158 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#
Can anyone get vpn working at all?
tun vermagic=2.6.32.15-g3a8614e
vermagic=2.6.32.15-g3a8614e preempt mod_unload ARMv7
see attached zip file
btedeski said:
vermagic=2.6.32.15-g3a8614e preempt mod_unload ARMv7
see attached zip file
Click to expand...
Click to collapse
What does this do?
me too
First, thanks for the compiled tun.ko for the stock ROM. I just got my Evo yesterday and am diving into Android for the first time, and have gotten rooted and VPNC installed and connected, but I get 0 bytes transferred on my Cisco ASA and no actual connection on the Evo. So I'm in the same boat, and from looking around, it doesn't look like anybody has gotten this working on 2.2 stock. I don't know enough to solve the problem myself, but just wanted to confirm that I have the same issue.
VPNC Working
So... I have a workaround that does seem to work with 2.2 Froyo. I tried this on King's kernel, and netarchy's kernels (both worked). I then loaded the tun.ko from a few posts above, and insmod'd it to work for Fresh 3.2.0.0 (with the new HTC Kernel)
So, here's what you do...
-Connect using VPNC (should show connected, but not allow tunneling)
-Issue the following commands
3G: "ip rule del from all lookup gprs"
Wifi: "ip ru del table wifi"
I used the application GScript Lite to send the commands
Then tunneling works!
I have gotten the connection to work on my Evo running Fresh stock 3.28 ROM, using the commands above. However, when I disconnect the phone freezes and I have to pull the battery to reset. Any ideas of what would be causing this?
davidfretz said:
I have gotten the connection to work on my Evo running Fresh stock 3.28 ROM, using the commands above. However, when I disconnect the phone freezes and I have to pull the battery to reset. Any ideas of what would be causing this?
Click to expand...
Click to collapse
Mine is doing that also. Maybe the kernel. I tried to logcat it but dont see anything because that freezes also
Don't suppose you could post one for 2.6.32.15-gb7b01d1 ? Pretty please?
TUN vermagic=2.6.32.15-gb7b01d1 preempt mod_unload ARMv7
[email protected] net]$ strings tun.ko | grep magic
vermagic=2.6.32.15-gb7b01d1 preempt mod_unload ARMv7
The attached zip file contains tun.ko
This is the supersonic-2.6.32.15-g746f4f0 but with the compile string modified to be gb7b01d1
this should work as long as gb7b01d1 and g746f4f0 are close.
Bill T
VPNC Disconnect -- Phone Freezes
davidfretz said:
I have gotten the connection to work on my Evo running Fresh stock 3.28 ROM, using the commands above. However, when I disconnect the phone freezes and I have to pull the battery to reset. Any ideas of what would be causing this?
Click to expand...
Click to collapse
Hi there, did you ever figure out freezing issue while disconnects? Any work-around or help .. . much appreciated...
hits100 said:
Hi there, did you ever figure out freezing issue while disconnects? Any work-around or help .. . much appreciated...
Click to expand...
Click to collapse
I downloaded the source for VPNC and ran it on my EVO in debug mode. I can tell you that the problem is not with VPNC Android client directly, it actually relates to the VPNC process running in the background.
Basically.. when you run the Android client, it just acts as a simple GUI that starts/stops this VPNC process (native C++ code). The freeze occurs when that VPNC process tries getting killed. So when you click "Disconnect" from your phone, VPNC (Android client) issues a linux shell command for "kill" that is supposed to terminate the VPNC process.
I wasn't able to determine, because of my lack of C++ skillz, what the VPNC process is doing that is causing the freeze. Maybe it's trying to close tunnels that don't exist? I don't know.. I do know there is a stop command in the vpnc-script file that comes with VPNC, but I couldn't tell if that was ever getting called or what. I suppose the next step would be to add some sort of output to that script file to see if that is being called. I have a feeling it's closely related to the commands issued to get the VPN connection working. Maybe there are some commands to close the tunnels THEN kill VPNC process.. never got that far, but I hope this helps any other dev.
If anyone wants to know exactly where it crashes in the Android code, it's in the VpncProcessHandler.java file on line 238. In the "disconnect" fxn.
drizkol said:
I downloaded the source for VPNC and ran it on my EVO in debug mode. I can tell you that the problem is not with VPNC Android client directly, it actually relates to the VPNC process running in the background.
Basically.. when you run the Android client, it just acts as a simple GUI that starts/stops this VPNC process (native C++ code). The freeze occurs when that VPNC process tries getting killed. So when you click "Disconnect" from your phone, VPNC (Android client) issues a linux shell command for "kill" that is supposed to terminate the VPNC process.
I wasn't able to determine, because of my lack of C++ skillz, what the VPNC process is doing that is causing the freeze. Maybe it's trying to close tunnels that don't exist? I don't know.. I do know there is a stop command in the vpnc-script file that comes with VPNC, but I couldn't tell if that was ever getting called or what. I suppose the next step would be to add some sort of output to that script file to see if that is being called. I have a feeling it's closely related to the commands issued to get the VPN connection working. Maybe there are some commands to close the tunnels THEN kill VPNC process.. never got that far, but I hope this helps any other dev.
If anyone wants to know exactly where it crashes in the Android code, it's in the VpncProcessHandler.java file on line 238. In the "disconnect" fxn.
Click to expand...
Click to collapse
Yeah, It's not front-end. Front-End application only sends kill command to vpnc process. If I do that same from terminal, it still freezes the system. It's something with kernel..

[Q] After reboot a new Wifi-MAC / emapiWlanMac error /Android no Wifi

Hi,
my phone has after a reboot a new WIFI-MAC-address.
All addresses are beginnig with: 00:18:41
I have to disable the MAC-filter in the router, when I try to use wlan.
Also the wlan-enable-button is grey in Android.
I have tried MTTY to fix this with
emapiWlanMac
like: http: // forum.xda-developers.com/showpost.php?p=3718638&postcount=23
But this is not working.
Result:
Code:
Notice: This MAC address takes effect only when your platform is EEPRON-less configuration. Please use [emapiTest] to verify it !
Signature mismatch! Data corruption?-eMapiWlanMacCommand, status = 0
emapiTest:
Code:
Cmd52 polling status timed out
CMD52 failed
Does anybody know, how I can fix my MAC-Address.
I have tried hundrets of WM-ROMs and Android kernels.
In WM wifi is working, but with new MAC addresses after a reboot.
In Android wifi is never starting.
Am I alone with this problem?
i was facing this kind of problem last week. I have resolved by setting a static IP on ma phone particular MAC address and now its working fine just try it.
Thanks for the answer, but your problem was another.
I have tried with a static ip (192.168.178.27), but this does not change anything.
When I enable MAC filter, my phone will not connect.
----------------
Router wlan devices:
HTC2 192.168.178.27 00:18:41:02:16: D5 nicht verbunden
- 192.168.178.27 00:18:41:1E:5E:7C nicht verbunden
- - 00:18:41:1A:37:77 nicht verbunden
(nicht verbunden = not connected)
Router Wlan log:
12.10.10 17:08:28 WLAN-Anmeldung ist gescheitert: Die MAC-Adresse der WLAN-Station ist gesperrt. Name: -, MAC-Adresse: 00:18:41:1A:37:77.
(WLAN registration failed: The MAC address of the WLAN station is closed.)
12.10.10 17:06:36 WLAN-Station abgemeldet. Name: -, MAC-Adresse: 00:18:41:1E:5E:7C.
12.10.10 17:06:36 WLAN-Station angemeldet. Name: -, IP-Adresse: 192.168.178.27, MAC-Adresse: 00:18:41:1E:5E:7C, Geschwindigkeit 54 MBit/s.
(angemeldet = announced)
---------
My Router does not see the phones name and the IP, because this MAC is not white listet.
There will be no problem in my home net, if I disable the mac filter, but I have no chance to connect to mac filtered nets.
I also have the problem with not startable wlan in android.

[DEV] Packet injection and monitor mode support

Hi,
Motivated by zewelor´s thread about injection support for the G1, I decided to create an equal one for our beloved Hero .
The attached kernel is Flykernel 13 by erasmux with patched compat wireless kernel modules, using the injection patches from David and Bobs msm_wifi patch. Thanks to zewelor for the prepatched sources. This means the kernel supports packet injection and monitor mode, so you can inject packets with aireplay-ng or capture them with kismet/aircrack and so on.
ALWAYS MAKE A NANDROID BACKUP!
What do you need?
1. Rooted HTC Hero
2. Installed recovery Image
3. 2.2 Rom
4. It is suggested to install debian in chroot to use aircrack, kismet and set the card into monitor mode. An debian image with aircrack preinstalled by zewelor you can find here: http://www.megaupload.com/?d=HA6CJKET (159MB) extract it on the /sdcard/ and chroot in your debian environment with "sh /sdcard/debian/startdeb". [TEST IT YOURSELF]
Second method:
Use Lil`debi installer to mount the image, instructions are here: https://guardianproject.info/2011/06/18/easy-installer-for-debian-on-android/.
Click to expand...
Click to collapse
Instructions:
1) Download injection_FlyKernel-13.zip
2) Flash the kernel in recovery mode
3) Use the attached start-inject.sh and stop-inject.sh scripts to load and unload the patched wifi modules for "injection mode".
4) Have fun!
Click to expand...
Click to collapse
Known Issues/Bugs
-If the interface is not associated to an access point it drains battery like crazy. The fix is to backport the idle mode patch, needs more investigation in my tests the kernel becomes very unstable.
-Airodump-ng and kismet stop showing traffic after 20-30mins, not sure if display error or interface stops working.
-In "adb shell" you need to start "screen" otherwise airodump shows no output, or you use connectbot or any other terminal app.
Click to expand...
Click to collapse
For Devs:
Patches to backport for the wl1251 driver you can find here:
http://build.meego.com/package/file...:Testing&rev=477436ad94f99819a5a97b5db4ad89ff
An injection patch for the compat-wireless-2.6.37-4-sn you find here: http://trac.pentoo.ch/export/2496/p...pat-wireless/files/wl1251-inject-2.6.37.patch
Prepatched compat-wireless-2010-12-22 with n900 patches by david and config patch you find here http://forum.xda-developers.com/attachment.php?attachmentid=727820&d=1316713392 thanks for the work zewelor.
Click to expand...
Click to collapse
89fc9c7fd97dab56d3220e93dea77d63 kernel-config_2.6.29.zip
e03c0a22bcb5425f1b301f463ea87490 injection_FlyKernel-13.zip
8009fa3c70211aaa329a6456eb0af6c8 iwconfig-static.zip
14b1866cc2b60ddbc1b565dab4a219d8 injection_scripts.zip
Yes the scripts are very dirty, but hey they work!
start-inject.sh: http://pastebin.com/MDKc2WJm
stop-inject.sh: http://pastebin.com/UuX83CBD
kernel config 2.6.29: http://pastebin.com/8ASmEAgN
ATTENTION!
If you want to set the interface into monitor mode without a linux image, push the attached (static compiled) iwconfig to /data/local/bin and execute "/data/local/bin/iwconfig wlan0 mode monitor" or uncomment the line in both shell scripts, of course you can copy the binary in any directory you like.
Action Time:
Code:
$adb shell
# sh start-inject.sh
[x] Injection startup
[x] Firmware/calibration file found
[+] Load injection modules
[+] Start wlan0 interface
wlan0 should be up and running :)
lo UP 127.0.0.1 255.0.0.0 0x00000049
dummy0 DOWN 0.0.0.0 0.0.0.0 0x00000082
rmnet0 UP 2.45.243.195 255.255.255.248 0x00001043
rmnet1 DOWN 0.0.0.0 0.0.0.0 0x00001002
rmnet2 DOWN 0.0.0.0 0.0.0.0 0x00001002
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
wlan0 UP 0.0.0.0 0.0.0.0 0x00001003
# debian [B][I](I'm using lil´debian this command starts the chroot script)[/I][/B]
[email protected]:/# ifconfig wlan0 down [B][I](In order to set monitor mode you most shutdown the interface or edit the injection script to start iwconfig)[/I][/B]
[email protected]:/# iwconfig wlan0 mode monitor
[email protected]:/# ifconfig wlan0 up
[email protected]:/# iwconfig wlan0
wlan0 IEEE 802.11bg Mode:Monitor Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
[email protected]:/# aireplay-ng --test wlan0
15:27:09 Trying broadcast probe requests...
15:27:13 Injection is working!
15:27:13 Found 1 AP
15:27:13 Trying directed probe requests...
15:27:13 E0:91:F5:XX:XX:XX - channel: 4 - 'XX_G'
15:27:43 Ping (min/avg/max): 982.727ms/993.888ms/1001.832ms Power: -70.16
15:27:43 19/30: 63%
[email protected]:/# exit
logout
# sh stop-inject.sh
[x] Stop Injection
[-] Stop wlan0 interface
[-] Unload injection modules
[+] Load wlan.ko module
[+] Load Firmware
[+] Start tiwlan0 interface
tiwlan0 should be up and running :)
lo UP 127.0.0.1 255.0.0.0 0x00000049
dummy0 DOWN 0.0.0.0 0.0.0.0 0x00000082
rmnet0 UP 2.45.243.195 255.255.255.248 0x00001043
rmnet1 DOWN 0.0.0.0 0.0.0.0 0x00001002
rmnet2 DOWN 0.0.0.0 0.0.0.0 0x00001002
usb0 DOWN 0.0.0.0 0.0.0.0 0x00001002
tiwlan0 UP 0.0.0.0 0.0.0.0 0x00001043
[B][I]Now enable wifi in android![/I][/B]
Remember these are not my patches, I only provide the patched kernel/kernel modules and loading scripts! Regarding the functionality and stability, Take it or leave it!, I have not the time and skill to make real modifications to the kernel module code to fix or improve stuff. You are free and welcome to post any progress you made.
FAQ
Q: What does packet injection and monitor mode mean?
A: It means that this thread is not for you!
Q: Does this stuff work for my XY phone?
A: No!, This kernel is only for HTC Hero, you need a phone which has the TI WL1251 wifi chipset, e.g G1, HTC Hero aka G2, Nokia N900 maemo...and build your own kernel.
Q: I have a problem with aircrack-ng,kismet...
A: This thread is about packet injection and monitor mode for the TI WL1251 and not about aircrack or kismet. I have nothing against serious questions, but want to avoid script kiddies derailing the thread with non topic related questions.
Q: I can't get the debian image running
A: Search the forum, there are a lot of different threads with instructions or use Lil`Debi Installer.
Q: I have a problem not related to aircrack-ng or kismet, can you help me?
A: I try to, however please post the question in the thread and _NOT_ via PM.
Q: Why not use Las Venturax kernel sources?
A: If there is demand I will post it, unfortunately it does not support "on the fly" switching between "regular and patched" wifi, which means every time you want to use the normal wlan module you need to reflash the kernel.
A lot questions are already answered in the G1 thread: http://forum.xda-developers.com/showthread.php?t=1271854

[Q] OpenVPN browser tunneling

Hi,
I want use my browser to connect on my corporate intranet via VPN connection, but I'm not able to do it.
Someone can help me?
Some information:
I tried 2 way to confgure OpenVPN:
1) I've configured OpenVPN via openvpn-settings apps (using pre-created cert files located on <rootsdcard>/openvpn ).
The .ovpn config files sound like
port yyyy
dev tun
# dev-node ovpn
proto tcp-client
remote xxx1.xxxx.it yyyy
remote xxx2.xxxx.it yyyy
remote xxx3.xxxx.it jjj
remote xxx4.xxxx.it jjj
ping 30
persist-tun
persist-key
tls-client
ca xxx.ca.crt
cert xxx.aaaa.bbbb.crt
key xxx.aaaa.bbbb.key
ns-cert-type server
comp-lzo
pull
verb 5
I connect to VPN with no problems, and I can use for example ssh to connect on my corporate linux server.
2) I've created a VPN from Menu->Settings-> Wireless & network-> VPN settings -> add VPN-> add VPN OpenVPN
and set parameters according with previous .ovpn config file
I connect also to VPN with no problems, and I can use for example ssh to connect on my corporate linux server.
On both cases I'm not able to browse intranet. So I checked the IP address I go out with, pointing to h**p://m.showip.net/, and It display my provider IP, not assigned VPN IP!
It can be that VPN don't tunnel all traffic? Maybe I need to change the default gateway?
I'm confused
My OS is Cyanogenmod 7.1.0.1
My phone is HTC Wildfire (Buzz)

[LG-D722] [jagnm] [lg g3 beat] Wifi mac 00:00:00:00:00:00 FIX

If you upgraded ROM in jagnm probably You have broken WiFi that cant connect to almost any hotspot. Check wifi advanced setting for mac - it's 00:00:00:00:00:00
I tried several ROMs - all except factory ROM had this issue. Going back to stock ROM on that device is bad idea, it's old and packed with bulky apps.
Finally I decided to go with unofficial lineage os 15.1 from here: https://vasy.ru/LineageOS-15/jagnm/
Rooted that with supersu, and started console (you can enable it in developer settings or use "adb shell" command from pc - that is more comfortable to write anything).
in console enter su, then bash, and check interfaces:
Code:
C:\adb>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
jagnm:/ $ su
jagnm:/ # bash
jagnm / # ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
(...)
wlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 Driver bcmsdh_sdmmc
(...)
jagnm / #
in file /data/misc/wifi/config You will find that cur_etheraddr is set to all zeros,
Code:
jagnm / # cat /data/misc/wifi/config
btc_mode=1
mpc=1
roam_off=0
roam_scan_period=10
roam_delta=20
roam_trigger=-80
PM=2
cur_etheraddr=00:00:00:00:00:00
changing that line to anything restores wifi mac address on next interface restart, let's try:
Code:
jagnm / # sed -i "s/00:/11:/g" /data/misc/wifi/config
jagnm / # ifconfig wlan0 down
jagnm / # ifconfig wlan0 up
jagnm / # fconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:90:4c:c5:12:38 Driver bcmsdh_sdmmc
inet addr:192.168.1.251 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::290:4cff:fec5:1238/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20601 TX bytes:3720
Any change to that line helps to restore original mac address, You can also delete this file chmod it or directory to something unreadable, but it will be recreated to zeros on each restart and problem will come back. I needed to find a way to fix that permanently, I looked for any startup scripts but it seems that init_d is not working on lineage, I followed that guide to fix that: https://forum.xda-developers.com/lineage/general/how-to-enable-init-d-to-function-t3810355
With init_d there is script here: /etc/init.d/90userinit that looks for userscript here: /data/local/userinit.sh so let's put there same thing as above
Code:
jagnm / # echo 'ifconfig wlan0 down && sed -i "s/00:/11:/g" /data/misc/wifi/config && ifconfig wlan0 up' > /data/local/userinit.sh
jagnm / # chmod +x /data/local/userinit.sh
this will fix wifi mac on each restart. Of course You need to make all those each time You flash new rom, but it's not that frequent on so old phone with almost no updates. Probably I'll never use any sim card here, but wifi is best way to have internet on this device.
I hope that will help, it's old device and probably noone use that as main phone - with working wifi You can still find something to to for this device in home.
please report if this fixed problem on your lg g3s, what is Your ROM or if You have anyt other idea how to fix that config generating all zeros for mac address
Hi there. I know this has been a while since this post, but I have just found my old d722 today and decided to make a small multimedia centrem from it. Wanted to flash latest ROM and ended up with MAC 00... error
your solution here saved me. Thanks a lot
one question, I guess phone must be rooted to be able to run content of userinit.sh properly, right? For some reason I am unable to root my d722 and I think that is why I am not able to repair this MAC error permanently. Changing /data/misc/wifi/config via adb works perfectly but is gone after reboot as expected

Categories

Resources