Skip to content

Unable to connect to WiFi with duplicate SSIDs #180

Open
@banksfinn

Description

@banksfinn

Problem

Currently, I'm unable to connect to my wifi network due to having multiple access points with duplicate SSIDs. There is no method for explicitly stating the BSSID or otherwise filtering down the SSIDs to prevent this issue.

Error:
('No such ssid', b'SSID in Secrets')

Tested

This was tested on an Adafruit Matrix Portal, using the guide listed here: https://learn.adafruit.com/adafruit-matrixportal-m4/internet-connect

This was first tested by the direct esp.connect_AP, then subsequently tested out using WifiManager.

Solution

I'd love the ability to either explicitly state the BSSID, or default to connecting to the closest SSID.

I've made a branch for the WifiManager C++ code (here: https://github.com/banksfinn/WiFiManager), but realized this will need to be 2 part solution. This is the relevant thread I worked from: tzapu/WiFiManager#221

Does anyone have any guidance of next steps for this repo?

Hardware

Adafruit Matrix Portal
Wifi Mesh System

Activity

anecdata

anecdata commented on Aug 16, 2023

@anecdata
Member

Connecting by BSSID as you note isn't currently implemented in this library like it is for native wifi.

The NINA firmware will already try to connect to the best access point with the given SSID. This is done by the underlying Espressif esp-idf call. I'm not sure why it doesn't work in your environment, I have many APs with the same SSID, and ESP32SPI devices can connect without issue.

My reading for what would be needed for ESP32SPI to connect using the BSSID of a particular AP...

This library's connect (wifi_set_passphrase) function would need the bssid parameter added.

The NINA firmware would need to be updated with the bssid parameter added to the setPassPhrase function.

However, the Arduino function called by NINA, WiFi.begin (see also), doesn't appear to support bssid as a parameter, so it might have to be re-implemented. This could be a complex development task, but the bones for it seem to be present.

trezm

trezm commented on May 27, 2025

@trezm

I see this issue is quite old, but wanted to add that I see the exact same issue. Here's the printout from the example wifi running:

ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. 1.2.2
MAC addr: <redacted>
        Daedalus                RSSI: -56
        Daedalus-guest          RSSI: -56
        Daedalus                RSSI: -60
        Daedalus-guest          RSSI: -61
        Daedalus                RSSI: -63
        Daedalus-guest          RSSI: -63
Connecting to AP...
could not connect to AP, retrying:  ('No such ssid', b'Daedalus')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @trezm@anecdata@banksfinn

        Issue actions

          Unable to connect to WiFi with duplicate SSIDs · Issue #180 · adafruit/Adafruit_CircuitPython_ESP32SPI