Issue link: https://read.uberflip.com/i/1428386
LoRaWAN Specification ©2016 LoRa™ Alliance Page 17 of 91 The authors reserve the right to change specifications without notice. 4.3 MAC Payload of Data Messages (MACPayload) 1 The MAC payload of the data messages, a so-called "data frame", contains a frame header 2 (FHDR) followed by an optional port field (FPort) and an optional frame payload field 3 (FRMPayload). 4 4.3.1 Frame header (FHDR) 5 The FHDR contains the short device address of the end-device (DevAddr), a frame control 6 octet (FCtrl), a 2-octets frame counter (FCnt), and up to 15 octets of frame options (FOpts) 7 used to transport MAC commands. 8 9 Size (bytes) 4 1 2 0..15 FHDR DevAddr FCtrl FCnt FOpts For downlink frames the FCtrl content of the frame header is: 10 Bit# 7 6 5 4 [3..0] FCtrl bits ADR RFU ACK FPending FOptsLen For uplink frames the FCtrl content of the frame header is: 11 Bit# 7 6 5 4 [3..0] FCtrl bits ADR ADRACKReq ACK RFU FOptsLen 4.3.1.1 Adaptive data rate control in frame header (ADR, ADRACKReq in FCtrl) 12 LoRa network allows the end-devices to individually use any of the possible data rates. This 13 feature is used by the LoRaWAN to adapt and optimize the data rate of static end-devices. 14 This is referred to as Adaptive Data Rate (ADR) and when this is enabled the network will be 15 optimized to use the fastest data rate possible. 16 Adaptive Data Rate control may not be possible when the radio channel attenuation 17 changes fast and constantly. When the network is unable to control the data rate of a device 18 , the device's application layer should control it. It is recommended to use a variety of 19 different data rates in this case. The application layer should always try to minimize the 20 aggregated air time used given the network conditions. 21 If the ADR bit is set, the network will control the data rate of the end-device through the 22 appropriate MAC commands. If the ADR bit is not set, the network will not attempt to control 23 the data rate of the end-device regardless of the received signal quality. The ADR bit may 24 be set and unset by the end-device or the Network on demand. However, whenever 25 possible, the ADR scheme should be enabled to increase the battery life of the end-device 26 and maximize the network capacity. 27 Note: Even mobile end-devices are actually immobile most of the time. 28 So depending on its state of mobility, an end-device can request the 29 network to optimize its data rate using ADR. 30 If an end-device whose data rate is optimized by the network to use a data rate higher than 31 its lowest available data rate, it periodically needs to validate that the network still receives 32 the uplink frames. Each time the uplink frame counter is incremented (for each new uplink, 33 repeated transmissions do not increase the counter), the device increments an 34 ADR_ACK_CNT counter. After ADR_ACK_LIMIT uplinks (ADR_ACK_CNT >= 35 ADR_ACK_LIMIT) without any downlink response, it sets the ADR acknowledgment request 36 bit (ADRACKReq). The network is required to respond with a downlink frame within the 37 next ADR_ACK_DELAY frames, any received downlink frame following an uplink frame 38
