xoseperez / basicstation-docker

Basics™ Station Packet Forward protocol using Docker
41 stars 8 forks source link

How to setup for RAK5146? #9

Closed Nileshbhavsar closed 7 months ago

Nileshbhavsar commented 1 year ago

Hello sir,

I am using RAK 5146 with our custom linux board. We are trying to do inbuilt LNS using this module in our board but unfortunately it is not working.

I go through forum and currently used this repository: https://github.com/lorabasics/basicstation

Currently, I am building corecell example but getting error in that. so, can you suggest me what changes required for RAK 5146?

Nileshbhavsar commented 1 year ago

HI,

I am getting output like this.

root@rak-gateway:/opt/ttn-station# /opt/ttn-station/basicstation/build-corecell-std/bin/station --radio-init=/opt/ttn-station/reset_gw.sh
2022-10-29 09:14:12.647 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)
2022-10-29 09:14:12.647 [SYS:INFO] Station Ver : 2.0.6(corecell/std) 2022-10-29 09:09:07
2022-10-29 09:14:12.647 [SYS:INFO] Package Ver : (null)
2022-10-29 09:14:12.647 [SYS:INFO] mbedTLS Ver : 2.28.0
2022-10-29 09:14:12.647 [SYS:INFO] proto EUI   : 0:fc4b:bcbc:4b90       (/sys/class/net/eth0/address)
2022-10-29 09:14:12.647 [SYS:INFO] prefix EUI  : ::1    (builtin)
2022-10-29 09:14:12.647 [SYS:INFO] Station EUI : fc4b:bcff:febc:4b90
2022-10-29 09:14:12.648 [SYS:INFO] Station home: ./     (builtin)
2022-10-29 09:14:12.648 [SYS:INFO] Station temp: /var/tmp/      (builtin)
2022-10-29 09:14:12.648 [SYS:WARN] Station in NO-CUPS mode
2022-10-29 09:14:12.853 [TCE:INFO] Starting TC engine
2022-10-29 09:14:12.892 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-10-29 09:14:12.893 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2022-10-29 09:14:14.590 [TCE:INFO] Infos: fc4b:bcff:febc:4b90 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-FC4BBCFFFEBC4B90
2022-10-29 09:14:14.590 [AIO:DEBU] [3] ws_close reason=1000
2022-10-29 09:14:14.590 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2022-10-29 09:14:14.590 [AIO:DEBU] [3] WS connection shutdown...
2022-10-29 09:14:14.594 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-10-29 09:14:14.594 [TCE:VERB] Connecting to MUXS...
2022-10-29 09:14:15.808 [TCE:VERB] Connected to MUXS.
2022-10-29 09:14:16.004 [S2E:WARN] Unrecognized region: IN865 - ignored
2022-10-29 09:14:15.886 [SYS:VERB] /opt/ttn-station/reset_gw.sh: Forked, waiting...
2022-10-29 09:14:15.887 [SYS:DEBU] execvp argv[0]: </opt/ttn-station/reset_gw.sh>
2022-10-29 09:14:15.887 [SYS:DEBU]        argv[1]: </dev/spidev0.0>
2022-10-29 09:14:16.253 [SYS:INFO] Process /opt/ttn-station/reset_gw.sh (pid=2123) completed
2022-10-29 09:14:16.254 [RAL:INFO] Lora gateway library version: Version: 2.1.0;
2022-10-29 09:14:16.322 [RAL:INFO] [LGW sx1302] full_duplex=0 clksrc=0 lorawan_public=1
2022-10-29 09:14:16.323 [RAL:DEBU] SX130x txlut table (16 entries)
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  0:  rf_power=12 pa_gain=0 pwr_idx=15
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  1:  rf_power=13 pa_gain=0 pwr_idx=16
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  2:  rf_power=14 pa_gain=0 pwr_idx=17
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  3:  rf_power=15 pa_gain=0 pwr_idx=19
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  4:  rf_power=16 pa_gain=0 pwr_idx=20
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  5:  rf_power=17 pa_gain=0 pwr_idx=22
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  6:  rf_power=18 pa_gain=1 pwr_idx=1
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  7:  rf_power=19 pa_gain=1 pwr_idx=2
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  8:  rf_power=20 pa_gain=1 pwr_idx=3
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut  9:  rf_power=21 pa_gain=1 pwr_idx=4
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut 10:  rf_power=22 pa_gain=1 pwr_idx=5
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut 11:  rf_power=23 pa_gain=1 pwr_idx=6
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut 12:  rf_power=24 pa_gain=1 pwr_idx=7
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut 13:  rf_power=25 pa_gain=1 pwr_idx=9
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut 14:  rf_power=26 pa_gain=1 pwr_idx=11
2022-10-29 09:14:16.323 [RAL:INFO] SX1302 txlut 15:  rf_power=27 pa_gain=1 pwr_idx=14
2022-10-29 09:14:16.323 [RAL:INFO]  RX/TX RF0:    865.2MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
2022-10-29 09:14:16.324 [RAL:INFO]  RX    RF1:  866.385MHz rssi_offset=-215.4 type=5 rssi_tcomp=0.000 0.000 20.410 2162.560 0.000
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   0: 865.0625MHz rf=0 freq=-137.5 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   1: 865.4025MHz rf=0 freq=+202.5 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   2:  865.985MHz rf=1 freq=-400.0 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   3: 865.2325MHz rf=0 freq= +32.5 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   4:  866.185MHz rf=1 freq=-200.0 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   5:  866.385MHz rf=1 freq=  +0.0 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   6:  866.585MHz rf=1 freq=+200.0 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  [mSF]   7:  866.785MHz rf=1 freq=+400.0 datarate=0
2022-10-29 09:14:16.324 [RAL:INFO]  channel 8 disabled
2022-10-29 09:14:16.324 [RAL:INFO]  channel 9 disabled
2022-10-29 09:14:16.324 [RAL:INFO] Station device: spi:/dev/spidev0.0 (PPS capture disabled)
2022-10-29 09:14:16.324 [HAL:INFO] [lgw_com_open:84] Opening SPI communication interface
2022-10-29 09:14:16.325 [HAL:INFO] [lgw_spi_open:88] Setting SPI speed to 2000000
2022-10-29 09:14:16.325 [HAL:INFO] [lgw_connect:1192] chip version is 0x12 (v1.2)
2022-10-29 09:14:18.543 [HAL:INFO] [timestamp_counter_mode:431] using legacy timestamp
2022-10-29 09:14:18.723 [HAL:ERRO] [lgw_start:1105] failed to open I2C for temperature sensor on port 0x39
2022-10-29 09:14:18.723 [RAL:ERRO] Concentrator start failed: lgw_start
2022-10-29 09:14:18.723 [RAL:ERRO] ral_config failed with status 0x08
2022-10-29 09:14:18.723 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
2022-10-29 09:14:18.723 [AIO:DEBU] [3] ws_close reason=1000
2022-10-29 09:14:18.724 [AIO:DEBU] Echoing close - reason=1000
2022-10-29 09:14:18.919 [AIO:DEBU] [3|WS] Server sent close: reason=1000
2022-10-29 09:14:18.919 [AIO:DEBU] [3] WS connection shutdown...
2022-10-29 09:14:18.919 [TCE:VERB] Connection to MUXS closed in state -1
2022-10-29 09:14:18.920 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
2022-10-29 09:14:28.924 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-10-29 09:14:28.924 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2022-10-29 09:14:30.667 [TCE:INFO] Infos: fc4b:bcff:febc:4b90 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-FC4BBCFFFEBC4B90
2022-10-29 09:14:30.667 [AIO:DEBU] [3] ws_close reason=1000
2022-10-29 09:14:30.668 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2022-10-29 09:14:30.668 [AIO:DEBU] [3] WS connection shutdown...
2022-10-29 09:14:30.672 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-10-29 09:14:30.672 [TCE:VERB] Connecting to MUXS...
2022-10-29 09:14:31.905 [TCE:VERB] Connected to MUXS.
2022-10-29 09:14:32.101 [S2E:WARN] Unrecognized region: IN865 - ignored
2022-10-29 09:14:32.104 [SYS:VERB] /opt/ttn-station/reset_gw.sh: Forked, waiting...
2022-10-29 09:14:32.104 [SYS:DEBU] execvp argv[0]: </opt/ttn-station/reset_gw.sh>
2022-10-29 09:14:32.105 [SYS:DEBU]        argv[1]: </dev/spidev0.0>
2022-10-29 09:14:32.450 [SYS:INFO] Process /opt/ttn-station/reset_gw.sh (pid=2141) completed
2022-10-29 09:14:32.451 [RAL:INFO] Lora gateway library version: Version: 2.1.0;
2022-10-29 09:14:32.509 [any:CRIT] Radio device '/dev/spidev0.0' in use by process: 2121

