Live data from Hacker News

ESP32 WiFi Superstitions

supakeen.com

1–10 of 86 posts

Re: ESP32 WiFi Superstitions

#3
If you have an ESP32C3 board with poor wifi performance, check if it's a boad with poor design that has the ceramic antenna is too close to the oscillator: https://roryhay.es/blog/esp32-c3-super-mini-flaw

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.)

Re: ESP32 WiFi Superstitions

#4
> If your network hardware allows it, you should pin the device to the closest one.

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.

Re: ESP32 WiFi Superstitions

#6

> If your network hardware allows it, you should pin the device to the closest one. 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…

Yes this is a skill issue.

But Arduino ecosystem is full of superstition and bizarre hacks. It's cargo cult electronics. They will do anything to avoid reading documentation or writing robust code.

Even the power saving recommendation here reeks of it. There is no effort to understand it. Someone on an Arduino forum recommends it, others start to echo it to try to appear like they know what they're talking about, it becomes lore in the Arduino world and you out yourself as a clueless newbie if you don't know to do esp_wifi_set_ps(WIFI_PS_NONE) without questioning anything because that's just the way it's done. It disables the radio in between AP beacons, so unless there's a bug in the implementation it should have no noticeable impact to a quiet WiFi station other than saving a lot of power.

Re: ESP32 WiFi Superstitions

#7
post #2

2.4Ghz WiFi networks should use 20Mhz bands generally. No idea about specifically with ESP32s, but this is good guidance for not congesting the 2.4Ghz space.

I second that. In my experience forcing a 40MHz channel on a 2.4g network leads to abysmal performance (never tried it with ESP32, however I can imagine it would be even worse...).

Re: ESP32 WiFi Superstitions

#8
Props to OP for using the term 'superstitions'. Wi-fi (and radio in general) is poorly understood even by people with engineering degrees, let alone the average Joe. This often leads to trying random stuff until an improvement is perceived (or believed to be...), then spreading this experience as proven and applicable in any context with no further research and confirmation of the results (let alone filing bug reports).

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.

Re: ESP32 WiFi Superstitions

#9
I created some sensor boards based on the ESP8266, they worked well for a while but lately they've been getting flaky. I'm a mediocre hardware engineer at best, so if anyone has any tips on how to make my board more stable, they would be appreciated.

Here's the board, it's a bit of a generic light/motion/presence sensor with an IR LED:

https://gitlab.com/stavros/sensor-board

Post reply on HN