Lora-net/LoRaMac-node

Determining ADR & Gateway Status

Closed this issue · 1 comments

If ADR is enabled, is there a way to determine if ADR backoff has reached the terminal statge i.e. fully backed off? Is there an API that be used to determine the ADR status

This is slightly related to being able to determine if the end device is connected to a gateway - presumably if ADR has backed off fully then the node can assume that data is not reaching the gateway/network, otherwise it would not have backed off completely.

On the other hand, if ADR has not fully backed off, but message acknowledgements at the application layer are not happening, the end device can determine that the network is ignoring its messages, presumably because the node is no longer connected to the application at TTN - which suggests a re-join might be appropriate.

So, the basic question is how to determine that ADR status.

Currently there is no API that can be used to determine the ADR back off status.
Up until now there was no need to have such API.

As a general note, an end-device does not connect to a gateway.
An end-device connects to a LoRaWAN Network Server.
A gateway is a simple medium translator, RF communication to IP protocols and IP protocols to RF communication, there is no LoRaWAN processing taking place on a gateway.

To understand how the ADR back off algorithm works please refer to LoRaWAN 1.0.4 specification chapter 4.3.1.1.
The main goal of this algorithm is to ensure that a connection with a Network Server is still valid.

To verify that you have a connection with a network server one may use the LinkCheckReq MAC command.

What we could do in future is to have a notification from the MAC layer when the back off algorithm reaches the last step. Which would enable the possibility to re-join the network.

At the moment there is no scheduled work on such subject.
If someone is willing to propose such addition, contributions are welcome.

In the future it would be nice if you could post this kind of questions on the project Discussions tab. It is a better place to engage discussions and then we can agree if it is an issue or not.
If you don't mind I move this issue to the Discussions tab.