wpa_supplicant : Blacklist wireless networks by BSSID

4

I am currently using wpa_supplicant to connect to my wireless network. The wireless network is extended with at least 30 different access points having the same SSID, and it takes a lot of time to connect because 10 of them aren't working properly (timing out, taking a couple of minutes to acknowledge,...).

I would like to know if there is a way to blacklist the non-working access points from their BSSID so I can ignore them and connect faster to the wireless network by probing working access points only.

Axel Isouard

Posted 2012-09-11T11:29:29.623

Reputation: 271

Answers

4

You can use "wpa_cli blacklist xx:xx:xx:xx:xx:xx" just after wpa_supplicant starts. I don't know how sticky it is.

user270318

Posted 2012-09-11T11:29:29.623

Reputation:

2

You can also use network option bssid_blacklist, take a look for it in the example file: https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf

kikeenrique

Posted 2012-09-11T11:29:29.623

Reputation: 549

This answer does the trick without having to hack around. – Ory Band – 2019-08-07T07:28:31.503

1

Wire up this code to a command-line option.

I don't think there is any built-in setting to take care of this but basically you should be able to go to main.c, and wire up a command line option like --blacklist=00:11:22:33:44;55:66:77:88:99 (the BSSIDs separated by semicolons).

To make it persistent you'd have to store it in wpa_supplicant.conf but it's easy enough to replace wpa_supplicant with a wrapper that adds your --blacklist parameter.

If you manage to cook up a patch and it seems relatively bug-free and generally useful, you may want to submit it upstream.

NOTE: Intermediate knowledge of the C programming language is required to complete this task. If you don't have the knowledge, you may get better results by asking at another site like StackOverflow.

allquixotic

Posted 2012-09-11T11:29:29.623

Reputation: 32 256

Thanks for your advice, I'll try to fork it and see what I can do with it tonight by making a blacklist command and blacklisting AP in the config file. I'll post the details here once it's done. – Axel Isouard – 2012-09-11T14:01:43.733