cancel
Showing results for 
Search instead for 
Did you mean: 

Integration guidelines for X-CUBE-CELLULAR and NETXDUO

MD'Si.1
Associate III

Hi,

I'm looking to port an application using the LwIP stack and X-CUBE-CELLULAR to NETXDUO. The goal is eventually create an application that connects to Azure IoT Hub over cellular.

Are there any recommendations from ST on integrating NETXDUO with X-CUBE-CELLULAR or porting an example from X-CUBE-CELLULAR to use NETXDUO?

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
MD'Si.1
Associate III

0693W00000QLLXHQA5.jpgHi @McLovin​ 

Yes I was able to connect to Azure IoT with the NetxDuo stack. My modem was a CAT 1 LTE modem and not a CAT M1 LTE modem.

If you use X-cube-cellular version 7.0.0 then ST and MS NetxDuo team have done the work to connect the PPP interface to the cell modem stack. Some bugs do exist like disconnecting the PPP session and triggering a modem shut down / power down properly.

After that I took the sample_azure_iot_embedded_sdk_with_retry.c example from NetX github as my sample application and merged them. I'm on STM32 Cube IDE version 1.8 so I believe by default that uses the NetxDuo 6.1.7 release. I think I found that in one of the NetX files or maybe the project configuration tool. Pick the NetXDuo release that matches what ST has in their STM32CubeIDE version of you will have version mismatch issues.

You will need to copy over the Azure IoT client embedded Sdk from Netx release into your STM32 project (see my attached screenshot)

Lastly to start the Azure example replace the call to start the Echo client example with the call to start the Azure client. Here is a snippet of what I did in sample_helper_thread_entry() in app_netxduo.c

  /* Start sample. */
#ifdef ECHO_CLIENT
  sample_start(&ip_0, &pool_0, &dns_0, unix_time_get);
#endif //ECHO_CLIENT
 
#ifdef IOT_CLIENT
  sample_entry(&ip_0, &pool_0, &dns_0, unix_time_get);
#endif //IOT_CLIENT

Hope this helps!

View solution in original post

3 REPLIES 3
McLovin
Associate III

Hi @MD'Si.1​ , did you manage to use Azure IoT with the NetXDuo stack? I'm also interested to try this for the B-L462E-Cell1.

MD'Si.1
Associate III

0693W00000QLLXHQA5.jpgHi @McLovin​ 

Yes I was able to connect to Azure IoT with the NetxDuo stack. My modem was a CAT 1 LTE modem and not a CAT M1 LTE modem.

If you use X-cube-cellular version 7.0.0 then ST and MS NetxDuo team have done the work to connect the PPP interface to the cell modem stack. Some bugs do exist like disconnecting the PPP session and triggering a modem shut down / power down properly.

After that I took the sample_azure_iot_embedded_sdk_with_retry.c example from NetX github as my sample application and merged them. I'm on STM32 Cube IDE version 1.8 so I believe by default that uses the NetxDuo 6.1.7 release. I think I found that in one of the NetX files or maybe the project configuration tool. Pick the NetXDuo release that matches what ST has in their STM32CubeIDE version of you will have version mismatch issues.

You will need to copy over the Azure IoT client embedded Sdk from Netx release into your STM32 project (see my attached screenshot)

Lastly to start the Azure example replace the call to start the Echo client example with the call to start the Azure client. Here is a snippet of what I did in sample_helper_thread_entry() in app_netxduo.c

  /* Start sample. */
#ifdef ECHO_CLIENT
  sample_start(&ip_0, &pool_0, &dns_0, unix_time_get);
#endif //ECHO_CLIENT
 
#ifdef IOT_CLIENT
  sample_entry(&ip_0, &pool_0, &dns_0, unix_time_get);
#endif //IOT_CLIENT

Hope this helps!

Guillaume K
ST Employee

see also https://github.com/STMicroelectronics/x-cube-azure-telematics and https://www.st.com/en/embedded-software/x-cube-azure.html . For the moment it's on B-U585I-IOT02 with WiFi interface but cellular support is planned in the future.