ChirpStackOS 3.6.0 for RPi0-W produces “frame-counter did not increment” error, but ChirpStackOS 3.6.0 for RPi4 works fine

Before I go into the details of this issue, I’d like to mention that I’m well aware of Chirpstack v4, but would prefer to stay with v3 because I’ve had issue with getting v4 working properly. Here are the steps performed to get ChirpStack OS 3.6.0 working with the RPi4:

  1. Flashed chirpstack-gateway-os-full-raspberrypi4-20220802203912.rootfs.wic.gz into an SD card
  2. Updated the OS with chirpstack-gateway-os-full-update-raspberrypi4-20220802203912.swu
  3. Ran gateway-config and set the following:
  • Set concentrator shield to SX1302 CoreCell, US915, Channels 0-7 +64

  • Edited Concentratord config by modifying lorawan_public = true to false

  • Copied a modified version of chirpstack-network-server.toml into /etc/chirpstack-network-server/chirpstack-network-server.toml

    • Pretty typical network server configuration, the only major thing to notice is ADR is disabled with “disable_adr=true”
  • Network-server, Service-profile, Device-Profile, Gateway, and Application are all created via the ChirpStack OS GUI

  • Installed a custom application in ChirpStack OS, which is responsible for automatically creating devices and sending downlinks to sensors.

In summary, the network is set up to be a private network with ADR disabled. As seen in device_data_RPi4 and device_lorawan_frames_RPi4 below, ChirpStack works beautifully:

Device Data:

LoRaWAN Frame:

The LoRa device (STM32WL) reliably joins the network, and two uplinks and downlinks are successfully achieved. Awesome! Now I want to migrate this exact same setup on a RPi0 W.

I repeated the steps above, but with chirpstack-gateway-os-full-raspberrypi0-wifi-20220803152030.rootfs.wic.gz and chirpstack-gateway-os-full-update-raspberrypi0-wifi-20220803152030.swu respectively.

I expected to get the same successful operation, but instead I receive a “frame-counter did not increment error” and I’m having a hard time resolving this:

Device Data:

LoRaWAN Frame:

The same exact device firmware that works for the RPi4 Chirpstack OS does not work for the RPI0-W ChirpStack OS even though I’ve verified that both gateway parameters are identical. The device is configured as a nucleo-wl55jc-profile-32.yaml device. From reading similar issues on the forum, I have a feeling that the argument “it’s something wrong with the sensor” will be made. I have a hard time agreeing with this, considering the device works fine on the RPI4 variant of ChirpStack OS. The changing variable is the gateway, not the sensor.

I wanted to attach the corresponding json files and chirpstack-network-server.toml, but unfortunately those extensions are not allowed to be uploaded here. Any insights towards resolving this would be greatly appreciated!

So I’d like to give an update regarding this post so far. I took some time to migrate to ChirpStack V4.1.1 and just as in v3.6.0, ChirpStack works great with the RPi4 variant of ChirpStack OS.

However, just as before, I’m hitting a wall with running ChirpStack 4.1.1 on a Raspberry Pi zero. I went through the same setup procedures and configurations that worked well with the RPi4. I see a successful “JoinAccept”:

I noticed how there’s no downlinks at all, which follows the pattern as mentioned in the original post about RPI0 not sending downlinks to the device.

But immediately after a join occurs, ChirpStack seems to just crashe:

It does get up-and-running again, but when I try to join the network with that same device , ChirpStack crashes again - making this a repeatable issue.

Follow-up question:
Are there plans to output a RPi Zero 2W ChirpStack image? I was able to just load a RPi3 v3.6.0 ChirpStack image onto the RPi-2W - which worked because that board is just a RPi3 in a zero form factor.

When I tried to do this same “workaround” with ChirpStack v4.1.1, the RPi0-2W refuses to startup with the RPI3 V4.1.1 ChirpStack image. It seems that a RPi3 image will no longer work with the RPi0-2W, and an actual RPi0-2W image needs to be produced. Thoughts on this?

Pi Zero is just too weak.

Even if that may be the case for a Pi Zero, the Pi Zero 2W uses a RPi3 processor. It might be worth for ChirpStack to support the Pi Zero 2WS in place of the original Zero.

Have you also tried the Gateway OS v4.2.0-test.2 image? It is an upgrade from the previous Gateway OS versions which were built using Yocto :slight_smile: Raspberry Pi - ChirpStack open-source LoRaWAN® Network Server documentation

It looks like the Zero 2 W is not (yet) supported by OpenWrt out-of-the box due to license uncertainties:;a=commit;h=e9f9cd14cc71826957877999fd063dd080de4751

See also:

You’re awesome! I appreciate the clarification and additional resources.

I will proceed with your most recent images for the RPi4 and make sure to contribute by reporting bugs and concerns :smile:

Maybe once I get to a good place with the Pi4, I’ll play around with building ChirpStackOS for the Zero 2 W and report findings. Thanks a bunch!

This topic was automatically closed after 90 days. New replies are no longer allowed.