Gateway with legacy package forwarder not connected

My raspberry gateway uses ttn-resin-gateway-rpi
I configured it with balena (resinIO) environment variables to use the legacy package forwarder only.

SERVER_TTN = false
SERVER_0_ENABLED = true
SERVER_0_TYPE = semtech
SERVER_0_DOWNLINK = true
SERVER_0_ADDRESS = router.eu.thethings.network
SERVER_0_PORTUP = 1700
SERVER_0_PORTDOWN = 1700
FREQ_PLAN_URL = https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870

But my gateway shows offline in the TTN console.
My LoRa node uses OTAA to connect but I only see activation messages in the TTN console, no uplink, no downlink messages.

The only special log-entries I found in the package forwarder logs where these:

Upstream datagram acknowledgment quality for server “router.eu.thethings.network” is 0.00%

WARNING: [up] ignored out-of sync ACK packet

Click to see the full logs

21.05.19 13:33:09 (+0200) main *******************
21.05.19 13:33:09 (+0200) main *** Configuration:
21.05.19 13:33:09 (+0200) main *******************
21.05.19 13:33:09 (+0200) main GW_EUI: B827EBFFFE25266A
21.05.19 13:33:09 (+0200) main TTN gateway connector disabled. Not fetching config from account server.
21.05.19 13:33:09 (+0200) main Latitude: 48.19169827
21.05.19 13:33:09 (+0200) main Longitude: 11.60150389
21.05.19 13:33:09 (+0200) main Altitude: 500
21.05.19 13:33:09 (+0200) main Gateway EUI: B827EBFFFE25266A
21.05.19 13:33:09 (+0200) main Has hardware GPS: False
21.05.19 13:33:09 (+0200) main Hardware GPS port: /dev/ttyAMA0
21.05.19 13:33:09 (+0200) main Using fake GPS
21.05.19 13:33:09 (+0200) main [TTN Gateway]: Resetting concentrator on pin 11
21.05.19 13:33:10 (+0200) main 11:33:10 *** Multi Protocol Packet Forwarder for Lora Gateway ***
21.05.19 13:33:10 (+0200) main Version: 3.0.20
21.05.19 13:33:10 (+0200) main 11:33:10 *** Lora concentrator HAL library version info ***
21.05.19 13:33:10 (+0200) main Version: 5.0.1; Options: native;
21.05.19 13:33:10 (+0200) main ***
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Little endian host
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: found global configuration file /opt/ttn-gateway//global_conf.json, parsing it
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: /opt/ttn-gateway//global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: lorawan_public 1, clksrc 1
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: no configuration for LBT
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: antenna_gain 0 dBi
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Configuring TX LUT with 16 indexes
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 0> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 1> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 2> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 3> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 4> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 5> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 6> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora multi-SF channel 7> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: /opt/ttn-gateway//global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: gateway MAC address is configured to B827EBFFFE25266A
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Found 1 servers in array.
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Server 0 configured to “router.eu.thethings.network”
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: filename for statistical performance is configured to “loragwstat.json”
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: packets received with a valid CRC will be forwarded
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: packets received with a CRC error will NOT be forwarded
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: packets received with no CRC will NOT be forwarded
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Reference latitude is configured to 48.191698 deg
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Reference longitude is configured to 11.601504 deg
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Reference altitude is configured to 500 meters
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: GPS is enabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Using fake GPS coordinates instead of real.
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Upstream data is enabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Downstream data is enabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Ghoststream data is disabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Radiostream data is enabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Statusstream data is enabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Beacon is disabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Packet logger is enabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Flush output after statistic is disabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Flush after each line of output is disabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Watchdog is disabled
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Contact email configured to “xxx@gmx.xx
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Description configured to “”
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: [Transports] Initializing protocol for 1 servers
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: Successfully contacted server router.eu.thethings.network
21.05.19 13:33:10 (+0200) main 11:33:10 INFO: [main] Starting the concentrator
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: [main] concentrator started, radio packets can now be received.
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: [up] Thread activated for all servers.
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: JIT thread activated.
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: Disabling GPS mode for concentrator’s counter…
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: host/sx1301 time offset=(1558438390s:852231µs) - drift=917564039µs
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: Enabling GPS mode for concentrator’s counter.
21.05.19 13:33:13 (+0200) main
21.05.19 13:33:13 (+0200) main 11:33:13 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 150 ms
21.05.19 13:33:18 (+0200) main 11:33:18 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 150 ms
21.05.19 13:33:23 (+0200) main 11:33:23 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 154 ms
21.05.19 13:33:28 (+0200) main 11:33:28 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 122 ms
21.05.19 13:33:31 (+0200) main 11:33:31 INFO: [stats] received packet with bad CRC from mote: FFC02D75 (fcnt=36130)
21.05.19 13:33:34 (+0200) main 11:33:34 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 142 ms
21.05.19 13:33:39 (+0200) main 11:33:39 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 142 ms
21.05.19 13:33:43 (+0200) main
21.05.19 13:33:43 (+0200) main ##### 2019-05-21 11:33:43 GMT #####
21.05.19 13:33:43 (+0200) main ### [UPSTREAM] ###
21.05.19 13:33:43 (+0200) main # RF packets received by concentrator: 1
21.05.19 13:33:43 (+0200) main # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
21.05.19 13:33:43 (+0200) main # RF packets forwarded: 0 (0 bytes)
21.05.19 13:33:43 (+0200) main # PUSH_DATA datagrams sent: 0 (0 bytes)
21.05.19 13:33:43 (+0200) main # PUSH_DATA acknowledged: 0.00%
21.05.19 13:33:43 (+0200) main ### [DOWNSTREAM] ###
21.05.19 13:33:43 (+0200) main # PULL_DATA sent: 6 (100.00% acknowledged)
21.05.19 13:33:43 (+0200) main # PULL_RESP(onse) datagrams received: 0 (0 bytes)
21.05.19 13:33:43 (+0200) main # RF packets sent to concentrator: 0 (0 bytes)
21.05.19 13:33:43 (+0200) main # TX errors: 0
21.05.19 13:33:43 (+0200) main ### BEACON IS DISABLED!
21.05.19 13:33:43 (+0200) main ### [JIT] ###
21.05.19 13:33:43 (+0200) main # INFO: JIT queue contains 0 packets.
21.05.19 13:33:43 (+0200) main # INFO: JIT queue contains 0 beacons.
21.05.19 13:33:43 (+0200) main ### [GPS] ###
21.05.19 13:33:43 (+0200) main # No time keeping possible due to fake gps.
21.05.19 13:33:43 (+0200) main # Manual GPS coordinates: latitude 48.19170, longitude 11.60150, altitude 500 m
21.05.19 13:33:43 (+0200) main ### [PERFORMANCE] ###
21.05.19 13:33:43 (+0200) main # Upstream radio packet quality: 0.00%.
21.05.19 13:33:43 (+0200) main # Upstream datagram acknowledgment quality for server “router.eu.thethings.network” is 0.00%.
21.05.19 13:33:43 (+0200) main # Downstream heart beat acknowledgment quality for server “router.eu.thethings.network” is 100.00%.
21.05.19 13:33:43 (+0200) main # Downstream datagram content quality for server “router.eu.thethings.network” is 0.00%.
21.05.19 13:33:43 (+0200) main # Downstream radio transmission quality for server “router.eu.thethings.network” is 100.00%.
21.05.19 13:33:43 (+0200) main ### [ CONNECTIONS ] ###
21.05.19 13:33:43 (+0200) main # Semtech status report send.
21.05.19 13:33:43 (+0200) main ##### END #####
21.05.19 13:33:44 (+0200) main 11:33:44 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 122 ms
21.05.19 13:33:49 (+0200) main 11:33:49 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 142 ms
21.05.19 13:33:54 (+0200) main 11:33:54 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 170 ms
21.05.19 13:33:59 (+0200) main 11:33:59 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 60 ms
21.05.19 13:34:02 (+0200) main 11:34:02 INFO: [stats] received packet with bad CRC from mote: 177AB6DC (fcnt=53106)
21.05.19 13:34:05 (+0200) main 11:34:05 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 120 ms
21.05.19 13:34:10 (+0200) main 11:34:10 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 152 ms
21.05.19 13:34:13 (+0200) main 11:34:13 INFO: Disabling GPS mode for concentrator’s counter…
21.05.19 13:34:13 (+0200) main 11:34:13 INFO: host/sx1301 time offset=(1558438390s:852686µs) - drift=455µs
21.05.19 13:34:13 (+0200) main 11:34:13 INFO: Enabling GPS mode for concentrator’s counter.
21.05.19 13:34:13 (+0200) main
21.05.19 13:34:13 (+0200) main
21.05.19 13:34:13 (+0200) main ##### 2019-05-21 11:34:13 GMT #####
21.05.19 13:34:13 (+0200) main ### [UPSTREAM] ###
21.05.19 13:34:13 (+0200) main # RF packets received by concentrator: 1
21.05.19 13:34:13 (+0200) main # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
21.05.19 13:34:13 (+0200) main # RF packets forwarded: 0 (0 bytes)
21.05.19 13:34:13 (+0200) main # PUSH_DATA datagrams sent: 1 (236 bytes)
21.05.19 13:34:13 (+0200) main # PUSH_DATA acknowledged: 0.00%
21.05.19 13:34:13 (+0200) main ### [DOWNSTREAM] ###
21.05.19 13:34:13 (+0200) main # PULL_DATA sent: 6 (100.00% acknowledged)
21.05.19 13:34:13 (+0200) main # PULL_RESP(onse) datagrams received: 0 (0 bytes)
21.05.19 13:34:13 (+0200) main # RF packets sent to concentrator: 0 (0 bytes)
21.05.19 13:34:13 (+0200) main # TX errors: 0
21.05.19 13:34:13 (+0200) main ### BEACON IS DISABLED!
21.05.19 13:34:13 (+0200) main ### [JIT] ###
21.05.19 13:34:13 (+0200) main # INFO: JIT queue contains 0 packets.
21.05.19 13:34:13 (+0200) main # INFO: JIT queue contains 0 beacons.
21.05.19 13:34:13 (+0200) main ### [GPS] ###
21.05.19 13:34:13 (+0200) main # No time keeping possible due to fake gps.
21.05.19 13:34:13 (+0200) main # Manual GPS coordinates: latitude 48.19170, longitude 11.60150, altitude 500 m
21.05.19 13:34:13 (+0200) main ### [PERFORMANCE] ###
21.05.19 13:34:13 (+0200) main # Upstream radio packet quality: 0.00%.
21.05.19 13:34:13 (+0200) main # Upstream datagram acknowledgment quality for server “router.eu.thethings.network” is 0.00%.
21.05.19 13:34:13 (+0200) main # Downstream heart beat acknowledgment quality for server “router.eu.thethings.network” is 100.00%.
21.05.19 13:34:13 (+0200) main # Downstream datagram content quality for server “router.eu.thethings.network” is 0.00%.
21.05.19 13:34:13 (+0200) main # Downstream radio transmission quality for server “router.eu.thethings.network” is 100.00%.
21.05.19 13:34:13 (+0200) main ### [ CONNECTIONS ] ###
21.05.19 13:34:13 (+0200) main # Semtech status report send.
21.05.19 13:34:13 (+0200) main ##### END #####
21.05.19 13:34:13 (+0200) main 11:34:13 WARNING: [up] ignored out-of sync ACK packet
21.05.19 13:34:15 (+0200) main 11:34:15 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 67 ms
21.05.19 13:34:20 (+0200) main 11:34:20 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 150 ms
21.05.19 13:34:25 (+0200) main 11:34:25 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 154 ms
21.05.19 13:34:30 (+0200) main 11:34:30 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 158 ms
21.05.19 13:34:36 (+0200) main 11:34:36 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 144 ms
21.05.19 13:34:41 (+0200) main 11:34:41 INFO: [down] for server router.eu.thethings.network PULL_ACK received in 155 ms
21.05.19 13:34:42 (+0200) main 11:34:42 INFO: [stats] received packet with valid CRC from mote: D001ACE9 (fcnt=46037)
21.05.19 13:34:42 (+0200) main 11:34:42 WARNING: [up] ignored out-of sync ACK packet
21.05.19 13:34:43 (+0200) main
21.05.19 13:34:43 (+0200) main ##### 2019-05-21 11:34:43 GMT #####
21.05.19 13:34:43 (+0200) main ### [UPSTREAM] ###
21.05.19 13:34:43 (+0200) main # RF packets received by concentrator: 1
21.05.19 13:34:43 (+0200) main # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
21.05.19 13:34:43 (+0200) main # RF packets forwarded: 1 (23 bytes)
21.05.19 13:34:43 (+0200) main # PUSH_DATA datagrams sent: 2 (472 bytes)
21.05.19 13:34:43 (+0200) main # PUSH_DATA acknowledged: 0.00%
21.05.19 13:34:43 (+0200) main ### [DOWNSTREAM] ###
21.05.19 13:34:43 (+0200) main # PULL_DATA sent: 6 (100.00% acknowledged)
21.05.19 13:34:43 (+0200) main # PULL_RESP(onse) datagrams received: 0 (0 bytes)
21.05.19 13:34:43 (+0200) main # RF packets sent to concentrator: 0 (0 bytes)
21.05.19 13:34:43 (+0200) main # TX errors: 0
21.05.19 13:34:43 (+0200) main ### BEACON IS DISABLED!
21.05.19 13:34:43 (+0200) main ### [JIT] ###
21.05.19 13:34:43 (+0200) main # INFO: JIT queue contains 0 packets.
21.05.19 13:34:43 (+0200) main # INFO: JIT queue contains 0 beacons.
21.05.19 13:34:43 (+0200) main ### [GPS] ###
21.05.19 13:34:43 (+0200) main # No time keeping possible due to fake gps.
21.05.19 13:34:43 (+0200) main # Manual GPS coordinates: latitude 48.19170, longitude 11.60150, altitude 500 m
21.05.19 13:34:43 (+0200) main ### [PERFORMANCE] ###
21.05.19 13:34:43 (+0200) main # Upstream radio packet quality: 100.00%.
21.05.19 13:34:43 (+0200) main # Upstream datagram acknowledgment quality for server “router.eu.thethings.network” is 0.00%.
21.05.19 13:34:43 (+0200) main # Downstream heart beat acknowledgment quality for server “router.eu.thethings.network” is 100.00%.
21.05.19 13:34:43 (+0200) main # Downstream datagram content quality for server “router.eu.thethings.network” is 0.00%.
21.05.19 13:34:43 (+0200) main # Downstream radio transmission quality for server “router.eu.thethings.network” is 100.00%.
21.05.19 13:34:43 (+0200) main ### [ CONNECTIONS ] ###
21.05.19 13:34:43 (+0200) main # Semtech status report send.
21.05.19 13:34:43 (+0200) main ##### END #####
21.05.19 13:34:43 (+0200) main 11:34:43 WARNING: [up] ignored out-of sync ACK packet
21.05.19 13:34:46 (+0200) main 11:34:46 INFO: [down] for server router.eu.thethings.network serv_addr[ic] PULL_RESP received - token[56:252] :slight_smile:
21.05.19 13:34:46 (+0200) main 11:34:46 INFO: [down] for server PULL_ACK received in 58 ms
21.05.19 13:34:47 (+0200) main INFO: tx_start_delay=1495 (1495.500000) - (1497, bw_delay=1.500000, notch_delay=0.000000)
21.05.19 13:34:47 (+0200) main src/mp_pkt_fwd.c:1671:thread_jit(): lgw_send done: count_us=96250228

