MQTT forwarder fails to send data to external broker

Hello to everyone,
I just set-up an LPS8v2 Dragino gateway with a sensor. On that side all is working, sensor is sending data every 20’ as expected. Comes the issue with MQTT forwarder to the external broker.

Using console at Dragino level, I checked that some data can be sent to the external broker with command mosquitto_pub. I checked that subscribing to Chirpstack (v4) broker is working as well using mosquitto_sub command.
LoRaWAN Semtech UPD is set-up with following parameters:

  • Service provider: Semtech/Private LoRaWAN
  • Server address: 127.0.0.1
  • Ports: 1700
  • Gateway EUI: key provided in the box BTW the key is named GWID
    As a double check I looked at chirpstack-mqtt-forwarder/configuration.html. All seems to be fine.
[logging]
  level="info"
  log_to_syslog=false

[backend]
  enabled="semtech_udp" 

  [backend.semtech_udp]
    bind="0.0.0.0:1700"

[mqtt]
  topic_prefix="eu868"
  server="tcp://127.0.0.1:1883"
  username=""
  password=""
  ca_cert=""
  tls_cert=""
  tls_key=""

MQTT forwarder using user interface is set-up as such

  • IP of external MQTT broker, port 1883
  • Topic: lora
  • user and password: empty

What I understand Chirpstack MQTT broker should connect to the external broker, but nothing is displayed at external broker level.

External broker running on an RPi, version 1.5.7. MQTT broker 3.1.1

Despite many research, including in this forum, I could find the solution to get the sensor data sent to the external broker. I hope that someone will be able to help me to sort this out.
Thank you.

I think you are confused by the purpose of the MQTT forwarder, and I can’t quite understand your current setup from your explanation.

From what I can grasp you currently have a sensor, that uplinks to a gateway with the UDP packet forwarder and MQTT forwarder installed. Since you have made no mention of an external Chirpstack server, does this mean that your dragino gateway also has a local Chirpstack server? If so is it a regular Chirpstack server or Chirpstack gateway OS?

A few things things that might help clear some confusion:

The Chirpstack MQTT forwarder is not something to send decrypted sensor data out of Chirpstack, it is Chirpstack’s backhaul to a gateway. The MQTT forwarder translates UDP packets from the UDP packet forwarder to MQTT that Chirpstack can understand. So an uplink from a sensor in your architecture should go: Device → gateway’s concentrator → gateway’s UDP Forwarder → Chirpstack MQTT forwarder → Chirpstacks MQTT broker → Chirpstack itself.

Then once it’s in Chirpstack you should use an integration to forward the data to an external platform. For MQTT you just want to change the server= line in the [integration.mqtt] section of your chirpstack.toml. You could also look into MQTT bridging which is a built in tool to MQTT which allows you to have one broker mirror another.