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.

how to include the certificate to the MQTT client example

Other Parts Discussed in Thread: CC3200

HI 

 I am trying to include the certificate to the example code for cc3200 on "mqtt client " 

 am unable to connect to broker  please help me 

help me in including the certificate  to mqtt client example on cc3200

  • Hi,

    Please take a look at: e2e.ti.com/.../498605

    Regards,
    Gigi Joseph.
  • The CC3200-SDK’s MQTT-Client application establishes a non-secure connection w/ IBM’s broker, and now let's assume that you need to change the configuration to establish a secure connection w/ your server using the private key file, certificate file and CA file. Please modify ‘connect_config’ as explained below.

    /* connection configuration */
    connect_config usr_connect_config[] =
    {
        {
            {
                {
                    SL_MQTT_NETCONN_URL | SL_MQTT_NETCONN_SEC,
                    SERVER_ADDRESS,
                    PORT_NUMBER,
                    <method to tcp secured socket>,
                    <cipher to tcp secured socket>,
                    <number of files for secure transfer>, /* 3 'coz of the above assumption */
                    security_file_list  /* See ‘security_file_list’ below */
                },
                SERVER_MODE,
                true,
            },
            NULL,
            "user1",
            <user-name>,
            <password>,
            true,
            KEEP_ALIVE_TIMER,
            {Mqtt_Recv, sl_MqttEvt, sl_MqttDisconnect},
            TOPIC_COUNT,
            {TOPIC1, TOPIC2, TOPIC3},
            {QOS2, QOS2, QOS2},
            {WILL_TOPIC,WILL_MSG,WILL_QOS,WILL_RETAIN},
            false
       }
    };
    
    char *security_file_list[] = {“/cert/clientkey.der”, “/cert/clientcert.der”, "/cert/cacert.der"};
    

    -/Praneet

  • Hi Praneet,


    Thank you for your response, i have one more question please hep me in generating the certificate . and one more do we need to include the certificate to the code

    thank you once and waiting for response

    -/ Suman Baba
  • We don't issue the certificates - Connect w/ your contacts on the server side.
    Of course - You need to program these certificate(s) on the sFLASH.

    -/Praneet
  • I'm closing this thread - For any followup queries, please start a new thread w/ references to the current one for us to track it better.

    -/Praneet