cancel
Showing results for 
Search instead for 
Did you mean: 

I Nucleo lrwan problem

Hamdi Oussema
Associate II

I'm currently using I Nucleo lrwan1 shield and STM32L073 to create a Lora end node. I downloaded the latest I cube lrwan (v2.0.0) and there is no configuration to the I Nucleo lrwan1. So I can't make it work.

So, is there anyone who has the same problem or can anyone guide me to make it work.

I also posted the problem on the TTN forum and they recommended me to ask the st community about this problem

here is the link : https://www.thethingsnetwork.org/forum/t/i-cube-lrwan-problem/48864/3

23 REPLIES 23
JCOUP
Associate III

Where are you now? Could you recap the exact HW configuration you are using ? Are you in End-node configuration or in AT_Master configuration ? I'm trying to understand you problem to help you ? Do you drive the USI modem directly thanks to the AT-cmd or by th eway of the AT_Master. Regarding the documentation , you will find some relevant info in the UM 2073 ... regards

The complaint as I read it is that the NUCLEO-L073RZ examples for the NUCLEO+USI combo, as furnished by ST in the LRWAN2 kits, don't work properly out-of-the-box.

That the default UART settings/plumbing are wrong for the AT interface to the USI (I-NUCLEO-LRWAN1)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
JCOUP
Associate III

OK, effectively we encountered some blocking points with this package. You will find here below all the needed fixes to be applied . Major fixe is regarding the fixe applied in lora_driver.c ... Regards

  • Main problem encountered was du to a less memory array allocation. Was already present in the previous version of the package (1.3.1) but without board effect !!! (could be possible following the final mapping organization provided by the linked).

in lora_driver.c in line 81 --> replace 16 by 32 size --> static uint8_t PtrTempValueFromDevice[32] ; /*to get back the device address in */

in sys_app.c --> just reorganize two statements UTIL_TIMER_Init() and Modem_IO_Init() in the SystemApp_Init(void) function
 
 
 */
 
void SystemApp_Init(void)
 
{
 
 /* USER CODE BEGIN SystemApp_Init_1 */
 
 /* USER CODE END SystemApp_Init_1 */
  
 /*Initialises timer and RTC*/
 
 /*UTIL_TIMER_Init();*/
 
  Gpio_PreInit();
  
 /* Configure the debug mode*/
 
#if 1  
 
 DBG_Init();
 
#endif
 
 /*Initialize the terminal */
 
 /*UTIL_ADV_TRACE_Init();*/
  
 Modem_IO_Init();
 
    /*Initialises timer and RTC*/
 
 UTIL_TIMER_Init();
 
 
 
 /*Set verbose LEVEL*/
 
 /*UTIL_ADV_TRACE_SetVerboseLevel(VERBOSE_LEVEL);*/
 
 /*Initialize the temperature and Battery measurement services */
 
 SYS_InitMeasurement();
  
 /*Initialize the Sensors */
 
 EnvSensors_Init();
  
 /*Init low power manager*/
 
 UTIL_LPM_Init();
 
 /* Disable Stand-by mode */
 
 UTIL_LPM_SetOffMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE);
  
#if defined (LOW_POWER_DISABLE) && (LOW_POWER_DISABLE == 1)
 
 /* Disable Stop Mode */
 
 UTIL_LPM_SetStopMode((1 << CFG_LPM_APPLI_Id), UTIL_LPM_DISABLE);
 
#elif !defined (LOW_POWER_DISABLE)
 
#error LOW_POWER_DISABLE not defined
 
#endif /* LOW_POWER_DISABLE */
 
 /* USER CODE BEGIN SystemApp_Init_2 */
  
 /* USER CODE END SystemApp_Init_2 */
 
}
 
in sys_app.c --> remove from MasterApp_Init(void) the Modem_IO_Init()
 
in sys_app.c --> remove Gpio_PreInit(void) the two follwoing statements
 
line 310 --> /* __HAL_RCC_GPIOA_CLK_DISABLE();*/
 
line 312 --? /* __HAL_RCC_GPIOC_CLK_DISABLE();*/

  • in uart.c --> add the sys_conf.h --> to define the USE_USART2 symbol

here is the trace ( Rx pin) transmitted by the modem at reset .. Then after join accepted modem return 254 for battery level and return code OK for the sending frame . On Tx we see the AT+SEND cmd

This problem will be reported on L073 and L053 and will be present in the future next package release ...

JCOUP

@Community member​  - correct: the NUCLEO-L073RZ examples for the NUCLEO+USI combo, as furnished by ST in the LRWAN2 kits, do not work properly out-of-the-box.

"the default UART settings/plumbing are wrong for the AT interface to the USI (I-NUCLEO-LRWAN1)"

Indeed; plus:

  • (a) missing #include(s) of sys_conf.h
  • having fixed the UART selection, the code crashes (Hard Fault?)
  • Project defines duplicate settings in lorawanconf.h & sys_conf.h - leading to 57 warnings