Processing the Downlink Packet

Check the FOptsLen and FOpts Fields

MAC commands may be found in either the Frame Payload (FRMPayload) field or the Frame Options (FOpts) field. Application data may be found in the FRMPayload field.

downlink-packet-foptslen-fopts

Figure 1: FOptsLen and FOpts fields highlighted in the LoRaWAN® downlink packet structure

The 4-bit FOptsLen field inside the Frame Control Octet is located within the Frame Header in the MAC Payload, as shown in Figure 1.

If the FOptsLen field in the downlink is set to 0, this indicates that the FOpts field is 0 octets long, and the end device should proceed to check the FPort field described in the next section Check the FPort and FRMPayload Fields.

If the FOptsLen is set between 1 and 15, this indicates the length in octets of the variable length FOpts field. The end device must then read the FOpts field, the length of which will now be known. The FOpts octets are found inside the Frame Header within the MAC payload, as shown in Figure 1. Before processing the contents of the FOpts octets, the end device should proceed to check the FPort field described in the next section Check the FPort and FRMPayload Fields.