ERROR: [main] failed to start the concentrator

Hey, thanks for getting back so quick. I ran build-pi.sh , which brough lora_gateway and another copy of packet_forwarder into packet_forwarder/mp_pkt_fwd . Running make in the new lora_gateway directory gives a similar error:

make all -e -C libloragw
make[1]: Entering directory '/home/pi/kersing/packet_forwarder/mp_pkt_fwd/lora_gateway/libloragw'
Makefile:44: *** No SPI physical layer selected, check ../target.cfg file..  Stop.
make[1]: Leaving directory '/home/pi/kersing/packet_forwarder/mp_pkt_fwd/lora_gateway/libloragw'
Makefile:10: recipe for target 'all' failed
make: *** [all] Error 2

I needed sudo to build the folders in /opt. Thank you for making this repo. Iā€™ll let you know if I hit any more speedbumps.

@kersing I was able to build it, and now Iā€™m getting the error which is the title of this thread.

10:26:41  *** Multi Protocol Packet Forwarder for Lora Gateway ***
Version: 3.0.20
10:26:41  *** Lora concentrator HAL library version info ***
Version: 5.0.1; Options: native;
***
10:26:41  INFO: Little endian host
10:26:41  INFO: found global configuration file global_conf.json, parsing it
10:26:41  INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
10:26:41  INFO: lorawan_public 1, clksrc 1
10:26:41  INFO: no configuration for LBT
10:26:41  INFO: antenna_gain 0 dBi
10:26:41  INFO: Configuring TX LUT with 16 indexes
10:26:41  INFO: radio 0 enabled (type SX1257), center frequency 904300000, RSSI offset -166.000000, tx enabled 1
10:26:41  INFO: radio 1 enabled (type SX1257), center frequency 905000000, RSSI offset -166.000000, tx enabled 0
10:26:41  INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 7 to 12
10:26:41  INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8
10:26:41  INFO: FSK channel 8 disabled
10:26:41  INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
10:26:41  INFO: gateway MAC address is configured to B827EBFFFE15F6CB
10:26:41  INFO: Found 1 servers in array.
10:26:41  INFO: Server 0 configured to "router.us.thethings.network"
10:26:41  INFO: packets received with a valid CRC will be forwarded
10:26:41  INFO: packets received with a CRC error will NOT be forwarded
10:26:41  INFO: packets received with no CRC will NOT be forwarded
10:26:41  INFO: GPS is disabled
10:26:41  INFO: Upstream data is enabled
10:26:41  INFO: Downstream data is enabled
10:26:41  INFO: Ghoststream data is disabled
10:26:41  INFO: Radiostream data is enabled
10:26:41  INFO: Statusstream data is enabled
10:26:41  INFO: Beacon is disabled
10:26:41  INFO: Packet logger is disabled
10:26:41  INFO: Flush output after statistic is disabled
10:26:41  INFO: Flush after each line of output is disabled
10:26:41  INFO: Watchdog is disabled
10:26:41  INFO: [Transports] Initializing protocol for 1 servers
10:26:42  INFO: Successfully contacted server router.us.thethings.network
10:26:42  INFO: [main] Starting the concentrator
10:26:42  ERROR: [main] failed to start the concentrator

The solution is part of the thread as well. Fix the clock setting, make sure the right reset pin is used and allow for a couple of retries. If that all fails use the command line switch to set SPI comms to a lower speed.

Sorry, I couldnā€™t find any post about changing the clock setting. Where do I set that? I have changed the reset pin to 7, which should be right.

Also, make sure to have SPI enabled :wink: (You wouldnā€™t be the first to forget that step)

Ah, thank you. Still confused as to what I should set SPI_SPEED to. I saw some info about that here: https://github.com/Lora-net/lora_gateway/issues/26, but none have worked. Iā€™ve experimented with many different SPI_SPEED values in /opt/ttn-gateway/dev/lora_gateway/libloragw/inc/imst_rpi.h, between 50k and 8M, and none have worked. Though now, with SPI_DEBUG enabled, I get some SPI info before the failure:

