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
Create / Modify a Channel Request (NewChannelReq)
The network server uses the NewChannelReq command to request the creation or modification of the definition of a bidirectional radio channel. The network server also uses the command to disable a radio channel. The request contains the index of the channel to create or modify, the frequency of the channel, and the range of uplink data rates allowed on the channel.
Note
This command is only to be handled by end devices operating in a region with a dynamic channel plan. Find out if the region you will support uses a dynamic channel plan in Section 1.3, ‘Regional Parameters Summary Tables’ (page 24) of the RP002-1.0.4 LoRaWAN® Regional Parameters specification.
If the command is not supported in the region, the end device must not send an answer. If the command is supported, the end device then validates whether or not the channel is allowed to be created or modified in the region. If the channel index in the request matches a default channel in the region where the end device operates, the end device must not modify the channel. Find the default channels for a given region in the ‘Band Channel Frequencies’ subsection for the region in Section 2 of the RP002-1.0.4 LoRaWAN Regional Parameters specification.
If allowed, the end device must make the changes requested and respond with a NewChannelAns indicating that the request was acted upon. If not allowed, the end device must respond with a NewChannelAns indicating if the issue was with the data rate or the frequency requested. Section Create / Modify a Channel Answer of the Sending Messages Book explains how to send the NewChannelAns response.
Learn more in Section 5.6, ‘Creation / Modification of a Channel’ (page 36) of the LoRaWAN Link Layer Specification v1.0.4.