-->
Page 1 of 2

Choose between multiple access points with same SSID?

PostPosted: Sat Sep 19, 2015 11:20 am
by torntrousers
Is there any API that lets you choose an access point when there are multiple access points in range with the same SSID?

Re: Choose between multiple access points with same SSID?

PostPosted: Sat Sep 19, 2015 11:56 am
by kriegste
From the manual:

Code: Select allstruct 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.


Edit: Oh, I just saw, you use the Arduino stuff... I have no idea then.

Re: Choose between multiple access points with same SSID?

PostPosted: Sat Sep 19, 2015 2:47 pm
by igrr
Basically, you first have to choose an AP, and then pass its BSSID to WiFi.begin:

WiFi.begin(const char* ssid, const char *passphrase, int32_t channel, uint8_t bssid[6]);
source

Note that if you want to pass bssid you also need to set the channel number.

Getting BSSID and channel number from scan results is possible by calling WiFi.BSSID(index) and WiFi.channel(index).
source

Re: Choose between multiple access points with same SSID?

PostPosted: Sat Sep 19, 2015 5:12 pm
by SoC
torntrousers wrote:Is there any API that lets you choose an access point when there are multiple access points in range with the same SSID?

are these ap with same ssid have same password also?