The integration publishes uplink messages to AWS IoT MQTT and subscribes to downlink messages. The integration uses the same MQTT topic and payload format as The Things Network MQTT.
This guide walks you through subscribing and storing uplink messages and publishing a downlink message.
AWS IoT supports MQTT, HTTP and WebSockets to work with data programmatically. See Protocols for more information.
Uplink Messages #
When developing LoRaWAN applications in AWS IoT, you often want to view data as it arrives for testing if everything works. AWS IoT features a Test view to subscribe to an MQTT topic and show live data.
- Log in to the AWS Management Console
- In Services under Internet Of Things, go to AWS IoT
- In the menu on the left, go to Test
- Enter in Subscription topic the uplink topic
+/devices/+/up
(or<AppID>/devices/+/up
for a specific application). Read more about uplink topics
- Click Subscribe to topic
- Uplink messages are shown as they arrive
Downlink Messages #
When developing LoRaWAN applications in AWS IoT, you often want to send downlink messages to test the behavior of your device. The AWS IoT Test view can also be used to publish downlink messages.
- Log in to the AWS Management Console
- In Services under Internet Of Things, go to AWS IoT
- In the menu on the left, go to Test
- Under Publish, enter a downlink topic to publish to:
<AppID>/devices/<DevID>/down
- Enter the downlink message according to the downlink message format (see MQTT topic and payload format):
For example, sending raw payload:
{
// LoRaWAN FPort
"port": 1,
// Unconfirmed downlink
"confirmed": false,
// Base64 encoded payload
"payload_raw": "AQIDBA=="
}
- Click Publish to topic
- See the downlink message scheduled in The Things Network Console:
See Protocols to learn how to interact with the AWS IoT message broker programmatically.