I have been working for a while with the ESP8266 I have a question:
According to the online documentation of GitHub from the esp8266wifi library I can initialize the WiFi in Station mode to (obviously) connect to a nearby AP, I can initialize the station mode in 3 "different ways":
WiFi.begin (): The module initializes the Station mode and connects to the last network that is connected, because the credentials (SSID and Password) are stored in its internal memory (flash?).
WiFi.begin (ssid, password): The module initializes the Station mode and connects to the network with "ssid" and "password".
WiFi.begin (ssid, password, channel, bssid, connect): The same as the previous one, only that you pass more parameters: the one that interests me is the bssid, which is the MAC address of the AP to which I am going to connect.
Now comes the question: if I wanted to use the last mode, because I want to make sure that the ESP connects ONLY to an AP (a kind of MAC filtering), I also have to specify the channel and set the connect parameter? Or I can simply use something like this:
WiFi.begin ("MyOwnNetwork", "123456789", "00: 1B: 44: 11: 3A: B7")
I can not prove it right now, I do not have the module in my hands.