Problem with Ic880a-spi, pi and basicstation

Hey I am currently in the process of building my first gateway. As I use ic880a-spi, raspberry pi 4b and lora basics station, I use Building a gateway with Raspberry Pi and IC880A | The Things Stack for LoRaWAN as instructions for setting up the gateway. However I am facing some issues. Wiring, API Key, start.sh and station.conf files were created as described. When i start the gateway, i get the following error messages:

I ran two test tools to find the problem.
First the test_loragw_spi:

Second the test_loragw_reg:

For me it looks like both tests had no errors. But since I am relatively new to lorawan and raspberry pi, I would appreciate any help to solve the problem or debug it properly.

Wouldn’t you think text output is easier to read as (formatted) text on the forum in stead of screen shots? Makes it searchable as well so anyone else with the same issue might find the message at a future date…

That makes sense thanks for the comment:)

Gateway@raspberrypi:/opt/ttn-station/config $ sudo RADIODEV=/dev/spidev0.0 /opt/ttn-station/bin/start.sh
2023-12-06 14:07:31.537 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)
2023-12-06 14:07:31.537 [SYS:INFO] Station Ver : 2.0.6(rpi/debug) 2023-12-06 10:52:47
2023-12-06 14:07:31.537 [SYS:INFO] Package Ver : (null)
2023-12-06 14:07:31.537 [SYS:INFO] mbedTLS Ver : 2.28.0
2023-12-06 14:07:31.537 [SYS:INFO] proto EUI   : d83a:ddff:fe58:a7f7    (station.conf)
2023-12-06 14:07:31.537 [SYS:INFO] prefix EUI  : ::1    (builtin)
2023-12-06 14:07:31.537 [SYS:INFO] Station EUI : d83a:ddff:fe58:a7f7
2023-12-06 14:07:31.537 [SYS:INFO] Station home: ./     (builtin)
2023-12-06 14:07:31.537 [SYS:INFO] Station temp: /var/tmp/      (builtin)
2023-12-06 14:07:31.537 [SYS:WARN] Station in NO-CUPS mode
2023-12-06 14:07:31.739 [TCE:INFO] Starting TC engine
2023-12-06 14:07:31.842 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 5E:C3:B7:A6:43:7F:A4:E0
issuer name       : CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
subject name      : CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
issued  on        : 2011-05-05 09:37:37
expires on        : 2030-12-31 09:37:37
signed using      : RSA with SHA1
RSA key size      : 4096 bits
basic constraints : CA=true
subject alt name  :
    <unsupported>
key usage         : Key Cert Sign, CRL Sign
certificate policies : An2023-12-06 14:07:31.843 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2023-12-06 14:07:32.134 [TCE:INFO] Infos: d83a:ddff:fe58:a7f7 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-D83ADDFFFE58A7F7
2023-12-06 14:07:32.134 [AIO:DEBU] [3] ws_close reason=1000
2023-12-06 14:07:32.134 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2023-12-06 14:07:32.134 [AIO:DEBU] [3] WS connection shutdown...
2023-12-06 14:07:32.200 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 5E:C3:B7:A6:43:7F:A4:E0
issuer name       : CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
subject name      : CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES
issued  on        : 2011-05-05 09:37:37
expires on        : 2030-12-31 09:37:37
signed using      : RSA with SHA1
RSA key size      : 4096 bits
basic constraints : CA=true
subject alt name  :
    <unsupported>
