RPi + RAK831 + Resin image => Failed to start the concentrator


(Jeremyherbert) #1

Hi,

I followed the instructions on the TTN page here: https://www.thethingsnetwork.org/docs/gateways/rak831/ Unfortunately, all I get is the dreaded “failed to start the concentrator” message over and over. It doesn’t go away after a few minutes; I’ve left it for 30 mins with no change.

I have a Raspberry Pi 3 B+ with a RAK831 and RAK831 adapter board (just arrived today). Does anyone know what the issue could be ? Power supply is a good one, 5V@2.4A.

log:
/sbin/udevd
14.09.18 22:13:30 (+1000) main *** Resin Machine Info:
14.09.18 22:13:30 (+1000) main *** Type: None
14.09.18 22:13:30 (+1000) main *** Arch: None
14.09.18 22:13:30 (+1000) main *******************
14.09.18 22:13:30 (+1000) main *** Configuration:
14.09.18 22:13:30 (+1000) main *******************
14.09.18 22:13:30 (+1000) main GW_EUI:
14.09.18 22:13:30 (+1000) main Enabling TTN gateway connector
14.09.18 22:13:30 (+1000) main *******************
14.09.18 22:13:30 (+1000) main *** Fetching config from TTN account server
14.09.18 22:13:30 (+1000) main *******************
14.09.18 22:13:32 (+1000) main Gateway ID: apartment
14.09.18 22:13:32 (+1000) main Gateway Key:
14.09.18 22:13:32 (+1000) main Frequency plan: AS_923_925
14.09.18 22:13:32 (+1000) main Frequency plan url: https://account.thethingsnetwork.org/api/v2/frequency-plans/AS_923_925
14.09.18 22:13:32 (+1000) main Gateway description: apartment
14.09.18 22:13:32 (+1000) main Gateway placement: unknown
14.09.18 22:13:32 (+1000) main Router: bridge.asia-se.thethings.network
14.09.18 22:13:32 (+1000) main
14.09.18 22:13:32 (+1000) main Fallback routers:
14.09.18 22:13:32 (+1000) main mqtts://bridge.eu.thethings.network:8882
14.09.18 22:13:32 (+1000) main mqtts://bridge.us-west.thethings.network
14.09.18 22:13:32 (+1000) main mqtts://bridge.brazil.thethings.network
14.09.18 22:13:32 (+1000) main Latitude: 0
14.09.18 22:13:32 (+1000) main Longitude: 0
14.09.18 22:13:32 (+1000) main Altitude: 0
14.09.18 22:13:32 (+1000) main Gateway EUI:
14.09.18 22:13:32 (+1000) main Has hardware GPS: False
14.09.18 22:13:32 (+1000) main Hardware GPS port: /dev/ttyAMA0
14.09.18 22:13:33 (+1000) main Not sending coordinates
14.09.18 22:13:33 (+1000) main [TTN Gateway]: Resetting concentrator on pin 11
14.09.18 22:13:33 (+1000) main 12:13:33 *** Multi Protocol Packet Forwarder for Lora Gateway ***
14.09.18 22:13:33 (+1000) main Version: 3.0.20
14.09.18 22:13:33 (+1000) main 12:13:33 *** Lora concentrator HAL library version info ***
14.09.18 22:13:33 (+1000) main Version: 5.0.1; Options: native;
14.09.18 22:13:33 (+1000) main ***
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Little endian host
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: found global configuration file /opt/ttn-gateway//global_conf.json, parsing it
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: /opt/ttn-gateway//global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: lorawan_public 1, clksrc 1
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: 8 LBT channels configured
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: antenna_gain 0 dBi
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Configuring TX LUT with 16 indexes
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: radio 0 enabled (type SX1257), center frequency 923600000, RSSI offset -166.000000, tx enabled 1
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: radio 1 enabled (type SX1257), center frequency 924600000, RSSI offset -166.000000, tx enabled 0
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 0> radio 0, IF -400000 Hz, 125kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 1> radio 0, IF -200000 Hz, 125kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 2> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 3> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 4> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 5> radio 1, IF -400000 Hz, 125kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 6> radio 1, IF -200000 Hz, 125kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora multi-SF channel 7> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Lora std channel> radio 1, IF -100000 Hz, 250000 Hz bw, SF 7
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: FSK channel> radio 1, IF 200000 Hz, 125000 Hz bw, 50000 bps datarate
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: /opt/ttn-gateway//global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: gateway MAC address is configured to
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Found 1 servers in array.
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Server 0 configured to “bridge.asia-se.thethings.network”
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: filename for statistical performance is configured to"loragwstat.json"
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: packets received with a valid CRC will be forwarded
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: packets received with a CRC error will NOT be forwarded
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: packets received with no CRC will NOT be forwarded
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: GPS is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Upstream data is enabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Downstream data is enabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Ghoststream data is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Radiostream data is enabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Statusstream data is enabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Beacon is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Packet logger is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Flush output after statistic is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Flush after each line of output is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Watchdog is disabled
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Contact email configured to “”
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: Description configured to “apartment”
14.09.18 22:13:33 (+1000) main 12:13:33 INFO: [Transports] Initializing protocol for 1 servers
14.09.18 22:13:34 (+1000) main 12:13:34 INFO: [TTN] server “bridge.asia-se.thethings.network” connected
14.09.18 22:13:34 (+1000) main 12:13:34 INFO: [main] Starting the concentrator
14.09.18 22:13:35 (+1000) main 12:13:35 ERROR: [main] failed to start the concentrator


