Other Parts Discussed in Thread: CC3235SF, CC3200
Hello,
I am just trying to create secure mqtt client to connect with amazon broker by using "mqtt_client_CC3235SF_LAUNCHXL_tirtos_ccs" demo code. I have added the certificate for the same, but not able to connect with aws server. Is there anything else to modify in the code.
After connecting with WiFi network I got the below messages on serial.
[GEN::INFO] Subscribed to all topics successfully
[GEN::INFO] MQTT_EVENT_SERVER_DISCONNECT
#define APPLICATION_NAME "MQTT client" #define APPLICATION_VERSION "2.0.0" #define SL_TASKSTACKSIZE 2048 #define SPAWN_TASK_PRIORITY 9 // 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 "/cc3235sf" #define MQTT_WILL_MSG "will_msg_works" #define MQTT_WILL_QOS MQTT_QOS_0 #define MQTT_WILL_RETAIN false #define MQTT_CLIENT_PASSWORD NULL #define MQTT_CLIENT_USERNAME NULL #define MQTT_CLIENT_KEEPALIVE 0 #define MQTT_CLIENT_CLEAN_CONNECT true #define MQTT_CLIENT_MQTT_V3_1 true #define MQTT_CLIENT_BLOCKING_SEND true #define MQTT_CONNECTION_FLAGS MQTTCLIENT_NETCONN_URL | MQTTCLIENT_NETCONN_SEC \ | MQTTCLIENT_NETCONN_SKIP_CERTIFICATE_CATALOG_VERIFICATION #define MQTT_CONNECTION_ADDRESS "*****-ats.iot.us-east-1.amazonaws.com" #define MQTT_CONNECTION_PORT_NUMBER 8883 char *MQTTClient_secureFiles[3] = {"ca.crt", "cert.crt", "key.key"}; MQTTClient_ConnParams mqttConnParams = { MQTT_CONNECTION_FLAGS, // connection flags MQTT_CONNECTION_ADDRESS, // server address MQTT_CONNECTION_PORT_NUMBER, // port number of MQTT server SLNETSOCK_SEC_METHOD_SSLv3_TLSV1_2, // method for secure socket SLNETSOCK_SEC_CIPHER_FULL_LIST, // cipher for secure socket 3, // number of files for secure connection MQTTClient_secureFiles // secure files }; . . . . . . . .