...
14:24:41  INFO: [main] Starting the concentrator
Note: SPI port opened and configured ok
Note: SPI read success
Note: SPI read success
14:24:41  ERROR: [main] failed to start the concentrator

Mp forwarder allows you to specify the SPI speed on the command line (-s ).
Have you locked the clock speed of the RPi3?

What do you use to reset the concentrator?

Iā€™ve tried that method, too. No, I couldnā€™t figure out how to do that. Overclocking options are disabled on the Pi 3.

Locking the clock requires setting core_freq as mentioned in the message I linked to. Google helps as wellā€¦

I read that post feed, but was under the impression you didnā€™t need to lock it unless going >= 8M on baud. Iā€™ll try locking it anyway.

I set core_freq=250 in /boot/config.txt, rebooted, and tried a range of bauds, but still getting the same error. Iā€™ve tried with sudo ./mp_pkt_fwd -s 8000000. Is that reasonable? With all logging enabled, I get:

16:54:28  *** Multi Protocol Packet Forwarder for Lora Gateway ***
Version: 3.0.20
16:54:28  *** Lora concentrator HAL library version info ***
Version: 5.0.1; Options: native;
***
16:54:28  INFO: Little endian host
16:54:28  INFO: found global configuration file global_conf.json, parsing it
16:54:28  INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
16:54:28  INFO: lorawan_public 1, clksrc 1
lgw_board_setconf:437: Note: board configuration; lorawan_public:1, clksrc:1
16:54:28  INFO: no configuration for LBT
16:54:28  INFO: antenna_gain 0 dBi
16:54:28  INFO: Configuring TX LUT with 16 indexes
16:54:28  INFO: radio 0 enabled (type SX1257), center frequency 904300000, RSSI offset -166.000000, tx enabled 1
lgw_rxrf_setconf:486: WARNING: NOT A VALID TX NOTCH FILTER FREQUENCY [126000..250000]Hz
lgw_rxrf_setconf:498: Note: rf_chain 0 configuration; en:1 freq:904300000 rssi_offset:-166.000000 radio_type:2 tx_enable:1 tx_notch_freq:0
16:54:28  INFO: radio 1 enabled (type SX1257), center frequency 905000000, RSSI offset -166.000000, tx enabled 0
lgw_rxrf_setconf:498: Note: rf_chain 1 configuration; en:1 freq:905000000 rssi_offset:-166.000000 radio_type:2 tx_enable:0 tx_notch_freq:0
16:54:28  INFO: Lora multi-SF channel 0>  radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 0 configuration; en:1 freq:-400000 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 1>  radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 1 configuration; en:1 freq:-200000 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 2>  radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 2 configuration; en:1 freq:0 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 3>  radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 3 configuration; en:1 freq:200000 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 4>  radio 1, IF -300000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 4 configuration; en:1 freq:-300000 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 5>  radio 1, IF -100000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 5 configuration; en:1 freq:-100000 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 6>  radio 1, IF 100000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 6 configuration; en:1 freq:100000 SF_mask:0x7e
16:54:28  INFO: Lora multi-SF channel 7>  radio 1, IF 300000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:617: Note: LoRa 'multi' if_chain 7 configuration; en:1 freq:300000 SF_mask:0x7e
16:54:28  INFO: Lora std channel> radio 0, IF 300000 Hz, 500000 Hz bw, SF 8
lgw_rxif_setconf:591: Note: LoRa 'std' if_chain 8 configuration; en:1 freq:300000 bw:1 dr:4
16:54:28  INFO: FSK channel 8 disabled
lgw_rxif_setconf:525: Note: if_chain 9 disabled
16:54:28  INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
16:54:28  INFO: gateway MAC address is configured to B827EBFFFE15F6CB
16:54:28  INFO: Found 1 servers in array.
16:54:28  INFO: Server 0 configured to "router.us.thethings.network"
16:54:28  INFO: packets received with a valid CRC will be forwarded
16:54:28  INFO: packets received with a CRC error will NOT be forwarded
16:54:28  INFO: packets received with no CRC will NOT be forwarded
16:54:28  INFO: GPS is disabled
16:54:28  INFO: Upstream data is enabled
16:54:28  INFO: Downstream data is enabled
16:54:28  INFO: Ghoststream data is disabled
16:54:28  INFO: Radiostream data is enabled
16:54:28  INFO: Statusstream data is enabled
16:54:28  INFO: Beacon is disabled
16:54:28  INFO: Packet logger is disabled
16:54:28  INFO: Flush output after statistic is disabled
16:54:28  INFO: Flush after each line of output is disabled
16:54:28  INFO: Watchdog is disabled
16:54:28  INFO: [Transports] Initializing protocol for 1 servers
16:54:28  INFO: Successfully contacted server router.us.thethings.network
16:54:28  INFO: [main] Starting the concentrator
Note: SPI port opened and configured ok
Note: SPI read success
lgw_connect:532: INFO: no FPGA detected or version not supported (v0)
Note: SPI read success
lgw_connect:555: ERROR: NOT EXPECTED CHIP VERSION (v0)
ERROR: FAIL TO CONNECT BOARD
16:54:28  ERROR: [main] failed to start the concentrator

