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.

CCS/CC3220SF-LAUNCHXL: SlNetSock_startSec() is failing in latest SimpleLink CC32XX SDK Azure IoT Plugin (4.10.01.01)

Part Number: CC3220SF-LAUNCHXL

Tool/software: Code Composer Studio

Hi,

I have just updated my project to use the new SDKs:

SimpleLink CC32xx SDK (4.10.00.07)

SimpleLink CC32XX SDK Azure IoT Plugin (4.10.01.01)

Before the update, we were using 

SimpleLink CC32xx SDK (3.30.01.02)

SimpleLink CC32XX SDK Azure IoT Plugin (3.30.00.02)

We're using x509 authentication, I was able to compile with the new SDKs with no issues, but when I tried running I got the message: "SlNetSock_startSec failed to start session".

We didn't have any issues with the former SDKs that we were using...

Can you please advise?... Has something changed?

Thanks,

   Galit.

  • Hi Galit,

    1. Please verify you have the latest servicepack from the 4.10 SDK flashed to the device.
    2. Can you enable logs to check the error code?
      1. If the error is -468, this means the device cannot verify a root CA certificate against the trusted root certificate catalog. You may have flashed a "dummy" certificate or catalog from the SDK.

    Best regards,

    Sarah

  • Hi Sarah, thanks for your answer.

    1. Of course. I have flashed the latest service pack from the 4.10 SDK to the device.

    2. Even when the logs are enabled, I can see no error code, only:

    [../../sdk/umqtt/src/mqtt_client.c:1042] Error: io_open failed
    [../../sdk/iothub_client/src/iothubtransport_mqtt_common.c:2282] failure connecting to address sonar.azure-devices.net.
    [../../pal/src/tlsio_sl.c:371] SlNetSock_startSec failed to start session

    Which error code are you referring to? Which function call? Perhaps I can use a breakpoint to check it?
    I can't seem to be able to break at the call to SlNetSock_startSec() function (in tlsio_sl.c)...

    Thanks,

       Galit.

  • Hi Galit,

    You will have to add the common_sl_prov_debug.a library to your project to see error codes.

    To set breakpoints, you will need to add the file directly to your project. Left-click on the project in your workspace, select Add Files, and either copy or link to tlsio_sl.c.

    Best regards,

    Sarah

  • Hi Sarah,

    I have added library azure_cc32xx_4_10_01_01\source\third_party\azure-iot-pal-simplelink\build_all\sdk\lib\ccs\m4\common_sl_prov_debug.a to my project.

    I still get only this information:

    [../../sdk/umqtt/src/mqtt_client.c:1042] Error: io_open failed
    [../../sdk/iothub_client/src/iothubtransport_mqtt_common.c:2282] failure connecting to address sonar.azure-devices.net.
    [../../pal/src/tlsio_sl.c:371] SlNetSock_startSec failed to start session

    As for adding the file - it is already in my project, under Includes : C:\ti\azure_cc32xx_4_10_01_01\source\third_party\azure-iot-pal-simplelink\pal\src\ tlsio_sl.c , and I cannot break there...
    Shouldn't the file be in my project be default, as It links to to the Azure plugin debug libraries? Including the relevant library, pal_sl_debug.a ?

    Any thoughts?

    Thanks!

       Galit.

  • Hi Galit,

    The source tlsio_sl.c is not compiled in your project. It is part of a linked library. You can use the symbol, but due to compiler optimization, stepping through the debugger this way is not accurate.

    You need to actually add the file to your project by going through the Add File menu, so it shows up in the project pane with the rest of the example source. This will overwrite the linked symbols and allow you to step through the file.

    There is an example of how to do it in this SimpleLink Academy lab, in task 2, steps 6-11: http://dev.ti.com/tirex/explore/node?node=AJ9nHaAsEsae1pf9GfFizw__fc2e6sr__LATEST

    Best regards,

    Sarah