Problem to conect rak7258 to MQTT Mosquito broker

i have a rak7258 with this configuration

I am trying to connect to a mosquito mqtt server, but I introduce the topics that they indicate in the gw but I do not receive anything
The gw receives data, and I can see it, but nothing appears on the server, do you think what it might be?

Hi @carlos,
If you want to see the data from the device, you should subscribe to the topic : application/<application_ID>/device/<device_EUI>/rx.
You can see the topic templates here :

Hellow Nikola,
I tried it and it did not work, can you think what could be? I’m going crazy

Please doublecheck the settings of the MQTT.fx.

I have the same options cheked

The broker’s address is the address of the server that hosts the mosquito broker, right?

Your Broker Address is (localhost) which means that your MQTT broker is looking for this topic on the PC that you use to run mqtt.fx. Here you need to give your GW address.

i change it now, i put my gw adress but it did t work

Have you set the User Credentials right in MQTT.fx?
Also, I started reading the theme from the beginning and I found out smth strange in the GW settings here in MQTT Broker Adress you have to set (localhost), and from what I see it is not set like that :

I have another ip since this GW is in a different network than the local host. That was the ip of the server where I have the mosquito broker. I have checked the connectivity by ping between the server and the GW and it is correct, as well as port 1883 is open

This is because there are two distinct uses of MQTT in such a system, not just one.

The first usage is for the gateway component to send (via the UDP to MQTT bridge) raw encrypted traffic to the network server on the gateway/ topics.

The second usage is for the network server component to send decrypted traffic to application consumers on the application/ topics.

Since the asker wants application traffic not raw encrypted traffic, it’s the network server that needs to have its output pointed at the external MQTT broker.

Both the gateway component’s MQTT bridge and the network server’s input side need to remain pointed at the on-board ( loopback) MQTT broker.

Even if the output of the network server is pointed at the external broker, the system will be broken and pass no data if in the process of setting that up the gateway bridge or the network server’s input were accidentally pointed somewhere other than the internal broker. (In theory one could put the raw gateway traffic on the external broker, but this would only make any sense in a system running the network server in the cloud, as otherwise the data will make an unreasonable number of hops between gateway box and cloud)

1 Like

I really don’t understand very well if that applies to me (excuse my ignorance)
I have tried putting the IPs that you said and it still doesn’t work.
I don’t know what else to try

Basically you’re going to need to take time to understand the architecture of how the various pieces of the system fit together, and the above explanation.

Perhaps what you should do is reset the RAK7258 to factory configuration, make sure everything works, and then change only the address of the network server’s application interface MQTT broker.

I understand more or less how it works.
I have a structure like the one in the photo.
The GW is inside a different network (vlan) than where I have the mqtt server hosted. All ports and connection are enabled, so I have a connection


What I do not understand is why after following the steps in this manual I cannot get the data in my broker(sorry but i can upload the file)
LoRaWAN Deployment Scenario 1:
Using your Gateway as a LoRaWAN
Server Hub
WisDevice Series

Unfortunately that does not really represent an understanding of how the system works. In particular, it is missing both the role of the UDP-to-MQTT gateway bridge, and the fact that there are two entirely distinct uses of MQTT in the chain of processing and delivering an uplink, not just one.

I’d strongly encourage taking time to understand what each component of the system is responsible for, and how it interacts with the others, as it will be very hard to trouble shoot issues without a clear mental picture of how all of the pieces fit together.

if you are using mqtt bridge you must create application server in broker host so configure build in server and use global integration path for mqtt communication.

note topic should be same in gateway and mqtt server.

No! The above is utterly confused.

Again, the MQTT bridge is for the raw gateway data between the gateway part of the box and the internal or external network server. It is NOT used for the application data.

Unless you are using an external network server do not change the settings of the MQTT bridge. Doing so will only break things entirely.

Hi @cstratton

I recently got RAK7258 for my project and was able to communicate with my Lora mote with the built-in lora and application server. Now, I want the gateway to communicate to an external MQTT broker (Mosquitto). And I’ve made the following changes as per this guide

I’ve attached the screenshots of the 3 MQTT connection pages which has to be changed, as far as my understanding goes,:

  1. LoRa MQTT Bridge
  2. In the global integration tab, Application Server Integration MQTT
  3. Gateway Backend Configuration MQTT

But the connection between gateway and the broker is not getting established. I’m subscribing to the gateway using the cmd window and i get this error.

mosquitto_sub -t /gateway/#
Error: No connection could be made because the target machine actively refused it.

Please let me know if there’s anything I’m missing or doing wrong. Any help would be greatly appreciated.

That’s a mistake. You should never change the configuration of the MQTT bridge if you are using the internal LoRaServer.

The only reason to change it would be if you are using an external LoRaServer.

If you want to decoded data to appear on an external MQTT broker, then you need to point the output of the LoRaSerever at that, not the MQTT bridge.

@cstratton ,
Thank you for your instant reply. I followed a couple of threads on the forum and tried to do that to see if that works for me or not.

I disabled the bridge for now and kept the rest configuration as it was earlier. Still, I am not able to connect to the broker. I’m using MQTT explorer client and the host IP I’ve set is The topic I’ve subscribed to see the data is as given in the global integration MQTT template - application/{{application_ID}}/device/{{device_EUI}}/rx

I have microchip’s lora mote at the end node. I started of with sending the data from mote to gateway and I was able to see the data in the WebUI Application tab under Live Device data. Not sure why I’m having difficulty getting it via the broker.

Is there any other thing I’m missing out here? I tested out my installation of broker using the cmd window by pub/sub. Worked very well. Do we have to send any join command before we sub to gateway to initiate the connection?

That would of course prevent it from working at all…