openevse_esp32_firmware icon indicating copy to clipboard operation
openevse_esp32_firmware copied to clipboard

Multi-access point: weakest signal chosen

Open transplier opened this issue 2 years ago • 6 comments

I have a commercial WiFi setup with multiple access points creating a single network (happens to be Aruba Network gear). All my devices correctly connect to the strongest access point, except OpenEVSE - it seems to default to the weakest signal. If I temporarily power down all access points other than the one I want OpenEVSE to use, it does associate with the correct access point.... but then goes right back to the weakest one on reboot. Very strange. Does it somehow remember the MAC of the first access point it saw?

The issue persists even if I associate with a completely different network, then reconnect to the original multi-access-point network.

Aside, as a workaround... is there any way to force association with a particular access point, such as by MAC/bssid?

EDIT: Looks like ESPHome ran into similar issues (not sure why my ESPHome devices work correctly). https://github.com/esphome/feature-requests/issues/731

ESP-IDF has a roaming example, perhaps it could be integrated? https://github.com/espressif/esp-idf/tree/master/examples/wifi/roaming

transplier avatar Jul 04 '22 06:07 transplier

I had a similar problem, though in my case with Ubiquity as the network vendor.

Ubiquity allowed me to limit which AP OpenEVSE would associate with. Aruba might have the same?

Ultimately I created a unique SSID that only the single AP near the OpenEVSE broadcasts.

Obviously both are workarounds, but it's been stable.

davethetallguy avatar Jul 04 '22 12:07 davethetallguy

Good workaround idea. ~My Aruba doesn't seem to have such an option, sadly.~ EDIT: Oh, they call it "Zones". Workaround applied, still, would be great for it to select the strongest AP and/or support 802.11r/k/v.

transplier avatar Jul 04 '22 17:07 transplier

Looks like default behavior is to connect to the AP with the lowest channel. Looks like there is a way to scan signal strength also.

https://www.reddit.com/r/esp32/comments/nphj1c/how_to_connect_to_wifi_ap_has_stronger_signal/

On Mon, Jul 4, 2022, 1:26 PM Giacomo Ferrari @.***> wrote:

Good workaround idea. My Aruba doesn't seem to have such an option, sadly.

— Reply to this email directly, view it on GitHub https://github.com/OpenEVSE/ESP32_WiFi_V4.x/issues/385#issuecomment-1174023189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN5QH4LQ7ZGI5TN5VXKWRDVSMNF3ANCNFSM52SCT24A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

chris1howell avatar Jul 04 '22 18:07 chris1howell

Will look in to this, how are you checking the AP that is connected to, from the AP itself?

jeremypoulter avatar Jul 05 '22 15:07 jeremypoulter

how are you checking the AP that is connected to

From my AP's management interface.

transplier avatar Jul 05 '22 17:07 transplier

FWIW I found with mine some time ago it was connecting to the lowest channel number in range of multiple BSSIDs that it saw (regardless of signal strength).

My workaround was set up 2 networks - one with the BSSID, another the same SSID and no BSSID at lower priority. That way it roams if the expected AP goes down. Then on the "server side" I have HomeAssistant issue a reboot to ESPHome if it notices an access point go from "down" to "up" on the network (tested by pinging its management interface).

Really awful workaround but until they fix the bug for finding the strongest channel dynamically I couldn't find a better way.

mmiller7 avatar Jul 17 '22 18:07 mmiller7

Thanks to @KipK for finding the solution to this, will be part of #533.

For the record by default the Arduino library is setup to connect to the first matching SSID it finds, rather than scanning all available APs...

jeremypoulter avatar Feb 25 '23 13:02 jeremypoulter