Processing the Downlink Packet

Verify the Message Integrity Code (MIC)

The end device must calculate the Message Integrity Code (MIC) of the message and verify that the calculated MIC matches the value sent down in the MIC field in the downlink. If the two MIC values do not match, the end device must ignore this message.

Calculate the MIC over the Mac Header (MHDR), Frame Header (FHDR), Frame Port (FPort), and Frame Payload (FRMPayload) using the NwkSKey following the instructions at line 801 in Section 4.4, ‘Message Integrity Code’ (page 25) of the TS001-1.0.4 LoRaWAN® L2 1.0.4 Specification.

Note

The NwkSKey is derived during the activation process, as explained in the End Device Activation Book.

Figure 1 highlights the fields that are used in the MIC calculation.

MIC-Fields-Message

Figure 1: Fields used to calculate the MIC