Replies: 3 comments 6 replies
-
For interest, there is a related problem with downlinks - I've found that some network servers will send an empty downlink to your port number when acknowledging a confirmed uplink. So I try to avoid empty packets in either direction. |
Beta Was this translation helpful? Give feedback.
-
This stack implementation does support transmission/reception of empty FRMPayloads (at least it is supposed to). The LoRaWAN specification allows the following empty FRMPayload transmissions:
This stack implementation uses options 1 and 2 for the uplinks as I think it is a waste of time on air resources sending the FPort without sending as well the FRMPayload. LoRaMac-node/src/mac/LoRaMac.c Lines 1251 to 1314 in 9218d00 Maybe I don't fully understand the observed behavior description. |
Beta Was this translation helpful? Give feedback.
-
Sometimes an uplink or downlink is used as a command or indication, and there are parameters in the payload. When you have a command that doesn't need parameters, you often want to specify an empty uplink or downlink. But it still needs to have a port number to identify the command. |
Beta Was this translation helpful? Give feedback.
-
I was trying to send an empty confirmed uplink the other day and realized that this is not really reliably supported by LoRaMac-node. My intended application was configuration polling. The device would send an empty uplink to a specific port number and receive configuration via the downlink.
As it turns out, LoRaMac-node would internally change the port number to 0 if it has any MAC commands waiting to be piggybacked in order to be able to put those in the message payload. The original port number is lost in this case. Another odd behavior that I ran into was that even if there were no MAC commands waiting, empty confirmed uplinks would not be retransmitted.
This makes me wonder whether empty uplinks are supported by LoRaMac-node. I quickly skimmed the LoRaWAN specification and found nothing that would prohibit those, so maybe this is an implementation limitation? If LoRaMac-node cannot reliably send empty uplinks, maybe it should report an error to the application? Or perhaps the handling of piggybacked MAC commands should be left to the application instead so that empty uplinks to non-zero port numbers could be supported?
Not a critical problem, I am just wondering what the intended behavior is in this corner case.
Beta Was this translation helpful? Give feedback.
All reactions