Chat freely about anything...

User avatar
By metalphreak
#16080 Scan for strongest signal and use the BSSID. Then make sure bssid_set = 1 and bssid = bssid of strongest AP before you call wifi_station_set_config

Every AP will have a unique BSSID regardless of the SSID set. The below is from the v1.0.1 SDK, so it might have been added recently?

Code: Select allstruct station_config {
 uint8 ssid[32];

uint8 password[64];
 uint8 bssid_set;
 uint8 bssid[6];


BSSID as MAC address of AP, will be used when several APs have the same SSID.

If station_config.bssid_set==1 , station_config.bssid has to be set, otherwise, the connection will fail. 

In general, station_config.bssid_set need to be 0.
User avatar
By Stefan73
#16218 Thanks for the information. Need to try it and it may provide a work around for some cases.

I guess this is still not a real solution. AFAIK you cannot scan for networks while you are connected. WiFi roaming (which is part of the basic standard) needs to do this, to keep connected to the best AP.