Android Question getBSSID

Philip Prins

Active Member
Licensed User
Is there a way to get the BSSID (Mac adress) of the Accespoint i am connected to?
I noticed the WiFi libraries based on scan results but i want a solution to retrieve it directly.

Added in API level 1
public String getBSSID ()

Return the basic service set identifier (BSSID) of the current access point.

The BSSID may be null, if there is no network currently connected. "02:00:00:00:00:00", if the caller has insufficient permissions to access the BSSID.

How to use this in B4A?

Philip Prins

Active Member
Licensed User
I think that you should use this library:

I see that there is an isConnected property that you can use.
Thanks Erel,

Found it.
    If reading.IsConnected = True Then
            BSSID = reading.BSSID
            SSID = reading.SSID
            If SSID.Contains("my-button") Then
                btnWrite.Visible = True
                BSSID = BSSID.ToUpperCase
                BSSID = BSSID.Replace(":","")
                ButtonMac = BSSID
                btnWrite.Visible = False
            End If