RAK2245 lora-gateway-bridge issue

I Bought a RAK2245 for Raspberry Pi, after flashing the latest firmware from your site, I installed lora-gateway-bridge, I am using google cloud iot core so I setup the mqtt.integration in the lora-gateway-brige config file to point to google cloud mqtt, the issue is that when I edit the lora-packet-forwarder file to forward packet to my lora-gateway-bridge which is localhost on port 1700, restart the services I start getting this error in journalctl of the lora-gateway-bridge Aug 13 23:42:40 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:42:40+01:00" level=info msg="integration/mqtt: connected to mqtt broker" Aug 13 23:42:40 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:42:40+01:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="/devices/gw-b827Aug 13 23:43:09 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:09+01:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 topic=/devices/Aug 13 23:43:09 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:09+01:00" level=error msg="mqtt: connection error" error=EOF Aug 13 23:43:10 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:10+01:00" level=info msg="integration/mqtt: connected to mqtt broker" Aug 13 23:43:10 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:10+01:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="/devices/gw-b827Aug 13 23:43:39 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:39+01:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 topic=/devices/Aug 13 23:43:39 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:39+01:00" level=error msg="mqtt: connection error" error=EOF Aug 13 23:43:40 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:40+01:00" level=info msg="integration/mqtt: connected to mqtt broker" Aug 13 23:43:40 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:43:40+01:00" level=info msg="integration/mqtt: subscribing to topic" qos=0 topic="/devices/gw-b827Aug 13 23:44:09 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:44:09+01:00" level=info msg="integration/mqtt: publishing event" event=stats qos=0 topic=/devices/Aug 13 23:44:09 rak-gateway lora-gateway-bridge[1297]: time="2019-08-13T23:44:09+01:00" level=error msg="mqtt: connection error" error=EOF Aug 13 23:44:10 rak-gateway lora-gateway-bridge[1297]: time="
But when I set the packet forwarder server to point to my google-cloud server error is received any ideas please?

Hi @Dahir,

So I take it you have installed the gateway bridge on the Google Cloud IoT core, as you seem to point to it , right ?

Regards
Vladislav

Hi @Hobo, No I installed the gateway bridge on my raspberry pi gateway

the idea is that the packet forwarder should forward to the gateway bridge which in turn sends to cloud iot core, but for some reason if I set the packet forwarder server address to the gateway bridge which is localhost I get that error

The lora-gateway-bridge has been installed in the firmware and does not need to be installed.

About the configuration of loraserver and google cloud iot core,please refer to https://www.loraserver.io/guides/google-cloud-platform/

hi @ZhuQI thanks for your reply, I followed the guide on the link above, I have flashed the firmware again but I can’t seem to find lora-gateway-bridge by running the command lora-gateway-bridge please can u guide me on how to find it?

You can see the lora-gateway-bridge process using the command "ps -ef | grep lora-gateway-bridge"

Hi, thanks alot for taking the time, after resetting everything, and using the installed lora-gateway-bridge this is what I get once the bridge is started

due to this error this is what I see on my google cloud IoT Core, the device keeps showing up and then disconnecting again
Capture

and please note that as far as I know what’s causing the error is when I edit my packet_forwarder address in global_conf.json to localhost as below


am using this config because I want the packet forwarder to forward the packet to my gateway-bridge which is on my localhost.
But when I set the server address to nothing for example and restart
as above. the gateway bridge the start up fine without error as below:

also I can confirm that at the google cloud IoT core the connection is now consistent no longer disconnecting as the image below:

Please @everyone I really need your help this is my first experience with RAK2245 and loraserver so I don’t really know what going wrong

Hi @Hobo @ZhuQI @everyone I found a solution to the problem. I enable debug mode in cloud IoT core devices and realized that the fault was in the Device-ID, the issue was that lora-gateway-bridge is case insensitive with regards to the device-id or to be more precise it converts the device-id to lowercase when communicating with cloud IoT core even though I passed it as uppercase in my config file as you can see from above images and on the other hand the google cloud IoT core is case sensitive therefore assumes that the device in uppercase and lowercase are two different devices and hence the error, in the debug logs it keeps raising the error that the device trying to connect is not authorized. This was an eye opener because I couldn’t find this in any documentation

1 Like