Please suggest me.

xoseperez commented 1 year ago

Hi @Nileshbhavsar

This repository is actually a wrapper around the https://github.com/lorabasics/basicstation repository you are using. It takes care of patching the original code, adding a thin layer of start up configuration and dockerizing it. The problem you are facing is due to the fact that the original code relies on an on-board temperature sensor to compensate RSSI readings. This sensor is present in Semtech evaluation kits but it's usually not present on comercial concentrators like the RAK5146. So one of the things this repo does is patching the code to remove this feature and avoid this error at build time.

If you are still interested in using the original code you can maybe check the patch I'm applying here: https://github.com/xoseperez/basicstation/blob/master/builder/v2.0.6.patch, it will provide you some hints on what to modify in the original code to build it. Once you patch it, building it is pretty straight forward (https://github.com/xoseperez/basicstation/blob/master/builder/build.sh).

Hope this helps!

Nileshbhavsar commented 1 year ago

Hello Sir,

Thank you for your response.

Actually, I already downloaded https://github.com/lorabasics/basicstation and make a project for corecell. After referring your github repository, I created same path file in my setup and run using below command.

1). Created patch file in as similar to v2.0.6.patch available in https://github.com/xoseperez/basicstation/blob/master/builder/v2.0.6.patch link. 2). Go into basicsation folder 3). run the command: git checkout v2.0.6 && git apply ../v2.0.6.path 4). Run command: make clean && make platform=corecell variant=std

