Installing all ChirpStack components on Ubuntu desktop

Hello

I was using TTN, and now I wanna make a transition to ChirpStack. I’ve installed all components of the Chirpstack on a Ubuntu desktop by following these two resources (https://www.youtube.com/watch?v=FnTP7t47DlI&list=PL9FegcZTeB9LRLnXtN6OMkVSZYgHdlmOr, and https://www.youtube.com/watch?v=np4rIQ_teR4&t=223s). I had a great difficulty in modifying the chirpstack-gateway-bridge.toml, global_config.json and local_config.json files, especially because I was already using the latter two files associated with TTN.

After installing all the components (GWB, NS and AS), when I had run the status of network-server and that of application-server, no errors were seen. But after modifying gwb.toml and config files, I’m seeing the following errors:

samdani@samdani-Veriton-M200-H61:~$ systemctl status chirpstack-application-server
● chirpstack-application-server.service - ChirpStack Application Server
Loaded: loaded (/lib/systemd/system/chirpstack-application-server.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-11-30 08:19:37 IST; 4h 40min ago
Docs: https://www.chirpstack.io/
Main PID: 13712 (chirpstack-appl)
Tasks: 14 (limit: 4915)
Memory: 25.0M
CGroup: /system.slice/chirpstack-application-server.service
└─13712 /usr/bin/chirpstack-application-server

Nov 30 12:42:37 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:42:37+05:30” level=info msg=“finished unary call with code OK” ctx_id
Nov 30 12:42:45 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:42:45+05:30” level=info msg=“finished unary call with code OK” ctx_id
Nov 30 12:43:08 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:08+05:30” level=info msg=“finished client unary call” ctx_id=4eb45
Nov 30 12:43:08 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:08+05:30” level=info msg=“finished unary call with code OK” ctx_id
Nov 30 12:43:27 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:27+05:30” level=info msg=“finished unary call with code OK” ctx_id
Nov 30 12:43:27 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:27+05:30” level=info msg=“finished unary call with code OK” ctx_id
Nov 30 12:43:28 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:28+05:30” level=info msg=“finished client unary call” ctx_id=fba6b
Nov 30 12:43:28 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:28+05:30” level=info msg=“finished unary call with code OK” ctx_id
Nov 30 12:43:28 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:28+05:30” level=info msg=“finished client unary call” ctx_id=7c788
Nov 30 12:43:28 samdani-Veriton-M200-H61 chirpstack-application-server[13712]: time=“2019-11-30T12:43:28+05:30” level=info msg=“finished unary call with code OK” ctx_id

samdani@samdani-Veriton-M200-H61:~$ systemctl status chirpstack-network-server
● chirpstack-network-server.service - ChirpStack Network Server
Loaded: loaded (/lib/systemd/system/chirpstack-network-server.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-11-30 08:31:13 IST; 4h 29min ago
Docs: https://www.chirpstack.io/
Main PID: 14247 (chirpstack-netw)
Tasks: 13 (limit: 4915)
Memory: 7.3M
CGroup: /system.slice/chirpstack-network-server.service
└─14247 /usr/bin/chirpstack-network-server

Nov 30 12:42:21 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:21+05:30” level=info msg=“finished unary call with code OK” ctx_id=1bf
Nov 30 12:42:21 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:21+05:30” level=info msg=“finished unary call with code OK” ctx_id=f3b
Nov 30 12:42:21 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:21+05:30” level=info msg=“finished unary call with code OK” ctx_id=e47
Nov 30 12:42:33 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:33+05:30” level=info msg=“finished unary call with code OK” ctx_id=9f2
Nov 30 12:42:36 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:36+05:30” level=info msg=“finished unary call with code OK” ctx_id=2da
Nov 30 12:42:36 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:36+05:30” level=info msg=“finished unary call with code OK” ctx_id=cfd
Nov 30 12:42:37 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:42:37+05:30” level=info msg=“finished unary call with code OK” ctx_id=c67
Nov 30 12:43:08 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:43:08+05:30” level=info msg=“finished unary call with code OK” ctx_id=fad
Nov 30 12:43:28 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:43:28+05:30” level=info msg=“finished unary call with code OK” ctx_id=1f8
Nov 30 12:43:28 samdani-Veriton-M200-H61 chirpstack-network-server[14247]: time=“2019-11-30T12:43:28+05:30” level=info msg=“finished unary call with code OK” ctx_id=5f2

I’m afraid its not going to be a smooth transition. Anybody tried migrating successfully from TTN to ChirpStack?

@brocaar Considering a case where (all components of) chirpstack is installed on desktop, could you please help me find answers to the following questions:

  1. What specific changes should be done in chirpstack-gateway-bridge file? I’m using static IP for chirpstack desktop server.
  2. What specific changes should be done in the config files i.e., global_config.json and local_config.json? I especially have a doubt regarding the server ports being given in local_config.json file, should we use 1700 or just the IP alone, because I’m using static IP.

Now the issue is more complicated because I was using TTN before. So I’d like to know what additional changes are to be done in config files to make it work for chirpstack. I also have another question, is it enough to install chirpstack-gateway-bridge on desktop server, or do we’ve to install on both gateway and gateway bridge.

After following two diverse resources, I got confused and messed up the config files. I wanna rectify it - is it okay if I reinstall ./install.sh script, so that my original config files are restored. I’m using the poly_pkt_fwd of ic880a-gateway as my packet forwarder.

Also it seems the chirpstack-gateway-bridge is different from the old version (lora-gateway-bridge file). There’s no provision to add MAC address of the gateway in CS-gateway-bridge unlike the older version.

Hoping to see clarifications for the issues I’m facing.

For Ubuntu based desktop, you can follow the Debian / Ubuntu getting started guide: https://www.chirpstack.io/guides/debian-ubuntu/.

Alternatively, you can follow the Docker setup: https://www.chirpstack.io/guides/docker-compose/. I think this might be the easiest approach as it contains a ready to go (EU868) setup. The only thing remaining is then to configure your gateway to you desktop IP and port 1700.

Done with all these steps, but the gateway says ‘never seen’.

By gateway, do you mean gateway bridge? How do we configure this to desktop IP?

After unsuccessful attempt of Ubuntu based desktop, I’ve decided to go ahead with Chirp Stack installation on gateway itself. I’ve tried using gateway OS full image but was unsuccessful.

Finally i’ve installed all components of chirpstack on gateway itself using https://www.chirpstack.io/guides/debian-ubuntu/. However I’m stuck with installing the packet forwarder. Please guide me on this.

I’ve tried running compile.sh after making changes, and after running the lora_pkt_fwd file, the following is the output:

pi@raspberrypi:~/Downloads $ cd packet_forwarder/
pi@raspberrypi:~/Downloads/packet_forwarder $ cd lora_pkt_fwd/
pi@raspberrypi:~/Downloads/packet_forwarder/lora_pkt_fwd $ ./lora_pkt_fwd
*** Beacon Packet Forwarder for Lora Gateway ***
Version: 4.0.1
*** Lora concentrator HAL library version info ***
Version: 5.0.1;


INFO: Little endian host
INFO: found global configuration file global_conf.json, parsing it
INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
INFO: lorawan_public 1, clksrc 1
INFO: LBT is disabled
INFO: antenna_gain 0 dBi
INFO: Configuring TX LUT with 16 indexes
INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 129000
INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
INFO: Lora multi-SF channel 0> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 1> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 2> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 3> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 4> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 5> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 6> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 7> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to B827EBFFFEFCF84A
INFO: server hostname or IP address is configured to “localhost”
INFO: upstream port is configured to “1700”
INFO: downstream port is configured to “1700”
INFO: downstream keep-alive interval is configured to 10 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: found local configuration file local_conf.json, parsing it
INFO: redefined parameters will overwrite global parameters
INFO: local_conf.json does not contain a JSON object named SX1301_conf
INFO: local_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to B827EBFFFEFCF84A
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
ERROR: [main] failed to start the concentrator

Any little help is highly appreciated

For Ubuntu, you have to configure your gateway's (and not Chirpstack Gateway Bridge) global_config.json to port : 1700 and server IP : to the IP of your Chripstack Application Server.

Then you will also be able to see your gateway’s last seen on the application-server.

If you are trying to run the lora packet forwarder on chirpstack gateway-os , then you need to go to:

raspberrypi3: /etc/lora-packet-forwarder/global_conf.json

and change:

            "server_address": IP of your application server,
            "serv_port_up":1700,
            "serv_port_down":1700,
1 Like

Thank you very much for the clarification @pooja.mittal

Can you also please clarify about changes to be made in the localconfig.json, because there was an error seen related to localconfig.json

I presume no changes to be made in the chirpstack-network-server.toml file, can you please clarify.

Again, is this the only change that needs to be done, or any additional changes are required (like in case of gateway bridge, network server or application server). Sorry for loading this post with too many questions. Many thanks in advance.

In local_conf.json you only have to change the Gateway Mac Id, if required.

In gateway-os you only have to set the configurations of -

  1. generate a new configuration file chirpstack-network-server.toml , and execute the following command:
chirpstack-network-server configfile > chirpstack-network-server.toml
then change ,  the `[postgresql] dsn = ` and `[network_server.band]` (set it according to your country) in `chirpstack-network-server.toml` file.

follow : https://www.chirpstack.io/network-server/install/config/
  1. generate a new configuration file chirpstack-application-server.toml , execute the following command:
chirpstack-application-server configfile > chirpstack-application-server.toml

and change `[postgresql]`  and in  `[application_server.external_api]` set your `jwt_secret.` 

Follow : https://www.chirpstack.io/application-server/install/config/

4 . generate a new configuration file chirpstack-gateway-bridge.toml , execute the following command:

chirpstack-gateway-bridge configfile > chirpstack-gateway-bridge.toml

and change ` region, Minimal frequency (Hz),  Maximum frequency (Hz).` according to your country's requirement.

follow: https://www.chirpstack.io/gateway-bridge/install/config/