Chirpstack Gateway Bridge does not receive data from packet forwarder

Hi,
I just recently managed to make an Arduino Pro Gateway LoRa (a raspberry pi based gateway) work with the Chirpstack Gateway OS. I installed the base version (with the gateway bridge and the packet forwarder) in the gateway, while the network server and the application server are installed in a Ubuntu 18.04 machine. However, the gateway bridge does not receive anything from the packet forwarder. I think it might be a configuration problem, but as I haven’t found any documentation on how to configure the gateway bridge in the gateway, I relied on the information I gathered from this forum.
My configuration files are like that:

Gateway
packet forwarder -> global_conf.json

“gateway_conf”: {
“gateway_ID”: “001bc5067010d02e”,
“server_port_up”: “1700”,
“server_port_down”: “1700”,
“server_address”: “localhost”,
“keepalive_interval”: 10,
“stat_interval”: 30,
“push_timeout_ms”: 100,
“dc_check”:false,
“forward_crc_valid”: true,
“forward_crc_error”: false,
“forward_crc_disabled”: false,
“gps”: {
“type”: “fixed”,
“fixed_alti” : 30,
“fixed_lati” : 45.411718,
“fixed_long” : 11.905840
},
“sock_failure_threshold”: 3,
“sock_auto_rest_threshold”: 3,
“timer_sync”: 30000,
“time_before_radio_write”: 150000
}

gateway bridge -> chirpstack-gateway-bridge.toml

# MQTT integration configuration.
[integration.mqtt]
# Event topic template.
event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
# Command topic template.
command_topic_template="gateway/{{ .GatewayID }}/command/#"
# MQTT authentication.
[integration.mqtt.auth]
# Type defines the MQTT authentication type to use.
# Set this to the name of one of the sections below.
type="generic"
# Generic MQTT authentication.
[integration.mqtt.auth.generic]
# MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
server="tcp://<my server IP addres>:1883"

Some useful logs:

packet forwarder

*** 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
lgw_board_setconf:427: Note: board configuration; 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 0
lgw_rxrf_setconf:476: WARNING: NOT A VALID TX NOTCH FILTER FREQUENCY [126000…250000]Hz
lgw_rxrf_setconf:488: Note: rf_chain 0 configuration; en:1 freq:867500000 rssi_offset:-166.000000 radio_type:2 tx_enable:1 tx_notch_freq:0
INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
lgw_rxrf_setconf:488: Note: rf_chain 1 configuration; en:1 freq:868500000 rssi_offset:-166.000000 radio_type:2 tx_enable:0 tx_notch_freq:0
INFO: Lora multi-SF channel 0> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 0 configuration; en:1 freq:-400000 SF_mask:0x7e
INFO: Lora multi-SF channel 1> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 1 configuration; en:1 freq:-200000 SF_mask:0x7e
INFO: Lora multi-SF channel 2> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 2 configuration; en:1 freq:0 SF_mask:0x7e
INFO: Lora multi-SF channel 3> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 3 configuration; en:1 freq:-400000 SF_mask:0x7e
INFO: Lora multi-SF channel 4> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 4 configuration; en:1 freq:-200000 SF_mask:0x7e
INFO: Lora multi-SF channel 5> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 5 configuration; en:1 freq:0 SF_mask:0x7e
INFO: Lora multi-SF channel 6> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 6 configuration; en:1 freq:200000 SF_mask:0x7e
INFO: Lora multi-SF channel 7> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 7 configuration; en:1 freq:400000 SF_mask:0x7e
INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
lgw_rxif_setconf:581: Note: LoRa ‘std’ if_chain 8 configuration; en:1 freq:-200000 bw:2 dr:2
INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
lgw_rxif_setconf:637: Note: FSK if_chain 9 configuration; en:1 freq:300000 bw:3 dr:50000 (50000 real dr) sync:0xC194C1
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to 001BC5067010D02E
INFO: server hostname or IP address is configured to “localhost”
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: FPGA supported features: [TX filter] [Spectral Scan] [LBT]
lgw_start:823: Note: calibration started (time: 2300 ms)
lgw_start:844: Note: calibration finished (status = 191)
Info: Initialising AGC firmware…
Info: putting back original RADIO_SELECT value
INFO: [main] concentrator started, packet can now be received

