How to force use of a Wi-Fi BSSID

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
edr
Posts: 122
Joined: Mon Jan 04, 2021 3:35 am
Has thanked: 37 times
Been thanked: 29 times

How to force use of a Wi-Fi BSSID

Unread post 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!

User avatar
aberu
Core Developer
Posts: 1192
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 247 times
Been thanked: 411 times
Contact:

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

Unread post 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
}
birdybro~
edr
Posts: 122
Joined: Mon Jan 04, 2021 3:35 am
Has thanked: 37 times
Been thanked: 29 times

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

Unread post 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.

Post Reply