cancel
Showing results for 
Search instead for 
Did you mean: 

How to integrate netXDuo azure_iot addon with third-party device

hongwei_lyu
Associate

Hi,

The requirement is to port MQTT of NetX Duo to STM32f412 ,without the need to use the TCP/IP and TLS addons in NetX Duo.  Since we have DIGI XBee's modem and we will use its  TLS socket for communications. I have the secure-socket-like interface ready, e.g. createSocket, connect, send, recv, etc...I'm looking at the middleware at stm32-mw-netx.  At the beginning, I expected by providing my own BSD addon, I could run the azure-iot. But it turns out that the BSD addon in that repository is not used by MQTT. Can you suggest how I can integrate my sockets to the azure-iot/MQTT addon?

 

Best regards,

Hongwei

5 REPLIES 5

Wouldn't it be easier to just find a generic MQTT implementation which isn't tied to a particular IP stack?

 

https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md

https://wiki.st.com/stm32mcu/wiki/Introduction_to_NETXDUO

I hope to have the netXDuo azure_iot addon, which depends on its MQTT addon. I'm not sure if any generic MQTT could be used to replace the nexT Duo MQTT addon?

OK - I've edited the title to make that clearer

Guillaume K
ST Employee

If you use a 4G modem that provides its own TCP-IP stack you may have a look at Netxduo compilation flag NX_ENABLE_TCPIP_OFFLOAD. See:

https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/chapter3.md#tcpip-offload

of course you have to provide the offload functions.

no guarantee it works. I didn't test it.

It works at TCP-IP level, not TLS. azure-iot add-on will use netxduo's TLS functions.

Also there are some example of use of cellular modem in X-CUBE-AZURE package on st.com but it is for STM32U5 with Trustzone.

There may be examples in X-CUBE-AZURE-CELLULAR package.

if you want to have technical details about how to connect to Azure IoT without Azure SDK (with your own MQTT client and TLS), see Microsoft doc https://learn.microsoft.com/en-us/azure/iot/iot-mqtt-connect-to-iot-hub#using-the-mqtt-protocol-directly-as-a-device

also:

Implementing MQTT Communication with Azure IoT Hub... - STMicroelectronics Community

 

 

ASEHST
ST Employee

Hello @hongwei_lyu,

These examples might be helpful for you: x-cube-azrtos-f4/Projects/STM32F429ZI-Nucleo/Applications/NetXDuo at main · STMicroelectronics/x-cube-azrtos-f4

 

With Regards,

If your question is answered, please close this topic by clicking "Accept as Solution".