2014-05-16

A few months ago I replaced my DD-WRT Linksys WRT160Nv3 with a Netgear WNDR3800 with the latest OpenWRT.  I absolutely love the versatility of it, being able to script everything and not being restricted to the limited storage and configuration options DD-WRT provides.  I looked again recently and found out that my 160Nv3 is now supported as well, albeit with no luci web interface.  I installed it and everything seems to be working as far as interfaces go.

What I want to be able to do with this old router now is use it as a wireless client for multiple Ethernet devices.  DD-WRT allowed me to do this on this router but required entering all the SSID/security info in by hand and selecting client bridge mode.  With OpenWRT I can more readily scan for wireless networks which is nice and is more in line with what I'd like to do.

Ideally, I want to script the router such that when I plug it in, it automatically hosts a DHCP server on 192.168.1.1 and provides telnet/ssh/etc.  You would then connect from your wired device and scan for available AP's.  Selecting one would allow you to enter the password (preferably selecting the correct security) and connect wlan interface to that network.  Then it would shut down the DHCP server, bridge the wired ports to the wlan interface, and take a DHCP address on the wireless network internally.

Doing a manual run-through of the steps I want to take:

This displays all the available AP's correctly.

Now I'm authenticated and connected to my other router on the wlan0 interface.

Now this router has a DHCP client IP address on wlan0 and I can ping the other router and other network devices.

I have one bridge called "br-lan" consisting of eth0.1 interface.  Now I want to bridge that interface to the wireless.

It fails.

I read that using 4addr mode may solve this, so I tried:

and now br-lan appears to contain both eth0.1 and wlan0.  However, the wlan0 interface quits working.  I can no longer ping my other router.  Turning off 4addr mode requires removing wlan0 from the bridge, otherwise it fails with "command failed: Device or resource busy (-16)".  Once turning 4addr off however it starts pinging fine again.  Obviously the hardware is capable of a proper WiFi-to-Ethernet bridge client as it worked in DD-WRT so what am I doing wrong?

Show more