No MQTT Messages from Dragino CO2 Sensor Reaching Mosquitto Broker

Viewed 14

Hello,

I am trying to forward uplink data from my Dragino CO2 sensor to a Mosquitto MQTT broker running on a Raspberry Pi.

Currently, when I subscribe to the MQTT broker using:
"mosquitto_sub -h "0.0.0.0" -t "lora/#" -v"
I see nothing, even though ChirpStack shows that uplinks are being received from the sensor.

My current setup:

Mosquitto on Raspberry Pi, listening on port 1883 with anonymous access enabled.

Dragino Pico Station configured to forward to tcp://"raspberry pi id":1883, topic lora/#, TLS disabled.

Forwarder is enabled on Dragino.

I can see the Dragino connecting to Mosquitto (logs show new client connections), but no messages are published.

Question:
How can I configure ChirpStack or the Dragino Pico Station to ensure that uplink messages from the CO2 sensor are successfully published to my Mosquitto MQTT broker?

Thanks in advance!

2 Answers

even though ChirpStack shows that uplinks are being received from the sensor.

Assuming ChirpStack is receiving and processing the uplinks fine, it will publish these under ChirpStack specific MQTT topics. You can subscribe to this topic using:

mosquitto_sub -h MQTT_BROKER_IP -t "application/#" -v

Please note that 0.0.0.0 is not a valid IP address. It can be used to bind a server (e.g. MQTT broker) to all network interfaces. However when connecting, you must always specify a valid IP address or hostname.

I am using my Raspberry Pi as the MQTT broker with IP of my raspberry pi. Following the suggestion, I tried to subscribe to the topic:

mosquitto_sub -h "raspberry pi ip" -t "application/#" -v

However, nothing is being received. ChirpStack shows that uplinks from my CO2 sensor are arriving, but they don’t appear on the MQTT broker.

Could you please advise what might be causing this issue?