Failed to setup sx125x radio for RF chain 0 in IMST LoRa Lite Gateway

Dear brocaar,

hallo, i’m a student writing my thesis about “LoRaWAN research network”, I installed the LoRa-Gateway-OS-full on my IMST LoRa Lite Gateway [https://wireless-solutions.de/products/long-range-radio/lora-lite-gateway.html]

But the concentrator is failed to start
(I config the gateway reset pin as GPIO27)
ERROR: Failed to setup sx125x radio for RF chain 0
ERROR: [main] failed to start the concentrator

Do you or some others have any ideas? Thank you very much!
I put the complete log on Appendix:

*** Beacon Packet Forwarder for Lora Gateway ***
Version: 4.0.1
*** Lora concentrator HAL library version info ***
Version: 5.0.1;


INFO: Little endian host
INFO: found global configuration file global_conf.json, parsing it
INFO: global_conf.json does contain a JSON object named SX1301_conf, parsing SX1301 parameters
INFO: lorawan_public 1, clksrc 1
lgw_board_setconf:427: Note: board configuration; lorawan_public:1, clksrc:1
INFO: no configuration for LBT
INFO: antenna_gain 0 dBi
INFO: no configuration for tx gain lut 12
INFO: no configuration for tx gain lut 13
INFO: no configuration for tx gain lut 14
INFO: no configuration for tx gain lut 15
INFO: Configuring TX LUT with 12 indexes
INFO: radio 0 enabled (type SX1257), center frequency 867500000, RSSI offset -166.000000, tx enabled 1, tx_notch_freq 0
lgw_rxrf_setconf:476: WARNING: NOT A VALID TX NOTCH FILTER FREQUENCY [126000…250000]Hz
lgw_rxrf_setconf:488: Note: rf_chain 0 configuration; en:1 freq:867500000 rssi_offset:-166.000000 radio_type:2 tx_enable:1 tx_notch_freq:0
INFO: radio 1 enabled (type SX1257), center frequency 868500000, RSSI offset -166.000000, tx enabled 0, tx_notch_freq 0
lgw_rxrf_setconf:488: Note: rf_chain 1 configuration; en:1 freq:868500000 rssi_offset:-166.000000 radio_type:2 tx_enable:0 tx_notch_freq:0
INFO: Lora multi-SF channel 0> radio 1, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 0 configuration; en:1 freq:-400000 SF_mask:0x7e
INFO: Lora multi-SF channel 1> radio 1, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 1 configuration; en:1 freq:-200000 SF_mask:0x7e
INFO: Lora multi-SF channel 2> radio 1, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 2 configuration; en:1 freq:0 SF_mask:0x7e
INFO: Lora multi-SF channel 3> radio 0, IF -400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 3 configuration; en:1 freq:-400000 SF_mask:0x7e
INFO: Lora multi-SF channel 4> radio 0, IF -200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 4 configuration; en:1 freq:-200000 SF_mask:0x7e
INFO: Lora multi-SF channel 5> radio 0, IF 0 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 5 configuration; en:1 freq:0 SF_mask:0x7e
INFO: Lora multi-SF channel 6> radio 0, IF 200000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 6 configuration; en:1 freq:200000 SF_mask:0x7e
INFO: Lora multi-SF channel 7> radio 0, IF 400000 Hz, 125 kHz bw, SF 7 to 12
lgw_rxif_setconf:607: Note: LoRa ‘multi’ if_chain 7 configuration; en:1 freq:400000 SF_mask:0x7e
INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7
lgw_rxif_setconf:581: Note: LoRa ‘std’ if_chain 8 configuration; en:1 freq:-200000 bw:2 dr:2
INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
lgw_rxif_setconf:637: Note: FSK if_chain 9 configuration; en:1 freq:300000 bw:3 dr:50000 (50000 real dr) sync:0xC194C1
INFO: global_conf.json does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to B827EBFFFE595D59
INFO: server hostname or IP address is configured to “localhost”
INFO: upstream port is configured to “1700”
INFO: downstream port is configured to “1700”
INFO: downstream keep-alive interval is configured to 10 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
ERROR: Failed to setup sx125x radio for RF chain 0
ERROR: [main] failed to start the concentrator

                                                                                                                             Fangbo

You may want to have a look at some of the tutorials by “MobileFish” and in particular tutorial 32 where the gateway configuration files are analysed. Tutorial 29 covers the installation of gateway software. https://www.youtube.com/playlist?list=PLmL13yqb6OxdeOi97EvI8QeO8o-PqeQ0g

A full installation from source of the lora_gateway/ library would include some test utilities for the SPI communication, etc. A few potential issues which failure of the SPI tests might point to:

  • Misconnected SPI signal
  • Wrong SPI chip select
  • Overly long SPI wiring, or a bus that for some other reason only works at a slow clock
  • wrong reset GPIO

There’s also a quirk in some Linux systems relative to the reset signal that can show up as an “only works once” error where if you try to export an already exported GPIO, it gets un-exported instead. On my setups I modify the gateway reset script to only export the GPIO if it is not already exported.

When there is a Reset pin problem you normally only get the “failed to start concentrator” error message. In this case there is another error message about one of the two Sx125x radio chips. Have a closer look at the global_conf.json file

Have a look at this error message. The global_conf.json file should look like this

“radio_0”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 867500000,
“rssi_offset”: -166.0,
“tx_enable”: true,
“tx_freq_min”: 863000000,
“tx_freq_max”: 870000000
},
“radio_1”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 868500000,
“rssi_offset”: -166.0,
“tx_enable”: false
},

