IMST Lite Gateway setup

I’m trying to get Gateway OS running on an IMST Lite Gateway with Raspberry PI 1.
The “chirpstack-concentratord” is crashing continuously.

Mar 12 20:33:31 raspberrypi user.err chirpstack-gateway-bridge[751]: time="2020-03-12T20:33:31Z" level=error msg="backend/concentratord: event socket dial error" error="dial event api url error: zmq4: could not dial to \"ipc:///tmp/concentratord_event\": dial unix /tmp/co

In the shield setup I’m using point 3 what is IMST Lite Gateway.

The Config is:

# Concentratord configuration.
[concentratord]

# Log level.
#
# Valid options are:
#   * TRACE
#   * DEBUG
#   * INFO
#   * WARN
#   * ERROR
#   * OFF
log_level="INFO"

# Log to syslog.
#
# When set to true, log messages are being written to syslog instead of stdout.
log_to_syslog=true

# Statistics interval.
stats_interval="30s"

  # Configuration for the (ZeroMQ based) API.
  [concentratord.api]

  # Event PUB socket bind.
  event_bind="ipc:///tmp/concentratord_event"

  # Command REP socket bind.
  command_bind="ipc:///tmp/concentratord_command"


# LoRa gateway configuration.
[gateway]

# Antenna gain (dB).
antenna_gain=0

# Public LoRaWAN network.
lorawan_public=true

# Gateway vendor / model.
#
# This configures various vendor and model specific settings like the min / max
# frequency, TX gain table.
model="imst_ic880a_eu868"

# Gateway vendor / model flags.
model_flags=[]

# Gateway ID.
gateway_id="b827ebfffe218d8b"

# LoRa concentrator configuration.
[gateway.concentrator]

# Multi spreading-factor channels (LoRa).
multi_sf_channels=[
  868100000,
  868300000,
  868500000,
  867100000,
  867300000,
  867500000,
  867700000,
  867900000,
]

# LoRa std channel (single spreading-factor).
[gateway.concentrator.lora_std]
frequency=868300000
bandwidth=250000
spreading_factor=7

# FSK channel.
[gateway.concentrator.fsk]
frequency=868800000
bandwidth=125000
datarate=50000

I hope somebody can help me.

The logs you are providing are of the Gateway Bridge unable to connect to Concentratord. Could you provide the error log of the Concentratord? That might explain why it is crashing. I have a Lite gateway and with the latest Gateway OS and selecting the IMST Lite Gateway using the gateway-config utility, it starts fine.

How i get the error log for Concentratord?

See tail -n 100 -f /var/log/messages for all log output (replace -n 100 with a higher number to get more history). Or see sudo monit summary for an overview of the running services.

tail -n 500 -f /var/log/messages output:
https://pastebin.com/YBc026F8

raspberrypi:~$ sudo monit summary
Monit 5.26.0 uptime: 27m

Service Name                        Status                     Type         
raspberrypi                         OK                         System       
chirpstack-network-server           OK                         Process   
chirpstack-gateway-bridge           OK                         Process
chirpstack-concentratord            Does not exist             Process 
chirpstack-application-server       OK                         Process

What you could try:

Edit: make sure you are executing these steps as root user (e.g. by running sudo su).

Validate if concentratord is running (it is on my gateway as you can see below but probably it is not in your case, else monit would show OK):

raspberrypi:/home/admin# ps aux |grep concentratord
root       433  2.6  0.9  39700  3996 ?        Sl   12:18   0:03 /usr/bin/chirpstack-concentratord-sx1301 -c /etc/chirpstack-concentratord/sx1301/global.toml -c /etc/chirpstack-concentratord/sx1301/band.toml -c /etc/chirpstack-concentratord/sx1301/channels.toml

Disable the monit for concentratord (to make sure the next steps are not failing because monit is trying to restart concentratord):

raspberrypi:/home/admin# monit stop chirpstack-concentratord

Validate that the correct default config is set:

