I am trying to send a message using mqtt to a device, but it is not being received.
I can send exactly the same message using the Enque downlink payload feature on the device page and it is received.
The payload is:
{“confirmed”: true,“fPort”: 10,“data”: “QUxBTg==”}
The mqtt topic is
application/2/device/AC1F09FFFE04615E/command/down
Looks like I’ve solved the problem.
The topic ending was wrong.
The documentation says to use …/command/down
The .toml configuration file says to use …/tx
The latter works.
Hi Thiago,
I’m far from an expert in these things! But, my understanding is that the application server will only forward a message after it receives a message from the device (if it’s Class A). If it’s class C then it will send it anyway, but the device also needs to be configured as Class C.
Alan
Exactly, the application server will only forward a message after receiving a message from the device. When my application server receives a message from the device, it does not forward the downlink message that is in the queue.
Does your gateway send a TX ACK back to ChirpStack? ChirpStack will only remove items from the queue after a TX ACK from the gateway. Reason to not get TX ACKs are:
The gateway was unable to send the downlink for whatever reason
The gateway does not send TX ACKs at all (you might have a really old packet-forwarder installed)
You might want to subscribe to your gateways MQTT topic to debug the above (validate that a .../command/down was sent to the gateway and a .../event/txack was sent back.
Sorry, I mixed things up. It should indeed be .../gateway/ID/event/ack, not /txack. You need to inspect the content of this message to find out if there was any error.