# Send instruction to LoRa Device page

Note that for this tutorial you need to use a **LoRa** device.

## 1. Request downlink

Go to the **All Devices** page and click on the device you want to send a downlink to.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FxcImZ82mAvbKSQMSJhDt%2Fimage.png?alt=media&#x26;token=be02f20d-5286-42ae-b1df-358aa5a19b1e" alt=""><figcaption></figcaption></figure>

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 `1`.
* **Payload**: is the data you want to send to your device, written in hexadecimal characters. You could use for instance `010203`.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FN5RU7WcY2BnyJRaVDMD7%2FScreenshot-2023-01-30-at-14.00.40.jpg?alt=media&#x26;token=7de551fd-c65b-4b69-b3d7-8627ec70783a" alt=""><figcaption></figcaption></figure>

Click **Submit** to request the downlink to be sent to the device.

## 2. Check status of downlink

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.&#x20;

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2FnGi9fHvPbeV1AEayOBmJ%2FSend-instruction.jpg?alt=media&#x26;token=b214bcc4-6788-4ac1-a596-afd12119edbf" alt=""><figcaption></figcaption></figure>

**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.

Learn more about [downlink statuses](https://docs.kpnthings.com/kpn-things/building-blocks/devices#downlink-status). 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).

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2F8pwaqKSyJyFG9AfMtZpU%2FACK.jpg?alt=media&#x26;token=348254ea-deac-4155-a4f8-3faf36ffd359" alt=""><figcaption></figcaption></figure>

* 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.

<figure><img src="https://1453626848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl6RrePMSAjRvOgcHjMBZ%2Fuploads%2F2XagTNNhOLKB3VzMWgTD%2FDelivered.jpg?alt=media&#x26;token=59c5df4f-d460-4a6e-84bb-c70b3bc48f3b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**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](https://docs.kpnthings.com/kpn-things/general-functions/apis) to learn how.
{% endhint %}

## Optional: send your data to Azure SQL
