SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using a linux (slackware) box in an environment with several APs, all with same SSID and same auth. A couple of them are actually wireless repeaters.
An android phone can dynamically disconnect from an AP with very poor signal if it senses and AP of the same SSID with stronger signal (this can take up to a minute).
I have configured my linux box with rc.wireless.conf and wpa_supplicant.conf (WPA2 personal, PSK) for a stable config in this network.
How can I configure it to connect to the AP with the best signal? Apparently my box prefers only one AP, regardless the much stronger signal of another, nearby. Of course, forcing the MAC of an AP would not be preferred.
How can I reproduce the behaviour of Android phones to prefer best signal and switch AP if (significantly) better signal AP available?
I am specifically asking about rc.wireless configuration, not NetworkManager, here.
My main focus is to have the network up and running at startup using rc.inet1 and rc.wireless because this ensures I have network (and I need it) before some daemons start up later.
Having NetworkManager configure the network I get connectivity about 30 sec. after the login prompt (and of course after all services have already started, but some missed a data initialization).
So the primary concern is how to connect to the best signal AP with that SSID at startup.
Second concern is switching APs later, based on signal strength.
My brief research points to the wpa_supplicant module "bgscan" which sounds relevant. Based on what I see in /usr/doc/wpa_supplicant-[version]/wpa_supplicant.conf.sample, it might be sufficient to add
Code:
bgscan="simple:30:-45:300"
to your wpa_supplicant.conf, playing with those numbers if necessary. You can look over the documentation. Hope this helps.
Quote:
If this doesn't exist already, you could get signal levels with iwlist in a cron job and choose the best signal.
For the record, you can get signal strength readings using wpa_cli, a direct interface to wpa_supplicant, instead of iwlist (a lower-level utility which may not be 100% on the same page as wpa_supplicant). You can trigger a scan with
Code:
wpa_cli scan
and print the results with
Code:
wpa_cli scan_results
(which you can process as desired using cut, awk, or whatever if you end up having to go the cron job route).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.