The ttn-resin-gateway-rpi uses the multi-protocol-packet-forwarder.
Is it not possible any more to use this forwarder in UDP/1700 mode?

Your log shows you are using it in that mode and it is sending data to TTN, so why ask?

First i’m asking because it does not work.
But no data arrives and the gateway is shown offline in the TTN console.

Second i read on github for ttn-resin-gateway-rpi.
So i am not sure if this new data-format works correct with the old UDP.

mp-pkt-fwd uses the new protocolbuffers-over-mqtt-over-tcp protocol for gateways, as defined by TTN and used by the TTN kickstarter gateway. Using this protcol the gateway is authenticated, which means it is registered under a specific user and can thus be trusted. Because it uses TCP, the chance of packet loss is much lower than with the previous protocol that used UDP. Protocolbuffers packs the data in a compact binary mode into packets, using much less space than the plaintext json that was previously used. It should therefore consume less bandwidth.

  1. The log shows data is arriving and being forwarded. Did you register the gateway in ‘legacy’ mode @ TTN?
  2. MP stands for Multiple Protocol. IT implementatie both the UDP based protocol and the newer, better TCP based one. So you can decide which one to use.

I registered a new legacy gateway with the mac-address of the raspberry and also set the environment variable GW_EUI to the mac address. Then the gateway showed up online :smile:

My device tries to join via OTAA. The joining request and join accepted messages were displayed at the TTN gateway console. But the downlink message (accepted join) does not arrived at the device. So my device was not able to successfully join via OTAA.

I switched to ABP and I was able to send uplink messages. But downlink messages are not working.
So my next challenge is to fix downlink… My gateway is configured with GW_DOWNSTREAM=true.
Any ideas??

Take a look at the gateway log to see if it actually gets and transmits the data TTN schedules for transmission? Use SDR to check if the gateway transmits any data? Check the node debug to see if it gets any data? Make sure your node is not to close to the gateway (at least 3m distance)?

READ THE FORUM to check for answers as this question (node activation fails) and how to proceed has been answered at least once earlier this week? (That allows me to spend time helping people with unique issues)

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.