INFO: Disabling GPS mode for concentrator’s counter…
INFO: host/sx1301 time offset=(1574161670s:659124µs) - drift=322100276µs
INFO: Enabling GPS mode for concentrator’s counter.

lgw_receive:1155: FIFO content: 1 10 0 5 10
lgw_receive:1174: [2 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=392)

JSON up: {“rxpk”:[{“tmst”:5419147,“chan”:2,“rfch”:1,“freq”:868.500000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:7.0,“rssi”:-67,“size”:16,“data”:“QBkUAQIAiAEC+I1VSQnZfQ==”}]}
lgw_receive:1155: FIFO content: 1 30 0 5 10
lgw_receive:1174: [1 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=393)

JSON up: {“rxpk”:[{“tmst”:11425115,“chan”:1,“rfch”:1,“freq”:868.300000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:8.8,“rssi”:-70,“size”:16,“data”:“QBkUAQIAiQEC1UW7a498ZA==”}]}
lgw_receive:1155: FIFO content: 1 50 0 7 d
lgw_receive:1174: [3 17]
Note: LoRa packet
lgw_receive:1155: FIFO content: 1 6d 0 5 10
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=394)

JSON up: {“rxpk”:[{“tmst”:17431083,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9.2,“rssi”:-77,“size”:16,“data”:“QBkUAQIAigECbbLjIWSCaA==”}]}
lgw_receive:1155: FIFO content: 1 8d 0 5 10
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=395)

JSON up: {“rxpk”:[{“tmst”:23437099,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:10.5,“rssi”:-72,“size”:16,“data”:“QBkUAQIAiwEC2pYJ1grE3A==”}]}
lgw_receive:1155: FIFO content: 1 ad 0 5 10
lgw_receive:1174: [2 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=396)

JSON up: {“rxpk”:[{“tmst”:29442963,“chan”:2,“rfch”:1,“freq”:868.500000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:7.2,“rssi”:-69,“size”:16,“data”:“QBkUAQIAjAEClNevB5X8qQ==”}]}

##### 2019-11-19 11:08:23 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 6
# CRC_OK: 83.33%, CRC_FAIL: 16.67%, NO_CRC: 0.00%
# RF packets forwarded: 5 (80 bytes)
# PUSH_DATA datagrams sent: 5 (980 bytes)
# PUSH_DATA acknowledged: 0.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (0.00% acknowledged)
# PULL_RESP(onse) datagrams received: 0 (0 bytes)
# RF packets sent to concentrator: 0 (0 bytes)
# TX errors: 0
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
# SX1301 time (PPS): 2557764
src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
##### END #####

JSON up: {“stat”:{“time”:“2019-11-19 11:08:23 GMT”,“rxnb”:6,“rxok”:5,“rxfw”:5,“ackr”:0.0,“dwnb”:0,“txnb”:0}}
lgw_receive:1155: FIFO content: 1 cd 0 5 10
lgw_receive:1174: [1 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=397)

JSON up: {“rxpk”:[{“tmst”:35449739,“chan”:1,“rfch”:1,“freq”:868.300000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9.2,“rssi”:-72,“size”:16,“data”:“QBkUAQIAjQECTqCBH0Wv3A==”}]}
lgw_receive:1155: FIFO content: 1 ed 0 5 10
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=398)

JSON up: {“rxpk”:[{“tmst”:41455867,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9.8,“rssi”:-72,“size”:16,“data”:“QBkUAQIAjgECxouTmduV2g==”}]}
lgw_receive:1155: FIFO content: 1 d 1 5 10
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=399)

JSON up: {“rxpk”:[{“tmst”:47461819,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9.2,“rssi”:-72,“size”:16,“data”:“QBkUAQIAjwECMQYt1lx/Ag==”}]}
lgw_receive:1155: FIFO content: 1 2d 1 5 19
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 0200FDA5 (fcnt=10972)

