RAK831 RPi AU915 packet forwarder not receiving

Hello,

I have RAK831 Raspberry Pi gateway set up with the loraserver.io package (lora-gateway-bridge 3.1.0, loraserver 3.0.2, lora-app-server 3.2.0) and semtech packet forwarder 4.0.1, with AU915 configuration for these taken from RAKWireless’s github repo “rak_common_for_gateway”

I have an Arduino node running LMIC from https://github.com/mcci-catena/arduino-lmic
The node seems to be transmitting correctly, but the gateway doesn’t receive any packets.

Packet forwarder log shows:

Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: ##### 2019-08-02 02:58:35 GMT #####
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: ### [UPSTREAM] ###
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # RF packets received by concentrator: 0
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # RF packets forwarded: 0 (0 bytes)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # PUSH_DATA datagrams sent: 1 (113 bytes)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # PUSH_DATA acknowledged: 100.00%
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: ### [DOWNSTREAM] ###
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # PULL_DATA sent: 3 (100.00% acknowledged)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # RF packets sent to concentrator: 0 (0 bytes)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # TX errors: 0
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # TX rejected (collision packet): 0.00% (req:25, rej:0)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # TX rejected (collision beacon): 0.00% (req:25, rej:0)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # TX rejected (too late): 0.00% (req:25, rej:0)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # TX rejected (too early): 0.00% (req:25, rej:0)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # BEACON queued: 0
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # BEACON sent so far: 0
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # BEACON rejected: 0
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: ### [JIT] ###
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # SX1301 time (PPS): 2113929216
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: ### [GPS] ###
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # Invalid time reference (age: 1564714715 sec)
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: # no valid GPS coordinates available yet
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: ##### END #####
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: JSON up: {“stat”:{“time”:“2019-08-02 02:58:35 GMT”,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0}}
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: INFO: [up] PUSH_ACK received in 1 ms
Aug 02 11:00:05 rak-gateway lora-pkt-fwd[7360]: INFO: [down] PULL_ACK received in 0 ms

LMiC debug output:
4253617: engineUpdate, opmode=0x808
Packet queued
EV_JOINING
4253678: engineUpdate, opmode=0xc
EV_TXSTART
4254053: engineUpdate, opmode=0x88c
4254180: TXMODE, freq=917200000, len=23, SF=12, BW=125, CR=4/5, IH=0
4656599: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: -58
4656691: RXMODE_SINGLE, freq=924500000, SF=12, BW=500, CR=4/5, IH=0
rxtimeout: entry: 4664990 rxtime: 4656722 entry-rxtime: 8268 now-entry: 6 rxtime-txend: 310196
4718589: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 7
4718678: RXMODE_SINGLE, freq=923300000, SF=12, BW=500, CR=4/5, IH=0
rxtimeout: entry: 4728069 rxtime: 4718710 entry-rxtime: 9359 now-entry: 5 rxtime-txend: 372184
4728255: processRx2Jacc txrxFlags 0x2 --> 00
4728484: engineUpdate, opmode=0xc
4750456: engineUpdate, opmode=0xc
EV_TXSTART
4750737: engineUpdate, opmode=0x88c
4750800: TXMODE, freq=917500000, len=23, SF=8, BW=500, CR=4/5, IH=0
5062725: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: -57
5062816: RXMODE_SINGLE, freq=923900000, SF=7, BW=500, CR=4/5, IH=0
rxtimeout: entry: 5066493 rxtime: 5062846 entry-rxtime: 3647 now-entry: 6 rxtime-txend: 310524
5124384: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 7
5124538: RXMODE_SINGLE, freq=923300000, SF=12, BW=500, CR=4/5, IH=0
rxtimeout: entry: 5133863 rxtime: 5124506 entry-rxtime: 9357 now-entry: 6 rxtime-txend: 372184
5134049: processRx2Jacc txrxFlags 0x2 --> 00
5134285: engineUpdate, opmode=0xc
5394671: engineUpdate, opmode=0xc
EV_TXSTART
5394953: engineUpdate, opmode=0x88c
5395016: TXMODE, freq=917800000, len=23, SF=12, BW=125, CR=4/5, IH=0
5797501: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 7
5797591: RXMODE_SINGLE, freq=926300000, SF=12, BW=500, CR=4/5, IH=0
rxtimeout: entry: 5805955 rxtime: 5797623 entry-rxtime: 8332 now-entry: 6 rxtime-txend: 310196
5859489: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 6
5859642: RXMODE_SINGLE, freq=923300000, SF=12, BW=500, CR=4/5, IH=0
rxtimeout: entry: 5868967 rxtime: 5859611 entry-rxtime: 9356 now-entry: 6 rxtime-txend: 372184
5869154: processRx2Jacc txrxFlags 0x2 --> 00
5869383: engineUpdate, opmode=0xc
5905287: engineUpdate, opmode=0xc

