Page 1 of 1

How to force use of a Wi-Fi BSSID

Posted: Sun Feb 04, 2024 9:04 pm
by edr

I'm temporarily on a network with multiple AP's that use the same AP names (SSID's) but provide different un-bridged IP ranges that can't talk to each other.

For this reason I'd like to force the MiSTer to use a specific BSSID (specific AP) so that it can be on the same IP range as my laptop.

In /media/fat/linux/wpa_suplicant.conf I tried changing from using the ssid line to a bssid line instead (bssid="xx:xx:xx:xx") but Wi-Fi doesn't come up at all after I made the change (pretty sure I properly copied the correct bssid value).

Is this the correct approach to forcing a specific bssid or is there some other approach I need to take?

Thanks IA!


Re: How to force use of a Wi-Fi BSSID

Posted: Mon Feb 05, 2024 3:45 am
by aberu

How did you get the MAC for the specific AP? Did you use "iwlist wlan0 scanning" on the MiSTer?

don't forget to use the key_mgmt in the network brackets as well

Code: Select all

network={
        bssid=AA:BB:CC:DD:EE:FF
        psk="*********"
        key_mgmt=WPA-PSK
}

The key management method has to be declared explicitly I think so that linux will mix it with the password with whatever method that network allows (WPA-PSK, WPA2-PSK, etc...).

Otherwise, if that doesn't work, you will need to calculate the PSK correctly yourself via wpa_passphrase like so:

Code: Select all

/root# wpa_passphrase mynetwork mypassword
network={
        ssid="mynetwork"
        #psk="mypassword"
        psk=69e49214ef4e7e23d0ece077c2faf3c73f7522ad52a26b33527fa78d9033ff35
}

Re: How to force use of a Wi-Fi BSSID

Posted: Mon Feb 05, 2024 6:20 am
by edr

@aberu super helpful thanks for all the tips!

Finally something like the following worked for me (generated the psk using your wpa_passphrase suggestion where mynetwork is the ssid and mypassword is the plain text password for the AP(s) with that ssid)

Code: Select all

# cat /media/fat/linux/wpa_supplicant.conf

ctrl_interface=/run/wpa_supplicant
update_config=1
country=US

network={
	bssid=AA:BB:CC:DD:EE:FF
	psk=09sdfs90fisd09fis09fsidf09sdkf0sdfks0dfksd0fksd0f9skdf0k
}

Before this I tried bssid with plain text psk and key_mgmt=WPA2_PSK and this did not work for some reason.