Block WiFi Access Point by MAC address on DD-WRT using client mode WAN connection
As per Daniel's comment, startup.sh can modify /tmp/ath0_wpa_supplicant.conf
to include variable bssid=<mac of good ap>
in the network{}
declaration, followed by # kill -HUP "$(pidof "wpa_supplicant")"
to signal to wpa_supplicant that it should reload config.
This keeps the adaptor connected to an access point, blocking roaming to other access points.
- http://wiki.gentoo.org/wiki/Wpa_supplicant
- man wpa_supplicant
- (debian) /usr/share/doc/wpa_supplicant/README
To give you the straight answer, so you don't have to spend your time reading a whole dictionary:
On an ATHEROS based DDWRT device - so this does not work on Broadcom, it will work on yours if telnetting into the router and running 'ps' yields a process called wpa_supplicant
.
Go to Administration, Commands, and put this in and save as a Custom Script:
sed -i '7ibssid=xx:xx:xx:xx:xx:xx' /tmp/ath0_wpa_supplicant.conf
kill -HUP "$(pidof "wpa_supplicant")"
The first line inserts the line bssid=(mac address of upstream router)
at line 7 in the wpa_supplicant
, which should get it in the networking section. You can use less ath0_wpa_supplicant.conf
to see what range networking is in, at the telnet prompt in the folder /tmp
The second line as the first answerer states, restarts wpa_supplicant
.
The commands are copy-and-paste, as is. The only change you need to make is substituting the upstream AP's MAC for xx:xx...