I have noticed the same behaviour in the SDK 3.7.0-3, if we have no mqtt message, just PINGREQ during this time (1H30, more longer maybe because we change the heartbeat time to 15s) I've MQTT disconnection.
Do you relsove this problem ?
I see similar thing on SDK-3.5.2
----------- NetX -----------
----------- WICED_NETWORKING_WORKER_THREAD -----------
mqtt_disconnect_callback (in mqtt_network.c, this pushes a MQTT_DISCONNECT_EVENT to MQTT lib)
In my case I don't see the reason for the NetX TCP disconnect event.
badic_1722426, is this the same thing on your side?
Sorry, maybe it was a bad manipulation in my side (I've re-flash with my last software and there is no problem). XaYi_2199941, yes I see the same beahaviour when I used the SDK 3.5.2 but with the SDK 3.7.0 the TCP-IP stack seems to be more reliable, (if you used the nx_user.h from the SDK 3.7.0 normally the stability of the stack of the SDK 3.5.2 is better).
I'm now working on 4.0, and the "TCP disconnect" problem still bites me.
I'm really interested in your experience that "with the SDK 3.7.0 the TCP-IP stack seems to be more reliable", but I don't quite understand "(if you used the nx_user.h from the SDK 3.7.0 normally the stability of the stack of the SDK 3.5.2 is better)".
Could you kindly share some more information?
Are you seeing "TCP disconnect" problem on your platform recently?
1 of 1 people found this helpful
Developping a mqtt application which remains connected was very painful with this SDK, because the mqtt library is bugged. I make several modifications is this lib like the modification of the heartbeat interval (set to 1s in default, very too short for internet application) for a variable heartbeat interval set by the server. Moreover the mqtt disconnect and de-init function not working properly (the init function and de-init was completely review to have re-connection without problem).
In my case, my application no need a big stream, so I changed the wifi data rate (wwd_wifi_set_legacy_rate) to prefer stability and long range against a big rate.
Thank you for sharing.
I am also facing several issues with MQTT Reconnect. From your reply it seems like you have some solution for this. If so can you give me some insight on what changes you did to the MQTT Library to make it more stable. I am not able to do a reconnect with the MQTT in 3.5.2
Thanks in advance
Totally agree with your comment "very painful"...
I gave up MQTT reconnect and mostly rely on reboot.