(Amedee) #2

Can you confirm you have setup RESIN_HOST_CONFIG_core_freq and RESIN_HOST_CONFIG_dtoverlay as described in the article?

Also I would encourage reducing the SPI speed to e.g. 5MHz by setting the SPI_SPEED parameterto 5000000.


(Jeremyherbert) #3

Yep, this is my resin config:

resin_io___quiet-dew

I have set the SPI speed to 5MHz, but with no difference unfortunately.


(Jac Kersing) #4

Have you set the reset pin? From the instructions:

  1. Enter “GW_RESET_PIN” (no quotes) and value 11.

(Amedee) #5

Looks like that one was good :wink:


(Jeremyherbert) #6

Just an update here: I installed the poly packet forwarder using these instructions: https://github.com/ttn-zh/ic880a-gateway/tree/spi

It works perfectly once I restart the RAK831 manually. So I think there might be a bug in the resin build?

Edit: Also, with the resin image, the RAK831 never even got warm, so it was clearly not switching on. But I did observe the LEDs changing as the device was reset. I also left the system to run overnight and it did not do anything, but the ic880a-gateway system worked first try.


(Amedee) #7

This one does not use the same software stack…

It is strange. A bug is always possible, but this resin setup is already running on quite a lot of gateways without trouble.


(Jeremyherbert) #8

I tried a complete run through from scratch again this morning with the resin instructions, but still same result. Has anyone tested the resin build with AS923?


(Jeremyherbert) #9

Aha! AU915 works fine with the resin setup, but AS923 is broken.


(Jeremyherbert) #10

Ok, it’s definitely due to setting the frequency plan to AS923. If I set it to AU915 in the console and reboot the gateway, it comes up fine. Switching to AS923 gives the same error as above, and then switching back to AU915 it works again. I was running AS923 with the poly forwarder and it seemed to start fine?

@kersing are you the maintainer of this? Do you know if it has it been tested with AS923?


(Amedee) #11

Frequency plan if automatically fetched from TTN.

E.g. for EU plan, it gets https://account.thethingsnetwork.org/api/v2/frequency-plans/EU_863_870
and for AS: https://account.thethingsnetwork.org/api/v2/frequency-plans/AS_923_925

This URL is provided by TTN, as well as the data.

It would be interesting to see which configuration you get with the Zurich setup and how it is different from this one…

When I look at the plans, the AS has a lbt_cfg field that e.g. EU or AU don’t have. I don’t know if it has an impact or not though…


(Jac Kersing) #12

Poly from zh repo does not support LBT (listen before talk) MP does. That may cause the forwarder not to be able initialize the radio.


(Jeremyherbert) #13

With the zurich setup I used this config manually: https://github.com/TheThingsNetwork/gateway-conf/blob/master/AS2-global_conf.json

Is there some way to confirm that listen-before-talk is what is breaking MP?


(Amedee) #14

You can try the following in the resin setup:

in run.py line 191 add:

if 'lbt_cfg' in sx1301_conf:
   print "Removing LBT configuration"
   del sx1301_conf['lbt_cfg']

and see if it works…


(Jeremyherbert) #15

Hi Amedee,

Yes, that does fix it. But is LBT required for LoRaWAN compliance?


