Issue link: https://read.uberflip.com/i/1428377
LoRaWAN Specification ©2015 LoRa™ Alliance Page 17 of 82 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 ADRACKReq 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 Mobile end-devices should use their fixed default data rate as data rate management is not 17 practical when the moving end-device causes fast changes in the radio environment. 18 If the ADR bit is set, the network will control the data rate of the end-device through the 19 appropriate MAC commands. If the ADR bit is not set, the network will not attempt to control 20 the data rate of the end-device regardless of the received signal quality. The ADR bit may 21 be set and unset by the end-device or the Network on demand. However, whenever 22 possible, the ADR scheme should be enabled to increase the battery life of the end-device 23 and maximize the network capacity. 24 Note: Even mobile end-devices are actually immobile most of the time. 25 So depending on its state of mobility, an end-device can request the 26 network to optimize its data rate using ADR. 27 If an end-device whose data rate is optimized by the network to use a data rate higher than 28 its default data rate, it periodically needs to validate that the network still receives the uplink 29 frames. Each time the uplink frame counter is incremented (for each new uplink, repeated 30 transmissions do not increase the counter), the device increments an ADR_ACK_CNT 31 counter. After ADR_ACK_LIMIT uplinks (ADR_ACK_CNT >= ADR_ACK_LIMIT) without any 32 downlink response, it sets the ADR acknowledgment request bit (ADRACKReq). The 33 network is required to respond with a downlink frame within the time set by the 34 ADR_ACK_DELAY, any received downlink frame following an uplink frame resets the 35 ADR_ACK_CNT counter. The downlink ACK bit does not need to be set as any response 36 during the receive slot of the end-device indicates that the gateway has still received the 37 uplinks from this device. If no reply is received within the next ADR_ACK_DELAY uplinks 38