Can I display the contents of the global_conf.json file?

Hi ZhuQI, here is global_conf.json for packet forwarder. Gateway ID is mac address with fffe in the middle.

{
        "SX1301_conf": {
                "lorawan_public": true,
                "clksrc": 1,
                "clksrc_desc": "radio_1 provides clock to concentrator for most devices except MultiTech. For MultiTech set to 0.",
                "antenna_gain": 0,
                "antenna_gain_desc": "antenna gain, in dBi",
                "radio_0": {
                        "enable": true,
                        "type": "SX1257",
                        "freq": 917200000,
                        "rssi_offset": -166.0,
                        "tx_enable": true,
                        "tx_freq_min": 915000000,
                        "tx_freq_max": 928000000
                },
                "radio_1": {
                        "enable": true,
                        "type": "SX1257",
                        "freq": 917900000,
                        "rssi_offset": -166.0,
                        "tx_enable": false
                },
                "chan_multiSF_0": {
                        "desc": "Lora MAC, 125kHz, all SF, 916.8 MHz",
                        "enable": true,
                        "radio": 0,
                        "if": -400000
                },
                "chan_multiSF_1": {
                        "desc": "Lora MAC, 125kHz, all SF, 917.0 MHz",
                        "enable": true,
                        "radio": 0,
                        "if": -200000
                },
                "chan_multiSF_2": {
                        "desc": "Lora MAC, 125kHz, all SF, 917.2 MHz",
                        "enable": true,
                        "radio": 0,
                        "if": 0
                },
                "chan_multiSF_3": {
                        "desc": "Lora MAC, 125kHz, all SF, 917.4 MHz",
                        "enable": true,
                        "radio": 0,
                        "if": 200000
                },
                "chan_multiSF_4": {
                        "desc": "Lora MAC, 125kHz, all SF, 917.6 MHz",
                        "enable": true,
                        "radio": 1,
                        "if": -300000
                },
                "chan_multiSF_5": {
                        "desc": "Lora MAC, 125kHz, all SF, 917.8 MHz",
                        "enable": true,
                        "radio": 1,
                        "if": -100000
                },
                "chan_multiSF_6": {
                        "desc": "Lora MAC, 125kHz, all SF, 918.0 MHz",
                        "enable": true,
                        "radio": 1,
                        "if": 100000
                },
                "chan_multiSF_7": {
                        "desc": "Lora MAC, 125kHz, all SF, 918.2 MHz",
                        "enable": true,
                        "radio": 1,
                        "if": 300000
                },
                "chan_Lora_std": {
                        "desc": "Lora MAC, 500kHz, SF8, 917.5 MHz",
                        "enable": true,
                        "radio": 0,
                        "if": 300000,
                        "bandwidth": 500000,
                        "spread_factor": 8
                },
                "chan_FSK": {
                        "desc": "disabled",
                        "enable": false
                },
                "tx_lut_0": {
                        "desc": "TX gain table, index 0",
                        "pa_gain": 0,
                        "mix_gain": 8,
                        "rf_power": -6,
                        "dig_gain": 0
                },
                "tx_lut_1": {
                        "desc": "TX gain table, index 1",
                        "pa_gain": 0,
                        "mix_gain": 10,
                        "rf_power": -3,
                        "dig_gain": 0
                },
                "tx_lut_2": {
                        "desc": "TX gain table, index 2",
                        "pa_gain": 0,
                        "mix_gain": 12,
                        "rf_power": 0,
                        "dig_gain": 0
                },
                "tx_lut_3": {
                        "desc": "TX gain table, index 3",
                        "pa_gain": 1,
                        "mix_gain": 8,
                        "rf_power": 3,
                        "dig_gain": 0
                },
                "tx_lut_4": {
                        "desc": "TX gain table, index 4",
                        "pa_gain": 1,
                        "mix_gain": 10,
                        "rf_power": 6,
                        "dig_gain": 0
                },
                "tx_lut_5": {
                        "desc": "TX gain table, index 5",
                        "pa_gain": 1,
                        "mix_gain": 12,
                        "rf_power": 10,
                        "dig_gain": 0
                },
                "tx_lut_6": {
                        "desc": "TX gain table, index 6",
                        "pa_gain": 1,
                        "mix_gain": 13,
                        "rf_power": 11,
                        "dig_gain": 0
                },
                "tx_lut_7": {
                        "desc": "TX gain table, index 7",
                        "pa_gain": 2,
                        "mix_gain": 9,
                        "rf_power": 12,
                        "dig_gain": 0
                },
                "tx_lut_8": {
                        "desc": "TX gain table, index 8",
                        "pa_gain": 1,
                        "mix_gain": 15,
                        "rf_power": 13,
                        "dig_gain": 0
                },
                "tx_lut_9": {
                        "desc": "TX gain table, index 9",
                        "pa_gain": 2,
                        "mix_gain": 10,
                        "rf_power": 14,
                        "dig_gain": 0
                },
                "tx_lut_10": {
                        "desc": "TX gain table, index 10",
                        "pa_gain": 2,
                        "mix_gain": 11,
                        "rf_power": 16,
                        "dig_gain": 0
                },
                "tx_lut_11": {
                        "desc": "TX gain table, index 11",
                        "pa_gain": 3,
                        "mix_gain": 9,
                        "rf_power": 20,
                        "dig_gain": 0
                },
                "tx_lut_12": {
                        "desc": "TX gain table, index 12",
                        "pa_gain": 3,
                        "mix_gain": 10,
                        "rf_power": 23,
                        "dig_gain": 0
                },
                "tx_lut_13": {
                        "desc": "TX gain table, index 13",
                        "pa_gain": 3,
                        "mix_gain": 11,
                        "rf_power": 25,
                        "dig_gain": 0
                },
                "tx_lut_14": {
                        "desc": "TX gain table, index 14",
                        "pa_gain": 3,
                        "mix_gain": 12,
                        "rf_power": 26,
                        "dig_gain": 0
                },
                "tx_lut_15": {
                        "desc": "TX gain table, index 15",
                        "pa_gain": 3,
                        "mix_gain": 14,
                        "rf_power": 27,
                        "dig_gain": 0
                }
        },
        "gateway_conf": {
                "gateway_ID": "<removed because public forum>",
                /* change with default server address/ports, or overwrite in local_conf.json */
        "server_address": "127.0.0.1",
                "serv_port_up": 1700,
                "serv_port_down": 1700,
                /* adjust the following parameters for your network */
                "keepalive_interval": 10,
                "stat_interval": 30,
                "push_timeout_ms": 100,
                /* forward only valid packets */
                "forward_crc_valid": true,
                "forward_crc_error": false,
                "forward_crc_disabled": false,
                /* gps enable */
                "gps": true,
                "gps_tty_path": "/dev/ttyAMA0",
                "fake_gps": false,
                "ref_latitude": 10,
                "ref_longitude": 20,
                "ref_altitude": -1,
                "autoquit_threshold": 6
        }

}

Is the gateway you purchased supporting au915?

Yes, it was purchased from a local IoT store in Australia - https://www.iot-store.com.au/

Let’s do a test:

1.cd /opt/ttn-gateway/lora_gateway/util_pkt_logger
2.sudo cp /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/global_conf.json .
3.sudo systemctl stop ttn-gateway
4.sudo rm pkt; sudo ./util_pkt_logger*
5.open another terminal
6.in another terminal, cd /opt/ttn-gateway/lora_gateway/util_pkt_logger
7.tail -f pktlog_xxxx
8.The node sends a join request and observes the printing of step 7.

After starting join, this log shows:

"AA555A0000000101","","2019-08-02 07:57:05.828Z", 204610692, 916800000,0, 0,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-30,+12.0,"00000000-00000000-00010000-00000052-C085251A-97BF0F"
"AA555A0000000101","","2019-08-02 07:57:12.956Z", 211768193, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-38,+10.2,"00000000-00000000-00010000-00000052-C0862515-05B439"

That continues…

"AA555A0000000101","","2019-08-02 08:12:54.535Z",1153321892, 917000000,0, 1,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-45, +9.5,"00000000-00000000-00010000-00000052-C08C3803-5C7E41"
"AA555A0000000101","","2019-08-02 08:13:01.228Z",1160040445, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-69, +7.5,"00000000-00000000-00010000-00000052-C08D3871-6D7658"
"AA555A0000000101","","2019-08-02 08:13:02.103Z",1160913836, 917200000,0, 2,"CRC_BAD", 22,"LORA",125000,"SF8"   ,"4/7",-102,-14.0,"9C6BC69C-C7536AE8-1351DBFE-AAFE8140-07E580EA-DDA9"
"AA555A0000000101","","2019-08-02 08:13:09.860Z",1168645356, 916800000,0, 0,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-42,+10.0,"00000000-00000000-00010000-00000052-C08E380A-00B2C8"
"AA555A0000000101","","2019-08-02 08:13:16.085Z",1174897173, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-64, +6.5,"00000000-00000000-00010000-00000052-C08F389E-887439"
"AA555A0000000101","","2019-08-02 08:13:39.549Z",1198335604, 917800000,1, 5,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-37,+11.0,"00000000-00000000-00010000-00000052-C0903863-163B73"
"AA555A0000000101","","2019-08-02 08:13:46.659Z",1205471463, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-46,+11.0,"00000000-00000000-00010000-00000052-C091384B-A679AE"
"AA555A0000000101","","2019-08-02 08:14:10.067Z",1228852100, 917000000,0, 1,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-42,+12.2,"00000000-00000000-00010000-00000052-C0923824-0A8189"
"AA555A0000000101","","2019-08-02 08:14:16.562Z",1235374013, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-58, +8.2,"00000000-00000000-00010000-00000052-C09338AE-C89896"
"AA555A0000000101","","2019-08-02 08:14:31.837Z",1250623508, 917600000,1, 4,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-46,+11.5,"00000000-00000000-00010000-00000052-C094383C-874D30"
"AA555A0000000101","","2019-08-02 08:14:38.056Z",1256868623, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-52,+10.5,"00000000-00000000-00010000-00000052-C09538F9-B225CE"
"AA555A0000000101","","2019-08-02 08:14:58.217Z",1277002820, 918000000,1, 6,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-46,+10.8,"00000000-00000000-00010000-00000052-C09638AB-32DCC1"
"AA555A0000000101","","2019-08-02 08:15:05.000Z",1283811981, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-56,+11.0,"00000000-00000000-00010000-00000052-C097381F-1FA3C5"
"AA555A0000000101","","2019-08-02 08:15:23.553Z",1302337532, 917800000,1, 5,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-37,+11.0,"00000000-00000000-00010000-00000052-C0983841-9E3C14"
"AA555A0000000101","","2019-08-02 08:15:25.510Z",1304322475, 917000000,0, 1,"CRC_BAD", 40,"LORA",125000,"SF7"   ,""   ,-102,-10.8,"C9D26FDC-313FDFD0-FEEBBABE-664BED08-7AC97A37-557DA997-685E3B4E-966D4EC3-352D8439-24DCE32D"
"AA555A0000000101","","2019-08-02 08:15:30.132Z",1308945025, 917500000,0, 8,"CRC_OK" , 23,"LORA",500000,"SF8"   ,"4/5",-46, +8.0,"00000000-00000000-00010000-00000052-C0993872-62F0F5"
"AA555A0000000101","","2019-08-02 08:15:38.472Z",1317257988, 917200000,0, 2,"CRC_OK" , 23,"LORA",125000,"SF12"  ,"4/5",-34, +8.0,"00000000-00000000-00010000-00000052-C09A38A5-0B8067"

It seems that the gateway reception is ok.
But the log you sent at the top of the post didn’t see rxpk.

Do another test.
1.End the test in the previous step and terminate step 7
2. sudo systemctl stop ttn-gateway
3. cd /opt/ttn-gateway/packet_forwarder/lora_pkt_fwd/
4.sudo ./lora_pkt_fwd
5.The node sends a join request and observes the printing of step 4.

The screen fills with:

WARNING: [gps] read() returned value 0

How do you write output to file on raspbian?

ZhuQI, can we continue on Monday? Thanks for your help so far

If the gateway is not connected to gps, delete the two lines in global_conf.json and the print will be removed.
2019-08-02%2016%3A53%3A55