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.

ESP32-POE and ESP32-POE-ISO back in stock

Silicon Labs stopped selling Si3204 POE controllers which were inside our very popular ESP32-POE and ESP32-POE-ISO boards. There is no stock anywhere neither information when they will be back in stock. So back in August we start searching for alternative and we evaluated several other solutions. We liked most Texas Instruments and made some prototypes and verified that they works fine.

Then we run blank PCBs in production but unfortunately we hit two major Chinese Holidays, so instead the blank PCBs to arrive in the normal 2 weeks we had to wait 5 weeks to produce our order then another week to arrive here.

Meantime we sold out all our stock of ESP32-POE and POE-ISO and created solid backlog before we stop the sales on the web.

We are glad that this week we shipped all backlog orders and now the boards are again for sale!

The new revisions of the boards are REV.G and the PCB info will be updated on GitHub tomorrow. From user point of view nothing changes – the new revision operates exactly the same and have same functionality as the previous Silicon Labs based solution.

New Board with ESP32-S2 with LiPo charger unleash the native USB-OTG functionality

We recently released our ESP32-S2-DevKit-Lipo development board with ESP32-S2 SOC. It has the same functionality and pinout as Espressif ESP32-S2-Saola-1, but in addition it has a LiPo charger and battery management and is designed for Ultra low power – only 30uA consumption when on battery and deep sleep. This allows handheld battery operated applications. The LiPo part can power external sensors/circuits. This board has a built-in programmer with a CH340T USB-Serial convertor.

Many have noticed that ESP32-S2 has a native USB-OTG. Then why did we put the CH340T on it? The reason is that the Espressif SDK didn’t support USB back when we designed this board.

Now Espressif SDK adds support for a USB bootloader and the programming of the ESP32-S2 can be done by the native USB interface, we decided to make a new revision where the native USB-OTG interface is used.

We wanted to keep the LiPo battery functionality and this created an interesting technical challenge: the USB-OTG port can be used both as device and host. When used as a device, the board is powered by the USB and LiPo battery is charging. When used as a USB host (i.e. you can attach USB devices to the port) the USB port must supply 5V to the USB devices connected. Our first prototype had a power supply problem: when the ESP32-S2 works as a host the battery is powering the USB-OTG port with 5V, but there is attached also the LiPo charger circuit, so infinite loop is made: battery -> step up to 5V -> USB -> LiPo chgarger -> battery 🙂

This issue was preventing us from releasing this board earlier, but now on Rev.B all of these issues are fixed so we are about to run production.

Needless to say we kept the ultra low power design and the new board also consumes as low as 30uA in deep sleep.

Searching on the net it seems that no one else has implemented a USB-OTG functionality to the ESP32-S2 yet so this one will be the first. Also to the best of our knowledge there is still no software support for a USB host on the ESP32-S2 but we hope after our hardware is released this will push and accelerate the software development further.

ESP32-S2-DevKit-LiPo-USB is going to be released as Open Source Hardware like other IoT solutions we have.

New Open Source Hardware IoT ESP32-S2 development boards with LiPo Battery Charger and consumption of only 30uA in deep sleep target handheld WiFi apps

ESP32-S2 is new SOC from Espressif which fills the gap between ESP32 and ESP8266.

It has the same memory model as ESP32 but has cut the Ethernet and Bluetooth parts, so only WiFi connection is possible – same as ESP8266, but offers more power, secure boot and encrypted firmware. Also support of decent SSL connection, something which lacks in ESP8266.

Pricewise now S2 is a bit lower cost than ESP32 and more expensive than ESP8266, but there is very strong competition in this niche coming from the new Bouffalo BL6XX chips, so my prediction is that to stay ahead Espressif will further lower the prices of ESP32-S2 to match ESP8266 very soon.

For comparison with ESP32 and ESP8266 the new ESP32-S2 has plenty of GPIOs up to 43!

Initially Espressif has announced that their ESP32-S2-WROVER modules will have as low as 2-4uA consumption, but later they increased this value to 20uA. Not quite well as their target but still very good achievement.

Our ESP32-S2-DevKit-Lipo is pin to pin compatible with ESP32-S2-Saola-1:

To keep compatibility with SAOLA-1 we add RGB LED, but also add LiPo battery charger and ESP32-S2-DevKit-Lipo can operate even without external power supply only on LiPo battery, there is battery level monitoring and external power supply sense. ESP32-S2-DevKit-Lipo can power external circuits with 3.3V up to 200mA when operate on battery.

ESP32-S2-DevKit-Lipo has build in programmer with CH340T. There is possibility the programmer part to be excluded and to use ESP32-S2 directy USB connection.

When operating on battery if the RGB LED is enabled the power consumption is ridiculous 700uA as the RGB LED appear to use lot of current even when not in operation, but there is RGB disable solder jumper which if opened you will not be able to operate the RGB LED on battery but will decrease the power consumption to total less 30uA in deep sleep.