(Jeremyherbert) #16

Ok I take that back. The logs look fine, but it doesn’t show up as “connected” on the ttn platform?

17.09.18 20:14:31 (+1000) main ##### 2018-09-17 10:14:31 GMT #####
17.09.18 20:14:31 (+1000) main ### [UPSTREAM] ###
17.09.18 20:14:31 (+1000) main # RF packets received by concentrator: 0
17.09.18 20:14:31 (+1000) main # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
17.09.18 20:14:31 (+1000) main # RF packets forwarded: 0 (0 bytes)
17.09.18 20:14:31 (+1000) main # PUSH_DATA datagrams sent: 0 (0 bytes)
17.09.18 20:14:31 (+1000) main # PUSH_DATA acknowledged: 0.00%
17.09.18 20:14:31 (+1000) main ### [DOWNSTREAM] ###
17.09.18 20:14:31 (+1000) main # PULL_DATA sent: 0 (0.00% acknowledged)
17.09.18 20:14:31 (+1000) main # PULL_RESP(onse) datagrams received: 0 (0 bytes)
17.09.18 20:14:31 (+1000) main # RF packets sent to concentrator: 0 (0 bytes)
17.09.18 20:14:31 (+1000) main # TX errors: 0
17.09.18 20:14:31 (+1000) main ### BEACON IS DISABLED!
17.09.18 20:14:31 (+1000) main ### [JIT] ###
17.09.18 20:14:31 (+1000) main # INFO: JIT queue contains 0 packets.
17.09.18 20:14:31 (+1000) main # INFO: JIT queue contains 0 beacons.
17.09.18 20:14:31 (+1000) main ### GPS IS DISABLED!
17.09.18 20:14:31 (+1000) main ### [PERFORMANCE] ###
17.09.18 20:14:31 (+1000) main # Upstream radio packet quality: 0.00%.
17.09.18 20:14:31 (+1000) main ### [ CONNECTIONS ] ###
17.09.18 20:14:31 (+1000) main # bridge.asia-se.thethings.network: Connected
17.09.18 20:14:31 (+1000) main # Semtech status report send.
17.09.18 20:14:31 (+1000) main ##### END #####
17.09.18 20:14:31 (+1000) main 10:14:31 INFO: [TTN] bridge.asia-se.thethings.network RTT 176
17.09.18 20:14:31 (+1000) main 10:14:31 INFO: [TTN] send status success for bridge.asia-se.thethings.network
17.09.18 20:15:01 (+1000) main
17.09.18 20:15:01 (+1000) main ##### 2018-09-17 10:15:01 GMT #####
17.09.18 20:15:01 (+1000) main ### [UPSTREAM] ###
17.09.18 20:15:01 (+1000) main # RF packets received by concentrator: 1
17.09.18 20:15:01 (+1000) main # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
17.09.18 20:15:01 (+1000) main # RF packets forwarded: 0 (0 bytes)
17.09.18 20:15:01 (+1000) main # PUSH_DATA datagrams sent: 0 (0 bytes)
17.09.18 20:15:01 (+1000) main # PUSH_DATA acknowledged: 0.00%
17.09.18 20:15:01 (+1000) main ### [DOWNSTREAM] ###
17.09.18 20:15:01 (+1000) main # PULL_DATA sent: 0 (0.00% acknowledged)
17.09.18 20:15:01 (+1000) main # PULL_RESP(onse) datagrams received: 0 (0 bytes)
17.09.18 20:15:01 (+1000) main # RF packets sent to concentrator: 0 (0 bytes)
17.09.18 20:15:01 (+1000) main # TX errors: 0
17.09.18 20:15:01 (+1000) main ### BEACON IS DISABLED!
17.09.18 20:15:01 (+1000) main ### [JIT] ###
17.09.18 20:15:01 (+1000) main # INFO: JIT queue contains 0 packets.
17.09.18 20:15:01 (+1000) main # INFO: JIT queue contains 0 beacons.
17.09.18 20:15:01 (+1000) main ### GPS IS DISABLED!
17.09.18 20:15:01 (+1000) main ### [PERFORMANCE] ###
17.09.18 20:15:01 (+1000) main # Upstream radio packet quality: 0.00%.
17.09.18 20:15:01 (+1000) main ### [ CONNECTIONS ] ###
17.09.18 20:15:01 (+1000) main # bridge.asia-se.thethings.network: Connected
17.09.18 20:15:01 (+1000) main # Semtech status report send.
17.09.18 20:15:01 (+1000) main ##### END #####
17.09.18 20:15:01 (+1000) main 10:15:01 INFO: [TTN] bridge.asia-se.thethings.network RTT 185
17.09.18 20:15:01 (+1000) main 10:15:01 INFO: [TTN] send status success for bridge.asia-se.thethings.network
17.09.18 20:15:31 (+1000) main 10:15:31 INFO: Disabling GPS mode for concentrator’s counter…
17.09.18 20:15:31 (+1000) main 10:15:31 INFO: host/sx1301 time offset=(1537179208s:679266µs) - drift=-235µs
17.09.18 20:15:31 (+1000) main 10:15:31 INFO: Enabling GPS mode for concentrator’s counter.
17.09.18 20:15:31 (+1000) main
17.09.18 20:15:31 (+1000) main
17.09.18 20:15:31 (+1000) main ##### 2018-09-17 10:15:31 GMT #####
17.09.18 20:15:31 (+1000) main ### [UPSTREAM] ###
17.09.18 20:15:31 (+1000) main # RF packets received by concentrator: 0
17.09.18 20:15:31 (+1000) main # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
17.09.18 20:15:31 (+1000) main # RF packets forwarded: 0 (0 bytes)
17.09.18 20:15:31 (+1000) main # PUSH_DATA datagrams sent: 0 (0 bytes)
17.09.18 20:15:31 (+1000) main # PUSH_DATA acknowledged: 0.00%
17.09.18 20:15:31 (+1000) main ### [DOWNSTREAM] ###
17.09.18 20:15:31 (+1000) main # PULL_DATA sent: 0 (0.00% acknowledged)
17.09.18 20:15:31 (+1000) main # PULL_RESP(onse) datagrams received: 0 (0 bytes)
17.09.18 20:15:31 (+1000) main # RF packets sent to concentrator: 0 (0 bytes)
17.09.18 20:15:31 (+1000) main # TX errors: 0
17.09.18 20:15:31 (+1000) main ### BEACON IS DISABLED!
17.09.18 20:15:31 (+1000) main ### [JIT] ###
17.09.18 20:15:31 (+1000) main # INFO: JIT queue contains 0 packets.
17.09.18 20:15:31 (+1000) main # INFO: JIT queue contains 0 beacons.
17.09.18 20:15:31 (+1000) main ### GPS IS DISABLED!
17.09.18 20:15:31 (+1000) main ### [PERFORMANCE] ###
17.09.18 20:15:31 (+1000) main # Upstream radio packet quality: 0.00%.
17.09.18 20:15:31 (+1000) main ### [ CONNECTIONS ] ###
17.09.18 20:15:31 (+1000) main # bridge.asia-se.thethings.network: Connected
17.09.18 20:15:31 (+1000) main # Semtech status report send.
17.09.18 20:15:31 (+1000) main ##### END #####
17.09.18 20:15:31 (+1000) main 10:15:31 INFO: [TTN] bridge.asia-se.thethings.network RTT 181
17.09.18 20:15:31 (+1000) main 10:15:31 INFO: [TTN] send status success for bridge.asia-se.thethings.network


(Amedee) #17

I cannot answer that – If you would use the Zurich setup it wouldn’t do LBT :wink:

Now, it would be good to understand why the concentrator doesn’t start with LBT – it is either a problem with the config file or with the mp forwarder.
This is more a question for @kersing :nerd_face:

It might be a transient problem of the bridge, the log looks good. I think it will appear sometime.
Does it forwards packets?


(Jac Kersing) #18

You are missing one component in the list, the concentrator and more specifically the fpga firmware level.
MP works on different hardware with lbt enabled so I don’t think it will be an issue with the software. However being in EU868 I am unable to check. (I am not about to start running lorawan hardware configured for frequencies used by mobile operators over here)


(Jeremyherbert) #19

Couldn’t you just enable LBT for EU868? Or terminate the antenna with a 50ohm load?


(Jac Kersing) #20

Depending on the hardware LBT is not supported below 915MHz. As far as I know I don’t have hardware that does support below 915MHz.

You do not seriously expect me to spend money on gateway hardware I can’t legally use over here, do you? This is a hobby that is consuming too much money and takes too much of my free time as it is… (Ask me again when I’m making money out of my work on MP forwarder, however, don’t expect it to happen soon)