wpa_supplicant : Blacklist wireless networks by BSSID

7,578

Solution 1

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.

Solution 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

Solution 3

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.

Share:
7,578

Related videos on Youtube

Axel Isouard
Author by

Axel Isouard

Updated on September 18, 2022

Comments

  • Axel Isouard
    Axel Isouard over 1 year

    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
    Axel Isouard over 11 years
    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.
  • Ory Band
    Ory Band almost 5 years
    This answer does the trick without having to hack around.
  • zertyz
    zertyz over 2 years
    I guess you meant "bssid_ignore"