Enqueue downlink from Chirpstack Server

I am trying to send enqueue downlink message to a LoRa Device through Fport 131 but it is not reaching the device .How could I get to know the payload is received in device ? Is there any outbound port needs to be open in server level?

Chirpstack → MQTT Broker → Gateway Bridge / MQTT Forwarder → Gateway → Device

Typically there is no extra configuration for an outbound port as downlinks go through the same chain as uplinks, simply reversed. The MQTT Broker is on the same port regardless of uplinks or downlinks.

Has the device uplinked yet? Class A devices only receive downlinks after uplinking.

If the device is uplinking, then you need to find where the downlink is being lost in the chain. Check the logs for Chirpstack then the MQTT Broker then the Gateway bridge and finally the gateway. Once you find where it is being lost in the chain you can start debugging.

Hi Liam,

Here is the log I got

Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.933166Z INFO gRPC{uri=/api.DeviceService/Enqueue}: chirpstack::storage::device_queue: Device qu
eue-item enqueued id=0708d0fc-8d5e-4f6d-9753-5760f6938584 dev_eui=70b3d53990000c30
Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.933298Z INFO gRPC{uri=/api.DeviceService/Enqueue}: chirpstack::api: Finished processing request
status=“200” latency=5.589411ms
Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.988250Z INFO gRPC{uri=/api.DeviceService/GetQueue}: chirpstack::api: Finished processing reques
t status=“200” latency=2.147447ms

Mar 07 00:00:05 cloud4c systemd[1]: Reloading Mosquitto MQTT Broker…
Mar 07 00:00:05 cloud4c systemd[1]: Reloaded Mosquitto MQTT Broker.
Mar 15 15:29:22 cloud4c mosquitto[731]: warning: can’t get client address: Connection reset by peer
Notice: journal has been rotated since unit was started, output may be incomplete.

Mar 22 10:49:13 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:49:13.513683827+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Mar 22 10:49:43 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:49:43.521880311+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Mar 22 10:50:13 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:50:13.521052791+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Mar 22 10:50:43 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:50:43.514905912+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Here it seems correct I guess how to check the gateway logs and is there any whitelisting required to connect the server to gateway?

FYI its useful to use the “preformatted text” option for displaying logs:

Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.933166Z INFO gRPC{uri=/api.DeviceService/Enqueue}: chirpstack::storage::device_queue: Device qu
eue-item enqueued id=0708d0fc-8d5e-4f6d-9753-5760f6938584 dev_eui=70b3d53990000c30
Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.933298Z INFO gRPC{uri=/api.DeviceService/Enqueue}: chirpstack::api: Finished processing request
status=“200” latency=5.589411ms
Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.988250Z INFO gRPC{uri=/api.DeviceService/GetQueue}: chirpstack::api: Finished processing reques
t status=“200” latency=2.147447ms

Mar 07 00:00:05 cloud4c systemd[1]: Reloading Mosquitto MQTT Broker…
Mar 07 00:00:05 cloud4c systemd[1]: Reloaded Mosquitto MQTT Broker.
Mar 15 15:29:22 cloud4c mosquitto[731]: warning: can’t get client address: Connection reset by peer
Notice: journal has been rotated since unit was started, output may be incomplete.

Mar 22 10:49:13 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:49:13.513683827+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Mar 22 10:49:43 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:49:43.521880311+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Mar 22 10:50:13 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:50:13.521052791+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats
Mar 22 10:50:43 cloud4c chirpstack-gateway-bridge[615]: time=“2024-03-22T10:50:43.514905912+05:30” level=info msg=“integration/mqtt: publishing event” event=
stats qos=0 topic=in865/gateway/b827ebfffe68a231af/event/stats

In these logs this line:

gRPC{uri=/api.DeviceService/Enqueue}: chirpstack::storage::device_queue: Device queue-item enqueued id=0708d0fc-8d5e-4f6d-9753-5760f6938584 dev_eui=70b3d53990000c30
Mar 22 10:45:52 cloud4c chirpstack[619]: 2024-03-22T05:15:52.933298Z INFO gRPC{uri=/api.DeviceService/Enqueue}: chirpstack::api: Finished processing request
status=“200” latency=5.589411ms

Indicates that the message was queued for downlink by Chirpstack. Im not sure what the error underneath of that is but it doesn’t seem critical. Then the logs below that just show the gateway sending a couple stats messages.

The issue is that there is no log showing that Chirpstack published the “down” event to the MQTT broker, nor is there an uplink event. So the downlinks are not being sent to the MQTT Broker, but this is expected as (assuming the device is class A) the downlink can only be sent after an uplink.

Have you made the device trigger an uplink when the downlink is in queue? If the device is sending uplinks but not being received then there is a problem with the uplink chain and that is what you should be troubleshooting (Maybe a band mismatch between device and gateway).

Hi Liam,

The uplink is working fine I am receiving the data from the device. The issue is only with downlink. Where I can check the band issues? Is there any configuration for the downlink message in chirpstack?