2022-10-04 12:57 AM
Hello everyone,
Currently, I am working with the example LoRaWAN_End_Node on Nucleo-WL55JC1. I am trying to achieve downlink control. Downlink messages are sent from Chirpstack NS.
Right now, I don't know where the function of receiving and processing downlink packets is, in the LoRaWAN_End_Node. I suspect that it is the function OnRxData in lora_app.c but when I tested, it was not what I wanted.
Can anyone help me on finding where that function is and how to implement new code?
P/s: My next goal is to send a hex (01) from Chirpstack NS to the board so that an LED is turned on.
Thank you in advanced, Huy Nguyen.
Solved! Go to Solution.
2022-10-07 05:09 AM
Hello @Community member ,
You were right, you can process the data sent to your device in this function regarding the port on which data is sent.
Then you can process the buffer, a parameter of the structure "LmHandlerAppData_s"
In the End_Node example, depending of the port used to send data, we process the payload to change the class of the device or blink a LED.
You can already use this example for your use case
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
2022-10-07 05:09 AM
Hello @Community member ,
You were right, you can process the data sent to your device in this function regarding the port on which data is sent.
Then you can process the buffer, a parameter of the structure "LmHandlerAppData_s"
In the End_Node example, depending of the port used to send data, we process the payload to change the class of the device or blink a LED.
You can already use this example for your use case
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
2022-10-08 12:56 AM
ah so indeed the reception and the processing of downlink packets is in OnRxData in lora_app.c. I also later used another way to test the function and it was as you said.
Thank you for your answer, Huy Nguyen.
2022-10-08 12:57 AM
@Louis AUDOLY ah so indeed the reception and the processing of downlink packets is in OnRxData in lora_app.c. I also later used another way to test the function and it was as you said.
Thank you for your answer, Huy Nguyen.