How does it actually work?

Hello,

I’m a bit confused how chirpstack-concentratord works. The documentation is unclear how it connects to ChirpStack… especially when the ChirpStack is not on the same server.

Also, I get this error when I try to run it:

dietpi@lora-gateway:~$ sudo ./chirpstack-concentratord-sx1301 
2023-05-22T10:22:52.506Z INFO  [libconcentratord::reset] Configuring reset pin, dev: /dev/gpiochip0, pin: 17
2023-05-22T10:22:52.506Z INFO  [chirpstack_concentratord_sx1301::cmd::root] Starting Concentratord SX1301 (version: 4.1.1, docs: https://www.chirpstack.io/concentratord/)
2023-05-22T10:22:52.506Z INFO  [libconcentratord::reset] Triggering sx1302 reset
2023-05-22T10:22:52.706Z INFO  [chirpstack_concentratord_sx1301::concentrator] Setting spi device path, spidev_path: /dev/spidev0.0
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Setting board configuration, lorawan_public: true, clock_source: 1
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator radios
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 0, enabled: true, center_freq: 867500000, type: SX1257
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 1, enabled: true, center_freq: 868500000, type: SX1257
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator channels
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 868100000, rf_chain: 1, if_freq: -400000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 868500000, rf_chain: 1, if_freq: 0
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 867100000, rf_chain: 0, if_freq: -400000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 867300000, rf_chain: 0, if_freq: -200000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 867500000, rf_chain: 0, if_freq: 0
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 867700000, rf_chain: 0, if_freq: 200000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 867900000, rf_chain: 0, if_freq: 400000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring Std LoRa channel, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring FSK channel, enabled: true, freq: 868800000, rf_chain: 1, if_freq: 300000
2023-05-22T10:22:52.707Z INFO  [chirpstack_concentratord_sx1301::concentrator] Starting the concentrator
ERROR: Failed to load fw 1
ERROR: Version of calibration firmware not expected, actual:216 expected:2
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: lgw_start failed', chirpstack-concentratord-sx1301/src/main.rs:111:80
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I’m running fresh DietPi OS, RPI4, RAK2245/2243 combo.

The Concentratord provides a “generic” ZMQ based API for chipset of the shield you are using, see also this diagram:

https://www.chirpstack.io/docs/chirpstack-concentratord/index.html#architecture-example

So it does not connect directly to ChirpStack, you probably want to use it together with the ChirpStack MQTT Forwarder to connect to a MQTT broker.

By splitting this in multiple components, concerns can be splitted:

  • The Concentratord knows how to interact with specific chipsets (SX1301 / SX1302 / SX1303 and the 2.4 GHz concentrator module), but it does not know about different transports (UDP, MQTT)
  • The ChirpStack MQTT Forwarder and ChirpStack UDP Forwarder know about the different transports, but do not have to know about chipset specifics (only about the ZMQ API of the Concentratord).

Also, I get this error when I try to run it:

Have you tried Introduction - ChirpStack open-source LoRaWAN® Network Server documentation? The ChirpStack Gateway OS contains many tweaks to make things work out of the box (at least I’m trying very hard to provide this experience). If you are using your own OS, then you might need to make some modifications (e.g. to enable SPI, I2C, enable the UART port for GNSS etc…).

ERROR: Version of calibration firmware not expected, actual:216 expected:2

Most likely this is caused by the module not being reset correctly, in which case the reset pin might not be correctly configured / connected.

Hello @brocaar thanks for reply, in the end I managed to get it to work with docker version of “rakwireless/udp-packet-forwarder:latest” this worked great, and its sending data via UDP to chirpstack on my other VM. Currently testing with one sensor, and its solid for day and half… I’ll give it a weak and then mount it outside :smiley: