cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble to implement Azure example for board B-L4S5I-IOT01A to Stm32CubeIDE

DJadc.1
Associate II

Hi,

Recently I have been trying to implement an example from ST where data is sent telemetry to Azure. The problem is that Stm32CubeIDE did not generate Netxduo / addons / azure_iot. I am trying to manually add this folder but there are a lot of errors regarding includes and in the example I do not see these folders and files, although in some files they have #include "nx_azure_iot_json_reader.h" which is part of azure-sdk-for-c. If you have any ideas where you need to select somewhere in Stm32CubeIDE to generate this file, please give me advice.

Link to example: https://github.com/azure-rtos/getting-started/tree/master/STMicroelectronics/B-L4S5I-IOT01A

Stm32CubeIDE version: 1.8

19 REPLIES 19
Haithem Rahmani
ST Employee

Hi @DJadc.1​ 

could you please share the errors you are getting?

regards

Haithem.

DJadc.1
Associate II

0693W00000LvqLYQAZ.pngFor now i have problem with these two file which have:

#include <curl/curl.h>

#include <windows.h>

I don't know why Stm32CubeIDE don't generate azure_iot folder so i have to put it manually. if you have idea where i need to select in Stm32CubeIDE option which allows to generate this folder

@Haithem Rahmani​ 

Haithem Rahmani
ST Employee

Have a look at this microsoft package it offers applications the azure_iot for B-L4S5I-IOT01A board.

there your can notice the relevant files imported from the sdk_iot.

hope this helps.

DJadc.1
Associate II

@Haithem Rahmani​ 

Oo thanks it will be very helpful, tonight i will try something with this. if it will work properly i will annouce here

DJadc.1
Associate II

Okey so it works but works at AzureIoTHub and i want to work it at AzureIoTCentral. I was trying to put datas from AzureIoTCentral but i don't see host name or ENDPOINT (serviceOperationsHostName {Your DPS name}.azure-devices-provisioning.net). Do you have any idea where i can get it?

@Haithem Rahmani​ 

DJadc.1
Associate II

Okey so i fix it. if you want send datas to Azure IoT Central you need to activate DPS and fill #define ENDPOINT "global.azure-devices-provisioning.net" and the rest of the data is self-explanatory

This will be work :D

DJadc.1
Associate II

@Haithem Rahmani​ 

I got a problem with porting example project to my new. This problem is related with SysTick because program is going to infinite loop when i click step over before func HAL_Delay(value); I was trying to change SysTick timer to another timer but it given worse result. If you have some free time and you can help me with that i will really thankful. Below is screen with where is the problem and i attach zip file with my project.

0693W00000Lw3U4QAJ.png

Haithem Rahmani
ST Employee

there are 3 common use cases for this problem

  • the SysTick is being used by both RTOS & HAL IP driver

keep the Systick for the RTOS and select another timer for the HAL (TIM6)

  • The HAL_Delay is called in an interrupt context (WIFI_REST_MODULE() )

The HAL_Delay won't run because the SYSTICK_PRIORITY is usally less than the current interrupt no preamption is possible.

you'll need to call the "WIFI_REST_MODULE" outside the interrupt mode.

  • The WIFI_REST_MODULE() is called while the RTOS is not yet initialized

the THREADX is disabling the interrupts while initializing thus you'll need to call the WIFI_REST_MODULE either before the tx_kernel_start() or

in a thread entry function.

hope this helps.

regards

Haithem.

DJadc.1
Associate II

@Haithem Rahmani​ 

Okey so i set SysTick on TIM6 and i tried wifi init before tx_kernel_start() and in thread entry function and this is not work. Do you have any ideas why? or Can you possibly debug the project which i sent in prev message?

0693W00000Lw7YoQAJ.png0693W00000Lw7Z3QAJ.png