Hi,
I’ve got a RAK2245 Pi HAT (AS923) and a RAK831 LoRa/LoRaWAN Developer Kit (with a converter board)(AU915), and I installed each on Respberry Pi 3 B+.
I ran the latest firmware (RAK2245&RAK831_based_on_Raspbian_OS_for_RPI3_V4.1.0_20191202) and tried point-to-point communication to them from my other LoRa endpoints (Seeeduino LoRaWAN, Dragino LoRa HAT+GPS, and Reyax rylr896).
I saw that both gateways can only receive less than 50% of packets sent from each one of those endpoints. I verified that by stopping the ttn-gateway service in the gateway and ran the start.sh at /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd instead. I use the AS923 global config file and the sending frequencies I’ve tried are 923.6 and 924.2 MHz. The sending intervals I tried is between 1 to 4 seconds. The physical distance between an endpoint and a gateway is less than 3 meters.
I’ve also tested using /opt/ttn-gateway/lora_gateway/util_pkt_logger and enabled DEBUG_HAL, and I saw that the packet losses are not due to CRC error, because the CRC-error packet would still be logged. I looked at the code it seems that lgw_receive() just didn’t get many of the packets.
The following I attached the output of /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/lora_pkt_fwd.
Please advice what I shall do to avoid uplink packet losses. Thank you.
Sincerely,
Chao
lgw_board_setconf:427: Note: board configuration; lorawan_public:1, clksrc:1
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:923600000 rssi_offset:-166.000000 radio_type:2 tx_enable:1 tx_notch_freq:0
lgw_rxrf_setconf:488: Note: rf_chain 1 configuration; en:1 freq:924600000 rssi_offset:-166.000000 radio_type:2 tx_enable:0 tx_notch_freq:0
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 0 configuration; en:1 freq:-400000 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 1 configuration; en:1 freq:-200000 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 2 configuration; en:1 freq:0 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 3 configuration; en:1 freq:200000 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 4 configuration; en:1 freq:400000 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 5 configuration; en:1 freq:-400000 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 6 configuration; en:1 freq:-200000 SF_mask:0x7e
lgw_rxif_setconf:607: Note: LoRa 'multi' if_chain 7 configuration; en:1 freq:0 SF_mask:0x7e
lgw_rxif_setconf:581: Note: LoRa 'std' if_chain 8 configuration; en:1 freq:-100000 bw:2 dr:2
lgw_rxif_setconf:637: Note: FSK if_chain 9 configuration; en:1 freq:200000 bw:3 dr:50000 (50000 real dr) sync:0xC194C1
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
*** 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: no configuration for LBT
INFO: antenna_gain 0 dBi
INFO: Configuring TX LUT with 16 indexes
INFO: radio 0 enabled (type SX1257), center frequency 923600000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
INFO: radio 1 enabled (type SX1257), center frequency 924600000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
INFO: Lora multi-SF channel 0> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 1> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 2> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 3> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 4> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 5> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 6> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora multi-SF channel 7> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
INFO: Lora std channel> radio 1, IF -100000 Hz, 250000 Hz bw, SF 7
INFO: FSK channel> radio 1, IF 200000 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 0000000000000000
INFO: server hostname or IP address is configured to "0.0.0.0"
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: GPS serial port path is configured to "/dev/ttyAMA0"
INFO: Reference latitude is configured to 10.000000 deg
INFO: Reference longitude is configured to 20.000000 deg
INFO: Reference altitude is configured to -1 meters
INFO: fake GPS is disabled
INFO: Auto-quit after 20 non-acknowledged PULL_DATA
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 B827EBFFFE7470FD
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: [main] TTY port /dev/ttyAMA0 open for GPS synchronization
INFO: [main] concentrator started, packet can now be received
INFO: Disabling GPS mode for concentrator's counter...
INFO: host/sx1301 time offset=(1586573817s:465704µs) - drift=13421416µs
INFO: Enabling GPS mode for concentrator's counter.
WARNING: [gps] GPS out of sync, keeping previous time reference
WARNING: [gps] GPS out of sync, keeping previous time reference
##### 2020-04-11 02:57:07 GMT #####
### [UPSTREAM] ###
# RF packets received by concentrator: 0
# CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
# RF packets forwarded: 0 (0 bytes)
# PUSH_DATA datagrams sent: 0 (0 bytes)
# PUSH_DATA acknowledged: 0.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 1 (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): 2672312
src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# Valid time reference (age: 1 sec)
# no valid GPS coordinates available yet
##### END #####
INFO: End of upstream thread
WARNING: failed to close GPS successfully
INFO: concentrator stopped successfully
INFO: Exiting packet forwarder program