OpenWRT: no WIFI connection because of old nvram leftovers

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

OpenWRT: no WIFI connection because of old nvram leftovers

Post by ^rooker »

[PROBLEM]
I've flashed the firmware on my WRT54GL v1.1: First to FreiFunk v1.2.5 and 2 years later to OpenWRT "white russian" v0.9.

Unfortunately, I couldn't get the WIFI network to work, and I was a bit puzzled by some settings I've discovered, which were not mentioned anywhere to be default.

One of them was, that my wifi interface "eth1" had a static IP configured:
eth1 Link encap:Ethernet HWaddr 00:18:39:86:xx:xx
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:253 errors:0 dropped:0 overruns:0 frame:31449
TX packets:253 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:53214 (51.9 KiB) TX bytes:56238 (54.9 KiB)
Interrupt:2 Base address:0x5000
Unfortunately, my FreiFunk configuration was so old and so long ago that I couldn't possibly remember if I did that or not.

Running the "nvclean.sh" script, got rid of FreiFunk specific variables, but did not undo the static wifi IP configuration. :(

[SOLUTION]
I figured that that IP must be stored somewhere in the NVRAM variables, so I did a:

Code: Select all

nvram show | grep 0.23
and got the following result:

Code: Select all

wifi_ipaddr=192.168.0.23
Thanks to a list of OpenWRT's NVRAM variables and their meaning, I got the assumption that that setting was a leftover from my previous setup.

To get a list of all "wifi_" specific nvram variables, do:

Code: Select all

nvram show | grep wifi_
In my case, that returned:
wifi_netmask=255.255.255.0
wifi_proto=static
wifi_ipaddr=192.168.0.23
wifi_ifname=eth1
So, according to an installation manual for the configuration of OpenWRT im HRZ, it seemed safe to unset these variables:

Code: Select all

nvram unset wifi_netmask
nvram unset wifi_proto
nvram unset wifi_ipaddr
nvram unset wifi_ifname
Additionally, my vlan settings were incorrect, too - so I changed them back to what I hope are the defaults for WRT54GL:

Code: Select all

wan_device=vlan1
vlan0ports=3 2 1 0 5*
lan_ifnames=vlan0 eth1
wan_ifnames=vlan1
vlan1hwname=et0
vlan1ports=4 5
wan_iface=vlan1
wan_ifname=vlan1
vlan0hwname=et0
Although on the back of my WRT54GL it says "v1.1", my ifconfig resembles more the settings of a v2.0.

My WIFI works now, and I'm happy! :)

[REFERENCES]
http://martybugs.net/wireless/openwrt/client.cgi
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply