B4R Question Connect the ESP8266 to an Accesspoint with an specific MAC address

Chris160179

Member
Licensed User
Longtime User
Hello everybody,

is there a way to connect the ESP8266 to an specific Mac address of Accesspoint.
I have 3 Accesspoints, every Accesspoint has his own MAC address but the same SSID.

The ESP8266 connects somtimes to the wrong Accesspoint not really in range.


Thank you
 

bdunkleysmith

Active Member
Licensed User
Longtime User
I am using rESP8266WiFi v1.50 and it seems Connect3 connects to the network even if the BSSID is not correct.

Is this the expected functionality?

That is if BSSID matches an access point then that is the one connected to, but if there is no matching BSSID then any randomly selected access point with the correct SSID and password will be connected to.

I presume the syntax of my code is correct:

B4X:
    GlobalStore.Put(2, wifi.ScannedBSSID(i)) 'BSSID



    If wifi.Connect3(bc.StringFromBytes(GlobalStore.slot0), bc.StringFromBytes(GlobalStore.Slot1), 0, GlobalStore.Slot2) = False Then
        Log("Error connecting to network")
        Return
    Else
        Log("Connected to network: ", GlobalStore.Slot0)
        Log("MAC address: ", GlobalStore.Slot2)
    End If

If I put in a random hex string, say "F81A6742DC95", in lieu of GlobalStore.Slot2, then it still connects to the network and so I am wondering how I know when I put in the correct BSSID that I'm going to connect to the correct access point.
 
Upvote 0
Top