JSON up: {“rxpk”:[{“tmst”:48261596,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF12BW125”,“codr”:“4/5”,“lsnr”:9.8,“rssi”:-102,“size”:25,“data”:“QKX9AAKA3CoFMIA2Njh9CnzN7KL1iJHwOw==”}]}
lgw_receive:1155: FIFO content: 1 56 1 5 10
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=400)

JSON up: {“rxpk”:[{“tmst”:53467771,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:10.2,“rssi”:-72,“size”:16,“data”:“QBkUAQIAkAECN7maD8qMIw==”}]}
lgw_receive:1155: FIFO content: 1 76 1 5 10
lgw_receive:1174: [0 17]
Note: LoRa packet

INFO: Received pkt from mote: 02011419 (fcnt=401)

JSON up: {“rxpk”:[{“tmst”:59473755,“chan”:0,“rfch”:1,“freq”:868.100000,“stat”:1,“modu”:“LORA”,“datr”:“SF7BW125”,“codr”:“4/5”,“lsnr”:9.5,“rssi”:-72,“size”:16,“data”:“QBkUAQIAkQECe0kF/vHk9g==”}]}

INFO: Disabling GPS mode for concentrator’s counter…

##### 2019-11-19 11:08:53 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 6
# CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 6 (105 bytes)
# PUSH_DATA datagrams sent: 7 (1302 bytes)
# PUSH_DATA acknowledged: 0.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 3 (0.00% acknowledged)
# PULL_RESP(onse) datagrams received: 0 (0 bytes)
# RF packets sent to concentrator: 0 (0 bytes)
# TX errors: 0
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
# SX1301 time (PPS): 62558285
src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled
##### END #####
INFO: host/sx1301 time offset=(1574161670s:658905µs) - drift=-219µs
INFO: Enabling GPS mode for concentrator’s counter.

Gateway bridge

INFO[0000] starting ChirpStack Gateway Bridge docs=“https://www.chirpstack.io/gateway-bridge/” version=3.4.0
INFO[0000] backend/semtechudp: starting gateway udp listener addr=“0.0.0.0:1700”
INFO[0000] integration/mqtt: connected to mqtt broker

Result of monit status:

Process 'lora-packet-forwarder'
status OK
monitoring status Monitored
monitoring mode active
on reboot start
pid 5374
parent pid 1
uid 0
effective uid 0
gid 0
uptime 0m
threads 5
children 0
cpu 0.2%
cpu total 0.2%
memory 0.1% [1.4 MB]
memory total 0.1% [1.4 MB]
security attribute -
data collected Tue, 19 Nov 2019 10:18:30

Process 'chirpstack-gateway-bridge'
status OK
monitoring status Monitored
monitoring mode active
on reboot start
pid 5332
parent pid 1
uid 0
effective uid 0
gid 0
uptime 1m
threads 12
children 0
cpu 0.0%
cpu total 0.0%
memory 0.9% [8.3 MB]
memory total 0.9% [8.3 MB]
security attribute -
disk read 0 B/s [44 kB total]
data collected Tue, 19 Nov 2019 10:18:30

System 'raspberrypi3'
status OK
monitoring status Monitored
monitoring mode active
on reboot start
load average [0.02] [0.03] [0.00]
cpu 0.1%us 0.1%sy 0.0%wa
memory usage 23.0 MB [2.5%]
swap usage 0 B [0.0%]
uptime 7d 20h 57m
boot time Mon, 11 Nov 2019 13:21:14
data collected Tue, 19 Nov 2019 10:18:30

Also, when tailing the mosquitto log right after starting the gateway bridge, I can see that the gateway can connect to mosquitto on port 1883, so, the problem is actually in the link between the bridge and the packet forwarder.

Has anyone experienced that? I think I’ve configured everything as I should, or maybe not, so, can someone please help me?

Many thanks,
Níbia

Funny how just posting here made me fix the issue :stuck_out_tongue:

I realized that my global_config.json was wrong. Instead of serv_port_up and serv_port_down I had server_port_up and server_port_down. I was also passing the port number under quotation marks. After I’ve fixed it, everything works like a charm!

1 Like