Skip to content

Conversation

AxelHamburch
Copy link

The user Buger Dread has given good advice in the MakerBits group regarding the instability of the Wifi connection of an ESP32.

https://t.me/makerbits/20423

By default, the ESP32 scans for access points numerically. The first one is taken. However, the first one does not have to be good.

There is an extended command WiFi.setScanMethod for the ESP32 which forces a scan of all APs before an AP is selected.

https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/src/WiFiSTA.cpp#L230

This must be done before the actual call WiFi.begin.

I tested the code change on a bitcoinSwitch and it worked.

@dni
Copy link
Member

dni commented Sep 9, 2025

seems to work fine! i added it to our boilerplate project, soon it will make it into switch aswell... i will close your pr at that point.
lnbits/hardware-installer#19
added this pr and your username in the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants