IC880A-SPI gatway says "not connected" on TTN

Hello, I am currently creating a LoRaWAN outdoor multi-channel gateway fora university project. I purchased a RPi3 B+ and an ic880A and followed the guide on https://github.com/ttn-zh/ic880a-gateway/wiki, I even added my gateway ID to the remote-config repo. However, by the end of the installation my gateway status is “not connected” on TTN. Can anyone please help out. Here are some logs from my RPi.

After running sudo systemctl status ttn-gateway.service I receive the following,

ttn@ttn-gateway:~ $ sudo systemctl status ttn-gateway.service
● ttn-gateway.service - The Things Network Gateway
Loaded: loaded (/lib/systemd/system/ttn-gateway.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-02-08 12:42:02 +04; 11min ago
Main PID: 317 (start.sh)
Tasks: 4 (limit: 2200)
Memory: 16.2M
CGroup: /system.slice/ttn-gateway.service
├─317 /bin/bash /opt/ttn-gateway/bin/start.sh
└─686 ./poly_pkt_fwd

Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: ##### 2020-02-08 08:52:55 GMT #####
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: ### [UPSTREAM] ###
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # RF packets received by concentrator: 0
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # RF packets forwarded: 0 (0 bytes)
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # PUSH_DATA datagrams sent: 1 (287 bytes)
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # PUSH_DATA acknowledged: 0.00%
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: ### [DOWNSTREAM] ###
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # PULL_DATA sent: 3 (100.00% acknowledged)
Feb 08 12:52:55 ttn-gateway ttn-gateway[317]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)

And after running sudo tcpdump -AUq port 1700 I get,

