Using MQTT on windows
Using the internal MQTT broker
This page explains how you can access your MQTT server under windows, retrieve uplink packets and send downlink packets using MQTTX (https://mqttx.app/downloads).
MQTTX connection
Open the MQTTX application, and create a new connection
Configure it with:
Name :
friendly name
Host protocol:
mqtt://
Host ip:
<ip of server gateway>
Port:
1883
Client ID:
<use the pre-configured one>
Username:
tao
Password:
tao
SSL/TLS:
off
MQTT Version:
3.1
let all others fields with the default settings
click
Connect
when finished
Uplink
Default uplink topic is
/uplink-topic
on the MQTT serverOn the MQTTX application
- click on
New Subscription
- configure Topic:
/uplink-topic
- click on
Each new uplink is added in the history panel:
As the payload is JSON based, you can select
JSON
in the upper left combo box to have it indented
Downlink and Downlink Status
Default topics are
/downlink-topic
and/downlink-status-topic
The different downlink delivery failure causes are described here (search for DeliveryFailedCause in the
DevEUI_downlink_Sent report
).On the MQTTX application
- click on
New Subscription
- configure Topic:
/downlink-topic
- click on
New Subscription
- configure Topic:
/downlink-status-topic
- click on
At the end of the panel, you have a formular to send data
configure destination to
/downlink-topic
copy and paste the following JSON extract :
{
"DevEUI_downlink": {
"DevEUI": "70B3D53260001A75",
"FPort": "2",
"Confirmed": "0",
"FlushDownlinkQueue": "1",
"payload_hex": "0304FD"
}
}press the arrow button to send the downlink message
you then receive a first message on the /downlink-topic, it is the exact sent message
you later on receive the transmission status in the /downlink-status-topic, in our exemple, the downlink is rejected due to an
Invalid DevEUI