Other Parts Discussed in Thread: CC3235SF
Hi TI,
mqttt_client is working well and i'm able to connect with my server (custom) as well, now testing whether is it able to reconnect with the broker once it is disconnected due to internet connectivity gone, attention please, while i'm saying connectivity gone means only i pug out the ethernet cable from router, not router's supply off, wifi is still connected, that's the reason i'm not getting any tls related error, but only it is not able to reconnect with the server. after connectivity gone as MQTT_CLIENT_KEEPALIVE is define to 10 after, 10 sec. i'm getting MQTT_EVENT_SERVER_DISCONNECT, and APP_MQTT_CON_TOGGLE started.
i want to test it min. 30 min, i mean if after 30 min connectivity is coming it should reconnect with the server. but as of now it's going to max 2 min only, some time crashing before this as well. let me tell, i didn't change anything in it, i just took it from sdk , and changed wifi credentials
#define AP_SSID "" // "network-name"
#define AP_PASSWORD "" // "network-password"
and server setting in mqtt_client_app.c
#define APPLICATION_NAME "MQTT client"
#define APPLICATION_VERSION "2.0.3"
// un-comment this if you want to connect to an MQTT broker securely
//#define MQTT_SECURE_CLIENT
#define MQTT_MODULE_TASK_PRIORITY 2
#define MQTT_MODULE_TASK_STACK_SIZE 2048
#define MQTT_WILL_TOPIC "cc32xx_will_topic"
#define MQTT_WILL_MSG "will_msg_works"
#define MQTT_WILL_QOS MQTT_QOS_2
#define MQTT_WILL_RETAIN false
#define MQTT_CLIENT_PASSWORD ""
#define MQTT_CLIENT_USERNAME ""
#define MQTT_CLIENT_KEEPALIVE 10
#define MQTT_CLIENT_CLEAN_CONNECT true
#define MQTT_CLIENT_MQTT_V3_1 true
#define MQTT_CLIENT_BLOCKING_SEND true
#ifndef MQTT_SECURE_CLIENT
#define MQTT_CONNECTION_FLAGS MQTTCLIENT_NETCONN_IP4
#define MQTT_CONNECTION_ADDRESS "xx.xx.xx.xxx"//"mqtt.eclipse.org"//"broker.hivemq.com" //
#define MQTT_CONNECTION_PORT_NUMBER 1883
#else
#define MQTT_CONNECTION_FLAGS MQTTCLIENT_NETCONN_IP4 | MQTTCLIENT_NETCONN_SEC
#define MQTT_CONNECTION_ADDRESS ""
#define MQTT_CONNECTION_PORT_NUMBER 8883
#endif
//#define OTA_DEFAULT_METHOD StartCloudOTA
//#define OTA_DEFAULT_METHOD StartLocalOTA
//#define OTA_DEFAULT_METHOD StartInternalUpdate
mqd_t appQueue;
int connected;
int deinit;
Timer_Handle timer0;
int longPress = 0;
/* Client ID */
/* If ClientId isn't set, the MAC address of the device will be copied into */
/* the ClientID parameter. */
char ClientId[13] = "";
here is some trial's screen shot
1) trial
it stuck here in forever error loop, so it had comment out that loop as it was going every time in it.
2) trial
code crashed itself, before giving connectivity
3) trial
if giving connectivity timely, it's connected and lastly disconnected itself. and stop here forever.
4) trial
crashed.
i'm not able to understand , how it possible, new project from simplelink_cc32xx_sdk_6_10_00_05 without changing anything just changed wifi ssid and password, not even mqtt credentials, went with the default one, wifi is up and mqtt connect is also up, but when checking reconnection by removing cable from router and connecting it back software is not able to reconnect with the server.
please do let me know, what can do for it.
Thanks,
sarju