4 - Implementing Adaptive Data Rate
Adaptive Data Rate (ADR) describes the scheme whereby the network server controls the data rate, RF transmit power, and channels an end device uses when sending uplinks, as well as the number of retransmissions made.
The network server uses the Received Signal Strength Indicator (RSSI) of the messages received from the end device to determine how close the end device is to the nearest gateway(s). This allows the network server to select the most appropriate settings for each end device.
The benefits of ADR are that it helps preserve the battery life of an end device and reduces interference, giving all end devices on the network the best chance of communicating successfully.
Processing LinkADRReq MAC Command
When the end device sets the ADR bit in uplinks, the network may adjust an end device’s data rate, transmission output power, channels used for uplink access, and the number of transmissions made per uplink frame using the LinkADRReq command.
Note
The LinkADRReq should be handled even when the end device does not set the ADR bit to 1 in uplinks. Devices that are not using ADR should still update their channel plan in response to a request from the network server.
As shown in Figure 1 above, these are the fields of interest in the LinkADRReq MAC command:
-
Data Rate (DataRate), inside the Requested Data Rate and TX Output Power (DataRate_TXPower) field in the LinkADRReq command. This indicates the new data rate the end device should use when sending uplinks.
-
TX Output Power (TXPower), inside the DataRate_TXPower field in the LinkADRReq command. This indicates the new TX Power the end device should use when sending uplinks.
-
Channel Mask Control (ChMaskCntl) in the Redundancy field and the Channel Mask (ChMask) field in the LinkADRReq command. Together, these indicate the channels the end device should use when sending uplinks.
-
Number of Transmissions Per Uplink Frame (NBTrans), inside the Redundancy field in the LinkADRReq command. This indicates the number of times each uplink should be retransmitted.
The rest of this chapter explains how to process the LinkADRReq command. There are three steps to this:
-
Unpack the command and validate that the requests inside can be applied and do not conflict with each other. If there are multiple LinkADRReq commands in the same downlink frame this is considered in this step.
-
If the request is valid, update the end device settings to the settings requested in the command.
-
Respond with a single LinkADRAns command informing the network server if the command or its individual elements have been accepted or rejected.