Trouble setting up a ChirpStack on RAK2746

Afternoon. I’ve been fighting with this all day now. I started with the directions from here: Raspberry Pi - ChirpStack open-source LoRaWAN<sup>®</sup> Network Server

I then loaded up a good quality SD card with the chirpstack-gateway-os-full-raspberrypi0-wifi-20200820130219.rootfs.wic.gz image

Next I let the RAK2746 sit and boot and setup for a while. Next I configure the wifi on it so it can be on our network.

That done, I move over the swu like the directions say and install it.

At this point, everything is smooth as butter and I can reach the web interface on the Pi.

If I continue following the directions here: https://www.chirpstack.io/project/guides/first-gateway-device/
I get stuck on these lines:

There are two steps involved when adding a gateway. First of all, you need to configure your gateway so that it sends data to the ChirpStack Gateway Bridge component. In the packet-forwarder configuration, modify the following configuration keys:

  • server_address to the IP address / hostname of the ChirpStack Gateway Bridge
  • serv_port_up to 1700 (the default port that ChirpStack Gateway Bridge is using)
  • serv_port_down to 1700 (same)

Is this up to date with how things are currently configured? I ask because I can’t seem to find anywhere to modify those options. I assume this is done over ssh (not the webserver), but I spent half of today trying to make this work and never had any luck! I am working from a clean install now to write these notes up.

Any thoughts what I am missing?

1 Like

OK, maybe I shouldn’t be messing with that instruction. On the previous page, it has the comment

Unlike the chirpstack-gateway-os-base image, you should not update the ChirpStack Gateway Bridge configuration. It is configured to point to the MQTT broker which comes with the chirpstack-gateway-os-full image.

So is that what it is referring to?

Do you mean the RAK7246/G? might be a typo :wink:

The Gateway Bridge comes after the packet-forwarder/concentrator. You should not have to change anything there. I think the guide is for the packet-forwarder, but the newer Gateway OS uses the Chirpstack Concentratord. I also stumbled over this and have not yet found corresponding configuration options in the configuration files. Though I haven’t had much time to look at it just yet.

I’m also not sure why the Image from RAK does not have the full ChirpStack install for the RAK7246/G, like on it’s other Pi based Gateways. Maybe processing limitations of the Pi zero W? Anyways I’d love to have the whole stack working on the Gateway for testing. Otherwise the Pi Zero W could maybe be substituted with a Pi 3 or 4 (still using the RAK 2246 shield)?

I think you might be right.

After a few more hours I was so close, but still not 100% there. I am stuck now with MQTT issues. I spent a loooong afternoon trying a ton of things and googling stuff, but nothing. I can find others having similar issues over the years, but I can’t come up with a solution yet.

Actually, there was two issues. The MQTT one, and the fact that I couldn’t add a network-server for a while. That one was really weird and I am not sure how I fixed it. The problem seemed to be due to something with the fact that everything was running on one box. Again, lots of people with similar issues, but not a good single solution. Eventually I got it to work, but I am not sure if I will be able to recreate it now.

I feel like I am sooooo close, but I’ve drained so many hours into it, I am to the point where I need to decide how much longer to try.

My approach seems to be so close, but the webserver still claims to have never seen the gateway.

When I monitor /var/log/messages I see chunks of code looking kind of like this (it is funny, you can see two end devices I was previously using get mentioned in the log. I am not even worrying about them yet):

Aug 22 19:48:57 raspberrypi0-wifi user.info chirpstack-concentratord-sx1301[442]: Publishing stats event, stats_id: 6d570ac7-5b00-4122-8137-ec147870c249, rx_received: 0, rx_received_ok: 0, tx_received: 0, tx_emitted: 0
Aug 22 19:48:57 raspberrypi0-wifi user.info chirpstack-gateway-bridge[423]: time=“2020-08-22T19:48:57Z” level=info msg=“backend/concentratord: stats event received” stats_id=6d570ac7-5b00-4122-8137-ec147870c249
Aug 22 19:48:57 raspberrypi0-wifi user.info chirpstack-gateway-bridge[423]: time=“2020-08-22T19:48:57Z” level=info msg=“integration/mqtt: publishing event” event=stats qos=0 stats_id=6d570ac7-5b00-4122-8137-ec147870c249 topic=gateway/b827ebfffec9e57a/event/stats
Aug 22 19:48:57 raspberrypi0-wifi user.info chirpstack-network-server[318]: time=“2020-08-22T19:48:57Z” level=info msg=“gateway/mqtt: gateway stats packet received” gateway_id=b827ebfffec9e57a stats_id=6d570ac7-5b00-4122-8137-ec147870c249
Aug 22 19:48:58 raspberrypi0-wifi user.info chirpstack-network-server[318]: time=“2020-08-22T19:48:58Z” level=info msg=“gateway updated” ctx_id=6d570ac7-5b00-4122-8137-ec147870c249 gateway_id=b827ebfffec9e57a
Aug 22 19:48:58 raspberrypi0-wifi user.warn chirpstack-network-server[318]: time=“2020-08-22T19:48:58Z” level=warning msg=“creating insecure application-server client” server=“localhost:8001”
Aug 22 19:49:02 raspberrypi0-wifi user.err chirpstack-network-server[318]: time=“2020-08-22T19:49:02Z” level=error msg=“gateway: handle gateway stats error” ctx_id=6d570ac7-5b00-4122-8137-ec147870c249 error="get application-server client error: get application-server client err
Aug 22 19:49:07 raspberrypi0-wifi user.info chirpstack-concentratord-sx1301[442]: Frame received, uplink_id: d367d1c8-9a51-4a13-824c-15c113e21e4f, count_us: 372296804, freq: 903300000, bw: 125000, mod: LoRa, dr: SF7
Aug 22 19:49:09 raspberrypi0-wifi user.info chirpstack-concentratord-sx1301[442]: Frame received, uplink_id: c61b018d-0fb3-4c7a-b1a6-f6eba929f325, count_us: 374236059, freq: 902700000, bw: 125000, mod: LoRa, dr: SF7

To clean up that wall of text, I think that the two lines of interest (to me at least are)

Aug 22 19:48:58 raspberrypi0-wifi user.warn chirpstack-network-server[318]: time=“2020-08-22T19:48:58Z” level=warning msg=“creating insecure application-server client” server=“localhost:8001”

Aug 22 19:49:02 raspberrypi0-wifi user.err chirpstack-network-server[318]: time=“2020-08-22T19:49:02Z” level=error msg=“gateway: handle gateway stats error” ctx_id=6d570ac7-5b00-4122-8137-ec147870c249 error="get application-server client error: get application-server client err

I am wondering if maybe since everything is running on the same device if I am running into a similar issue as here: gitmemory.com - This website is for sale! - gitmemory Resources and Information.

Sadly, network is not a strong area of mine, but I am going to look into this route a little next

Amazingly, I figured it out. I added these lines to the chirpstack-application-server.toml configuration

[application_server]
  [application_server.integration]
    [application_server.api]
    bind="0.0.0.0:8001"
    public_host="0.0.0.0:8001"

Now it seems to be running as well as when I had chirpstack on my laptop and the RAK7246 was running as a gateway only.

Thanks for the help on all the different threads folks.