Warm tip: This article is reproduced from serverfault.com, please click

LoRaWAN unconfirmed downlink and re-JOIN procedure

发布于 2017-12-20 15:09:52

Recently I started working on LoRa-enabled devices and noticed that some of them do not handle case when they are unprovisioned from Network Server. This happens a lot during development (especially if NS is under development too).

Here is what happening:

  • LoRa device provisioned on Network/App Server.
  • LoRa device sends JOIN and succeed.
  • I deleted the device entity on the Network Server and add it again. This cause deletion of the session keys that are generated during OTAA and cleanup of the devEUI
  • LoRa device keep sending the data, and it is rejected on the server.
  • LoRa device does nothing to handle it and keeps sending data.

Some devices send JOIN again when power-cycled. But not all devices can be power-cycled at all! Some meters I've seen rejected to work after their hard-wired battery that when re-attached!

Is there any "common" approach of how device should detect/handle such kind of "disconnection" from NS?

Questioner
Max
Viewed
0
Jason 2018-02-11 07:31:26

An end-device could periodically check the session by requesting a downlink for the network server.

Sending a confirmed packet or a link check request should elicit a response from the server.

ADR will request a downlink after 64 uplinks and a response should be received. If no response is seen after 32 additional uplinks the datarate is reduced. If the lowest datarate is reached the default channels are reenabled. The end-device does not considered the session lost or disconnected, it will continue to send packets until the battery is exhausted.

An application should determine when the session has been lost depending on its requirements and expectations.