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.

CC3235MODSF: Azure MQTT Example Not Working

Part Number: CC3235MODSF
Other Parts Discussed in Thread: CC3235SF, UNIFLASH, CC3220SF

Hi E2E,

Good day!

I have a customer with the following concern.

-------------------------------------------------------------------------------------------------------

I am using azure_cc32xx_2_20_00_05 SDK with simplelink_cc32xx_sdk_2_40_02_00 SDK and the \examples\rtos\CC3235SF_LAUNCHXL\azure\iothub_client_sample_mqtt example is not working.

I have service pack sp_4.1.0.29_3.1.0.5_3.1.0.17.bin installed.

This is related to the issue at the link below but I could not login to write to the forum. The website login seems to be broken.
e2e.ti.com/.../2973995

The console printout is as follows:
[Cortex_M4_0] Starting the iohub_client_sample_mqtt example
Current time: Thu Jun 20 20:34:57 2019

CC32XX has connected to AP and acquired an IP address.
IP Address: 10.0.0.24
IoTHubClient_LL_SetMessageCallback...successful.
IoTHubClient_LL_SendEventAsync accepted message [0] for transmission to IoT Hub.
IoTHubClient_LL_SendEventAsync accepted message [1] for transmission to IoT Hub.
IoTHubClient_LL_SendEventAsync accepted message [2] for transmission to IoT Hub.
IoTHubClient_LL_SendEventAsync accepted message [3] for transmission to IoT Hub.
IoTHubClient_LL_SendEventAsync accepted message [4] for transmission to IoT Hub.

There should be a confirmation like below for each message but there is not.
Confirmation[0] received for message tracking id = 0 with result = IOTHUB_CLIENT_CONFIRMATION_OK

If I change the transport from MQTT to HTTP it works properly, sending data to my IoT Hub. With MQTT, there is no data sent and no confirmation. Just wondering if I need to upgrade the SDK or anything like that.

-------------------------------------------------------------------------------------------------------

Thank you for your usual help.

Best regards,

Franz

  • HI Franz,

    The servicepack version that your customer is using is a bit out of date. The latest one that is available within the 3.10.00.04 SDK is version 4.2.0.3_3.1.0.5_3.1.0.17. 

    Please have your customer try updating the servicepack and then re-run the Azure example. While the new servicepack is delivered with the new SDK, the plugin is only validated to use SDK version 2.40.00.xx. Thus, your customer should try using that SDK version in the program code, but flashing the new servicepack to the CC3220.

    Let me know if that doesn't work.

    Regards,

    Michael

  • Hi Michael,

    Thank you for the response.

    My customer tried your suggestion of updating the service pack. However, he still has the same result. He is using LAUNCHCC3235MCD board in development mode with the cc3235sf_out_of_box_tirtos example and sp_4.2.0.3_3.1.0.5_3.1.0.17.bin programmed using Uniflash 5.0. The certificate source files are certcatalogPlayGround20160911.lst. He is also using CCS 8.3 to program iothub_client_sample_mqtt. He can connect to the hub using a C# simulated device and MQTT but not the MCU.

    Best regards,

    Franz

  • Hi Franz, 

    I see your last forum post was dealing with this issue on the cc3220sf. Is that still working fine, but the same procedure is not working on the cc3235sf?

    Regards,

    Dalton

  • Hi Dalton,

    My customer is working on CC3235SF and it is currently not working.

    Best regards,

    Franz

  • Hi Franz,

    Thanks for that update. How is this issue related to the forum link you posted? It seems like a similar issue, but maybe its just not working on this new hardware?

    At any rate, I'll see if I can reproduce the issue. 

    Regards,

    Dalton

  • Hi Franz, 

    I think I can see the problem. You said that your customer is using the certificate source files called certcatalogPlayGround20160911.lst. The users guide for the azure plugin states that "Ensure your CC32XX LaunchPad is updated with a certificate catalog that contains the Baltimore CyberTrust Root CA (ie. NOT the playground catalog). When connecting securely using TLS with Azure servers, this root CA is validated against the certificate catalog, and connection error would result if the catalog does not contain this particular root CA."

    Can you have your customer use the certificate specified here and see if that fixes it?

    Regards,

    Dalton

  • Hi Dalton,

    Thank you for the response. It fixes the issue of my customer. He just had a follow-up inquiry related to your solution. Please see below.

    "I have the correct certificate catalog that is compatible with the Baltimore root certificate used for Azure TLS and MQTT. I want to also use X.509 certificates for Azure IoT Hub device authentication. If the device certificate and root certificate on the server are self-signed, will they not work with the certificate catalog? Eventually they will be signed by a trusted root that would be listed in the certificate catalog, but for now I was wondering if there is anything I can do for development. The X.509 authentication doesn't seem to work right now."

    Best regards,

    Franz

  • Hi Franz,

    This page on the azure github site explains how to set up certificates for testing purposes. That should allow your customer use these certificates until they have properly signed certificates.

    Regards,

    Dalton

  • Hi Dalton,

    My customer has a follow-up inquiry regarding your response. Kindly see below.

    "I wasn't sure if I should use leaf device instructions or edge device instructions. What I don't understand is how to use the certificates with the SimpleLink Azure MQTT demo, for example. Where do the certificates go and which ones do I use? Are they written to flash with specific file names? I see references to possible names like "/cert/device_cert.pem" and "/cert/device_key.pem". Will they be compatible with the certificate catalog? I tried writing the certificate and key to the locations I mentioned and it did not work. I'm just looking for a little more detail. Thank you."

    Thank you for your support.

    Best regards,

    Franz

  • Hi Franz,

    I think I would need to see the code from the example and how it was modified to further diagnose why it is not working. Can you provide that?

    In the mean time I'd recommend your customer try using the self signed certificates in the prov_dev_client_II_sample example. This example is more suited to experimenting with certificates.

    Regards,

    Dalton

  • Hi Dalton,

    Thank you for the response.

    My customer will try your recommendation. I will inform you once there is an update.

    Best regards,

    Franz