AR-150 Lan Connection Issues

I have noticed that I am having issues with the AR-150 when I go between different WAN locations, and the old WAN is not available.

The router does not always boot with an available wireless LAN. I have to use a cable on the LAN side to access it. I actually usually use a cable, so it’s hard to quantify the issue.

Last night I took the device on the road. I had some issues connecting when I got to my destination, not sure how I resolved it, but I think I did it through Luci. I used the device for some testing and when I returned home reconnected the device to my home LAN. The device did not find the configured (default) wireless LAN and after 3 reboots I connected a cable and got in.

I went into Luci to look at the config, and think I tried to set the connections in Luci (as opposed to Gli gui). When I scanned and selected the WAN and saved I lost the LAN (not sure if that’s right, but I think its reasonable if the WAN is a different channel).

Anyhow, the config was all wrong and I tried a config restore and the router never came back. I had to do a reset and reconfigure it all. I did not put 2 and 2 together, but when I was traveling, I had to reset the router twice. I chocked it up to the hotel wireless, but now am not sure. Until recently resetting was not an issue, but now I have added a number of packages, so the connection issue is an issue. It took about 40 minutes to rebuild things.

I will be more cognizant going forward regarding connections, but it may be some time until I can properly do some testing.

AR-150 on 2.13FW

Packages installed: OpenVPN and Tethering

So, I had the chance to retest the wireless and can affirm that when I go to a new location with a different WWAN connection that I can not access the GLI GUI over wireless. I need to connect a cable to config the wireless.

I logged in with WinSCP and deleted the section from the wireless config relating to the station. Specifically the entire ‘config wifi-iface’ section with the line ‘option mode ‘sta’’ in it. Saved the file and rebooted the router.

The router returns with the LAN side now up and available.

I can now use the GLI Gui to connect to the desired STAtion. The device then shuts down the LAN side wireless to match the config of the station and restarts. All is good… mostly. I still need to reconnect my Laptop to the AR-150 because when the AR-150 wireless restarted the laptop went and found itself another network to connect to. This will not always be the case, but can be.

OK, but there is still a problem, as I need a cable to connect and run WinSCP to delete config section. This forum post has the solution:

I added the following code to the Luci=>System => Startup => Local Startup (rc.local) section, and it will remove, on boot, the ‘sta’ config.

Wireless Reset

This will remove the WWAN Connection on boot and allow the WLAN to connect.

mode=$(uci -q get wireless.@wifi-iface[1].mode)
if [ “$mode” = “sta” ]; then
uci delete wireless.@wifi-iface[1]
uci commit wireless
uci commit network

The disconnect of the WLAN still occurs, but I do not need the cable. And yes it’s not seamless if you connect to the same WAN all the time, but if you don’t…

For a different approach, this link will scan through a list of saved and disabled STAtions, keeping the current if available, or looking for another in the list and making it active. It’s more in line with what I am looking for, but beyond my skills I think.

Again, I’m liking the two radio solution.

If you configure using Luci, the problem is, there is a checkbox which is checked by default, if you didin’t uncheck it, your new sta configuration will replace your ap. No idea why this is the default configuration. But in our own UI there is no such problem.

On Ar150 there is a switch and button, which can solve some of your problems.

You can configure the switch to turn on/off your sta interface. In case your wwan is not there, you can just move the switch to bring your ap back.

Well great minds think alike, or at least similar. I was thinking that the button would be a better option for resetting the router (deleting the STA config section). The switch seems like a better tool for turning on and off the wifi (WWAN).

Does the button disable the WWAN or all wireless? I assume it just adds option disabled ‘1’ ??
Unfortunately no clue as to how to do this. The info is not detailed enough for one with my skill level. Maybe some detailed blogs or written instructions on these tools would help.

Back to the real problem, I am mostly using the GLI GUI, the problem is still there is no LAN to connect to if the WAN can not find it’s connection. The script above works, but it’s a problem when the PC goes to sleep. It would be a perfect button (or switch) script.

The button active the script /etc/rc.button/reset

The switch active the script /etc/rc.button/BTN_8

just edit this two files, you can find the clue. Here is a post for same applications.

Thanks for the pointers

It looks like 2 different approaches, and I do not know the good/bad if any.

The link you provided appears to disable the current wireless (disabled=1) and enable the Ethernet on the WAN interface, as opposed to just deleting the entire wifi-iface above. I am not smart enough to know if there are pros or cons to the different approaches, however it seems like it’s safer to change the one file. If the wireless station is disabled, does one even need to change the Ethernet on the WAN at all?

Also is is better practice (I think) to put the code in a file in user bin and call it from the button script?