3 - Receiving Messages

Messages sent from a network server to an end device are referred to as downlinks. These are sent to the end device via a single gateway. If there are multiple gateways near a device, the network server will select the most suitable gateway to broadcast from. This means the end device does not need to consider de-duping.

Devices operating in Class A mode only receive downlinks during the receive windows opened following an uplink, as described in the section Opening Receive Windows of the Sending Messages Book.

Devices that support Class B mode as well as Class A can receive additional downlinks in receive windows opened at fixed time slots. Read more about Class B mode in the Class B Book.

Devices that support Class C mode as well as Class A can receive additional downlinks at any time. Read more in the Class C: Continuously Listening for Downlinks book.

Todo

Fix link

In this book, you learn how to receive and handle downlink packets using the LoRaWAN® 1.0.4 specification.

Handling MAC Commands

Receive Windows Parameters Setup Request (RXParamSetupReq)

The network server requests updates to the data rate offset between the uplink and the first receive window (RX1) using the RXParamSetupReq command. The network server also requests updates to the frequency and data rate for the second receive window following an uplink (RX2) using the same command.

The end device must verify the validity of the settings. If the settings are valid, the end device must apply the new settings. In either case, the end device must respond with a RXParamSetupAns command, as described in section Receive Window Parameters Setup Answer of the Sending Messages Book. The RXParamSetupAns command informs the network server whether or not it was able to apply the settings.

Learn more in Section 5.4, ‘Receive Windows Parameters’ (page 33) of the LoRaWAN® Link Layer Specification v1.0.4.

Warning

The RXParamSetupAns command should be sent with every single uplink until a Class A downlink is received back from the network server to avoid connectivity loss.

For Class C devices, after the network server transmits the RXParamSetupReq MAC command, it will not send any more Class C downlinks until it receives the RXParamSetupAns response from the end device. It is therefore important that the end device responds with the RXParamSetupAns message in a Class A uplink as soon as possible.

If your device uses Activation by Personalization (ABP), the settings updated by this command must be stored in non-volatile memory (NVM), so that they persist even when the device is reset, and connectivity is not lost.

Read more in section Handling Commands That Modify Downlink Parameters.