Linux picking the best access point in a WLAN with repeaters

In many larger WLAN setups you’ll find repeaters or extenders which spread the WLAN to farther places on the floor. Often they are set up in such a way that they use the same WLAN name (SSID) and password. In that case the WLAN hardware on your laptop will pick the best access point and connect to it. As far as I understand, Ubuntu won’t influence that decision but instead leave it to the WLAN driver / hardware. If there are multiple access points in reach there might be several outcomes:
1. Your laptop connects to the strongest WLAN and stays there and everything is fine.
2. Your laptop connects to the strongest WLAN and stays with it even if the signal deteriorates so much that it would be better to connect to a different AP (access point). Now you’re stuck with a bad connection.
3. Your laptop immediately drops a bad AP for a good one, constantly reconnecting and thus dropping your network connections all the time. Now you’re stuck with an unstable connection.
I found myself stuck with the 2nd situation and wrote the wifi-picker script [1] which will pick the best AP that serves a specific SSID. For example, assume you are already connecting to a WLAN called “home_wifi” which consists of a router in the living room and a repeater in the kitchen. You switch your laptop on in the living room, so it connects to the router AP. Now you take the laptop to the kitchen, but it stays connected to the router AP instead of connecting to the repeater AP.
Now run the wifi-picker script, as root, from the command line:
sudo wifi-picker wlan0 home_wifi
It will construct a list of all APs serving the home_wifi WLAN and reconnect to the one with the best signal as reported by the iwlist tool.

Resources

[1] wifi-picker

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.