ChirpStack v4 Not Connecting to MQTT (I think?)

A quick search and it seems that I might have an inverse issue.

I followed the Docker approach to setup a fresh instance of CSv4 (sort of)

I had a pre existing instance of MQTT that I use for Node-Red so I modified the Docker Compose file to exclude the instantiation of MQTT. All appears to have worked well but with some caveats.

  1. ChirpStack Web UI pulls up just fine
  2. The Tektelic Macro is connected and publishing status messages to my MQTT server. So I have to assume that the UDP Forwarder and CS MQTT Forwarder are in proper configuration.

I added the Tektelic GW to CSv4 with the EUI number of the GW and it reports never seen. There must be some obvious connection configuration I’ve missed. It might be that the CSv4 is looking in for an internal docker IP address and my MQTT being on an outside IP (another VM).

Any help?

In each of the configuration files I have implemented environment variables as I saw this in a post that has a similar situation as myself. Only they were using certs.

So I have pointed my chirpstack.toml and the region configs to the same mqtt ip and port. The regions are all connecting to my mqtt server just fine. As is my gateway running the mqtt forwarder ipk.

The only missing link here seems to be chirpstack server.

As an experiment, I went ahead and scraped the whole thing and did everything basically as shipped in github. and still the same symptoms. I can see the gateway connect in the MQTT explorer but nothing in the Chirpstack server.

I followed the architecture as follows:

Tektelic → udp pkt forwarder → CS MQTT Forwarder → MQTT Broker

Not getting anywhere… Still…

Bump:

Okay. So I quite literally deleted everything including the VM and started over 100% with the Docker compose file. I excluded Chirpstack Gateway Bridge and Basics Station as from what I gather it is not required given my architecture choices to have the gateway use mqtt chirpstack forwarder to speak directly to the broker.

I have verified that the gateways becomes a client along with my node red instance.

Yet the Chirpstack UI still never recognizes that gateway is connected. Any help?

Do you have any devices communicating through the gateway? The gateway status remains “unseen” until a device uplinks through it.

1 Like

Hmmm….

How did I miss that in the documents? I find that a little odd. My mind got stuck in the ooda loop of “create gateways-> add applications → add devices”.

So @Liam_Philipp are you telling me that I can have any random LoRa device sending packets perhaps to an outside source (like TTN)? And it will hear it and become recognized by Chirpstack?

Thanks for tuning in! It helps.

I’m not exactly sure what you are asking there. By “random device” do you mean end device or gateway? Because the end device doesn’t send to anything in specific, but transmits an RF signal for anything in range (gateways) to pick up. If you meant can the gateway send to TTN and Chirpstack discover it, then no Chirpstack would not discover what the gateway is picking up.

Although if someone else’s end-device which they monitor through TTN is within range of your gateway, your gateway will receive the message (although it would be encrypted) and pass the message onto your network server, which will then reject the message as the devEUI isn’t recognized in your server.

All I was saying was that the “status” associated with a gateway in the UI only gets updated from “unseen” when one of the devices associated with your network uplinks using it. Having the gateway connect to the MQTT broker is not enough for it to say “online” in the UI, Chirpstack needs to see the gateway receive an uplink from one of your devices before it will deem it is online.

1 Like

If that is not your issue, have you configured your MQTT topic-prefixes?

Yeah sorry for the lack of clarity.

What I meant to say was a device that is not registered within my network. So for example I have a device that is registered on TTN. So if I were to power it up and attempt to connect to TTN, would it be enough to get my gateway seen?

But if I understand what you are telling me, I will need to first create an Application on my network and then in turn create a new end device and attempt to get it to join my network. Only then will the gateway switch to seen and hopefully then at the same time will the device I just created be properly see.

Also I have setup the region prefix and I assumed that the gateway prefixes are already good to go. I used the MQTT Explorer and see that it is sending topics to mqtt that look similar to the ones described in the documentation.

Cheers,

Ah, using a device registered in TTN to uplink through the gateway is not enough to get the gateway online status. It’s a bit un-intuitive how the status works but in my understanding a gateway will only come online once it receives a message from a device registered in your Chirpstack network. In my opinion once a gateway connects over MQTT it should come “online” although I guess the reason this is not the case is certain deployments use the gateway bride on the server, and just because that connects doesn’t mean the gateway is online.

Your following understanding is correct though, you will have to create an application and add a device to Chirpstack, then have that device uplink once to have the gateway be registered as online.

1 Like

Thanks Liam. Will give it a shot.