ERROR: [main] failed to start the concentrator

SPI is enable and I did not go directly to the local_conf.json i think. when I’m following the tutorial this asks what my Gateway ID, my Gateway Key and the reset pin. And recommends pin 17 for raspberry 3 which is my case, I just put “17” and enter. Can I confirm in any way that I’m using the right pin? For power supply I have one with 5v 1A

For a 3B that is not a lot of power… recommended for RPi3 is to use at least 2A power supply.
For the RPi3 there is also an SPI timing issue which requires changing the boot config, a quick look at the repo does not show anything related to this.
Do you need a Raspian based install? If not I would suggest to use https://github.com/jpmeijers/ttn-resin-gateway-rpi . You could use this on a (spare) sdcard to check the hardware anyway.

hi (sorry for English)
i try semtech packet forwarder with orange pi zero and sx1278(LoRa-RA02)

  1. can i run this gateway ? (in Lora-net say SX1278 supported )
  2. when run packet forwarder ERROR : failed to start the concentrator.?
    • where i can change or set spi pin mosi / miso / sck / reset / Dio0 / CS .( IS necessary )
    • i use wiringOP-zero .
      Thank you for the guide.
      Regards.

You are mixing two projects, sx1278 is a chip for a node. It can be used for a single channel gateway, not for the full gateway software you are trying to run.

1 Like

Thank you for response.
yes ,but i have only lora-ra02 :kissing_smiling_eyes:.
i run single channel gateway but only supported up link . now i trying to run dual_chan_pkt_fwd.
if you have better suggest , please help me.

Dual_chan_pkt_fwd is the best option. However the error suggests another packet forwarder, not dual_chan_pkt_fwd.

This message is not in the dual_chan_pkt_fwd sources according to github (search). It is part of the source of Lora-net packet_forwarder, poly_pkt_fwd, mp_pkt_fwd etc, software for a full gateway based on sx1301/sx1308.

1 Like

Hi Jac, I’m trying to build your version of lora_gateway on a Raspberry Pi 3 B+, with the RHF0M301 gateway hat. Is that possible? I’m getting

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

My library.cfg is the following:

CFG_SPI= native
PLATFORM= imst_rpi 

Is there something I can do to make this work for my hardware? Thanks.

The code should work fine on your hardware. Can you try using the build-pi.sh script included with mp_pkt_fwd?

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