Itā€™s still not working, but I got closer. Thereā€™s a discrepancy between how we talk about pins in the TTN packet forwarder and forks off of Semtechā€™s. TTNā€™s reset pin refers to GPIO #, whereas Semtech and others refers to the reset pin by pin #. GPIO 7 = pin 26, so setting that to 26 in reset_lgw.sh got me closer to working.

The last few lines of my verbose output are now:

lgw_spi_rb:373: BURST READ: to trans 1024 # chunk 1024 # transferred 8192 
Note: SPI burst read success
ERROR: Failed to load fw 1
Note: SPI read success
Note: SPI write success
Note: SPI write success
Note: SPI read success
Note: SPI write success
Note: SPI write success
Note: SPI write success
Note: SPI read success
ERROR: Version of calibration firmware not expected, actual:0 expected:2
21:18:55  ERROR: [main] failed to start the concentrator

Hello ehsanmgh,
I am facing the same problem. can you please tell me how you RESET the ic880a-SPI board.

Hello,
I already tried it but it didnā€™t worked.
Is any other solutions to start the concentrator ?
Any help ll be appreciating.
Thank you.

Hi, I had the same issue, I could resolve it by resetting the CE0 and RESET pin before running the forwarder. Here is how i did it:


echo "Restarting the CE0 pin..."
CSPIN=8
echo "$CSPIN" > /sys/class/gpio/export
sleep 1
echo "out" > /sys/class/gpio/gpio$CSPIN/direction
echo "0" > /sys/class/gpio/gpio$CSPIN/value
sleep 1
echo "1" > /sys/class/gpio/gpio$CSPIN/value
echo "Done\n"
sleep 1

echo "Restarting the Concentrator..."
RSTPIN=17
echo "$RSTPIN" > /sys/class/gpio/export
sleep 1
echo "out" > /sys/class/gpio/gpio$RSTPIN/direction
echo "1" > /sys/class/gpio/gpio$RSTPIN/value
sleep 1
echo "0" > /sys/class/gpio/gpio$RSTPIN/value
echo "Done\nLaunching the forwarder..."
sleep 2

cd /PATH_TO_THE_GATEWAY_CODES/packet_forwarder/ && ./lora_pkt_fwd

Save this code in a shell file, change the path according to your own settings and make sure to run it with sudo
The full article can be found here

1 Like

Moji
I read your article thank you very much, but I have doubts about how to save or create the code in the console. I am a newbie

Hello,
image
As you can see i have the ā€˜ftdiā€™. Where can i find the instructions to fix this?
iā€™am having the same error:
ā€œERROR: [main] failed to start the concentratorā€

Do you mean you have ftdi hardware? Or that you have SPI hardware and the wrong software version?
Which instructions have you used?

BTW the terminal output is ascii text, no need to use an image, just cut-and-paste the text as a quote/code block next time you post.

1 Like

error_post Any idea how I might resolve this error ? I am using LORA gateway along with a risinghf module. What might be the solution to this?