by supakeen on 3/15/25, 11:12 PM with 80 comments
by phoronixrly on 3/16/25, 12:52 AM
The prominence and accessibility (to laymen) of wifi does not help the situation either... I mean what else CAN they do except try stuff out, how are they going to determine that it worked and why it did?...
OP, yes, poorly implemented power saving has in my experience often been a culprit behind network reliability issues. That said, please consider adding a disclaimer that just disabling power saving in client devices without pinpointing the root cause of the instability or at least reporting it is exactly why we are in a situation where it is still buggy.
by rahimnathwani on 3/16/25, 12:37 AM
YMMV but adding a loop of wire in parallel with the oscillator improved wifi performance on mine.
(I first tried moving the ceramic antenna a millimeter outward, but that made no difference.)
by Calamityjanitor on 3/16/25, 1:05 AM
Came across even more 'work arounds'; No spaces in the SSID, disable IPv6 for the whole network even if the ESP ignores it. Thing is all of these settings would reboot the router and reconnect everything, so it would seemingly work until the next dropout.
I found limiting them to 802.11g instead of connecting with 'n' stopped the dropouts for good. Even now I wouldn't say that is a cure-all and that any of these other recommendations don't work, I'd guess that each AP's firmware might have different conflicts with different devices.
by zamadatix on 3/16/25, 12:42 AM
In Wi-Fi it's always the client's choice on where to connect to at the end of the day and any hacks the APs try to do to steer clients are "suggestions" at best and "signal ruiners for everyone" at worst.
You may be better off specifying which specific AP you want to connect to by specifying the BSSID argument in the WiFi.begin() call on the ESP32 side https://github.com/espressif/arduino-esp32/blob/master/libra...
Alternatively, if you REALLY want to force it, the sanest way is to use a uniquely named IoT SSID on each AP so there would be no other option for those clients to choose to latch on to (and you can leave the other SSIDs shared for normal clients). E.g. "IoT-1", "IoT-2", "IoT-3" on 3 separate APs. It may clutter up device screens more when you list available networks but it's just visual because, as far as airtime, they all beacon just as often if the names are the same or not anyways.
> From what people and the internet tell me you should set the band width on the 2.4 Ghz network that your boards use to 20 Mhz, not 40, not 60, and definitely not automatic.
This is spot on in that 20 MHz is the ideal channel width on 2.4, doubly so for just an ESP32. Some things to add are I'd say it should apply to any of your 2.4 GHz networks unless you live out the sticks and really want to race a few extra mbps out at the fringe of your AP coverage (and even then the wider channel width is probably going to make your SNR worse even in the sticks). Also, I don't believe the ESP32 supports 60 MHz in the 2.4 GHz space at all (it's certainly not an option in the Wi-Fi standard).
I'll also tack on that the ESP32-C6 can be worth springing for if these kinds of thing are a particular concern as it support Wi-Fi 6, which has a few enhancements for connecting lots of IoT devices without so much noise.
by shadowpho on 3/16/25, 1:52 AM
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
by yjftsjthsd-h on 3/16/25, 4:51 AM
by denkmoon on 3/16/25, 12:31 AM
by leptons on 3/16/25, 1:36 AM
This is not a characteristic of "ESP32", this is how the software running on the ESP32 is programmed to work, whatever specific program that is. And it is not my experience at all with "ESP32s". In my ESP-IDF based program, the ESP32 device connects to access points exactly how I tell it to connect with the software I wrote that deals with wifi connections. YMMV.
by freen on 3/16/25, 3:24 AM
Combine that with very few “knobs” to turn on the esp32 framework, a router/wifi AP that is likely hostile to its owners, and well, superstition is pretty much all that is left.
It’s a demon haunted world.
Take note, those who dream of llms operating everything include each other: “prompt engineering” is just a fancy euphemism for grimoire, and when it’s all massive, inscrutable matrices deciding everything, well, you too might just feel it’s not a bad idea to build a shrine.
by sourtrident on 3/16/25, 3:59 PM
by ryao on 3/16/25, 6:54 AM
This is not a superstition for 2.4GHz. Other devices sharing 2.4ghz tend to malfunction when 40MHz channels are in use. This is a well known phenomenon. I have been able to reproduce it in my household by enabling 40MHz channel support for 2.4GHz on my ruckus APs while listening to audio from a Bluetooth speaker. The Bluetooth speaker will start having discontinuities in the audio stream that disappear when 40MHz support in the APs is disabled.
by briHass on 3/16/25, 1:57 AM
I've always turned off power saving and given them hard coded IP settings (no DHCP). The only time I saw anything wonky is a short-lived experiment with the 32's deep sleep not reliably connecting on wakeup.
Mostly ESPHome now, two of the basic Uniquiti pucks from a few years back, for reference.
by riobard on 3/16/25, 5:52 AM
Solved it by creating a dedicated IoT SSID advertising just WPA2 w/ AES and only on 2.4GHz w/ 20MHz (you shouldn't use 40MHz on 2.4GHz anyway for god's sake).
Here're some useful tips to tune WiFi for IoT https://www.wiisfi.com/#iotconnect
by stavros on 3/16/25, 12:53 AM
Here's the board, it's a bit of a generic light/motion/presence sensor with an IR LED:
by eternityforest on 3/17/25, 2:11 AM
I wonder if there's some special high security setting or OpenWRT router or something that they don't like?
Whenever tech people say something is unreliable, I sometimes wonder if they're using it in a non-stock way, and if that is part of what causes the issues.
by pabs3 on 3/16/25, 3:35 AM
by rkunde on 3/16/25, 5:11 PM
by maujim on 3/16/25, 4:53 AM
> seriously, open up a device and changes are relatively large that you’ll find one
s/changes/chances
by JKCalhoun on 3/16/25, 5:26 PM
Maybe there was a way to turn off the Wi-Fi stack. But I suppose the general point still stands — that there are plenty of other small devices without Wi-Fi if that is not a requirement.
by mrtesthah on 3/16/25, 12:46 AM
https://www.tarlogic.com/news/backdoor-esp32-chip-infect-ot-...