I am trying to setup my TP-Link TL-MR3020 running OpenWRT to to redistribute a wireless network, e.g. for when traveling and being in a hotel.
So far, my setup works pretty well - if the wireless network is actually available and ready to be connected to. If it is not, or I have e.g. a typo in the SSID or WPA key somewhere, OpenWRT not only fails to bring the network to be redistributed up, but also does not get the 'local' WLAN up. This is not so bad if I have a laptop with an Ethernet jack available - but would be pretty horrible if I'm traveling with only an iPad at my disposal.
My relevant (AFAIK) configuration files are as follows:
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'lan' option ifname 'eth0' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' config interface 'wan' option proto 'dhcp' option 'ifname' 'wlan0-1'
config wifi-device 'radio0' option type 'mac80211' option macaddr '64:70:02:6a:03:ae' option hwmode '11ng' option htmode 'HT20' list ht_capab 'SHORT-GI-20' list ht_capab 'SHORT-GI-40' list ht_capab 'RX-STBC1' list ht_capab 'DSSS_CCK-40' option country 'DE' option channel '13' option txpower '20' config wifi-iface option network 'lan' option ssid 'tlmr3020' option device 'radio0' option mode 'ap' option encryption 'psk2' option key '....' option disabled '0' option wmm '1' config wifi-iface option network 'wan' option ssid '....' option encryption 'psk2' option device 'radio0' option mode 'sta' option key '....' option disabled '0' option wmm '1'
wifi up while having a typo in the SSID to be redistributed gets me the following output:
command failed: Device or resource busy (-16) Configuration file: /var/run/hostapd-phy0.conf Using interface wlan0 with hwaddr 64:70:02:6a:03:ae and ssid "tlmr3020" Successfully initialized wpa_supplicant
No really obvious error message here, the
command failed always comes up (even on successful connects), doesn't seem to have any impact whatsoever.
logread seems to indicate that netifd tries to get some IP via DHCP for the wan interface, which of course will now fail. It never seems to timeout/do something else, though.
Jan 15 12:14:54 tlmr3020 daemon.notice netifd: wan (13582): udhcpc (v1.19.4) started Jan 15 12:14:54 tlmr3020 daemon.notice netifd: wan (13582): Sending discover... Jan 15 12:14:57 tlmr3020 daemon.notice netifd: wan (13582): Sending discover... Jan 15 12:15:00 tlmr3020 daemon.notice netifd: wan (13582): Sending discover...
This way, the
tlmr3020 wireless network never comes up, removing my ability to connect to the MR3020 over-the-air - pretty inconvenient to say the least.
Anyone got an idea what to do here to let the 'host' wlan connection fail gracefully, not impacting the 'local' network? I searched for and tried pretty much everything I could think of, getting nowhere.