Problem to conect rak7258 to MQTT Mosquito broker

Oh, okay. Well, I think I have to go back to the basics. I’m absolutely new to Lora and Lorawan so the learning is still going.

@cstratton If you had to suggest, can you guide me the steps to connect to MQTT broker?

That would be really helpful to me and I’d appreciate that a lot.
Thank you.

There is an internal MQTT setup that sends data from the gateway part to the ChirpStack that happens to be running on the same hardware. This should not be changed if you want to use the built in ChirpStack.

You need to concentrate on the Application Server configuration. That’s what lets the data flow out.

@nmcc @cstratton
I added my device in the application tab use the appKey generated to send the data from the mote. And I can see all the data under the Live Device Data - Tab.

I’m following the same template as provided in the MQTT topic template tab as in the picture below. I can see all the interactions happening with broker like connected, disconnected, sub, unsub, etc. but not the data. I went through a couple of similar threads but I don’t see any thing different than the way i have set it up.

Oh, one thing i feel might be different is I’m using a private server instead of public. Here’s how my packet forwarder tab looks like.

Please help. I feel totally lost. Thank you.

It would seem it is all configured wrongly judging by the images you submitted.

  1. You are using the built in server, thus the internal Bridge should point to 127.0.0.1 as you.
  2. As you seem to want to forward the Device data that you claim is comming at the application and the node is registered with the built in server you should use the Global Integration feature to point to your external Broker address and port. Again your image shows the 127.0.0.1 This is why the broker does not see anything as you are simply not sending any data to its address.
  3. I suggest you update to the latest firmware not keeping any of the settings so you start fresh first via this link and do the following.

https://downloads.rakwireless.com/LoRa/Indoor-Gateway-RAK7258/Firmware/RAK7258_Latest_Firmware.zip
I. Use the Built-in Server to get your data. Configure an Application and add the Device (you seem to have already done this in a way that it works).
II. Go to the Global Integration tab and configure the MQTT with the address and port of your MQTT broker, the one you would like to see the the data at.
III. The Global Integration Topic Templates on the same page are where you want to look at to get the proper structure to look at when using your external broker.

This should result in you seeing the incoming data.

Regards
Vladislav

@Hobo,

Thank you for you message. I think you missed the link for firmware update. Can you please forward that again?

As for the MQTT port and address, It is running on the same system so wouldn’t that be localhost or 127.0.0.1? Is there a way to confirm the mqtt address or it will be the same as my wifi’s IP?

And do I to need to change the IP in Gateway Backend Configuration → General tab too or just in global integration?

Thank you.
Rahul

Hei @mrahul ,

Check my previous post I updated it.

You state here that your broker is external so it can not be using the local loopback address of the gateway now can it :slight_smile:


Confirming the address is up to you, you are the one that deployed it wherever you did.

Stick to what I suggested for now and try to avoid changing anything else. Lets see what happens.

Regards
Vladislav

Hello @Hobo ,

Thanks for the link. I flashed the new firmware from the link and reconfigured the gateway. Took me a while to familiarize with the new UI.

  • Set the mote on the application with the device EUI and can see the data coming in Live Device Data tab.
  • Went to Global integration tab and put this IP in the broker address as the mosquitto broker is on the same machine. Not sure if its important, but I’d like to mention that I have connected my desktop with a ethernet cable and set up the gateway as AP + client to connect wirelessly.

image

  • Down below, I’ve edited the topic template too. To sum up, this is what my global integration tab looks like:

Also, I also tried connecting by mentioning the client id but not sure if that works.
Please let me know if there is anything I’m doing wrong.

Thank you,
Rahul

@mrahul

So if I understand correctly you have a Desktop that is running the broker that is connected to your router via Ethernet. The gateway is connected to the same router via Wi-Fi.
So everything is in the same LAN. The address in the Global integration is the one the Desktop has.
You mention editing the topics? Why

Regards
Vladislav

Yes, that is correct.

The reason I edited the template is I read somewhere in doc or the webUI that the ID and EUI has to be included. I tried either way though but no luck.

@mrahul ,

I think you are missing the point. These topics best be left as default. What you have done is entered the specific IDs for your particular case, which makes no sense. What if you had 2 devices? How would you do it than?
They are a guideline on how to subscribe to a particular topic, you substitute with the particular ID when you actually subscribe, via the Broker itself.
It would seem you are misconfiguring this part. If there is device data incoming at the application level than it must be the integration/broker that is at fault.
Make sure your gateway is communicating with the broker. Check the IPs and port are matching, make sure the topics are left as default and subscribe in the proper manner.

Regards
Vladislav

I asked in your PM (please reply here), WHY are you using a broker on your PC rather than a client?

What are you trying to achieve?