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.

LAUNCHXL-CC3235SF: AWS IoT core integrations with SDK 7_10

Part Number: LAUNCHXL-CC3235SF

Tool/software:

I am facing the difficulty to integrate the AWS Iot core mqtt with my controller using secured keys, I am trying pass my CA certificate.

I have already raised a query regarding but I couldn't any solution to my issue well I attaching the link to my previous query
https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1418544/launchxl-cc3235sf-aws-iot-core-integrations-with-sdk-7_10/5447182#5447182


I was unable to fix the certificate parse issue for PEM files but I got some query where they where able to resolve the issue but add a NULL to key, I have tried to add the NULL to key by following the query statement but still didn't resolve the issue. So I am attaching the query links here for reference so if anyone can help me how to bypass this issue.
https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1365782/cc3220sf-launchxl-mqtt-aws-tls-1-3-connection-failed/5232690?tisearch=e2e-sitesearch&keymatch=%20user%3A571520#5232690

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1227423/launchxl-cc3235sf-mqtt-tls-connect-failed?cm_session=5519386c-5641-4d33-9e1d-fa85746c18f0&cm_type=link&cm_link=4999437a-d0cd-4992-a1ad-caf21af67193&utm_campaign=5519386c-5641-4d33-9e1d-fa85746c18f0&utm_medium=email&utm_source=contactmonkey&utm_content=sales%201%3a1&utm_term=AW%3a+Issues+and+Questions+Regarding+MQTT+Connection+with+CC3220SF+LaunchPad

Any help will be appreciated,

Vamsi

  • Hi, 

    I had a little improvement but still have some issue from the log bellow,

    [0;32m[WIFI::INFO] [NETAPP EVENT] IP Acquired: IP=192.168.137.190 , Gateway=192.168.137.1
    [SlNetConnEventHandler] I/F 1 - CONNECTED (IP LEVEL)!
    [SlNetConnEventHandler] I/F 1 - CONNECTED (INTERNET LEVEL)!
    startSNTP: Current time: Sun Oct 13 10:02:07 2024

    [0;32m[MQTT_APP::INFO] Subscribed to all topics successfully

    [0;32m[MQTT_APP::INFO] Wi-Fi connection is UP
    [0;32m[SL-MBEDTLS::INFO] InitTlsSocket:: sd=1, pTlsSock=20008160 slSock=1

    [0;32m[SL-MBEDTLS::INFO] . Connect on tcp/*/4433 ...

    [0;32m[SL-MBEDTLS::INFO] ConfigClientSocket: . Setting up the TLS data...

    [0;32m[SL-MBEDTLS::INFO] Performing the mbedTLS SSL/TLS handshake...
    [0;32m[SL-MBEDTLS::INFO] Success ! SSL/TLS handshake completed !
    [0;32m[SL-MBEDTLS::INFO] Verifying peer X.509 certificate...
    [0;32m[SL-MBEDTLS::INFO] Success !

    ============================================
    MQTT client Example Ver: 2.0.3
    ============================================

    CHIP: 0x31100019
    MAC: 3.7.0.1
    PHY: 3.1.0.26
    NWP: 4.13.0.2
    ROM: 8738
    HOST: 3.0.1.71
    MAC address: 88:01:f9:b5:60:f2

    ============================================
    [0;32m[WIFI::INFO] [SlWifiConnEventHandler] POWERED_UP
    [0;32m[WIFI::INFO] MAC address: 88:1:f9:b5:60:f2
    [0;32m[WIFI::INFO] [Event] STA connected to AP - BSSID:7a:af:08:02:fb:e8, SSID:venusgeo
    [0;32m[WIFI::INFO] [NETAPP EVENT] IP Acquired: IP=192.168.137.190 , Gateway=192.168.137.1
    [SlNetConnEventHandler] I/F 1 - CONNECTED (IP LEVEL)!
    [SlNetConnEventHandler] I/F 1 - CONNECTED (INTERNET LEVEL)!
    [0;32m[SL-MBEDTLS::INFO] . Connect on tcp/*/4433 ...

    startSNTP: Current time: Sun Oct 13 10:58:33 2024

    [0;32m[MQTT_APP::INFO] Subscribed to all topics successfully

    [0;32m[MQTT_APP::INFO] Wi-Fi connection is UP
    [0;32m[SL-MBEDTLS::INFO] InitTlsSocket:: sd=1, pTlsSock=20008160 slSock=1

    [0;32m[SL-MBEDTLS::INFO] . Connect on tcp/*/4433 ...

    [0;32m[SL-MBEDTLS::INFO] ConfigClientSocket: . Setting up the TLS data...

    [0;32m[SL-MBEDTLS::INFO] Performing the mbedTLS SSL/TLS handshake...
    [0;32m[SL-MBEDTLS::INFO] Success ! SSL/TLS handshake completed !
    [0;32m[SL-MBEDTLS::INFO] Verifying peer X.509 certificate...
    [0;32m[SL-MBEDTLS::INFO] Success !
    [0;31m[SL-MBEDTLS::ERROR] mbedtls_ssl_read returned 0

    [0;32m[SL-MBEDTLS::INFO] SlNetIfWifi_close:: Connection Socket 1 was removed

    [0;32m[SL-MBEDTLS::INFO] SlNetIfWifi_close:: Listener Socket 1 was removed

    [0;32m[MQTT_APP::INFO] MQTT_EVENT_SERVER_DISCONNECT

    It is seen that handshake is completed but after that there is an error seen. Could anyone please let me know how to resolve this issue.

    Thanks,

    Vamsi

  • Hi,

    Can you please update how the certificate issue was resolved?

    now it seems the handshake is successful but you fail on return value 0 from recv() which means that the other side closed the connection.

    Would it be possible to get an NWP log to see what is going on under the hood?

    there is a procedure on how to fetch those logs from a dedicated pin (PIN_62) but you would need to add some lines on the application as well.

    Let me know if this is possible.

    Regards,

    Shlomi

  • I have resolved the certificate issue but changing all the three certificate files to .der format as shown in bellow

    char *MQTTClient_secureFiles[3] = {"private.der", "certificate.der", "AmazonRootCA1.der"};

    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
    };

  • Thanks, still doesn't see the relation and why it fixed the certificate issue.

    As for the NWP log, is it possible on your side?

    Shlomi

  • Hi,
    Could you please help how to take NWP logs.

    Thanks,

    Vamsi