Mqtt sending download message

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

The application server version is 3.15.0

Thanks
Alan

Hi guys, I’m having a problem. When sending commands by MQTT, my commands are queued (application server) and not sent to the device.

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.

The topic naming and defaults have changed over time, but your local configuration is always leading :slight_smile:

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:

  1. The gateway was unable to send the downlink for whatever reason
  2. 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.

How, to troubleshoot for the reason, in 1st point.

Like, gateway is sending ack for downlink but not tx_ack

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.