-
Hi all! I have ported Lwan stack to nrf52+sx1262. Node sends uplink packet every minute by Is there any mechanism to send two consequent messages? From the code I clearly see |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@vAnArhist do you have a repo you're willing to share? I started the port of LoRaMac to an RAK4631 module (nRF52840 + SX1262), it builds, but I'm at the point where I initialize I/O. I'd be delighted to test and contribute. Sending batches of messages: your application code needs to maintain a queue of UL traffic and send them one at a time, the LoRaWAN stack won't do this for you. I've implemented this on the STM32WL FW derived from LoRaMac, though ST has a more substantial LMhandler layer. I'd be happy to see if I could port this in your repo. |
Beta Was this translation helpful? Give feedback.
You mention batching of messages, so you probably have a queue. On each OnTxData() completion, you'd set a status that results in the foreground code calling a "send next packet" function. Depending on how you want to use confirmed ULs, you might implement retry logic here as well.
Background:
LoRaMac applications are basically a spin loop in the foreground that drops into deep sleep when there's nothing to be done. An interrupt (timer, radio, etc.) wakes the MCU, the IRQ is handled and may ultimately end-up notifying the app, like OnTxData(), that's why these are in interrupt context (and you generally don't want to modify global state and/or call LMHandler functions there).
Once IRQ pro…