Closed bertmelis closed 6 months ago
Would it be possible to enable debug logging and post the results?
Also, where does it exactly fail. Can't see it in your log.
Just to let you know: due to circumstances I'm unable to work on this for about two weeks.
@bertmelis no problem for the delays.
But I am not so familar with the debugging included libraries.
A) In PlatformIO I only need to add build_flags = -DCORE_DEBUG_LEVEL=5
into the platform.ini and compile again?
Then the debug information is presented like the Serial.print() via the usb connection to the terminal window? (example below)
B) Can I only get the debug info via the usb interface or also remotely, if the module is not near my PC?
Boot --> connected --> WiFi interrupted --> timeout MQTT-LWT --> WiFi reconnected --> MQTT still dead
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1344
load:0x40078000,len:13896
load:0x40080400,len:3600
entry 0x400805f0
[ 18][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 465][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 495][ 768][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 0 - WIFI_READY
[ 865][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 865][V][WiFiGeneric.cpp:340] _arduino_event_cb(): STA Started
[ 872][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 2 - STA_START
[ 888][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 80000000 Hz
E (12750) wifi:Association refused temporarily, comeback time 1024 mSec
[ 6365][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 203
[ 6366][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 6373][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 203 - ASSOC_FAIL
[ 6380][D][WiFiGeneric.cpp:1077] _eventCallback(): WiFi Reconnect Running
[ 6391][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 10896][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 10898][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 10901][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got New IP:192.168.yyy.yyy
[ 10913][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 10920][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 14186][W][AsyncTCP.cpp:950] _poll(): rx timeout 4
[148771][W][AsyncTCP.cpp:950] _poll(): rx timeout 4
[189308][W][AsyncTCP.cpp:950] _poll(): rx timeout 4
[215812][W][AsyncTCP.cpp:950] _poll(): rx timeout 4
[234335][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 200
[234337][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[234345][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 200 - BEACON_TIMEOUT
[234352][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[234364][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[236788][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[236789][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[236797][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[236803][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[236815][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[239239][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[239240][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[239247][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[239254][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[239266][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[241690][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[241691][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[241698][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[241705][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[241717][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[244141][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[244142][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[244149][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[244156][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[244168][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[246592][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[246593][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[246600][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[246607][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[246618][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[249043][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[249043][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[249051][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[249058][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[249069][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[251493][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[251494][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[251502][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[251509][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[251520][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[253944][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[253945][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[253953][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[253959][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[253971][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[256395][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[256396][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[256403][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[256410][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[256422][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[256496][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[256498][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[256500][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.yyy.yyy
[256513][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[256520][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
platformio.ini, adjust to your liking:
[env:debug]
platform = espressif32
board = esp32dev
build_flags =
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
-DDEBUG_ESP_MQTT_CLIENT
monitor_filters = esp32_exception_decoder
build_type = debug
It will generate a lot of messages on the Serial interface (USB connected to your PC). There is no easy way to avoid that.
Just to be sure: are you using the regular or the async version?
From your latest log I can't really see an issue besides very bad WiFi. Even if it manages to connect, it isn't succeeding in establishing a TCP connection.
I am using the async version and yes, it is bad WiFi as I dismounted the antenna and put into my hands to simulate the bad environment and to reach the reconnect state, where this error happens. I will try your logging input soon.
Now your debug with same scenario as above. result: http-server reachable MQTT-not
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1344
load:0x40078000,len:13896
load:0x40080400,len:3600
entry 0x400805f0
[ 18][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 465][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 495][ 768][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 0 - WIFI_READY
[ 867][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 867][V][WiFiGeneric.cpp:340] _arduino_event_cb(): STA Started
[ 874][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 2 - STA_START
[ 889][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 80000000 Hz
E (12744) wifi:Association refused temporarily, comeback time 1024 mSec
[ 6354][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 203
[ 6355][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 6362][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 203 - ASSOC_FAIL
[ 6369][D][WiFiGeneric.cpp:1077] _eventCallback(): WiFi Reconnect Running
[ 6380][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 10927][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 10929][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 10932][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got New IP:192.168.xxx.xxx
[ 10944][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 10951][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 10962][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 10970][I][MqttClient.cpp:290] loop(): Stack usage: 3520/5120
[ 11220][I][MqttClient.cpp:344] _sendPacket(): tx 84/84 (10)
[ 11230][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 11230][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x20
[ 11230][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 11236][I][Parser.cpp:205] _varHeaderConnack2(): Packet complete
[ 11242][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 1)
[ 11249][I][Packet.cpp:315] _allocate(): Alloc (l:45)
[ 11254][I][Packet.cpp:315] _allocate(): Alloc (l:39)
[ 11259][I][Packet.cpp:315] _allocate(): Alloc (l:44)
[ 11264][I][Packet.cpp:315] _allocate(): Alloc (l:45)
[ 11268][I][Packet.cpp:315] _allocate(): Alloc (l:50)
[ 11273][I][Packet.cpp:315] _allocate(): Alloc (l:39)
[ 11278][I][Packet.cpp:315] _allocate(): Alloc (l:49)
[ 11283][I][Packet.cpp:315] _allocate(): Alloc (l:49)
[ 11288][I][Packet.cpp:315] _allocate(): Alloc (l:50)
[ 11296][I][Packet.cpp:315] _allocate(): Alloc (l:564)
[ 11297][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 11722][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (30)
[ 11724][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 11726][I][MqttClient.cpp:344] _sendPacket(): tx 44/44 (80)
[ 11728][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (80)
[ 11734][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 11741][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 11745][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 11750][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 11756][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 11760][I][MqttClient.cpp:344] _sendPacket(): tx 564/564 (30)
[ 11768][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 11770][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 11775][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 11782][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11789][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 11799][I][MqttClient.cpp:376] _checkIncoming(): rx len 20
[ 11801][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11806][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11813][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11820][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 11826][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 15
[ 11832][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11838][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11844][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11852][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 11857][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 11864][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11869][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11876][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11883][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 11889][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 11895][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11900][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11907][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11914][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 11920][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 11930][I][MqttClient.cpp:376] _checkIncoming(): rx len 15
[ 11932][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11937][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11944][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11951][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 11957][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 11963][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11968][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11975][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11982][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 11988][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 11994][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12000][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12006][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12014][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 12019][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 12030][I][MqttClient.cpp:376] _checkIncoming(): rx len 9
[ 12031][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12036][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12043][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12050][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 12056][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 4
[ 12062][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 12068][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 12074][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12081][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 37224][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[ 37415][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 200
[ 37417][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 37418][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
[ 37424][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 200 - BEACON_TIMEOUT
[ 37438][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 37450][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 39874][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 39875][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 39883][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 39889][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 39901][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 40891][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 42325][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 42326][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 42333][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 42340][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 42352][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 44776][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 44777][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 44784][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 44791][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 44803][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 47227][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 47228][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 47235][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 47242][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 47253][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 49678][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 49678][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 49686][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 49693][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 49704][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 52128][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 52129][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 52137][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 52144][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 52155][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 52305][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 52307][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 52310][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.xxx.xxx
[ 52322][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 52329][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 52341][I][MqttClient.cpp:290] loop(): Stack usage: 3568/5120
Thank you, I will look into this. The async version needs a little more love...
Could you share the reconnection code? In the code you already shared, you just set the flag. I want to make sure the actual reconnecting is done properly.
I might have found the culprit: when the connect
-call for async doesn't succeed (here: https://github.com/bertmelis/espMqttClient/blob/main/src/MqttClient.cpp#L207), the async's poll
-function stops running and so mqttClient's loop
-function also doesn't get called.
Issue now is to find an elegant solution for this...
Could you try by removing (commenting out) line 274 from MqttClient.cpp: https://github.com/bertmelis/espMqttClient/blob/main/src/MqttClient.cpp#L274C7-L274C56
Could you share the reconnection code? In the code you already shared, you just set the flag. I want to make sure the actual reconnecting is done properly.
I do not really understand, what to do for this?
Could you try by removing (commenting out) line 274 from MqttClient.cpp: https://github.com/bertmelis/espMqttClient/blob/main/src/MqttClient.cpp#L274C7-L274C56
This means, I have to put your whole SW into my project to make changes for the usage of the changed code.. I have to think about the easies way.
I will create a separate branch so you can easily adjust in your platformio.ini
lib_deps =
https://github.com/bertmelis/espMqttClient.git#async-connect
my version of removed line 274. I will try your branch next - just to be on the save side.
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1344
load:0x40078000,len:13896
load:0x40080400,len:3600
entry 0x400805f0
[ 31][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 478][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 508][ 781][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 0 - WIFI_READY
[ 878][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 878][V][WiFiGeneric.cpp:340] _arduino_event_cb(): STA Started
[ 886][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 2 - STA_START
[ 2269][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 80000000 Hz
[ 3938][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 3940][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 3942][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got New IP:192.168.xxx.xxx
[ 3955][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 3962][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 3972][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 3981][I][MqttClient.cpp:290] loop(): Stack usage(Test SW Version): 3360/5120
[ 4230][I][MqttClient.cpp:344] _sendPacket(): tx 84/84 (10)
[ 4240][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 4240][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x20
[ 4240][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 4246][I][Parser.cpp:205] _varHeaderConnack2(): Packet complete
[ 4252][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 1)
[ 4260][I][Packet.cpp:315] _allocate(): Alloc (l:45)
[ 4264][I][Packet.cpp:315] _allocate(): Alloc (l:39)
[ 4269][I][Packet.cpp:315] _allocate(): Alloc (l:44)
[ 4274][I][Packet.cpp:315] _allocate(): Alloc (l:45)
[ 4279][I][Packet.cpp:315] _allocate(): Alloc (l:50)
[ 4283][I][Packet.cpp:315] _allocate(): Alloc (l:39)
[ 4288][I][Packet.cpp:315] _allocate(): Alloc (l:49)
[ 4293][I][Packet.cpp:315] _allocate(): Alloc (l:49)
[ 4298][I][Packet.cpp:315] _allocate(): Alloc (l:50)
[ 4306][I][Packet.cpp:315] _allocate(): Alloc (l:547)
[ 4307][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 4732][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (30)
[ 4734][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 4736][I][MqttClient.cpp:344] _sendPacket(): tx 44/44 (80)
[ 4739][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (80)
[ 4744][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 4749][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 4754][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 4760][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 4765][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 4771][I][MqttClient.cpp:344] _sendPacket(): tx 547/547 (30)
[ 4778][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 4780][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 4785][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 4792][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4799][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 4809][I][MqttClient.cpp:376] _checkIncoming(): rx len 15
[ 4811][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 4816][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 4823][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4830][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 4836][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 4842][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 4848][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 4854][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4862][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 4867][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 4874][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 4879][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 4886][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4893][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 4899][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 4908][I][MqttClient.cpp:376] _checkIncoming(): rx len 15
[ 4910][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 4916][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 4922][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4930][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 4935][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 4942][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 4947][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 4954][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4961][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 4967][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 4973][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 4978][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 4985][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 4992][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 4998][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 5008][I][MqttClient.cpp:376] _checkIncoming(): rx len 10
[ 5010][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 5015][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 5022][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 5029][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 5035][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 5041][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 5046][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 5053][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 5060][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 5066][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 5076][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 5077][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 5083][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 5089][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 5097][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 30235][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[ 30736][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[ 30773][I][MqttClient.cpp:376] _checkIncoming(): rx len 2
[ 30773][I][Parser.cpp:118] _fixedHeader(): Packet type: 0xd0
[ 30774][I][Parser.cpp:181] _remainingLengthNone(): Remaining length: 0
[ 30779][I][MqttClient.cpp:429] _checkIncoming(): Parsed 2 - remaining 0
[ 41766][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 200
[ 41768][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 41770][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
[ 41775][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 200 - BEACON_TIMEOUT
[ 41789][D][WiFiGeneric.cpp:1077] _eventCallback(): WiFi Reconnect Running
[ 41801][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 42270][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 44225][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 44226][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 44233][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 44240][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 44252][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 46676][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 46677][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 46684][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 46691][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 46703][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 49127][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 49128][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 49135][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 49142][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 49153][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 51577][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 51578][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 51586][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 51592][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 51604][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 54028][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 54029][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 54036][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 54043][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 54055][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 56479][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 56480][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 56487][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 56494][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 56506][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 58930][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 58931][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 58938][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 58945][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 58956][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 61380][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 61381][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 61389][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 61396][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 61407][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 63831][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 63832][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 63839][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 63846][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 63858][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 66282][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 66283][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 66290][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 66297][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 66309][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 68733][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 68734][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 68741][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 68748][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 68760][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 71184][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 71185][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 71192][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 71199][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 71210][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 71299][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 71302][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 71304][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.xxx.xxx
[ 71317][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 71324][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.xxx.xxx, MASK: 255.255.255.0, GW: 192.168.yyy.yyy
[ 71335][I][MqttClient.cpp:290] loop(): Stack usage(Test SW Version): 3536/5120
new branch used:
Dependency Graph
|-- espMqttClient @ 1.4.4+sha.7ce3524
|-- AsyncElegantOTA @ 2.2.7
|-- AsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.0.0
|-- SPIFFS @ 2.0.0
|-- AsyncTCP @ 1.1.1
|-- Ticker @ 2.0.0
|-- WiFi @ 2.0.0
debug output:
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1344
load:0x40078000,len:13896
load:0x40080400,len:3600
entry 0x400805f0
[ 31][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 478][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 508][ 781][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 0 - WIFI_READY
[ 879][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 879][V][WiFiGeneric.cpp:340] _arduino_event_cb(): STA Started
[ 886][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 2 - STA_START
[ 901][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 80000000 Hz
[ 5356][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 5358][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 5361][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got New IP:192.168.yyy.yyy
[ 5373][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 5380][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 5391][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 5400][I][MqttClient.cpp:290] loop(): Stack usage: 3132/5120
[ 5629][I][MqttClient.cpp:344] _sendPacket(): tx 84/84 (10)
[ 5639][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 5639][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x20
[ 5640][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 5645][I][Parser.cpp:205] _varHeaderConnack2(): Packet complete
[ 5651][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 1)
[ 5659][I][Packet.cpp:315] _allocate(): Alloc (l:45)
[ 5663][I][Packet.cpp:315] _allocate(): Alloc (l:39)
[ 5668][I][Packet.cpp:315] _allocate(): Alloc (l:44)
[ 5673][I][Packet.cpp:315] _allocate(): Alloc (l:45)
[ 5678][I][Packet.cpp:315] _allocate(): Alloc (l:50)
[ 5682][I][Packet.cpp:315] _allocate(): Alloc (l:39)
[ 5687][I][Packet.cpp:315] _allocate(): Alloc (l:49)
[ 5692][I][Packet.cpp:315] _allocate(): Alloc (l:49)
[ 5697][I][Packet.cpp:315] _allocate(): Alloc (l:50)
[ 5705][I][Packet.cpp:315] _allocate(): Alloc (l:547)
[ 5706][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 6131][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (30)
[ 6133][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 6136][I][MqttClient.cpp:344] _sendPacket(): tx 44/44 (80)
[ 6138][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (80)
[ 6144][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 6150][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 6154][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 6160][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 6165][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 6171][I][MqttClient.cpp:344] _sendPacket(): tx 547/547 (30)
[ 6177][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 6179][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 6185][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 6191][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6199][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 6208][I][MqttClient.cpp:376] _checkIncoming(): rx len 20
[ 6210][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6216][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6222][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6230][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6235][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 15
[ 6242][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6247][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6254][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6261][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6267][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 6273][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6279][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6285][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6293][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6298][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 6305][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6310][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6317][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6324][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6329][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 6339][I][MqttClient.cpp:376] _checkIncoming(): rx len 10
[ 6341][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6347][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6353][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6361][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6366][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 6372][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6378][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6385][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6392][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6397][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 6407][I][MqttClient.cpp:376] _checkIncoming(): rx len 14
[ 6409][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6415][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6421][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6429][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6434][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 9
[ 6441][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 6446][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 6453][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6460][I][Parser.cpp:298] _payloadSuback(): Packet complete
[ 6465][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 4
[ 6472][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 6477][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 6484][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 6491][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 10134][W][AsyncTCP.cpp:950] _poll(): rx timeout 4
[ 31635][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[ 32137][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[ 37137][W][AsyncTCP.cpp:943] _poll(): ack timeout 4
[ 40358][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 200
[ 40360][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 40362][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
[ 40367][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 200 - BEACON_TIMEOUT
[ 40381][D][WiFiGeneric.cpp:1077] _eventCallback(): WiFi Reconnect Running
[ 40393][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 40904][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 42817][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 42818][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 42825][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 42832][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 42844][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 45268][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 45269][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 45276][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 45283][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 45294][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 47719][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 47719][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 47727][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 47734][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 47745][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 50169][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 50170][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 50178][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 50184][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 50196][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 52620][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 52621][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 52628][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 52635][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 52647][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 55071][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 55072][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 55079][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 55086][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 55098][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 57522][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 57523][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 57530][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 57537][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 57548][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 59972][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 59973][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 59981][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 59987][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 59999][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 62423][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 62424][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 62431][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 62438][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 62450][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 64874][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 64875][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 64882][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 64889][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 64901][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 67325][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 67326][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 67333][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 67340][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 67351][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 69776][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 69776][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 69784][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 69791][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[ 69802][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 69899][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 69901][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 69904][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.yyy.yyy
[ 69916][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 69923][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 69934][I][MqttClient.cpp:290] loop(): Stack usage: 3536/5120
[ 75143][W][AsyncTCP.cpp:943] _poll(): ack timeout 4
Could you share the reconnection code? In the code you already shared, you just set the flag. I want to make sure the actual reconnecting is done properly.
I do not really understand, what to do for this?
I can't see a connection attempt in your latest log. Since everything is event driven in the async version, it is crucial to get the reconnect logic right.
Disclaimer, it might not even be 100% in the examples.
I did another test with my debug info switched on but still using your branch.. Interesting: currently MQTT comes back, but lots of time after the WiFi and http is active again.
hints: if searching for "Connecting to MQTT" 1.: initial boot up phase 2..8.: after WIFI disconnect and connect again, but no immediate MQTT connection 9.: MQTT Broker now connected again
void connectToMqtt()
{
#ifdef DEBUG
Serial.println("Connecting to MQTT...");
#endif
if (!mqttClient.connect()) {
reconnectMqtt = true;
lastReconnect = millis();
#ifdef DEBUG
Serial.println("Connecting failed.");
#endif
} else {
reconnectMqtt = false;
#ifdef DEBUG
Serial.println("Connection done.");
#endif
}
Debug:
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1344
load:0x40078000,len:13896
load:0x40080400,len:3600
entry 0x400805f0
[ 18][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[ 465][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[ 495]SPIFFS mounting successful
MQTT restarts: 0 / WIFI restarts: 0
last Reset reason: Power-on event (or reset button)
PSRAM available
PSRAM Total heap 4192123, PSRAM Free Heap 4192123
"PID":0x26
"xclk":20 Mhz
"pixformat":4
"framesize":13
"quality":10
"brightness":0
"contrast":2
"saturation":-2
"sharpness":0
"special_effect":0
"wb_mode":0
"awb":1
"awb_gain":1
"aec":1
"aec2":0
"ae_level":0
"aec_value":168
"agc":1
"agc_gain":0
"gainceiling":0
"bpc":0
"wpc":1
"raw_gma":1
"lenc":1
"hmirror":0
"dcw":1
"colorbar":0
[ 850][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 0 - WIFI_READY
[WiFi-event] event: 0
WiFi interface ready
[ 949][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[ 949][V][WiFiGeneric.cpp:340] _arduino_event_cb(): STA Started
[ 956][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 2 - STA_START
[WiFi-event] event: 2
WiFi client started
Connecting to Wi-Fi...
HTTP server started
[ 981][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 320 / 4 = 80 Mhz, APB: 80000000 Hz
E (13005) wifi:Association refused temporarily, comeback time 1024 mSec
[ 6442][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 203
[ 6443][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 6450][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 203 - ASSOC_FAIL
[ 6457][D][WiFiGeneric.cpp:1077] _eventCallback(): WiFi Reconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 6479][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 11002][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 11004][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 11006][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got New IP:192.168.yyy.yyy
[WiFi-event] event: 4
Successfully STA connected to Access Point
RSSI: -75 (Weak Signal)
[ 11030][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 11034][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[WiFi-event] event: 7
WIFI is connected!
IP address:
192.168.yyy.yyy
Connecting to MQTT...
[ 11056][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 11062][I][MqttClient.cpp:290] loop(): Stack usage: 3440/5120
Connection done.
[ 11310][I][MqttClient.cpp:344] _sendPacket(): tx 84/84 (10)
[ 11321][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 11321][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x20
[ 11321][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 11327][I][Parser.cpp:205] _varHeaderConnack2(): Packet complete
[ 11333][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 1)
Connected to MQTT broker: 192.168.xxx.xxx62, port: 1883
************************************************
Session present: 0
[ 11351][I][Packet.cpp:315] _allocate(): Alloc (l:45)
Last Will -online- setting- QoS 1/retain false, packetId: 1
[ 11366][I][Packet.cpp:315] _allocate(): Alloc (l:39)
Subscribing at QoS 1, packetId: 2
[ 11377][I][Packet.cpp:315] _allocate(): Alloc (l:44)
Subscribing at QoS 1, packetId: 3
[ 11378][I][Packet.cpp:315] _allocate(): Alloc (l:45)
Subscribing at QoS 1, packetId: 4
[ 11392][I][Packet.cpp:315] _allocate(): Alloc (l:50)
Subscribing at QoS 1, packetId: 5
[ 11393][I][Packet.cpp:315] _allocate(): Alloc (l:39)
Subscribing at QoS 1, packetId: 6
[ 11407][I][Packet.cpp:315] _allocate(): Alloc (l:49)
Subscribing at QoS 1, packetId: 7
[ 11408][I][Packet.cpp:315] _allocate(): Alloc (l:49)
Subscribing at QoS 1, packetId: 8
[ 11423][I][Packet.cpp:315] _allocate(): Alloc (l:50)
Subscribing at QoS 1, packetId: 9
{
"hostname": "ESP32-CAM-Briefkasten_Test",
"Uptime": "0:0:0",
"buildtime": "Jul 25 2023 11:00:23",
"wifiSSID": "SSIDzzzzz",
"wifiRSSI": -73,
"wifiIP": "192.168.yyy.yyy",
"ChipModel": "ESP32-D0WD-V3 Rev 3",
"ChipCores": 2,
"ChipFreqMhz": 80,
"CPUtemp": 53.33,
"ChipID": "15003316",
"PSRAM": "available",
"PSRAMheap": 4192107,
"PSRAMfree": 3808107,
"MqttRestarts": 1,
"WiFiRestarts": 1,
"lastResetReason": "Power-on event (or reset button)"
}
[ 11469][I][Packet.cpp:315] _allocate(): Alloc (l:564)
MQTT Publish succesful: 10
[ 11483][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 11812][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (30)
[ 11814][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 11816][I][MqttClient.cpp:344] _sendPacket(): tx 44/44 (80)
[ 11819][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (80)
[ 11825][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 11830][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[ 11835][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 11842][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[ 11845][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[ 11851][I][MqttClient.cpp:344] _sendPacket(): tx 564/564 (30)
[ 11858][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 11860][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 11865][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 11872][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
Publish acknowledged.
packetId: 1
[ 11890][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 11894][I][MqttClient.cpp:376] _checkIncoming(): rx len 15
[ 11894][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11900][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11906][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11914][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 2
qos: 1
[ 11930][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 11930][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11935][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11942][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11949][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 3
qos: 1
[ 11966][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 11966][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 11971][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 11978][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 11985][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 4
qos: 1
[ 12001][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 12005][I][MqttClient.cpp:376] _checkIncoming(): rx len 15
[ 12007][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12012][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12019][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12026][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 5
qos: 1
[ 12042][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[ 12043][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12048][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12055][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12062][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 6
qos: 1
[ 12078][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 12078][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12083][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12090][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12097][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 7
qos: 1
[ 12114][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 12119][I][MqttClient.cpp:376] _checkIncoming(): rx len 10
[ 12119][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12124][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12131][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12138][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 8
qos: 1
[ 12155][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[ 12155][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[ 12160][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[ 12167][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[ 12174][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 9
qos: 1
[ 12190][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[ 12194][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[ 12196][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[ 12201][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[ 12207][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
Publish acknowledged.
packetId: 10
[ 12225][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[ 37315][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[ 37816][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[ 38828][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 200
[ 38830][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 38832][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
[ 38837][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 200 - BEACON_TIMEOUT
Disconnected from MQTT: 7.
[ 38851][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 38868][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 41306][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 41307][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 41315][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 41322][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 41344][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 43774][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 43775][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 43782][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 43789][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 43811][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 46242][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 46243][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 46250][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 46257][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 46279][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 48709][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 48710][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 48718][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 48724][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 48747][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 51177][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 51178][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 51185][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 51192][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 51214][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 53645][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 53645][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 53653][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 53660][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 53682][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 56112][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 56113][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 56121][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 56127][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 56150][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 58580][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 58581][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 58588][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 58595][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 58617][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 61048][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 61049][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 61056][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 61063][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 61085][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 63515][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 63516][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 63523][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 63530][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 63553][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 65983][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 65984][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 65991][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 65998][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 66020][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 68451][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 68451][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 68459][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 68466][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 68488][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 70918][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 70919][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 70926][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 70933][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 70955][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 73386][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 00:00:00:00:00:00, Reason: 201
[ 73387][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 73394][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 201 - NO_AP_FOUND
[ 73401][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 73423][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 73443][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Reason: 202
[ 73445][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 73452][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 202 - AUTH_FAIL
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 73469][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 80285][V][WiFiGeneric.cpp:362] _arduino_event_cb(): STA Disconnected: SSID: SSIDzzzzz, BSSID: 1c:ed:6f:ee:7a:08, Reason: 2
[ 80285][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 5 - STA_DISCONNECTED
[ 80293][W][WiFiGeneric.cpp:1057] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[ 80299][D][WiFiGeneric.cpp:1081] _eventCallback(): WiFi AutoReconnect Running
[WiFi-event] event: 5
Disconnected from WIFI access point
Reconnecting...
[ 80322][V][WiFiGeneric.cpp:97] set_esp_interface_ip(): Configuring Station static IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
Connecting to Wi-Fi...
[ 84786][V][WiFiGeneric.cpp:355] _arduino_event_cb(): STA Connected: SSID: SSIDzzzzz, BSSID: 44:4e:6d:33:e6:df, Channel: 5, Auth: WPA2_WPA3_PSK
[ 84788][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 4 - STA_CONNECTED
[ 84791][V][WiFiGeneric.cpp:369] _arduino_event_cb(): STA Got Same IP:192.168.yyy.yyy
[WiFi-event] event: 4
Successfully STA connected to Access Point
RSSI: -71 (Weak Signal)
[ 84814][D][WiFiGeneric.cpp:1035] _eventCallback(): Arduino Event: 7 - STA_GOT_IP
[ 84818][D][WiFiGeneric.cpp:1098] _eventCallback(): STA IP: 192.168.yyy.yyy, MASK: 255.255.255.0, GW: 192.168.xxx.xxx
[WiFi-event] event: 7
WIFI is connected!
IP address:
192.168.yyy.yyy
Connecting to MQTT...
[ 84840][I][Packet.cpp:315] _allocate(): Alloc (l:84)
[ 84846][I][MqttClient.cpp:290] loop(): Stack usage: 3600/5120
Connection done.
[ 85096][I][MqttClient.cpp:344] _sendPacket(): tx 84/84 (10)
[ 90595][W][AsyncTCP.cpp:943] _poll(): ack timeout 4
[135102][W][MqttClient.cpp:442] _checkPing(): Disconnecting, server exceeded keepalive
[135605][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
[135609][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[136983][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[137102][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[137602][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[138102][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[138602][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[139102][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[139604][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[140104][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[140604][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[141104][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[141604][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[142104][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[142606][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[143106][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[143606][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[144106][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[144606][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[145106][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[145608][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[146108][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[146608][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[147108][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[147608][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[148108][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[148610][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[149111][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[149610][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[150110][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[150610][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[151110][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[151613][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[152112][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[152612][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[153112][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[153612][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[154112][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[154615][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[155114][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[156989][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[157114][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[157614][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[158114][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[158614][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[159114][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[159616][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[160116][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[160616][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[161116][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[161616][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[162116][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[162619][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[163118][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[163618][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[164118][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[164618][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[165118][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[165620][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[166120][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[166621][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[167120][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[167620][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[168120][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[168622][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[169122][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[169622][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[170122][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[170622][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[171122][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[171626][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[172125][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[172625][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[173125][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[173625][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[174125][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[174628][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[175127][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[176994][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[177127][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[177627][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[178127][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[178630][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[179130][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[179633][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[180133][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[180632][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[181132][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[181632][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[182132][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[182634][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[183134][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[183634][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[184134][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[184634][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[185134][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[185636][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[186136][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[186636][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[187136][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[187636][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[188136][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[188639][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[189139][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[189639][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[190139][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[190639][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[191139][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[191641][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[192141][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[192641][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[193142][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[193641][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[194141][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[194644][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[195143][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[197000][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[197143][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[197644][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[198143][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[198643][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[199143][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[199645][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[200146][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[200646][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[201146][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[201646][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[202146][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[202649][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[203148][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[203648][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[204148][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[204648][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[205148][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[205650][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[206151][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[206651][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[207151][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[207651][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[208151][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[208654][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[209153][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[209653][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[210153][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[210654][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[211153][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[211655][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[212155][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[212655][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[213155][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[213655][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[214155][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[214658][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[215158][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[217006][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[217158][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[217658][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[218158][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[218658][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[219158][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[219661][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[220161][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[220661][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[221161][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[221661][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[222161][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[222663][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[223163][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[223663][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[224163][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[224663][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[225163][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[225666][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[226165][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[226665][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[227165][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[227665][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[228165][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[228667][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[229167][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[229667][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[230167][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[230667][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[231167][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[231670][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[232169][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[232670][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[233169][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[233669][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[234169][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[234672][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[235172][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[237012][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[237172][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[237672][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[238172][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[238672][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[239172][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[239675][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[240174][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[240674][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[241174][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[241674][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[242174][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[242677][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[243176][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[243676][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[244176][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[244676][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[245176][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[245678][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[246178][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[246678][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[247178][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[247678][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[248178][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[248680][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[249180][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[249680][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[250180][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[250680][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[251180][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[251682][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[252182][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[252682][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[253182][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[253682][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[254182][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[254684][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[255184][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 0)
Disconnected from MQTT: 7.
Connecting to MQTT...
[257018][I][Packet.cpp:315] _allocate(): Alloc (l:84)
Connection done.
[257184][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[257684][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[258184][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[258684][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[259184][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[259687][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[260187][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[260687][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[261187][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[261687][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[262187][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[262689][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[263191][I][MqttClient.cpp:344] _sendPacket(): tx 84/84 (10)
[263204][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[263204][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x20
[263204][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[263210][I][Parser.cpp:205] _varHeaderConnack2(): Packet complete
[263216][I][MqttClient.cpp:693] _clearQueue(): clearing queue (clear session: 1)
Connected to MQTT broker: 192.168.xxx.xxx62, port: 1883
************************************************
Session present: 0
[263234][I][Packet.cpp:315] _allocate(): Alloc (l:45)
Last Will -online- setting- QoS 1/retain false, packetId: 11
[263249][I][Packet.cpp:315] _allocate(): Alloc (l:39)
Subscribing at QoS 1, packetId: 12
[263260][I][Packet.cpp:315] _allocate(): Alloc (l:44)
Subscribing at QoS 1, packetId: 13
[263261][I][Packet.cpp:315] _allocate(): Alloc (l:45)
Subscribing at QoS 1, packetId: 14
[263275][I][Packet.cpp:315] _allocate(): Alloc (l:50)
Subscribing at QoS 1, packetId: 15
[263276][I][Packet.cpp:315] _allocate(): Alloc (l:39)
Subscribing at QoS 1, packetId: 16
[263291][I][Packet.cpp:315] _allocate(): Alloc (l:49)
Subscribing at QoS 1, packetId: 17
[263292][I][Packet.cpp:315] _allocate(): Alloc (l:49)
Subscribing at QoS 1, packetId: 18
[263307][I][Packet.cpp:315] _allocate(): Alloc (l:50)
Subscribing at QoS 1, packetId: 19
{
"hostname": "ESP32-CAM-Briefkasten_Test",
"Uptime": "0:0:4",
"buildtime": "Jul 25 2023 11:00:23",
"wifiSSID": "SSIDzzzzz",
"wifiRSSI": -72,
"wifiIP": "192.168.yyy.yyy",
"ChipModel": "ESP32-D0WD-V3 Rev 3",
"ChipCores": 2,
"ChipFreqMhz": 80,
"CPUtemp": 53.33,
"ChipID": "15003316",
"PSRAM": "available",
"PSRAMheap": 4192107,
"PSRAMfree": 3808107,
"MqttRestarts": 2,
"WiFiRestarts": 2,
"lastResetReason": "Power-on event (or reset button)"
}
[263353][I][Packet.cpp:315] _allocate(): Alloc (l:564)
MQTT Publish succesful: 20
[263367][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[263695][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (30)
[263698][I][MqttClient.cpp:344] _sendPacket(): tx 39/39 (80)
[263700][I][MqttClient.cpp:344] _sendPacket(): tx 44/44 (80)
[263703][I][MqttClient.cpp:344] _sendPacket(): tx 45/45 (80)
[263707][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[263713][I][MqttClient.cpp:344] _sendPacke(): tx 39/39 (80)
[263718][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[263723][I][MqttClient.cpp:344] _sendPacket(): tx 49/49 (80)
[263729][I][MqttClient.cpp:344] _sendPacket(): tx 50/50 (80)
[263734][I][MqttClient.cpp:344] _sendPacket(): tx 564/564 (30)
[263741][I][MqttClient.cpp:376] _checkIncoming(): rx len 4
[263743][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[263748][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[263755][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
Publish acknowledged.
packetId: 11
[263773][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[263777][I][MqttClient.cpp:376] _checkIncoming(): rx len 25
[263777][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[263783][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[263789][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[263797][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 12
qos: 1
[263813][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 20
[263813][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[263819][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[263825][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[263833][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 13
qos: 1
[263849][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 15
[263849][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[263854][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[263861][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[263868][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 14
qos: 1
[263885][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 10
[263885][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[263890][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[263897][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[263904][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 15
qos: 1
[263920][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[263921][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[263926][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[263933][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[263940][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 16
qos: 1
[263956][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[263960][I][MqttClient.cpp:376] _checkIncoming(): rx len 10
[263962][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[263967][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[263974][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[263981][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 17
qos: 1
[263997][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 5
[263998][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[264003][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[264009][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[264017][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 18
qos: 1
[264033][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 0
[264037][I][MqttClient.cpp:376] _checkIncoming(): rx len 9
[264038][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x90
[264044][I][Parser.cpp:167] _remainingLengthVariable(): Remaining length: 3
[264050][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
[264058][I][Parser.cpp:298] _payloadSuback(): Packet complete
Subscribe acknowledged.
packetId: 19
qos: 1
[264074][I][MqttClient.cpp:429] _checkIncoming(): Parsed 5 - remaining 4
[264074][I][Parser.cpp:118] _fixedHeader(): Packet type: 0x40
[264080][I][Parser.cpp:131] _remainingLengthFixed(): Remaining length: 2
[264086][I][Parser.cpp:222] _varHeaderPacketId2(): Packet variable header complete
Publish acknowledged.
packetId: 20
[264104][I][MqttClient.cpp:429] _checkIncoming(): Parsed 4 - remaining 0
[289199][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[289701][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[289711][I][MqttClient.cpp:376] _checkIncoming(): rx len 2
[289711][I][Parser.cpp:118] _fixedHeader(): Packet type: 0xd0
[289711][I][Parser.cpp:181] _remainingLengthNone(): Remaining length: 0
[289717][I][MqttClient.cpp:429] _checkIncoming(): Parsed 2 - remaining 0
[315199][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[315701][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[315714][I][MqttClient.cpp:376] _checkIncoming(): rx len 2
[315715][I][Parser.cpp:118] _fixedHeader(): Packet type: 0xd0
[315715][I][Parser.cpp:181] _remainingLengthNone(): Remaining length: 0
[315720][I][MqttClient.cpp:429] _checkIncoming(): Parsed 2 - remaining 0
[341201][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[341703][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[341713][I][MqttClient.cpp:376] _checkIncoming(): rx len 2
[341713][I][Parser.cpp:118] _fixedHeader(): Packet type: 0xd0
[341713][I][Parser.cpp:181] _remainingLengthNone(): Remaining length: 0
[341719][I][MqttClient.cpp:429] _checkIncoming(): Parsed 2 - remaining 0
[367204][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[367706][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[367715][I][MqttClient.cpp:376] _checkIncoming(): rx len 2
[367715][I][Parser.cpp:118] _fixedHeader(): Packet type: 0xd0
[367715][I][Parser.cpp:181] _remainingLengthNone(): Remaining length: 0
[367721][I][MqttClient.cpp:429] _checkIncoming(): Parsed 2 - remaining 0
[393206][I][Packet.cpp:315] _allocate(): Alloc (l:2)
[393709][I][MqttClient.cpp:344] _sendPacket(): tx 2/2 (c0)
[393721][I][MqttClient.cpp:376] _checkIncoming(): rx len 2
[393721][I][Parser.cpp:118] _fixedHeader(): Packet type: 0xd0
[393721][I][Parser.cpp:181] _remainingLengthNone(): Remaining length: 0
[393727][I][MqttClient.cpp:429] _checkIncoming(): Parsed 2 - remaining 0
You are suffering an unfortunate limitation of the AsyncTCP library: a hardcoded timeout when connecting. I believe it is about ~30s~ 18s which you have to sit out.
my loop(): so 2.-9. attemp = 7 * 4 seconds are about your 18 seconds. O.k. but I wonder, as the MQTT till yesterday came not back after delay.
void loop() {
static uint32_t currentMillis = millis();
if (reconnectMqtt && ((currentMillis - lastReconnect) > 5000)) {
connectToMqtt();
}
delay(4000);
}
Total other question: are you referencing to include fix AsyncTCP @ 1.1.1 ? If yes, is this not old?
Regardless of the exact delay, I cannot change the timeout of asynctcp. So we have to wait until the timeout is reached and asynctcp signals the connection has failed. During this time you cannot try to connect a second time.
And yes, AsyncTCP is old. Development has stopped a while ago despite the issues. I included it in this library for compatability. You might be able to use alternative libraries but I didn't see one yet that addresses the timeout issue.
Just to be clear: I can't change the duration. But it is important to know if the fix solves the problem (eventually).
So, after one week I had several disconnects with the original 1.4.4 with a successful WiFi but not MQTT reconnect. Here, at the final destination of the module with no strong WiFi I have no chance to have a logging monitor all the time at the module. With the test module the MQTT came back in shorter tests.
I will now use you test branch (line 274 - break deleted) also for the official module and view the behaviour in the next days. And without this in the platformio.ini:
build_flags =
-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE
-DDEBUG_ESP_MQTT_CLIENT=1
monitor_filters = esp32_exception_decoder
build_type = debug
I understand. I hope will be able to restart working on this issue in the coming days...
Don't worry about the repair ttime. My observations with the branch library. I added counter to the WiFi and MQTT restarts and after one day I had 21 WiFi and only 3 MQTT restarts - result http connected but MQTT not. Second view 6 WiFi restarts and 2 MQTT ones, same result. Http initiated ESP reboot via browser brings normal operation again.
So the picture is stable - sorry ;-)
So the WiFi disconnect doesn't trigger a TCP disconnect. If so, that's very unfortunate as there not much we can do in this library. I'm not giving up though.
Meanwhile, you can force disconnect if WiFi drops. (.disconnect(true)
)
I've added state change logging to the async-connect
-banch. It'll give us much more insight about what's happening.
I compiled again and installed it in the test environment. I could not reproduce an unsuccessful MQTT restart. It is only the delayed MQTT restart when WIFI is already long connected again - but you explained this already and it would not hurt. But also in the real environment it cost several hours to rech this state. Attached is a log of several WIFI disconnects - at around [609032] the last restart happens. I will try again to come to a failure scenario, but have to switch of now my test environment with the logging possibilities. Test_log_20230809.txt
I'm still in the process of an (international) relocation. I hope to be settled again soon so I can test as well. I haven't forgotten about the issue...
Don't worry. I know you have not forgotten it. I just give input as good as I can do.
Just a question: why are you using the async version? On an ESP32 you can achieve non-blocking behaviour with the regular version.
Sorry for the delay, did not follow the issue for some time.
ESP32 has two cores, but not all functions are automatically distributed between the different cores. So I was not aware, that the sync version is generally non blocking.
I wanted to prevent, that in case of WIFI or CAM picture issues the system is blocked and not working or due to my watchdog functions self repairing (reboot or your mqttClient.disconnect(true) hint).
I used the hint and added it to my
case SYSTEM_EVENT_STA_DISCONNECTED:
routine
It was better, but still sometimes MQTT came not back - only with an additional
your mqttClient.disconnect(true)
triggered via the http-Web interface from my NodeRed control, it came back again.
So you propose to use the sync version for ESP32?
Just a feedback. Yesterday I installed the sync. version and after 24h and 4 WiFi-restarts the MQTT still is alive and the CPU shows 9°C lower temperature. So all good and let's see the result over 1 week. I changed only the method via:
#include <espMqttClientAsync.h> and
espMqttClientAsync mqttClient;
to
#include <espMqttClient.h> and
espMqttClient mqttClient;
and took out the manual restart workaround:
case SYSTEM_EVENT_STA_DISCONNECTED:
...
mqttClient.disconnect(true)
...
Good to hear. I'm surprised about the temperature change. It's not that the ESP32 has any CPU frequency scaling of some sorts. Less WiFi traffic might do something, I really don't have a clue.
Anyway. despite your success, I'll keep this issue open. You're merely avoiding it.
Thanks, but a question again. I am always reading, that only one CPU is really used by the applications. Why is there a difference, between ESP8266 is blocking and ESP32 not, so that I can use your sync version for ESP32 unblocking usage? Sorry for this question, but I found no good explanation for your hint so far.
ESP32 has an operating system so you can define different tasks. Like on your PC, you have different programs running at the same time.
espMqttClient (by default) creates its own task where it does the connecting, sending and receiving. This tasks works independently from the code you have in your loop()
in your Arduino program.
So while your Arduino code is running in one task, espMqttClient is running in another task. The espMqttCient task might be blocked during connecting but your Arduino task keeps running .
ESP8266 doesn't have an operating system like ESP32 has. So you cannot create a separate task. Hence, if espMqttClient has to wait for the connection to be made, your Arduino code will also have to wait. The Async version works differently. No code is running until there is a certain event (TCP connected or disconnected, MQTT packet comes in, you enqueue a packet...)
Just a short Feedback after using synchronous MQTT Version for 12 days: stable
Uptime [d:h:m]: 12:19:52
MQTT restarts: 24 / WIFI restarts: 19
so like in the asynchronous usage still my weak WiFi to this ESP but always stable after re-connects. And the earlier discussed positive side effect: the big pictures are much faster transferred via MQTT to my application.
Closing this issue in favor of #133
This topic is solved but async troubles are not yet.
@GnomiBerlin
I had the same observation due to an instable WiFi connection to an ESP32-CAM module. http Server was always reachable after WiFi reconnects, but the MQTT stops after some time.
Then I changed to this 1.4.4. version, but still have this problem. In the http page I added two links for ESP.restart() and for mqttClient.disconnect(). Both are working. But after some time, when MQTT is dead, the mqttClient.disconnect() is not helping.
I want not to open this issue as it is may be another reason, but MQTT is not stable.
Environment:
Code snippets:
Debugs: After ESP32 restart:
After mqttClient.disconnect():
Originally posted by @GnomiBerlin in https://github.com/bertmelis/espMqttClient/issues/102#issuecomment-1646839715