raspberrypi:/home/admin# cat /etc/default/chirpstack-concentratord 
# reset the LoRa concentrator on Concentratord start
CONCENTRATOR_RESET="yes"

# reset pin
CONCENTRATOR_RESET_PIN=5

# power enable pin
CONCENTRATOR_POWER_EN_PIN=18

# concentratord version
CONCENTRATORD_VERSION="sx1301"

Reset the sx1301:

raspberrypi:/home/admin# /etc/init.d/sx1301-reset stop && /etc/init.d/sx1301-reset start

Edit the global.toml config and set log_to_syslog to false (also validate that model="imst_ic880a_eu868":

vi /etc/chirpstack-concentratord/sx1301/global.toml

Start concentratord from the CLI:

raspberrypi:/home/admin# /usr/bin/chirpstack-concentratord-sx1301 -c /etc/chirpstack-concentratord/sx1301/global.toml -c /etc/chirpstack-concentratord/sx1301/band.toml -c /etc/chirpstack-concentratord/sx1301/channels.toml

On my IMST Lite gateway, this outputs:

2020-03-23 12:26:27,471 INFO  [chirpstack_concentratord_sx1301::cmd::root] Starting Concentratord SX1301 (version: 3.0.0-test.5, docs: https://www.chirpstack.io/concentratord/)
2020-03-23 12:26:27,473 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting spi device path, spidev_path: /dev/spidev0.0
2020-03-23 12:26:27,475 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting board configuration, lorawan_public: true, clock_source: 1
2020-03-23 12:26:27,477 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator radios
2020-03-23 12:26:27,479 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 0, enabled: true, center_freq: 867500000, type: SX1257
2020-03-23 12:26:27,479 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 1, enabled: true, center_freq: 868500000, type: SX1257
2020-03-23 12:26:27,480 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator channels
2020-03-23 12:26:27,482 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 868100000, rf_chain: 1, if_freq: -400000
2020-03-23 12:26:27,483 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2020-03-23 12:26:27,484 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 868500000, rf_chain: 1, if_freq: 0
2020-03-23 12:26:27,484 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 867100000, rf_chain: 0, if_freq: -400000
2020-03-23 12:26:27,486 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 867300000, rf_chain: 0, if_freq: -200000
2020-03-23 12:26:27,486 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 867500000, rf_chain: 0, if_freq: 0
2020-03-23 12:26:27,487 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 867700000, rf_chain: 0, if_freq: 200000
2020-03-23 12:26:27,487 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 867900000, rf_chain: 0, if_freq: 400000
2020-03-23 12:26:27,488 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring Std LoRa channel, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2020-03-23 12:26:27,489 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring FSK channel, enabled: true, freq: 868800000, rf_chain: 1, if_freq: 300000
2020-03-23 12:26:27,489 INFO  [chirpstack_concentratord_sx1301::concentrator] Starting the the concentrator
2020-03-23 12:26:30,590 INFO  [libconcentratord::events] Creating socket for publishing events, bind: ipc:///tmp/concentratord_event
2020-03-23 12:26:30,595 INFO  [libconcentratord::commands] Creating socket for receiving commands, bind: ipc:///tmp/concentratord_command
2020-03-23 12:26:30,597 INFO  [libconcentratord::jitqueue] Initializing JIT queue, capacity: 32
2020-03-23 12:26:30,604 INFO  [chirpstack_concentratord_sx1301::handler::gps] No gps_tty_path configured or GPS unavailable
2020-03-23 12:26:34,809 INFO  [chirpstack_concentratord_sx1301::handler::uplink] Frame received, uplink_id: e3228dff-05ff-4f09-9b34-b82aed94fa19, count_us: 6785683, freq: 868300000, bw: 125000, mod: LoRa, dr: SF7

(note that when log_to_syslog=true, you will not see any logs!)

i have the same issue

after executing this line i get this message

admin 17475 0.0 0.0 2188 440 pts/1 T 05:43 0:00 vi /etc/chirpstac....

and after trying to start concentratord i get this

ERROR: Failed to load fw 1
ERROR: Version of calibration firmware not expected, actual:0 expected:2
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "lgw_start failed"', 
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Please take a look again at my previous comment. It contains a few crucial step that you must validate. ERROR: Version of calibration firmware not expected, actual:0 expected:2 could mean the sx1301 was not properly reset. Please validate your configuration with the above steps :slight_smile:

thanks for fast replay, everything is configured as yours.

My Error looks the same like the Error from overdull.

raspberrypi:~$ /usr/bin/chirpstack-concentratord-sx1301 -c /etc/chirpstack-concentratord/sx1301/global.toml -c /etc/chirpstack-concentratord/sx1301/band.toml -c /etc/chirpstack-concentratord/sx1301/channels.toml
2020-03-25 10:06:37,655 INFO  [chirpstack_concentratord_sx1301::cmd::root] Starting Concentratord SX1301 (version: 3.0.0-test.5, docs: https://www.chirpstack.io/concentratord/)
2020-03-25 10:06:37,659 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting spi device path, spidev_path: /dev/spidev0.0
2020-03-25 10:06:37,662 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting board configuration, lorawan_public: true, clock_source: 1
2020-03-25 10:06:37,662 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator radios
2020-03-25 10:06:37,664 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 0, enabled: true, center_freq: 867500000, type: SX1257
2020-03-25 10:06:37,665 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 1, enabled: true, center_freq: 868500000, type: SX1257
2020-03-25 10:06:37,666 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator channels
2020-03-25 10:06:37,667 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 868100000, rf_chain: 1, if_freq: -400000
2020-03-25 10:06:37,669 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2020-03-25 10:06:37,669 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 868500000, rf_chain: 1, if_freq: 0
2020-03-25 10:06:37,672 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 867100000, rf_chain: 0, if_freq: -400000
2020-03-25 10:06:37,678 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 867300000, rf_chain: 0, if_freq: -200000
2020-03-25 10:06:37,680 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 867500000, rf_chain: 0, if_freq: 0
2020-03-25 10:06:37,681 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 867700000, rf_chain: 0, if_freq: 200000
2020-03-25 10:06:37,682 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 867900000, rf_chain: 0, if_freq: 400000
2020-03-25 10:06:37,683 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring Std LoRa channel, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2020-03-25 10:06:37,684 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring FSK channel, enabled: true, freq: 868800000, rf_chain: 1, if_freq: 300000
2020-03-25 10:06:37,687 INFO  [chirpstack_concentratord_sx1301::concentrator] Starting the the concentrator
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "lgw_start failed"', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

The reset script is using the content from the environment variable "$CONCENTRATOR_RESET_PIN". But where is it set?

If i switche to root with sudo su and run the command, than i get exactly the same error message.

raspberrypi:/home/admin# /usr/bin/chirpstack-concentratord-sx1301 -c /etc/chirpstack-concentratord/sx1301/global.toml -c /etc/chirpstack-concentratord/sx1301/band.toml -c /etc/chirpstack-concentratord/sx1301/channels.toml
2020-03-25 10:16:29,857 INFO  [chirpstack_concentratord_sx1301::cmd::root] Starting Concentratord SX1301 (version: 3.0.0-test.5, docs: https://www.chirpstack.io/concentratord/)
2020-03-25 10:16:29,860 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting spi device path, spidev_path: /dev/spidev0.0
2020-03-25 10:16:29,863 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting board configuration, lorawan_public: true, clock_source: 1
2020-03-25 10:16:29,865 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator radios
2020-03-25 10:16:29,866 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 0, enabled: true, center_freq: 867500000, type: SX1257
2020-03-25 10:16:29,867 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring radio, radio: 1, enabled: true, center_freq: 868500000, type: SX1257
2020-03-25 10:16:29,869 INFO  [chirpstack_concentratord_sx1301::concentrator] Setting up concentrator channels
2020-03-25 10:16:29,870 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 0, enabled: true, freq: 868100000, rf_chain: 1, if_freq: -400000
2020-03-25 10:16:29,873 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 1, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2020-03-25 10:16:29,874 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 2, enabled: true, freq: 868500000, rf_chain: 1, if_freq: 0
2020-03-25 10:16:29,875 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 3, enabled: true, freq: 867100000, rf_chain: 0, if_freq: -400000
2020-03-25 10:16:29,876 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 4, enabled: true, freq: 867300000, rf_chain: 0, if_freq: -200000
2020-03-25 10:16:29,878 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 5, enabled: true, freq: 867500000, rf_chain: 0, if_freq: 0
2020-03-25 10:16:29,879 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 6, enabled: true, freq: 867700000, rf_chain: 0, if_freq: 200000
2020-03-25 10:16:29,881 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring multi-SF LoRa channel, channel: 7, enabled: true, freq: 867900000, rf_chain: 0, if_freq: 400000
2020-03-25 10:16:29,882 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring Std LoRa channel, enabled: true, freq: 868300000, rf_chain: 1, if_freq: -200000
2020-03-25 10:16:29,882 INFO  [chirpstack_concentratord_sx1301::concentrator] Configuring FSK channel, enabled: true, freq: 868800000, rf_chain: 1, if_freq: 300000
2020-03-25 10:16:29,884 INFO  [chirpstack_concentratord_sx1301::concentrator] Starting the the concentrator
ERROR: Failed to load fw 1
ERROR: Version of calibration firmware not expected, actual:0 expected:2
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "lgw_start failed"', src/libcore/result.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

See the cat /etc/default/chirpstack-concentratord step :slight_smile:

OK, but it’s not working. You know if there are different revisions or variants? My gateway is based on a raspberry pi 1. It’s on of the first that was produced.

Just to confirm:

  • is you configuration exactly the same as mine (see previous comment) ?
  • Have you tried /etc/init.d/sx1301-reset stop && /etc/init.d/sx1301-reset start (as root user)?

Same config (copy below) and reset (start/stop) runs without error.

raspberrypi:/home/admin# cat /etc/default/chirpstack-concentratord 
# reset the LoRa concentrator on Concentratord start
CONCENTRATOR_RESET="yes"

# reset pin
CONCENTRATOR_RESET_PIN=5

# power enable pin
CONCENTRATOR_POWER_EN_PIN=18

# concentratord version
CONCENTRATORD_VERSION="sx1301"

Mine is also with the Raspberry Pi 1 (I received it recently). I’m not sure why it works for me but not for you.

Maybe there are different revisions of the IMST Lite gateway? (with different reset pins). My convertor board (between the iC880a and the Pi 1) has printed Part: 10066, PCB v6.

Maybe Pictures are easier than writing. My PCB is V1.4 an i have no idea where i can find the printed Part number.


I have asked IMST about the difference between V1.4 and V6 :slight_smile: In case it is mapped to a different reset pin, it would explain the difference in behavior.

Do you know which reset pin was used previously on your gateway?

I asked also for it :sweat_smile: , the will be happy about that.
We should checkout http://www.technoblogy.com/show?1XKI and https://github.com/ttn-zh/ic880a-gateway/tree/spi for the pin layout. With this script everything is working.

Could you try to update /etc/default/concentratord to:

# reset the LoRa concentrator on Concentratord start
CONCENTRATOR_RESET="yes"

# reset pin
CONCENTRATOR_RESET_PIN=25

# power enable pin
CONCENTRATOR_POWER_EN_PIN=18

# concentratord version
CONCENTRATORD_VERSION="sx1301"

Then:

  • re-run the sx1301-reset stop and start command
  • try to start concentratord from the cli

If that works, run monit start chirpstack-concentratord. When restarting the gateway, concentratord should be automatically started on boot.

Nevermind, I didn’t fully read your first link, see:

  • Change the reset pin to 5 by editing the line near the top of the file to:
    SX1301_RESET_BCM_PIN=5