Still I am getting similar error.

I also run docker setup as per your suggestion in README.md but after this, I am little bit confused about which steps need to follow for cloning your repository and run example for RAK 5146.

xoseperez commented 1 year ago

The patch effectively removes the temperature sensor code so it should not fail there... can you double check if the patch is correctly applied?

You only need to install docker if you are actually going to run the service as a docker container. You don't need to clone the repository to do it as you can fetch the pre-built image from docker hub. In this case, after installing docker (mind that docker compose is now a plugin for docker), just create a file called 'docker-compose.yml` with this contents:

version: '2.0'

services:

  basicstation:
    image: xoseperez/basicstation:latest
    container_name: basicstation
    network_mode: host
    privileged: true
    restart: unless-stopped
    environment:
      MODEL: "RAK5146"
      TC_KEY: "..."

And then run docker compose up to download and run the container. You will have to add the TC_KEY you get from TTN when registering the gateway or the TC_KEY and TC_TRUST if you are using a different LNS.

Nileshbhavsar commented 1 year ago

Hi,

I tried corecell with RAK 5146 but unfortunately failed with AGC fw read/write check failed error. Please check below log.

root@rak-gateway:/opt/ttn-station# /opt/ttn-station/basicstation/build-corecell-std/bin/station --radio-init=/opt/ttn-station/reset_gw.sh
2022-12-08 08:59:02.895 [SYS:INFO] Logging     : stderr (maxsize=10000000, rotate=3)
2022-12-08 08:59:02.895 [SYS:INFO] Station Ver : 2.0.6(corecell/std) 2022-12-08 08:58:33
2022-12-08 08:59:02.895 [SYS:INFO] Package Ver : (null)
2022-12-08 08:59:02.895 [SYS:INFO] mbedTLS Ver : 2.28.0
2022-12-08 08:59:02.895 [SYS:INFO] proto EUI   : 0:fc4b:bcbc:4b90       (/sys/class/net/eth0/address)
2022-12-08 08:59:02.895 [SYS:INFO] prefix EUI  : ::1    (builtin)
2022-12-08 08:59:02.895 [SYS:INFO] Station EUI : fc4b:bcff:febc:4b90
2022-12-08 08:59:02.895 [SYS:INFO] Station home: ./     (builtin)
2022-12-08 08:59:02.895 [SYS:INFO] Station temp: /var/tmp/      (builtin)
2022-12-08 08:59:02.896 [SYS:WARN] Station in NO-CUPS mode
2022-12-08 08:59:03.099 [TCE:INFO] Starting TC engine
2022-12-08 08:59:03.110 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-12-08 08:59:03.111 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2022-12-08 08:59:04.287 [TCE:INFO] Infos: fc4b:bcff:febc:4b90 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-FC4BBCFFFEBC4B90
2022-12-08 08:59:04.287 [AIO:DEBU] [3] ws_close reason=1000
2022-12-08 08:59:04.287 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2022-12-08 08:59:04.287 [AIO:DEBU] [3] WS connection shutdown...
2022-12-08 08:59:04.291 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-12-08 08:59:04.291 [TCE:VERB] Connecting to MUXS...
2022-12-08 08:59:05.256 [TCE:VERB] Connected to MUXS.
2022-12-08 08:59:05.445 [S2E:WARN] Unrecognized region: IN865 - ignored
2022-12-08 08:59:05.390 [SYS:VERB] /opt/ttn-station/reset_gw.sh: Forked, waiting...
2022-12-08 08:59:05.391 [SYS:DEBU] execvp argv[0]: </opt/ttn-station/reset_gw.sh>
2022-12-08 08:59:05.392 [SYS:DEBU]        argv[1]: </dev/spidev0.0>
2022-12-08 08:59:05.746 [SYS:INFO] Process /opt/ttn-station/reset_gw.sh (pid=2674) completed
2022-12-08 08:59:05.748 [RAL:INFO] Lora gateway library version: Version: 2.1.0;
2022-12-08 08:59:05.807 [RAL:INFO] [LGW sx1302] full_duplex=0 clksrc=1 lorawan_public=1
2022-12-08 08:59:05.808 [RAL:INFO]  RX/TX RF0:    865.2MHz rssi_offset=-166.0 type=2 rssi_tcomp=0.000 0.000 0.000 0.000 0.000
2022-12-08 08:59:05.809 [RAL:INFO]  RX    RF1:  866.385MHz rssi_offset=-166.0 type=2 rssi_tcomp=0.000 0.000 0.000 0.000 0.000
2022-12-08 08:59:05.810 [RAL:INFO]  [mSF]   0: 865.0625MHz rf=0 freq=-137.5 datarate=0
2022-12-08 08:59:05.810 [RAL:INFO]  [mSF]   1: 865.4025MHz rf=0 freq=+202.5 datarate=0
2022-12-08 08:59:05.810 [RAL:INFO]  [mSF]   2:  865.985MHz rf=1 freq=-400.0 datarate=0
2022-12-08 08:59:05.810 [RAL:INFO]  [mSF]   3: 865.2325MHz rf=0 freq= +32.5 datarate=0
2022-12-08 08:59:05.811 [RAL:INFO]  [mSF]   4:  866.185MHz rf=1 freq=-200.0 datarate=0
2022-12-08 08:59:05.811 [RAL:INFO]  [mSF]   5:  866.385MHz rf=1 freq=  +0.0 datarate=0
2022-12-08 08:59:05.811 [RAL:INFO]  [mSF]   6:  866.585MHz rf=1 freq=+200.0 datarate=0
2022-12-08 08:59:05.811 [RAL:INFO]  [mSF]   7:  866.785MHz rf=1 freq=+400.0 datarate=0
2022-12-08 08:59:05.811 [RAL:INFO]  channel 8 disabled
2022-12-08 08:59:05.811 [RAL:INFO]  channel 9 disabled
2022-12-08 08:59:05.811 [RAL:INFO] Station device: spi:/dev/spidev0.0 (PPS capture enabled)
2022-12-08 08:59:05.811 [HAL:INFO] [lgw_com_open:84] Opening SPI communication interface
2022-12-08 08:59:05.812 [HAL:INFO] [lgw_spi_open:88] Setting SPI speed to 2000000
2022-12-08 08:59:05.813 [HAL:INFO] [lgw_connect:1192] chip version is 0x12 (v1.2)
2022-12-08 08:59:06.909 [HAL:ERRO] [sx1302_agc_load_firmware:1187] AGC fw read/write check failed
2022-12-08 08:59:06.910 [HAL:ERRO] [sx1302_radio_calibrate:545] Failed to load calibration fw
2022-12-08 08:59:06.910 [HAL:ERRO] [lgw_start:878] radio calibration failed
2022-12-08 08:59:06.910 [RAL:ERRO] Concentrator start failed: lgw_start
2022-12-08 08:59:06.910 [RAL:ERRO] ral_config failed with status 0x08
2022-12-08 08:59:06.910 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
2022-12-08 08:59:06.910 [AIO:DEBU] [3] ws_close reason=1000
2022-12-08 08:59:06.910 [AIO:DEBU] Echoing close - reason=1000
2022-12-08 08:59:07.052 [AIO:DEBU] [3|WS] Server sent close: reason=1000
2022-12-08 08:59:07.052 [AIO:DEBU] [3] WS connection shutdown...
2022-12-08 08:59:07.053 [TCE:VERB] Connection to MUXS closed in state -1
2022-12-08 08:59:07.053 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)
2022-12-08 08:59:17.057 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-12-08 08:59:17.057 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
2022-12-08 08:59:18.226 [TCE:INFO] Infos: fc4b:bcff:febc:4b90 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-FC4BBCFFFEBC4B90
2022-12-08 08:59:18.226 [AIO:DEBU] [3] ws_close reason=1000
2022-12-08 08:59:18.226 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
2022-12-08 08:59:18.226 [AIO:DEBU] [3] WS connection shutdown...
2022-12-08 08:59:18.230 [AIO:INFO] ./tc.trust:
cert. version     : 3
serial number     : 82:10:CF:B0:D2:40:E3:59:44:63:E0:BB:63:82:8B:00
issuer name       : C=US, O=Internet Security Research Group, CN=ISRG Root X1
subject name      : C=US, O=Internet Security Research Group, CN=ISRG Root X1
issued  on        : 2015-06-04 11:04:38
expires on        : 2035-06-04 11:04:38
signed using      : RSA with SHA-256
RSA key size      : 4096 bits
basic constraints : CA=true
key usage         : Key Cert Sign, CRL Sig2022-12-08 08:59:18.230 [TCE:VERB] Connecting to MUXS...
2022-12-08 08:59:19.219 [TCE:VERB] Connected to MUXS.
2022-12-08 08:59:19.366 [S2E:WARN] Unrecognized region: IN865 - ignored
2022-12-08 08:59:19.369 [SYS:VERB] /opt/ttn-station/reset_gw.sh: Forked, waiting...
2022-12-08 08:59:19.370 [SYS:DEBU] execvp argv[0]: </opt/ttn-station/reset_gw.sh>
2022-12-08 08:59:19.370 [SYS:DEBU]        argv[1]: </dev/spidev0.0>
2022-12-08 08:59:19.713 [SYS:INFO] Process /opt/ttn-station/reset_gw.sh (pid=2691) completed
2022-12-08 08:59:19.713 [RAL:INFO] Lora gateway library version: Version: 2.1.0;
2022-12-08 08:59:19.762 [any:CRIT] Radio device '/dev/spidev0.0' in use by process: 2672

Please suggest me for this.

xoseperez commented 1 year ago

Hi Sorry for the late reply. It looks like it's failing to load the calibration firmware to the module. That's something in the HAL, so out of the scope of this project. I'm contacting the manufacturer to see if there is any reason for this, otherwise I'm not sure how can I help.

Maybe one thing you can test is the SPI bus speed. For SX1302/3 I use 8MHz instead of 2MHz. Try starting the service with:

LORAGW_SPI_SPEED=8000000 /opt/ttn-station/basicstation/build-corecell-std/bin/station --radio-init=/opt/ttn-station/reset_gw.sh
xoseperez commented 7 months ago

Closing as there is no more feedback