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?
struct station_config {
uint8 ssid[32];
uint8 password[64];
uint8 bssid_set;
uint8 bssid[6];
};
Note:
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.
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.