2022-03-25 02:33 AM
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
2022-03-26 06:26 AM
Hi @DJadc.1
could you please share the errors you are getting?
regards
Haithem.
2022-03-26 07:07 AM
For 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
2022-03-26 07:25 AM
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.
2022-03-26 07:36 AM
@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
2022-03-26 12:17 PM
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
2022-03-26 02:33 PM
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
2022-03-28 05:11 PM
@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.
2022-03-28 11:53 PM
there are 3 common use cases for this problem
keep the Systick for the RTOS and select another timer for the HAL (TIM6)
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 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.
2022-03-29 04:22 AM
@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?