Avoid WiFi channel 12-13-14 when working with ESP devices


Recently we are experimenting with Home Assistant installed on A20-OLinuXino-LIME2 Home server and attaching different nodes made with our ESP8266/ESP32 boards and noticed odd behaviour os ESP when WIFI router is set on the higher frequencies channels.

Most of WiFi router default settings are with channel Auto selection, this means the router will try first Channel 1 if too much noise and drop packets due to overwhelmed with WiFi devices area will change it up and so on, so our developers decided that it’s smart idea to use the WiFi router on the highest possible channel. This will guarantee that this channel will be most noise and interference free from other WiFi devices. So our router was set to WiFi channel 13:

We use the ESP standard firmware and ESPhome code. This is what happens: When the code is flashed for first time, it experience some errors while connecting but manage to connect to the router.

Access Point: TP Link
Hardware Version: Archer C1200 v2.0
Firmware Version: 2.0.0 Build 20170206 rel.46023 (EU)

SUCCESS CH13 (first attempt after flashing the code)
============================

[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -40 dB
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Association Expired'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:479]: Event: Disconnected ssid='OlimexTenda' reason='Probe Request Unsuccessful'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -52 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Association Leave'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[I][wifi:502]: WiFi Connected!
[C][wifi:350]:   Local MAC: 18:FE:34:9C:61:DE
[C][wifi:351]:   SSID: 'OlimexTenda'
[C][wifi:352]:   IP Address: 192.168.0.203
[C][wifi:354]:   BSSID: B0:4E:26:6E:B2:73
[C][wifi:355]:   Hostname: 'esp8266-evb-pir-9c61de'
[C][wifi:357]:   Signal strength: -56 dB 
[C][wifi:361]:   Channel: 13
[C][wifi:362]:   Subnet: 255.255.255.0
[C][wifi:363]:   Gateway: 192.168.0.1
[C][wifi:364]:   DNS1: 192.168.0.1
[C][wifi:365]:   DNS2: 0.0.0.0
[D][wifi:511]: Disabling AP...

As you can see from the above the ESP try to connect twice but gets error: ‘Association Expired’ and ‘Probe Request Unsuccessful’ but on the third attempt it connects.

The problem comes later if for some reason ESP lose power and start again. This could easily happen if the ESP is powered by the mains and there is power blackout and power restore.

FAILURE CH13 (after cold restart)
=================================
[C][wifi:037]: Setting up WiFi...
[D][wifi:046]: Loaded saved wifi settings: OlimexTenda
[D][wifi:370]: Starting scan...
[D][binary_sensor:036]: 'PIR Sensor': Sending state OFF
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -55 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[W][wifi:568]: Restarting WiFi adapter...
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[W][wifi:568]: Restarting WiFi adapter...
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -54 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[W][wifi:568]: Restarting WiFi adapter...
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[W][wifi:568]: Restarting WiFi adapter...
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -52 dB
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[W][wifi:568]: Restarting WiFi adapter...
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[I][wifi:135]: Starting fallback AP!
[C][wifi:198]: Setting up AP...
[C][wifi:200]:   AP SSID: 'esp8266-evb-pir-9c61de'
[C][wifi:201]:   AP Password: ''
[C][wifi:210]:   IP Address: 192.168.4.1
[W][wifi:527]: Timeout while connecting to WiFi.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -57 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Association Leave'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi:527]: Timeout while connecting to WiFi.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -56 dB
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Association Leave'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:479]: Event: Disconnected ssid='OlimexTenda' reason='Probe Request Unsuccessful'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -51 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[W][wifi:439]: No matching network found!
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -54 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -53 dB
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'ESP_CA17E1' (8C:4B:14:CA:17:E1) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -54 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -53 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[W][wifi_esp8266:213]: wifi_apply_hostname_(esp8266-evb-pir-9c61de): lwIP error -16 on interface st (index 0)
[W][wifi_esp8266:483]: Event: Disconnected ssid='OlimexTenda' bssid=B0:4E:26:6E:B2:73 reason='Auth Expired'
[W][wifi:533]: Error while connecting to network.
[D][wifi:370]: Starting scan...
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 13
[D][wifi:431]:     RSSI: -53 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 

As seen from the log above, after power cycling ESP can’t connect to WiFi router anymore, most of the errors shown are ‘Auth Expired’

If we change the WiFi router settings to Channel 1-11:

All problems now are gone and ESP connects every time no matter how many time power is cycled.

SUCCESS CH11 (after cold restart)
=================================
[D][wifi:046]: Loaded saved wifi settings: OlimexTenda
[D][wifi:370]: Starting scan...
[D][binary_sensor:036]: 'PIR Sensor': Sending state OFF
[D][wifi:385]: Found networks:
[I][wifi:429]: - 'OlimexTenda' (B0:4E:26:6E:B2:73) 
[D][wifi:430]:     Channel: 11
[D][wifi:431]:     RSSI: -54 dB
[D][wifi:434]: - 'Haxor' (B0:48:7A:CE:8D:BC) 
[D][wifi:434]: - 'OlimexGuests' (C8:3A:35:4B:10:78) 
[D][wifi:434]: - 'OlimexAP' (00:1F:1F:11:7B:B3) 
[D][wifi:434]: - 'OlimexTest' (78:32:1B:90:D7:38) 
[D][wifi:434]: - 'ubnt' (00:27:22:7C:3C:70) 
[I][wifi:245]: WiFi Connecting to 'OlimexTenda'...
[I][wifi:502]: WiFi Connected!
[C][wifi:350]:   Local MAC: 18:FE:34:9C:61:DE
[C][wifi:351]:   SSID: 'OlimexTenda'
[C][wifi:352]:   IP Address: 192.168.0.203
[C][wifi:354]:   BSSID: B0:4E:26:6E:B2:73
[C][wifi:355]:   Hostname: 'esp8266-evb-pir-9c61de'
[C][wifi:357]:   Signal strength: -55 dB 
[C][wifi:361]:   Channel: 11
[C][wifi:362]:   Subnet: 255.255.255.0
[C][wifi:363]:   Gateway: 192.168.0.1
[C][wifi:364]:   DNS1: 192.168.0.1
[C][wifi:365]:   DNS2: 0.0.0.0
[D][wifi:511]: Disabling AP...
[C][ota:082]: Over-The-Air Updates:
[C][ota:083]:   Address: esp8266-evb-pir.local:8266
[C][api:025]: Setting up Home Assistant API server...
[I][app:060]: setup() finished successfully!
[I][app:099]: ESPHome version 2021.11.4 compiled on Dec  9 2021, 11:08:14
[I][app:101]: Project olimex.esphome-esp8266-evb-pir version 1.0
[C][wifi:488]: WiFi:
[C][wifi:350]:   Local MAC: 18:FE:34:9C:61:DE
[C][wifi:351]:   SSID: 'OlimexTenda'
[C][wifi:352]:   IP Address: 192.168.0.203
[C][wifi:354]:   BSSID: B0:4E:26:6E:B2:73
[C][wifi:355]:   Hostname: 'esp8266-evb-pir-9c61de'
[C][wifi:357]:   Signal strength: -55 dB 
[C][wifi:361]:   Channel: 11
[C][wifi:362]:   Subnet: 255.255.255.0
[C][wifi:363]:   Gateway: 192.168.0.1
[C][wifi:364]:   DNS1: 192.168.0.1
[C][wifi:365]:   DNS2: 0.0.0.0
[C][logger:233]: Logger:
[C][logger:234]:   Level: DEBUG
[C][logger:235]:   Log Baud Rate: 115200
[C][logger:236]:   Hardware UART: UART0
[C][gpio.binary_sensor:015]: GPIO Binary Sensor 'PIR Sensor'
[C][gpio.binary_sensor:015]:   Device Class: 'motion'
[C][gpio.binary_sensor:016]:   Pin: GPIO16
[C][captive_portal:151]: Captive Portal:
[C][ota:082]: Over-The-Air Updates:
[C][ota:083]:   Address: esp8266-evb-pir.local:8266
[C][api:134]: API Server:
[C][api:135]:   Address: esp8266-evb-pir.local:6053
[C][api:139]:   Using noise encryption: NO
[C][mdns:084]: mDNS:
[C][mdns:085]:   Hostname: esp8266-evb-pir-9c61de

Our blind guess is that ESP can’t connect reliable on the higher frequency channels. As far as you choose channels 1-11 everything is fine. We think that most people even do not notice this kind of erros if they routers are set to Auto channels as the chances to go up to 12-13-14 are very slim.

5 Comments (+add yours?)

  1. diegor
    Dec 10, 2021 @ 11:38:25

    Try with 20Mhz band width. It reduces risk of interferences (and reduce the speed of course). See this link for recommended channel:

    https://en.wikipedia.org/wiki/List_of_WLAN_channels#2.4_GHz_(802.11b/g/n/ax)

    And channel 12 and 13 are forbidden in some geographical area (like north america) so some router block them by default. Usually there is some regional settings to change, to enable them.

    Reply

  2. jonsmirl
    Dec 10, 2021 @ 17:13:15

    I agree, 12, 13 and 14 are disabled in many pieces of equipment (like routers) because they are illegal to use in North America. There is a airport landing radar in that band that they interfere with. As a side effect the software implementing those bands is poorly tested since few people enable those channels.

    Reply

  3. Trackback: ESP8266 or ESP32 Connectivity Woes? Verify Your Wi-Fi Channel, Suggests Olimex's Tsvetan Usunov - Big Smart Future
  4. norddeutschetanzwerkstatt
    Jan 07, 2022 @ 13:36:08

    I’ve been facing this error for soooo long. Thanks for the clarification! While I can’t do much about the customers wifi settings, it finally explains why it happened!

    Reply

  5. Pallav Aggarwal
    Jan 18, 2022 @ 08:01:52

    Did you check with ESP module or on custom board having ESP chip?
    Could this be due to bad RF design for freq range? (channel 12-13-14)?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: