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.

CC3135MOD: MQTT example doesn't work with ported SDK to STM32 with FreeRTOS

Part Number: CC3135MOD

I am using a CC3135MOD interfaced with STM32 as host MCU through SPI. As per the porting guide we had ported
the APIs for STM32 and I use FreeRTOS in STM32. So I had followed the steps to make the SDK FreeRTOS compliant
and it works fine. With the same software I am planning to use MQTT client APIs. When I added the MQTT Client example
it shows a lot of errors. What is the reason for this glitch? What should be done to make the MQTT APIs compile without any
errors with the already ported software for STM32 with FreeRTOS?

  • Hi Aravind,

    The MQTT client library and other Network Services libraries use the SlNetIf and SlNetSock libraries that are part of our SDK platform. The Network Services libraries are application code that executes on the host MCU. They call SimpleLink Wi-Fi sl_* APIs, but they are not part of the porting layer for the host driver. You can find more details in the Network Service's User Guide in the docs/ns folder of the plugin.

    You can choose to also port the SlNetIf and SlNetSock libraries (in the source/ti/net folder) for your host MCU and RTOS (this may be the best option if you are using multiple NS libraries), or you can adapt the MQTT client source.

    Best regards,

    Sarah

  • Hi Sarah,

    Thanks for your suggestion. So there are two solutions, One is to port slnet if and slnetsock APIs to host MCU and FreeRTOS and other is to adapt MQTT client example. I am not able to understand how to process both of these. Can you give me a little detailed explanation or if already given can you please copy that thread?

    Thanks,

    Aravind

  • Hi Aravind,

    To port slnetif and slnetsock, you would need to use the POSIX RTOS adaption layer, or you would need to port to FreeRTOS. All of the source for these libraries is available in the source/ti/net folder.

    Or you can take the source from the MQTT library in the source/ti/net/mqtt folder and change all the slnetsock APIs directly to the host driver sl_* APIs. You would also need to use the POSIX adaption layer or port to FreeRTOS.

    If you're unfamiliar with POSIX, there's a link to the user's guide in the SDK here.

    Best regards,

    Sarah