When you deploy end devices, you have to select the power and the spreading factor. 1
This is really not an easy task. 2
If you choose a high transmission power and a high spreading factor, then obviously you have more chances 3
to reach your gateway, but you are also considerably reducing your device battery life. 4
So the trick is to find the closest value so the device can reach a gateway without wasting power. 5
So what we need to do is to place the end device at its final location, then go on the gateway logs and 6
check the power received, which is what we call the RSSI. 7
You can also check the SNR and depending on the margin you apply, then the LoRa transmission will have a 8
certain robustness. 9
Then once you are done with the specific end device, you check another one and you apply the same process. 10
Obviously that can't be done for a large fleet because it will take ages. 11
So what we can do is to use the network intelligence and the network intelligence for that is called 12
the ADR. 13
ADR stands for Adaptive Data Rate, and adaptive data rate is a little algorithm which runs on the network 14
server. 15
If the end device is set up to use ADR, then that's the network server which will give the information 16
of the power and the spreading factor. 17
So the device will be able to transmit with the most optimized power and spreading factor values. 18
So how does the adaptive data rate works? 19
The first thing we need to do is to activate it. 20
It's very simple. 21
We just have to enable the ADR flag in the uplink frame. 22
When the networks server sees the ADR flags, then it runs the ADR algorithm. And as soon as it finds 23
a better value for power and spreading factor, then it transmit to the end device. 24
To transmit the ADR value. 25
The network server uses a MAC command called LinkADRReq and when the end device receives and accepts the new 26
parameters then it will answer with a 27
LinkADRAns. 28
That's it. 29
Great. 30
Now there is one last thing that we need to explain. 31
It's when exactly the network server will send a request with the values. 32
When this ADR Link MAC command will be sent. 33
Of course it will be great to send a value right after the algorithm has calculated them, but sometimes 34
the network server just can't send them. 35
That's the case if the end-device has been moved outside of the Gateway coverage, imagine you're using 36
SF7 and your device is moved to the other side of the lake. 37
If the device can't reach the gateway, obviously the network server won't even know that it transmits. 38
To explain the ADR behavior, we're going to make three demonstrations for the ADR algorithm, and that's what 39
we're going to do in the next video.