Increase gl_health reconnect frequency on AR750S

Hi,

I am permanently connecting in repeater mode to a hotspot which has low signal quality and considerable noise. I cannot get closer to it unfortunately. Sometimes the connection is stable and works very well for hours, sometimes it disconnects every few minutes. gl_health seems to be doing a good job at reconnecting, but it takes a long time to do so - about 1 or 2 minutes. At times where the hotspot disconnects every other minute that means a lot of downtime. Is there any way I can increase the gl_health reconnect frequency?

Thank you!

Actually you are suggested to turn the program off directly.

It is used to reconnect to a list of save networks, especially when used in signal radio routers. It make sure the wifi can be broadcasted if repeater cannot be connected.

But as your are using AR750s which is dual-band router, it is ok to turn it off so that one of your radio is connected to the hotspot always.

/etc/init.d/gl_health stop
/etc/init.d/gl_health disable 

@alzhao thank you for your answer. I have tried turning gl_health off before by renaming the binary. This resulted in the router not reconnecting at all when temporarily loosing connection to the hotspot.

Not reconnecting at all sounds worse than reconnecting slowly. Am I missing something?

I see. Seems the router locks BSSID. Locking BSSID will result stable connection if the AP is good. But if the AP is not reliable don’t need to lock BSSID.

Here is what you can try.

First keep the gl_health disabled.

Second, ssh to the router and remove the BSSID settings in wireless station configuration. In /etc/config/wireless

ok, I disabled gl_health, commented out the BSSID line in the config config wifi-iface 'sta' section, which also mentioned the ssid of the hotspot I am connecting to. Then I rebooted the router. After the reboot, the ar750s reconnected automatically to the hotspot, so that’s very promising. I am now waiting for the first connection loss to see if automatic reconnecting works as desired.

Thank you so far. I appreciate the quick responses! Thank you alzhao! I will report back when I saw a disconnect or reconnect.

Btw, have you guys considered open sourcing gl_health? Might allow the community to help make it bullet proof and even give your company more exposure i.e. more customers in the openwrt space. I have been a software engineer at for-profit companies for many years and have only had good experiences with open sourcing non-mission-critical code, especially when it can be useful to others.

so funny thing. I did /etc/init.d/gl_health disable but after a reboot, it is running anyways. I checked ls /etc/rc.d/ but gl_health is not linked there. still it is running and the parent process id is 1. Will try again with renaming the gl_health binary to prevent it from running

ok, so I renamed /usr/bin/gl_health to /usr/bin/gl_health_ and rebooted. The AR750S connected to the hotspot at startup. But when it lost connection at some point it would not reconnect. So it looks like your recommendation did not help.

Maybe if you explain what the idea was it would help? Why disable gl_health and why would it automatically reconnect without a bssid?

actually, nevermind, something had re-written the /etc/config/wireless without commenting out the bssid. I commented it out again and now it looks like the connection survives the ap not being available. Will observe and report back

Yes, removing the bssid is necessary.

Thanks. Can you give me some background on how removing the BSSID helps? In my case there is only one access point for the hotspot I am repeating.

So observing for a few days, it seems that with gl_health disabled, the wifi manages to survive much more often, but eventually will still get disconnected. I am now running

while true; do date; ping -w 3 -c 1 172.17.2.1 || { ubus call network.wireless down; sleep 3; ubus call network.wireless up; echo up; sleep 90; }; sleep 3; done

in the background, which seems to make it survive most longer outages. There are still some other problems with the hotspot de-authenticating me occasionally. I am running a re-auth script as well, but sometimes the captive login page of the hotspot seems broken, however rebooting the AR750S fixes it, which is confusing. But it’s hard to pinpoint what’s happening exactly.

By using BSSID, it locks to one certain AP. When there are many AP broadcasting the same wifi SSID, by removing BSSID the router can pick up other AP if the one it is connecting disappear.

That makes sense. In my case there is only one AP, so I assume the locking doesn’t make a difference?

you are correct about this.