Compare this to yours, I think you have an extra line something like Tx Notch Filter = 0. its only causing an error in Radio 0 as only one of the two SX127x radio chips are enable for Transmitting.

thank you for your answer!
I have checked my global_conf.json, but I didn’t find an “extra line” like Tx Notch Filter = 0.

And I tried to add an line like " “tx_notch_freq”: 129000," into
“radio_0”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 867500000,
“rssi_offset”: -166.0,
“tx_enable”: true,
tx_notch_freq": 129000,
“tx_freq_min”: 863000000,
“tx_freq_max”: 870000000
},
It gives me the same error, I am still confused, could you please help me to check my global_conf.json?
Thank you very much!

{
“SX1301_conf”: {
“lorawan_public”: true,
“clksrc”: 1,
“antenna_gain”: 0,
“radio_0”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 867500000,
“rssi_offset”: -166.0,
“tx_enable”: true,
“tx_freq_min”: 863000000,
“tx_freq_max”: 870000000
},
“radio_1”: {
“enable”: true,
“type”: “SX1257”,
“freq”: 868500000,
“rssi_offset”: -166.0,
“tx_enable”: false
},
“chan_multiSF_0”: {
“enable”: true,
“radio”: 1,
“if”: -400000
},
“chan_multiSF_1”: {
“enable”: true,
“radio”: 1,
“if”: -200000
},
“chan_multiSF_2”: {
“enable”: true,
“radio”: 1,
“if”: 0
},
“chan_multiSF_3”: {
“enable”: true,
“radio”: 0,
“if”: -400000
},
“chan_multiSF_4”: {
“enable”: true,
“radio”: 0,
“if”: -200000
},
“chan_multiSF_5”: {
“enable”: true,
“radio”: 0,
“if”: 0
},
“chan_multiSF_6”: {
“enable”: true,
“radio”: 0,
“if”: 200000
},
“chan_multiSF_7”: {
“enable”: true,
“radio”: 0,
“if”: 400000
},
“chan_Lora_std”: {
“enable”: true,
“radio”: 1,
“if”: -200000,
“bandwidth”: 250000,
“spread_factor”: 7
},
“chan_FSK”: {
“enable”: true,
“radio”: 1,
“if”: 300000,
“bandwidth”: 125000,
“datarate”: 50000
},
“tx_lut_0”: {
“pa_gain”: 0,
“mix_gain”: 8,
“rf_power”: -6,
“dig_gain”: 0
},
“tx_lut_1”: {
“pa_gain”: 0,
“mix_gain”: 10,
“rf_power”: -3,
“dig_gain”: 0
},
“tx_lut_2”: {
“pa_gain”: 0,
“mix_gain”: 12,
“rf_power”: 0,
“dig_gain”: 0
},
“tx_lut_3”: {
“pa_gain”: 1,
“mix_gain”: 8,
“rf_power”: 3,
“dig_gain”: 0
},
“tx_lut_4”: {
“pa_gain”: 1,
“mix_gain”: 10,
“rf_power”: 6,
“dig_gain”: 0
},
“tx_lut_5”: {
“pa_gain”: 1,
“mix_gain”: 12,
“rf_power”: 10,
“dig_gain”: 0
},
“tx_lut_6”: {
“pa_gain”: 1,
“mix_gain”: 13,
“rf_power”: 11,
“dig_gain”: 0
},
“tx_lut_7”: {
“pa_gain”: 2,
“mix_gain”: 9,
“rf_power”: 12,
“dig_gain”: 0
},
“tx_lut_8”: {
“pa_gain”: 1,
“mix_gain”: 15,
“rf_power”: 13,
“dig_gain”: 0
},
“tx_lut_9”: {
“pa_gain”: 2,
“mix_gain”: 10,
“rf_power”: 14,
“dig_gain”: 0
},
“tx_lut_10”: {
“pa_gain”: 2,
“mix_gain”: 11,
“rf_power”: 16,
“dig_gain”: 0
},
“tx_lut_11”: {
“pa_gain”: 3,
“mix_gain”: 9,
“rf_power”: 20,
“dig_gain”: 0
}
},

    "gateway_ID": "b827ebFFFE595d59",
    "server_address": "localhost",
    "serv_port_up": 1700,
    "serv_port_down": 1700,
    "keepalive_interval": 10,
    "stat_interval": 30,
    "push_timeout_ms": 100,
    "forward_crc_valid": true,
    "forward_crc_error": false,
    "forward_crc_disabled": false
}

}

thank you for your answer!
I used the original IMST Lite Gateway, so maybe the first 3 points could be remove.
I’m not very sure what means “only work once”, does it means if I reset up using a wrong GPIO pin, it will not work even if I change to use the right pin?

you seem to be missing a " mark at the start of the line
“tx_notch_freq”: 129000,

Sorry. I think it’s a copy mistake. In my global_conf.json it has the mark :slight_smile:

Does anyone know if there’s a test function in LoRa-Gateway-OS by which I can use to test the connection, but not just start the packet-forwarder and check the log?