Page 1 of 1

WifiClient continuously disconnecting

Posted: Tue Apr 16, 2024 3:28 pm
by abdosn
Hi
I have an ESP8266 connecting to MQTT broker using WifiClient using PlatformIO and Arduino framework
What i have noticed is that WifiClient is continuously disconnecting (Although Wifi is stable and connected)
I have figured out a method that is continuously reconnecting to MQTT broker but some messages are fallen

My question is why this happened ? is there any effective method to avoid that ?

Here the debug messages using the flags

Code: Select all

-D DEUBG_ESP_CORE     -D DEBUG_ESP_WIFI

Code: Select all

...

:rcl pb=0 sz=-1
:abort
[My debug] Reconnecting to MQTT .. connected
[hostByName] Host: ********* is IP! // stars is actually my broker ip
:ur 1
dsrcv 0
:del
:ref 1

...