For these who need more memory there is variant ESP32-S2-WROVER-DevKit-Lipo with 2MB of PSRAM.

The prices start from EUR 5.56 for ESP32-S2-DevKit-Lipo and EUR 6.36 for ESP32-S2-WROVER-DevKit-Lipo .

Linux tip: How to reset device connected to USB port

Sometimes devices connected to USB ports need to be re-set. It’s not unusual GSM modems and WiFi dongles to freeze and the only way to bring them back to life is to remove and re-attach.

OLinuXino USB ports has power switches and current limiters which can be controller by Linux drivers.

After some experimenting we found that it’s not so easy actually to do it with the standard file system and shell.

A friend suggested to try this code. It worked very well, so here is how to use it. First you need to download and compile it, then to make it executable:

$ mkdir usbreset
$ cd usbreset
$ wget $ https://raw.githubusercontent.com/jkulesza/usbreset/master/usbreset.c
$ cc usbreset.c -o usbreset
$ chmod +x usbreset

Then you need to see where your USB device is. In our case I connected MOD-WIFI-R5370 WiFi USB dongle:

$ lsusb

you will see something like:

Bus 002 Device 039: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

to reset this device use the command:

./usbreset /dev/bus/usb/002/039

The device USB port will be power off for a second then power on again.

All above is tested and work with official Olimex Linux images from images.olimex.com, but should work on other Linux distributions too.

ESP32-DevKit-Lipo, ESP32-POE and ESP32-POE-ISO boards now have option with external antenna and all our ESP32 boards can be build in extended temperature range -40+105C for demanding applications

ESP32-POE-ISO

Our popular ESP32-DevKit-Lipo, ESP32-POE and ESP32-POE-ISO now has option with external antenna, so you can use them even with metal boxes. The external antenna extends their range by 20-30%.

We stock now ESP32 modules with 16MB of Flash, so if you run out of memory you can order any of our ESP32 boards with 16MB Flash module too.

Also we have ESP32 modules in extended temperature range -HT (high temperature) which works from -40C up to 105C for demanding applications.

New products we got in stock

We got many new products in stock:

ANTENNA-WIFI-BT-U.FL is 2.4GHz WiFi/BLE +3dBi antenna compatible with ESP32-WROOM-32U modules.

ANTENNA-WIFI-BT-U.FL

CONNECTOR-OBD2 connector with plastic box:

CON-OBD2-1

We got these as we have cool idea for WiFi OBD2 sequencer which will allow you to send pre-programmed OBD2 sequences to your card OBD bus allowing to do amazing effects with your car lights close doors with your phone and etc.

IR-BARRIER-100M is infrared fence for perimeter protection. It comes with dual beams and adjustable sensitivity.

IR-BAR-2

 

SNS-TMP-DS18B20 is digital temperature sensor which works with Arduino libraries and allow easy to make Solar Water Heater controller with ESP32-EVB and MOD-LCD2.8RTP . Two sensor can be addressed via single wire.

SNS-DS18B20-2

GLASS-TAPE20MM is glass re-enforced tape which is very strong and heat resistant.

fg-tape

Water proof push buttons with three sizes 12mm, 16mm, 19mm and four colors LED rings: Red, Green, Blue, Yellow, White:

but-12mm3

Seven new version of ESP32 modules are add to our web shop

esp32-wroom-32-01-2

We add to our web shop seven new ESP32 modules:

ESP32-WROOM-32D-4MB – this is equal to used by us ESP32-WROOM-32, it uses D0WD instead of D0WDQ6 which is with smaller size and Espressif recommend it for new designs.

ESP32-WROOM-32D-16MB  has 16MB of Flash

ESP32-WROOM-32D-4MBHT is High temperature +105C module for demanding applications.

ESP32-WROOM-32U-4MB is with U.FL connector for external antenna

ESP32-WROOM-32U-16MB has 16MB of Flash

ESP32-WROOM-32U-4MBHT is High temperature +105C module for demanding applications.

ESP32-WROVER-4MB has 4MB Flash and 8MB of PSRAM.

The high temperature modules are still not in stock as Espressif manufacture these now, but all others are in stock.

The slides from Industry 4.0 meeting in Stuttgart are online

zve-frauenhofer

Open Source / Free Software for Effective Industry 4.0 Meetup  organized by Nexedi GmbH  and hosted by Fraunhofer IAO was held on 12th of November in Stuttgart.

There were quite interesting talks mostly focused on Open Source Technologies and their possible use in Industry 4.0.

My slides are now uploaded at Slideshare.

MicroPython running on ESP8266-EVB driving MOD-IO and MOD-IO2 relays

mod-io2-details.png

New tutorial how to use ESP8266-EVB with Micropython and to switch on/off relays and read ADC values on MOD-IO2 from MCHobby.be

Previous Older Entries