ttn@ttn-gateway:~ $ sudo tcpdump -AUq port 1700

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes
12:57:54.091133 IP ttn-gateway.52747 > 52.169.76.203.1700: UDP, length 12
E…(u.@.@.W…+.4.L…B$…s…‘…cJ
12:57:54.344801 IP 52.169.76.203.1700 > ttn-gateway.52747: UDP, length 4
E . …@.-…4.L…+…Hd…s.
12:57:55.962624 IP ttn-gateway.54597 > 52.169.76.203.1700: UDP, length 287
E…;u.@.@.U…+.4.L…E…‘oh.;…’…cJ{“stat”:{“time”:“2020-02-08 08:57:55 GMT”,“lati”:25.31234,“long”:55.49102,“alti”:0,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:0.0,“dwnb”:0,“txnb”:0,“pfrm”:“IMST + Rpi",“mail”:"Shavaizknz98@gmail.com”,“desc”:"LoRaWAN gateway for Smart Campus Mobility System at the American.’…cJ."}}
12:58:04.221134 IP ttn-gateway.52747 > 52.169.76.203.1700: UDP, length 12
E…(xG@.@.Tu…+.4.L…|..…'…cJ
12:58:04.538464 IP 52.169.76.203.1700 > ttn-gateway.52747: UDP, length 4
E . …@.-…4.L…+…..

After running sudo tail -f /var/log/syslog , I get:

ttn@ttn-gateway:~ $ sudo tail -f /var/log/syslog
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # RF packets forwarded: 0 (0 bytes)
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # PUSH_DATA datagrams sent: 1 (287 bytes)
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # PUSH_DATA acknowledged: 0.00%
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: ### [DOWNSTREAM] ###
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # PULL_DATA sent: 3 (0.00% acknowledged)
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # RF packets sent to concentrator: 0 (0 bytes)
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # TX errors: 0
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: ### [GPS] ###
Feb 8 13:00:56 ttn-gateway ttn-gateway[317]: # Invalid gps time reference (age: 1581152455 sec)

Any and all help will be appreciated :slight_smile: .

The few lines of logging show nothing wrong. Are you sure you registered the gateway with the checkbox ‘legacy’ checked? And does the gateway ID in your configuration file match the ID you used to register on TTN?

According to the installer for the ic880a-gateway my ID is B827EBFFFEBF634A:

ttn@ttn-gateway:~/ic880a-gateway $ sudo ./install.sh spi
The Things Network Gateway installer
Version spi
Updating installer files…
Already up to date.
Gateway configuration:
Detected EUI B827EBFFFEBF634A from eth0
Do you want to use remote settings file? [y/N]^C
ttn@ttn-gateway:~/ic880a-gateway $ ^C

I used the same to create a config json file to upload on the gateway-remote-config repo, file uploaded labeled B827EBFFFEBF634A.json contained:

{
“gateway_conf”: {
“gateway_ID”: “B827EBFFFEBF634A”,
“servers”: [
{
“server_address”: “router.eu.thethings.network”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,
“serv_enabled”: true
}
],
“ref_latitude”: 25.31234487,
“ref_longitude”: 55.49102164,
“ref_altitude”: 0,
“contact_email”: “Shavaizknz98@gmail.com”,
“description”: “LoRaWAN gateway for Smart Campus Mobility System at the American University of Sharjah”
}
}

Moreover, my local_config file contains the same ID:

{
“gateway_conf”: {
“gateway_ID”: “B827EBFFFEBF634A”,
“servers”: [
{
“server_address”: “router.eu.thethings.network”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,
“serv_enabled”: true
}
],
“ref_latitude”: 25.31234487,
“ref_longitude”: 55.49102164,
“ref_altitude”: 0,
“contact_email”: “Shavaizknz98@gmail.com”,
“description”: “LoRaWAN gateway for Smart Campus Mobility System at the American University of Sharjah”
}
}

Here is a screenshot from my TTN Gateway status page

My global_config.json has a different ID listed but I assume this will be overriden by the local_config.json.

{
“SX1301_conf”: {
“lorawan_public”: true,
“clksrc”: 1, /* radio_1 provides clock to concentrator /
“radio_0”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 867500000,
“rssi_offset”: -166.0,
“tx_enable”: true
},
“radio_1”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 868500000,
“rssi_offset”: -166.0,
“tx_enable”: false
},
“chan_multiSF_0”: {
/
Lora MAC channel, 125kHz, all SF, 868.1 MHz /
“enable”: true,
“radio”: 1,
“if”: -400000
},
“chan_multiSF_1”: {
/
Lora MAC channel, 125kHz, all SF, 868.3 MHz /
“enable”: true,
“radio”: 1,
“if”: -200000
},
“chan_multiSF_2”: {
/
Lora MAC channel, 125kHz, all SF, 868.5 MHz /
“enable”: true,
“radio”: 1,
“if”: 0
},
“chan_multiSF_3”: {
/
Lora MAC channel, 125kHz, all SF, 867.1 MHz /
“enable”: true,
“radio”: 0,
“if”: -400000
},
“chan_multiSF_4”: {
/
Lora MAC channel, 125kHz, all SF, 867.3 MHz /
“enable”: true,
“radio”: 0,
“if”: -200000
},
“chan_multiSF_5”: {
/
Lora MAC channel, 125kHz, all SF, 867.5 MHz /
“enable”: true,
“radio”: 0,
“if”: 0
},
“chan_multiSF_6”: {
/
Lora MAC channel, 125kHz, all SF, 867.7 MHz /
“enable”: true,
“radio”: 0,
“if”: 200000
},
“chan_multiSF_7”: {
/
Lora MAC channel, 125kHz, all SF, 867.9 MHz /
“enable”: true,
“radio”: 0,
“if”: 400000
},
“chan_Lora_std”: {
/
Lora MAC channel, 250kHz, SF7, 868.3 MHz /
“enable”: true,
“radio”: 1,
“if”: -200000,
“bandwidth”: 250000,
“spread_factor”: 7
},
“chan_FSK”: {
/
FSK 50kbps channel, 868.8 MHz /
“enable”: true,
“radio”: 1,
“if”: 300000,
“bandwidth”: 125000,
“datarate”: 50000
},
“tx_lut_0”: {
/
TX gain table, index 0 /
“pa_gain”: 0,
“mix_gain”: 8,
“rf_power”: -6,
“dig_gain”: 0
},
“tx_lut_1”: {
/
TX gain table, index 1 /
“pa_gain”: 0,
“mix_gain”: 10,
“rf_power”: -3,
“dig_gain”: 0
},
“tx_lut_2”: {
/
TX gain table, index 2 /
“pa_gain”: 0,
“mix_gain”: 12,
“rf_power”: 0,
“dig_gain”: 0
},
“tx_lut_3”: {
/
TX gain table, index 3 /
“pa_gain”: 1,
“mix_gain”: 8,
“rf_power”: 3,
“dig_gain”: 0
},
“tx_lut_4”: {
/
TX gain table, index 4 /
“pa_gain”: 1,
“mix_gain”: 10,
“rf_power”: 6,
“dig_gain”: 0
},
“tx_lut_5”: {
/
TX gain table, index 5 /
“pa_gain”: 1,
“mix_gain”: 12,
“rf_power”: 10,
“dig_gain”: 0
},
“tx_lut_6”: {
/
TX gain table, index 6 /
“pa_gain”: 1,
“mix_gain”: 13,
“rf_power”: 11,
“dig_gain”: 0
},
“tx_lut_7”: {
/
TX gain table, index 7 /
“pa_gain”: 2,
“mix_gain”: 9,
“rf_power”: 12,
“dig_gain”: 0
},
“tx_lut_8”: {
/
TX gain table, index 8 /
“pa_gain”: 1,
“mix_gain”: 15,
“rf_power”: 13,
“dig_gain”: 0
},
“tx_lut_9”: {
/
TX gain table, index 9 /
“pa_gain”: 2,
“mix_gain”: 10,
“rf_power”: 14,
“dig_gain”: 0
},
“tx_lut_10”: {
/
TX gain table, index 10 /
“pa_gain”: 2,
“mix_gain”: 11,
“rf_power”: 16,
“dig_gain”: 0
},
“tx_lut_11”: {
/
TX gain table, index 11 /
“pa_gain”: 3,
“mix_gain”: 9,
“rf_power”: 20,
“dig_gain”: 0
},
“tx_lut_12”: {
/
TX gain table, index 12 /
“pa_gain”: 3,
“mix_gain”: 10,
“rf_power”: 23,
“dig_gain”: 0
},
“tx_lut_13”: {
/
TX gain table, index 13 /
“pa_gain”: 3,
“mix_gain”: 11,
“rf_power”: 25,
“dig_gain”: 0
},
“tx_lut_14”: {
/
TX gain table, index 14 /
“pa_gain”: 3,
“mix_gain”: 12,
“rf_power”: 26,
“dig_gain”: 0
},
“tx_lut_15”: {
/
TX gain table, index 15 */
“pa_gain”: 3,
“mix_gain”: 14,
“rf_power”: 27,
“dig_gain”: 0
}
},

"gateway_conf": {
    /* change with default server address/ports, or overwrite in local_conf.json */
    "gateway_ID": "AA555A0000000000",
    /* Devices */
    "gps": true,
    "beacon": false,
    "monitor": false,
    "upstream": true,
    "downstream": true,
    "ghoststream": false,
    "radiostream": true,
    "statusstream": true,
    /* node server */
    "server_address": "127.0.0.1",
    "serv_port_up": 1680,
    "serv_port_down": 1681,
    /* node servers for poly packet server (max 4) */
    "servers":
    [ { "server_address": "127.0.0.1",
        "serv_port_up": 1680,
        "serv_port_down": 1681,
        "serv_enabled": true },
      { "server_address": "iot.semtech.com",
        "serv_port_up": 1680,
        "serv_port_down": 1680,
        "serv_enabled": true } ],

/* 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 configuration /
“gps_tty_path”: “/dev/ttyAMA0”,
“fake_gps”: true,
“ref_latitude”: 10,
“ref_longitude”: 20,
“ref_altitude”: -1,
/
Ghost configuration /
“ghost_address”: “127.0.0.1”,
“ghost_port”: 1918,
/
Monitor configuration /
“monitor_address”: “127.0.0.1”,
“monitor_port”: 2008,
“ssh_path”: “/usr/bin/ssh”,
“ssh_port”: 22,
“http_port”: 80,
“ngrok_path”: “/usr/bin/ngrok”,
“system_calls”: [“df -m”,“free -h”,“uptime”,“who -a”,“uname -a”],
/
Platform definition, put a asterix here for the system value, max 24 chars. /
“platform”: "
",
/* Email of gateway operator, max 40 chars*/
“contact_email”: “operator@gateway.tst”,
/* Public description of this device, max 64 chars */
“description”: “Update me”

}

}

Apologies for the long message as I am new to forums in general as well as using LoRaWANs.

Bump :question:

If you can see in your own config it will connected to a server off semtech self. Please change that in one off the thethingnetwerk router off your regio.

Check then again.

Not really, that’s in the global_conf.json and overridden by the local_conf.json.

Do you have access from the location to the “router.eu.thethings.network”

Maybe yo can check it with a tcpdump or at least a ping to this address.

Check your interface name in place

tcpdump -ui wlan0 host router.eu.thethings.network

So I reset the Raspberry Pi I was using, and did the entire setup again. The only thing I did differently was to setup the local config file myself (entering latitude, longitude etc myself). It started working, and it shows up as connected on the TTN console. Honestly I am very confused but relieved that it’s working.

Thank you to all of you for helping out, I really appreciate it :slight_smile:

1 Like