Why we ask
We use confirmedDateDown to downlink command to a LoRaWAN water-meter, and want to guarantee the command be received.
What we expect
We thought that if device not receive the downlink, server will resent it after next uplink.
When water-meter does not really receive the command, it uplink the normal data to server with none ACK flag.
Then loraserver triggers an ACK event which the acknowledged is set to false, and the queue will be delete.
The loraserver’s log shows:
What we have look
We look into the source code, find that every class A downlink
qi will be set a
TimeoutAfter = now, and when no ACK upload, at next chance this pending qi will be delete.
We think it is designed so.
Back to what we want at the beginning, how can we resent the command using confirmedDateDown automatically?
Or, we can listen to the ACK event and reschedule downlink in case it fail?
Update, after few investigations, we want to implement the confirmed down retransmit feature, but we run into problems:
- Went the downlink need to retransmit, the downlink fCnt needs to stay the same, because all queue item is encrypted by AS already, and if we increase the fCnt for this queue item, the hole queue will be mess up. But remain the unchanged fCnt seem to be unfriendly to end-device.
- Then we try to let the AS do reschedule the message when it is false for ACK, but within this process, if anyone schedule a downlink by manual, the retransmit message which we want it to downlink next(if false to ACK) will be postponed.
Then I check the loraserver and lora-app-server in version 0.26 and 0.16, seems that it is AS to keep the queue, every time after uplink, loraserver will ask AS use an fCnt for queue item, then AS sent it to loraserver. Then I have questions:
- Why now the queue is kept by loraserver, if the AS do so, I can do the retransmit more smoothly.
- Again, What should I do or what do you think about the feature(retransmit the confirmed down if it is false to ACK).
Please help us, @brocaar or any other friend.
Really appreciate your help and best regards to you.
It seems i have the same problem and i don’t find how to implements a confirmed downlink secure process.