Send instruction to LoRa Device
Learn how to send an instruction (downlink) to your LoRa Device
Note that for this tutorial you need to use a LoRa device.
Go to the All Devices page and click on the device you want to send a downlink to.
Open the Send Instruction tab. There you will find the input fields to send a downlink to your LoRa device:
- FPort: is the LoRa application port on which to send the data. If you don't use application ports on your device, you can just use
- Payload: is the data you want to send to your device, written in hexadecimal characters. You could use for instance
Click Submit to request the downlink to be sent to the device.
After requesting the downlink, under Status Downlink your downlink will have appeared. Maybe you first see your downlink with the PENDING status, meaning it is still being processed, but if you hit the refresh button (#2 in the screenshot) you should see it switching to EXECUTING.
Queuing At most one downlink can be in EXECUTING at a time. When you submit more downlinks, they will stay in the PENDING state and they will be processed "first in first out". You can have at most 5 downlinks in PENDING. As long as a downlink is in PENDING mode, you can cancel it. If you do so, it will not be send anymore and the status will change to CANCELLED.
Downlinks will only be send to LoRaWAN Class A devices in answer to an uplink, so in order to receive the downlink we should trigger a message from our device. Then the downlink should be send in one of the receive windows.
For example for a Marvin device, the uplink and downlink messages should appear as such in the module communication log. Below you can see the logs of the LoRa module on a Marvin device after receiving a downlink.
Now when you refresh your status downlink table, you will see that an i-icon appeared, stating the following when you hover over it:
Expected log after the downlink is sent by the network
This means that your downlink has been sent to your device by our network.
Now go to the LoRa data tab and click on the top downlink record (#2 in the screenshot). You should find your requested downlink information, FPort and Payload, back in the Content data (#3 in the screenshot).
- If you get all the confirmations of your downlink in the Portal, but not on your device, that means your device did not have enough network coverage to receive the downlink. Sometimes devices have better uplink coverage than downlink coverage, so it can happen that downlinks do not reach your device. Or random physical phenomena are the cause of your lost downlink. Move closer to a window if you are inside or just retry your downlink to get success.
- It could happen that the downlink switches to FAILED on trying to send the downlink to your device. In that case also an i-icon has appeared in the downlink status table, stating the reason why it was not possible to send your downlink. Often it has to do with the network. If this happens, please send your downlink again, the error should not happen often.
LoRa Downlinks sent through KPN Things are always Confirmed downlinks. That way we trigger an Acknowledgement (ACK) from the device in the next uplink, and with that information we can determine whether a downlink was received or not.
Click on the refresh button (#1 in the screenshot) to refresh your Data History table. There should now be an uplink record following your downlink record that contains an ACK (#2 in the screenshot).
- If the uplink containing the ACK was not received by the network, you will see your downlink is still in EXECUTING. When a next uplink is received we conclude the downlink as FAILED, since we do not know for sure whether the downlink has been received. You could state that the quality of service for downlinks through KPN Things is "at least once".
If you switch back to the Send Instruction tab, you should see that the status of your requested downlink has switched to DELIVERED. That means the acknowledgement has been received by the network.
You can also send downlinks by API calls
Are you interested in sending downlinks to your Devices through API calls? That is also possible! Head on over to our API access to learn how.
Last modified 3mo ago