Library timer issue


I am using sx1262_Arduino library I have made few modifications according to my requirement, I face an issue in connecting to TTN and here’s the screenshot. Also i’ve noted that the loraMacInitializationTime is 0.
How do i resolve this?

I don’t see a problem in your screenshot?
What changes did you make to the library?


I have not made any changes in the library but I am using Segger Embedded studio for nordic (nrf52832), however I find issues in the xTaskGetTickCount() function does not return the proper xTimeNow value. It is returning zero ! so the lora join callback never occurs.



Could you explain the FreeRTOS stack size and priority used in sx1262_Arduino(Board.cpp file) library.
if(xTaskCreate(_lora_task, “LORA”, 4096, NULL, TASK_PRIO_NORMAL, &_loraTaskHandle))

is there any reference to the freeRTOSConfig.h file for the library?

Not sure what you mean.
xTaskCreate(_lora_task, “LORA”, 4096, NULL, TASK_PRIO_NORMAL, &_loraTaskHandle); is just using the API call to start a task that is provided by FreeRTOS which comes with the Arduino BSP for the nRF52 MCU’s.

Btw, your questions have nothing to do with the Network Server Stack for LoRaWAN. What RAK module are you using? The WisDuo RAK4630 or the WisBlock RAK4631? I want to move this thread into the correct category.

The RAK module used is RAK4631. However we are unable to push the data to TTN network server. As in earlier screenshot no payload is transmitted after the forward join-accept message.
We are debugging for issues. The IDE used is segger Embedded Studio.
Could you please help us in this regard?

I have no experience using Arduino code and libraries with Segger Embedded Studio, but I don’t think that using that IDE would change any timer behaviour.

Using PlatformIO (which is using the ArduinoBSP), I have not encountered any of the problems you are listing above.

Do you have any debug output from the RAK4631, does it receive the JOIN ACCEPT message from TTN?
Did you try to enable the debug output of the library itself to see if there are any error messages showing?

On TTN, what LoRaMAC stack are you selecting for the device? SX126x-Arduino is LoRaMAC stack version 1.0.2.

In addition, I never touched the freeRTOSConfig.h and changed anything in there. When using ArduinoIDE or PlatformIO, you do not need to change anything there.