by Vurdentium · 1y ago · 0 comments
If you're going to write a blog about how the ESP32 doesn't connect to the strongest AP so you need to pin it to a specific BSSID in your router settings... Maybe you shouldn't be writing that blog. If you haven't taken at least a moment to check documentation and see that the behaviour you want is already an option that can be selected by changing literally one line in your ESP32's WiFi config. Instead this pseudoscience proliferates.
Instead of spending x2 the initial effort to fix the root cause, you spend x1 the initial effort to implement jank and then spend x10 the effort down the line maintaining the jank.
Sounds like a "good enough" shitty solution to me, which is kind of the whole point of DIY.
It's literally one word to change in his WiFi config to get the behaviour he wants. It's already implemented. Who can't "deal" with that?
wifi_connection_config_t config = {
.ssid = "my_home_wifi",
.password = "secret123",
/*
implicitly initialised to default:
.method = CONNECT_TO_THE_FIRST_AP_THAT_RESPONDS,
*/
}
to wifi_connection_config_t config = {
.ssid = "my_home_wifi",
.password = "secret123",
/* explicitly initialise: */
.method = CONNECT_TO_THE_AP_WITH_THE_STRONGEST_RSSI,
}
It's that simple.