Tool/software: TI-RTOS
I am testing MQTT on CC3220MODA with the SDK 2.10.00.04 and found the below issue.
MQTT connection is being run on a loop as shown in below steps.
- Check if wlan is connected
- call MQTTClient_create with appropriate parameters
- Set will param, user Id and password
- invoke MQTTClient_connect
- if return value is greater than or equal to zero subscribe to topics. Then handle incoming message. When disconnects or if return value is less than zero, continue to step 6
- Sleep for 1 second
- Unsubscribe from topics,
- invoke MQTTClient_disconnect
- invoke MQTTClient_delete
- Loop to step 1
Everything works fine in normal connection, disconnection, reconnection etc, however if the internet fails for a long time, the wlan would be connected and the MQTT steps would cycle with a 1 second delay. This works for some time, but if this happens for an hour or so, and when the internet connection restores, the connection would never succeed. The MQTTClient_connect fails and returns less than zero, and I have to reset the board for a successful connection.
I have checked Run Time Object view to analyse heap and everything look normal i.e the heap memory usage is constant throughout the MQTT cycle.
Appreciate quick help.
Regards,
Zac