ESPHome device fails to connect mesh AP

Not sure if the solution would be in ESPHome at all but it looks like deep sleep is keeping devices from connecting to strongest mesh AP.

  • Router (R1) Asus RT-AX92U as main router in mesh setup.
  • Router (R2) RT-AX92U as mesh access point.
  • ESPHome sensor (S1) D1 mini with BME280 on battery.
  • Second sensor (S2) like S1.

S1 is at 2 meters from R2, 8 meters from R1.
S2 is at 6 meters from R2, 12 meters from R1, in exactly one line from R2, behind S1.
Both sensor locations show FAR best signal strength from R2 mesh point.
S1 always connects to R2 after deep sleep. As expected.
S2, furthest away from R1, always connects to R1 after deep sleep, causing intermittent bad connection.

Can I force S2 to connect to R2, the closest mesh point with best signal?

I’ve set R2 as preferred AP for both sensors in ASUS WebGUI… in vain. S2 keeps connecting to mesh point furthest away.
Both have static IP with R1 as gateway.

Anyone?

OK. Looks like there is no solution, except for some ESP32: here.

You can try using the network option in the WiFi config to define the BSSID of the AP you want each one to connect to.

1 Like

That WiFi component documentation only mentions SSID as possible value. So I was in the dark at first. Modified ‘ssid’ in my yaml by ‘bssid’ and look… the device sees and connects to only that AP!
Thanks a million!

So

wifi:
  networks:
  - ssid: FirstNetworkToConnectTo
    password: VerySafePassword
...

can also be

wifi:
  networks:
  - bssid: MAC-addressOfFirstAPToConnectTo
    password: VerySafePassword
...
1 Like