This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3235S: RabitMq MQTT Connection Error

Part Number: CC3235S

Hi,

I am trying to connect with rabitmq broker, below are the parameter set in code, 

#define MQTT_CONNECTION_FLAGS       MQTTCLIENT_NETCONN_URL | MQTTCLIENT_NETCONN_SEC \
                                    | MQTTCLIENT_NETCONN_SKIP_CERTIFICATE_CATALOG_VERIFICATION
#define MQTT_CONNECTION_ADDRESS     "rhelrmq.api-test.io"
#define MQTT_CONNECTION_PORT_NUMBER  31678

char *MQTTClient_secureFiles[4] = { "devicekey.key", "device.crt",
                                    "ca.crt",
                                    NULL };
MQTTClient_ConnParams mqttConnParams = {
//MQTT_CONNECTION_FLAGS,                  // connection flags
        MQTTCLIENT_NETCONN_URL | MQTTCLIENT_NETCONN_SEC,
        MQTT_CONNECTION_ADDRESS,                // server address
        MQTT_CONNECTION_PORT_NUMBER,            // port number of MQTT server
        SL_SO_SEC_METHOD_TLSV1_2,     // method for secure socket
        SL_SEC_MASK_SECURE_DEFAULT,         // cipher for secure socket
        4,                              // number of files for secure connection
        MQTTClient_secureFiles                  // secure files
        };
        
        .
        .
        .
        .
        .
        .
        .
        
        mqttClientHandle = MQTT_IF_Connect(mqttClientParams, mqttConnParams,
                                       MQTT_EventCallback);
        if (mqttClientHandle < 0)
        {
            while (1)
                ;
        }
        
        

I am getting the below connection error, 

[GEN::ERROR] connect failed: -456<CR><LF>
<LF><CR>
[GEN::INFO] MQTT_EVENT_SERVER_DISCONNECT

I have tested same certificates with mqtt box application and all are working fine. Does anybody know how to resolve this error?

  • Hi Tejas,

    You can find errors in source/ti/drivers/net/wifi/errors.h. -456 is bad CA file, which means the certificate is corrupted or missing from the file system. Try flashing again, and verify the path and filename.

    Best regards,

    Sarah