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
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.
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
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