Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>It seems that when an ESP32 connects it goes straight for the first access point it sees.

No! You as programmer control that. You can configure to connect to any AP you want.

My code does a scan and save the closest AP. If it can’t connect it does another scan and saves a new AP



I think they're claiming that it won't roam between APs with identical SSIDs.


It’s up to you as the programmer! The library literally gives you the power to roam/connect to whatever you want whenever you want.


Yea, it's not super clear but that's indeed what I meant to say :)


Then change your code.

Every AP has a bssid (MAC address) that you can use to connect to specific AP.

It’s up to the code to figure out which one to connect to. The libraries have all the options.

When you do a scan you get bssid of the AP and strength of each signal. You can make a determination of when to rescan and reconnect.


I do actually see the problem that the ESP32 doesn't automatically reconnect to the stronger AP. I think this gets triggered when then stronger AP is briefly unavailable (reboot or radar scan or whatever) and it switches to the weaker AP, but then once the stronger AP is back it stays connected to the weak AP. (This is with multiple APs in a mesh configuration)


> ESP32 doesn't automatically reconnect to the stronger AP

How would it know to reconnect to stronger AP?

You can order it to do a background scan and reconnect to stronger AP if you want, but you have to figure out how often to do this and how to interleave other data during the scan.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: