The network server manages each device’s radio settings with MAC commands: short instructions that ride in downlinks and answers that ride in uplinks. The most important one is adaptive data rate (ADR). This page explains what the network server does by itself and how to influence it from the profile.
Adaptive data rate (ADR)
A device close to a gateway does not need the slowest, longest-range data rate. ADR moves it to a faster data rate and a lower transmit power, which saves battery and airtime and leaves room for other devices.
ADR runs when both are true:
- Adaptive data rate (ADR) is on in the device’s profile (on by default).
- The device itself asks for ADR in its uplinks (most devices do).
How a change is decided
- For each uplink, the network server notes the best SNR among all gateways that heard it.
- Once it has 20 uplinks, it takes the best SNR of those 20.
- Margin = that SNR − the SNR the current data rate needs − the installation margin (10 dB by default, API setting
installationMarginDb, 0–30). - Each full 3 dB of margin is one step. Steps first raise the data rate, up to the profile’s Highest data rate (DR); remaining steps lower the transmit power by 2 dB each.
- The network server never raises a device’s power and never lowers its data rate below where it is.
- The change is sent as a LinkADRReq. When the device accepts it, the history starts over, and no new change is made for the next 20 uplinks.
When a change is accepted, the device’s attributes lora.dr and lora.txPower are updated.
Profile settings
| Field | Default | Effect |
|---|---|---|
| Adaptive data rate (ADR) | On | Off: the network server never sends ADR changes. |
| Lowest data rate (DR) | DR0 | The floor ADR keeps. |
| Highest data rate (DR) | DR5 | The ceiling ADR moves devices to. |
Turn ADR off for devices that move (trackers): their signal changes faster than 20 uplinks.
Other things the network server does by itself
| Action | When |
|---|---|
| Sets the RX1 delay (RXTimingSetupReq) | When the device’s RX1 delay differs from the profile’s, for example an ABP device that starts at 1 s. Repeated until the device confirms. |
| Sets RX1 offset and RX2 (RXParamSetupReq) | When the device’s values differ from the profile’s. |
| Asks for battery and link margin (DevStatusReq) | After each join and then every 24 hours (API setting devStatusIntervalH, 0 = never). |
| Sets an aggregated duty-cycle limit (DutyCycleReq) | Only when the API setting maxDutyCycle is above 0. |
| Answers link checks (LinkCheckAns) | When the device asks; tells it the margin and how many gateways heard it. |
| Answers time requests (DeviceTimeAns) | When the device asks for the network time. |
The device’s battery and margin arrive as telemetry on the next message when Add the radio values is on: lora.battery_level (0–100 %, absent for externally powered devices or when unknown) and lora.margin_db (the link margin the device measured, −32 to 31 dB).
How MAC commands are delivered
- Answers go first, then pending requests, in the downlink’s header (up to 15 bytes). When more is pending than fits, the commands go on FPort 0 instead, and your application downlink waits for the next window.
- A pending request is sent again with each downlink until the device answers, at most 3 times, then dropped.
- The network server answers an uplink even without application data when a MAC answer is due or the device asked for an acknowledgement of its ADR (ADRACKReq).
- MAC commands never block an application downlink for long: when both fit, both go.
Supported MAC commands (LoRaWAN 1.0.x)
| Command | Direction | Supported |
|---|---|---|
| LinkCheckReq / LinkCheckAns | Device asks, network answers | Yes |
| LinkADRReq / LinkADRAns | Network asks, device answers | Yes |
| DutyCycleReq / DutyCycleAns | Network asks | Yes (only when maxDutyCycle > 0) |
| RXParamSetupReq / RXParamSetupAns | Network asks | Yes |
| DevStatusReq / DevStatusAns | Network asks | Yes |
| NewChannelReq / NewChannelAns | Network asks | Answers are understood |
| RXTimingSetupReq / RXTimingSetupAns | Network asks | Yes |
| DlChannelReq / DlChannelAns | Network asks | Answers are understood |
| DeviceTimeReq / DeviceTimeAns | Device asks, network answers | Yes |
| TxParamSetupReq | Network asks | Not used in EU868 |
| Class B commands (PingSlot, Beacon) | — | Not supported |
| LoRaWAN 1.1 commands (Rekey, Rejoin, ResetInd) | — | Not supported |
An unknown command in an uplink stops the reading of the rest of that uplink’s MAC commands, as the LoRaWAN specification requires.

