[WIFI] Added macros for ESP - WifiGMode and WifiPower to reduce/eliminate Wifi interference on sensors like HC-SR501 (#1531)

* Fix WiFi interference on PIR

* Added to DOCS re: WiFi interference.

* Add sufficx -custom to configs without prod binaries

* Add ESP32 Wifi band and tx power to user_config.h

---------

Co-authored-by: andre <agreylin@gmail.com>
This commit is contained in:
Die Peter Panandandre authored and GitHub committed 2023-03-16 17:50:14 -05:00
1 parent d530841b0e
commit 3b4af96990
4 files changed
+101

No files matched your search

+7
View File
@@ -13,6 +13,13 @@ On M5Stack boards you may do a long press to these buttons in low power mode 0 (
You can also do a long press when powering the board to reset it, this press must be done during the first 5 seconds after the start.
### Wifi interference on ESP32 ###
Certain sensors like HC-SR501 is prone to generate false signals / triggers when used on a ESP32 with Wifi enabled. To reduce or elimate the effect the board must be put into Wifi B/G with lower TX power.
This can be achieved with the following macro, `WifiGMode` defined true and `WifiPower` to e.g. WIFI_POWER_11dBm.
Since the WiFi protocol is persisted in the flash of the ESP32 you have to run at least once with `WiFiGMode` defined **false** to get Band N back.
### Low power mode for ESP32
OpenMQTTGateway support a low power mode for ESP32, this mode is available per default on boards with batteries. The other boards needs to have the macro `DEFAULT_LOW_POWER_MODE` defined at 0, 1 or 2 to use it. More information about the modes is available into User_config.h.