key usage         : Key Cert Sign, CRL Sign
certificate policies : An2023-12-06 14:07:32.200 [TCE:VERB] Connecting to MUXS...
2023-12-06 14:07:32.453 [TCE:VERB] Connected to MUXS.
2023-12-06 14:07:32.469 [RAL:INFO] Lora gateway library version: Version: 5.0.1;
2023-12-06 14:07:32.486 [RAL:INFO] [LGW lgw1] clksrc=1 lorawan_public=1
2023-12-06 14:07:32.486 [RAL:INFO]  RX/TX RF0:    867.5MHz rssi_offset=-166.0 type=2 tx_notch_freq=0
2023-12-06 14:07:32.486 [RAL:INFO]  RX    RF1:    868.5MHz rssi_offset=-166.0 type=2 tx_notch_freq=0
2023-12-06 14:07:32.486 [RAL:INFO]  [mSF]   0:    868.1MHz rf=1 freq=-400.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   1:    868.3MHz rf=1 freq=-200.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   2:    868.5MHz rf=1 freq=  +0.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   3:    867.1MHz rf=0 freq=-400.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   4:    867.3MHz rf=0 freq=-200.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   5:    867.5MHz rf=0 freq=  +0.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   6:    867.7MHz rf=0 freq=+200.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [mSF]   7:    867.9MHz rf=0 freq=+400.0 datarate=0
2023-12-06 14:07:32.487 [RAL:INFO]  [STD]   8:    868.3MHz rf=1 freq=-200.0 datarate=2 bw=2
2023-12-06 14:07:32.487 [RAL:INFO]  [FSK]   9:    868.8MHz rf=1 freq=+300.0 datarate=50000 bw=0 sync_word=0/0
2023-12-06 14:07:32.487 [RAL:INFO] SX130x LBT not enabled
2023-12-06 14:07:32.487 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture disabled)
2023-12-06 14:07:32.487 [HAL:INFO] [lgw_spi_open:101] Setting SPI speed to 8000000
2023-12-06 14:07:32.487 [HAL:INFO] [lgw_spi_open:135] Note: SPI port opened and configured ok
**2023-12-06 14:07:33.004 [HAL:ERRO] [lgw_start:769] Failed to setup sx125x radio for RF chain 0**
**2023-12-06 14:07:33.004 [RAL:ERRO] Concentrator start failed: lgw_start**
**2023-12-06 14:07:33.004 [RAL:ERRO] ral_config failed with status 0x08**
**2023-12-06 14:07:33.004 [any:ERRO] Closing connection to muxs - error in s2e_onMsg**
2023-12-06 14:07:33.004 [AIO:DEBU] [3] ws_close reason=1000
2023-12-06 14:07:33.004 [AIO:DEBU] Echoing close - reason=1000
2023-12-06 14:07:33.035 [AIO:DEBU] [3|WS] Server sent close: reason=1000
2023-12-06 14:07:33.035 [AIO:DEBU] [3] WS connection shutdown...
2023-12-06 14:07:33.035 [TCE:VERB] Connection to MUXS closed in state -1
2023-12-06 14:07:33.035 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

Next time please use the formatting tools </> to format your log.

The error is usually caused by the software not being able to reset the concentrator board. Did you set the correct reset pin in the start.sh script?

Sorry did not know about those tools. I will remember the next time thanks.

I think I have. The reset pin is set to BCM pin 25 in the start.sh file. As far as I know this is pin 22 of the Raspberry Pi. On the IC880a-spi concentrator side I have pin 13 connected to pin 22 of the Pi. I can reset the concentrator outside the start.sh script tomorrow and see if that would help.

If you are using wires like in the guide you refer to you should check the reset wire isn’t defective as well. You wouldn’t be the first to get burned by a faulty wire.

I have now replaced the wires, tried a reset before start.sh is executed and set a different GPIO pin from the Raspberry Pi as the reset pin but nothing has made a difference. Now I’m trying to reduce the spi speed to 2000000. But i only get an error. i’ll try again later and see where the error is.

Short update for others with the same error. The ic880a-spi concentrator does not work with a spi speed of 8 MHz. I had to reduce the speed to 2 MHz. Thank you @kersing for your help. :slight_smile:

The need to lower the SPI speed might be caused by using wires in stead of a connecting PCB. I can’t recall having to reduce SPI speed for my ic880 based gateways.
However, if this works :grin:

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