LoRa-STM32WL-DevKIT: After joining TTN the LoRaWAN connection keeps being busy

Started by Volker, June 02, 2025, 06:02:47 PM

Previous topic - Next topic

Volker

We use the LoRa-STM32WL-DevKIT-main.zip from github.

We provided se_identity.h with our values for LORAWAN_DEVICE_EUI, LORAWAN_JOIN_EUI, LORAWAN_APP_KEY, LORAWAN_NWK_KEY, LORAWAN_NWK_S_KEY, LORAWAN_APP_S_KEY.

The modul does successfully connect/join to TTN by call of 
MX_LoRaWAN_Init() in main.c
We see the join acknowledge message on TTN website.
But after MX_LoRaWAN_Init() no further communication takes place with the TTN.
We inserted commands before and after MX_LoRaWAN_Init(); in main.c:
 
  uint32_t loraDevAddrVor;
  LmHandlerErrorStatus_t lmHandlerErrStatVor = LmHandlerGetDevAddr(&loraDevAddrVor);
  HAL_Delay(1000);
  MX_LoRaWAN_Init();  //<<<<<<<<<<<<<<<<<<<
  HAL_Delay(1000);
  uint32_t loraDevAddrNach1, loraDevAddrNach2;
  LmHandlerErrorStatus_t lmHandlerErrStatNach = LmHandlerGetDevAddr(&loraDevAddrNach1);
  bool loraBusy1 = LmHandlerIsBusy();
  LmHandlerFlagStatus_t loraFlagStat = LmHandlerJoinStatus();
  LmHandlerErrorStatus_t mmHandlerErrStatNach2 = LmHandlerGetDevAddr(&loraDevAddrNach2);
  bool loraBusy2 = LmHandlerIsBusy();

The Status messages indicate success. But LmHandlerIsBusy() returns that the LoRaWAN connection is busy all the time.

Perhaps the join acknowledge message from the TTN is not received or not utilized for setting the proper buys status?

Any idea what we do wrong or how to solve the problem?


LubOlimex

What does these lines even do:

bool loraBusy1 = LmHandlerIsBusy();
...
bool loraBusy2 = LmHandlerIsBusy();

The software at our GitHub is old and maybe it doesn't work properly with all functions from the guide:

https://www.st.com/resource/en/application_note/an5406-how-to-build-a-lora-application-with-stm32cubewl-stmicroelectronics.pdf

Maybe try to update the project, using this:

https://github.com/STMicroelectronics/STM32CubeWL/tree/main

There was this Helium project that a customer posted, while Helium is different network than TTN maybe it can give you idea about the settings.

https://olimex.wordpress.com/2024/07/10/helium-meteo-project-uses-bb-stm32wl-ant-and-mod-bme280-to-measure-and-transmit-temperature-humidity-and-pressure-via-helium-lorawan/

https://docs.nordicsemi.com/bundle/ncs-2.9.2/page/zephyr/boards/olimex/lora_stm32wl_devkit/doc/olimex_lora_stm32wl_devkit.html
Technical support and documentation manager at Olimex

LubOlimex

Also if I remember correct the demo at the web was some ping-pong demo between two LoRa-STM32WL-DevKIT boards would communicate over LoRa and print some data over the serial (if I remember one says PING and the other PONG).

I don't think this specific demo was tested in the TTN network, mainly because the TTN networks in our town don't reach our location. So we made some demo went to the center of the city tested the boards confirmed them working and all future tests were done between two boards.
Technical support and documentation manager at Olimex

Volker

Thank you for your advice.
Anyway, we put a lot of effort into this project. We found out that neither the onboard debugger does work properly nor that the provided sample software is tested properly.
According to your advice we shall now adapt the sample software by ST from ST sample boards to the Olimex board.

No, we don't. We give up with this board and put it to scrap. We look for a board from another vender with better support. Good bye Olimex.
 

LubOlimex

Well, it is sad that it turned out this way, but comparison and evaluation of similar products is part of the engineering process. We do the same when selecting components or parts.
Technical support and documentation manager at Olimex