Closed jawadiot closed 2 years ago
This is related to #53. A fix will be available in the next release.
Until then, as a work around you could start station in daemon mode using flag -d
(see station --help
for more details). This will cause station to start in the background, and additionally it will fork into a child-process such that the parent remains the daemon control process which restarts the the child when it exits for some reason. In the log you will see something like:
2020-05-14 10:55:23.175 [any:CRIT] Radio device '/dev/spidev32766.0' in use by process: 17882
2020-05-14 10:55:23.596 [SYS:ERRO] DAEMON: Station process 17882 died (exit code 0x1E00)
2020-05-14 10:55:23.606 [SYS:INFO] DAEMON: Station process 17943 started...
In order to be able to inspect the log in daemon mode you should specify a log file inside station.conf
, like this:
...
"station_conf": {
"log_file": "/var/log/station.log",
"log_level": "DEBUG", /* XDEBUG,DEBUG,VERBOSE,INFO,NOTICE,WARNING,ERROR,CRITICAL */
"log_size": 10000000,
"log_rotate": 3,
...
}
...
Your solution works well !!! Despite the fact that the service connects disconnects I still managed to make a communication between a sensor and the Gateway bridge I do not know if it is really bad that it starts and restarts but in any case it works,thank you for your help.
I have the same issue here in 2024. Is there a fix for this?
I have the same issue here in 2024. Is there a fix for this?
Can you please provide logs?
Hi Beitler, Here's the output.
$ docker compose up
WARN[0000] /home/gerry/docker-compose.yml: version
is obsolete
[+] Running 20/20
✔ basicstation Pulled 38.7s
✔ 59f5764b1f6d Pull complete 18.6s
✔ d25f96231021 Pull complete 18.9s
✔ bb18e33e1caf Pull complete 20.8s
✔ 0d20bfb20cea Pull complete 20.9s
✔ e19e63a02380 Pull complete 21.0s
✔ 86ebbdeb7b51 Pull complete 21.1s
✔ 4f4fb700ef54 Pull complete 21.1s
✔ 479634a35477 Pull complete 21.2s
✔ bcab80059af9 Pull complete 21.2s
✔ 5442132ede36 Pull complete 21.3s
✔ c3ce9eb5ac75 Pull complete 21.4s
✔ 9b5701f42b0b Pull complete 24.2s
✔ 91b4b4d6dc2f Pull complete 24.3s
✔ 9ccdbfcb8f3f Pull complete 24.3s
✔ fd2bc0fab3b3 Pull complete 30.8s
✔ 0b1c45d39382 Pull complete 31.0s
✔ e7fc4261f017 Pull complete 31.1s
✔ e925e200ba5a Pull complete 36.9s
✔ 7cc391a815a2 Pull complete 37.0s
[+] Running 1/1
✔ Container basicstation Created 8.6s
Attaching to basicstation
basicstation | ERROR: DEVICE set to auto discover but no concentrator found! (INTERFACE set to SPI)
basicstation | ------------------------------------------------------------------
basicstation | BasicStation (TM) Packet Forwarder Container v2.8.3
basicstation | (c) Xose Pérez 2022-2024
basicstation |
basicstation | Based on:
basicstation | basicstation v2.0.6
basicstation | sx1302_hal v2.1.0
basicstation | * picoGW_hal v0.2.3
basicstation | ------------------------------------------------------------------
basicstation |
basicstation | Protocol
basicstation | ------------------------------------------------------------------
basicstation | Mode: DYNAMIC
basicstation | Protocol: LNS
basicstation | LNS Server: wss://eu1.cloud.thethings.network:8887
basicstation | Gateway EUI: D83ADDFFFE78ADB2
basicstation | EUI Source: eth0
basicstation |
basicstation | Radio
basicstation | ------------------------------------------------------------------
basicstation | Model: SX1303
basicstation | Concentrator: SX1303
basicstation | Design: CORECELL
basicstation | Interface: SPI
basicstation | Radio Device: /dev/spidev0.1
basicstation | SPI Speed: 8000000
basicstation | Reset GPIO: 17
basicstation | Enable GPIO: 0
basicstation |
basicstation | 2024-04-30 21:42:28.580 [SYS:INFO] Logging : stderr (maxsize=10000000, rotate=3)
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] Station Ver : 2.0.6(corecell/stdn) 2024-04-16 20:15:36
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] Package Ver : (null)
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] mbedTLS Ver : 2.28.0
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] proto EUI : d83a:ddff:fe78:adb2 (station.conf)
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] prefix EUI : ::1 (builtin)
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] Station EUI : d83a:ddff:fe78:adb2
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] Station home: ./ (builtin)
basicstation | 2024-04-30 21:42:28.581 [SYS:INFO] Station temp: /var/tmp/ (builtin)
basicstation | 2024-04-30 21:42:28.581 [SYS:WARN] Station in NO-CUPS mode
basicstation | 2024-04-30 21:42:28.582 [RAL:DEBU] execvp argv[0]: </proc/self/exe>
basicstation | 2024-04-30 21:42:28.582 [RAL:DEBU] argv[1]: <-S>
basicstation | 2024-04-30 21:42:28.582 [RAL:DEBU] argv[2]: <(null)>
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Logging : stderr (maxsize=10000000, rotate=3)
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Station Ver : 2.0.6(corecell/stdn) 2024-04-16 20:15:36
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Package Ver : (null)
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] mbedTLS Ver : 2.28.0
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] proto EUI : d83a:ddff:fe78:adb2 (station.conf)
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] prefix EUI : ::1 (builtin)
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Station EUI : d83a:ddff:fe78:adb2
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Station home: ./ (builtin)
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Station temp: /var/tmp/ (builtin)
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Station slave: 0
basicstation | 2024-04-30 21:42:28.585 [S00:WARN] Station in NO-CUPS mode
basicstation | 2024-04-30 21:42:28.585 [S00:INFO] Slave LGW (0) - started.
basicstation | 2024-04-30 21:42:28.582 [RAL:INFO] Master has started slave: pid=66 idx=0 (attempt 1)
basicstation | 2024-04-30 21:42:28.782 [TCE:INFO] Starting TC engine
basicstation | 2024-04-30 21:42:28.830 [AIO:INFO] ./tc.trust:
basicstation | cert. version : 3
basicstation | serial number : 04:00:00:00:00:01:15:4B:5A:C3:94
basicstation | issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
basicstation | subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
basicstation | issued on : 1998-09-01 12:00:00
basicstation | expires on : 2028-01-28 12:00:00
basicstation | signed using : RSA with SHA1
basicstation | RSA key size : 2048 bits
basicstation | basic constraints : CA=true
basicstation | key usage : Key Cert Sign, CRL Sign
basicstation | 2024-04-30 21:42:28.831 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network :8887
basicstation | 2024-04-30 21:42:30.026 [TCE:INFO] Infos: d83a:ddff:fe78:adb2 muxs-::0 wss://eu1.cloud.th ethings.network:8887/traffic/eui-D83ADDFFFE78ADB2
basicstation | 2024-04-30 21:42:30.026 [AIO:DEBU] [4] ws_close reason=1000
basicstation | 2024-04-30 21:42:30.026 [AIO:ERRO] Recv failed: SSL - The peer notified us that the conne ction is going to be closed
basicstation | 2024-04-30 21:42:30.026 [AIO:DEBU] [4] WS connection shutdown...
basicstation | 2024-04-30 21:42:30.074 [AIO:INFO] ./tc.trust:
basicstation | cert. version : 3
basicstation | serial number : 04:00:00:00:00:01:15:4B:5A:C3:94
basicstation | issuer name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
basicstation | subject name : C=BE, O=GlobalSign nv-sa, OU=Root CA, CN=GlobalSign Root CA
basicstation | issued on : 1998-09-01 12:00:00
basicstation | expires on : 2028-01-28 12:00:00
basicstation | signed using : RSA with SHA1
basicstation | RSA key size : 2048 bits
basicstation | basic constraints : CA=true
basicstation | key usage : Key Cert Sign, CRL Sign
basicstation | 2024-04-30 21:42:30.074 [TCE:VERB] Connecting to MUXS...
basicstation | 2024-04-30 21:42:31.034 [TCE:VERB] Connected to MUXS.
basicstation | 2024-04-30 21:42:31.432 [S00:VERB] /app/config/reset.sh: Forked, waiting...
basicstation | 2024-04-30 21:42:31.432 [S00:DEBU] execvp argv[0]: </app/config/reset.sh>
basicstation | 2024-04-30 21:42:31.432 [S00:DEBU] argv[1]: </dev/spidev0.1>
basicstation | 2024-04-30 21:42:31.432 [S00:DEBU] argv[2]: <0>
basicstation | Concentrator reset through GPIO17 (using sysfs)
basicstation | Warning: /sys/class/gpio/gpio17 does not exist
basicstation | 2024-04-30 21:42:31.461 [S00:INFO] Process /app/config/reset.sh (pid=67) completed
basicstation | 2024-04-30 21:42:31.461 [S00:INFO] Lora gateway library version: Version: 2.1.0;
basicstation | 2024-04-30 21:42:31.462 [S00:INFO] [LGW sx1302] full_duplex=0 clksrc=0 lorawan_public=1
basicstation | 2024-04-30 21:42:31.463 [S00:DEBU] SX130x txlut table (16 entries)
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 0: rf_power=12 pa_gain=0 pwr_idx=15
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 1: rf_power=13 pa_gain=0 pwr_idx=16
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 2: rf_power=14 pa_gain=0 pwr_idx=17
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 3: rf_power=15 pa_gain=0 pwr_idx=19
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 4: rf_power=16 pa_gain=0 pwr_idx=20
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 5: rf_power=17 pa_gain=0 pwr_idx=22
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 6: rf_power=18 pa_gain=1 pwr_idx=1
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 7: rf_power=19 pa_gain=1 pwr_idx=2
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 8: rf_power=20 pa_gain=1 pwr_idx=3
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 9: rf_power=21 pa_gain=1 pwr_idx=4
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 10: rf_power=22 pa_gain=1 pwr_idx=5
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 11: rf_power=23 pa_gain=1 pwr_idx=6
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 12: rf_power=24 pa_gain=1 pwr_idx=7
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 13: rf_power=25 pa_gain=1 pwr_idx=9
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 14: rf_power=26 pa_gain=1 pwr_idx=11
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] SX1302 txlut 15: rf_power=27 pa_gain=1 pwr_idx=14
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] RX/TX RF0: 904.3MHz rssi_offset=-215.4 type=5 rssi _tcomp=0.000 0.000 20.410 2162.560 0.000
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] RX RF1: 905.0MHz rssi_offset=-215.4 type=5 rssi _tcomp=0.000 0.000 20.410 2162.560 0.000
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 0: 903.9MHz rf=0 freq=-400.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 1: 904.1MHz rf=0 freq=-200.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 2: 904.3MHz rf=0 freq= +0.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 3: 904.5MHz rf=0 freq=+200.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 4: 904.7MHz rf=1 freq=-300.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 5: 904.9MHz rf=1 freq=-100.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 6: 905.1MHz rf=1 freq=+100.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [mSF] 7: 905.3MHz rf=1 freq=+300.0 datarate=0
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [STD] 8: 904.6MHz rf=0 freq=+300.0 datarate=8 bw =6 Explicit header
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] channel 9 disabled
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] Station device: spi:/dev/spidev0.1 (PPS capture enable d)
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [lgw_com_open:84] Opening SPI communication interface
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [lgw_spi_open:88] Setting SPI speed to 8000000
basicstation | 2024-04-30 21:42:31.463 [S00:INFO] [lgw_connect:1192] chip version is 0x00 (v0.0)
basicstation | 2024-04-30 21:42:31.318 [RAL:INFO] Region plan hwspec 'sx1301/1' mapped to 1 slaves 'sx13 01/1'
basicstation | 2024-04-30 21:42:31.319 [RAL:INFO] Master sending 645 bytes of JSON sx1301conf to slave ( 0)
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] Configuring for region: US915 -- 923.0MHz..928.0MHz
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR0 SF10/BW125
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR1 SF9/BW125
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR2 SF8/BW125
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR3 SF7/BW125
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR4 SF8/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR5 FSK
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR6 FSK
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR7 FSK
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR8 SF12/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR9 SF11/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR10 SF10/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR11 SF9/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR12 SF8/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR13 SF7/BW500
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR14 FSK
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] DR15 FSK
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] TX power: 26.0 dBm EIRP
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] JoinEui list: 0 entries
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] NetID filter: FFFFFFFF-FFFFFFFF-FFFFFFFF-FFFFFFFF
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] Dev/test settings: nocca=1 nodc=1 nodwell=1
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] Beaconing every 2m8s on 923.3MHz(8) @ DR8 (frame layou t 5/11/23)
basicstation | 2024-04-30 21:42:31.319 [S2E:INFO] Beaconing suspend - missing GPS data: time
basicstation | ERROR: Failed to set SX1250_0 in STANDBY_RC mode
basicstation | 2024-04-30 21:42:33.064 [S00:ERRO] [lgw_start:908] failed to setup radio 0
basicstation | 2024-04-30 21:42:33.064 [S00:ERRO] Concentrator start failed: lgw_start
basicstation | 2024-04-30 21:42:33.064 [S00:CRIT] Slave radio start up failed with status 0x08
basicstation | 2024-04-30 21:42:32.952 [RAL:ERRO] Slave (0) - EOF
basicstation | 2024-04-30 21:42:32.953 [any:CRIT] Slave pid=66 idx=0: Fatal exit
basicstation exited with code 0
gerry@rak-gateway:~ $
Hi,
I'm running basic station on raspberry compute 3, with concentrator RAKWIRLESS 831, i sucess to run the example live-s2.sm.tc and i can watch the led driver of the concentrator on, But the basic station stop running after connecting/deconnecting from mux, the log say that there is already process using spi, and i'm pretty sur that he talk about him( the process that fail), and i even can't find this process running.
My station.conf :
log basic station :
gateway_bridge log :
I'mreally stuck about this, can you help me please ?