mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software
https://doc.sm.tc/station
59 stars 30 forks source link

Is SX1303 supported? #53

Open PavelSindler opened 1 year ago

PavelSindler commented 1 year ago

I am using Rpi 3, RAK5146 concentrator module (which is based on SX1303) and RAK2287/RAK5146 Pi HAT. I am using 32 bit Balena OS. It is stated in readme in this repository that SX1303 is supported, but from code it looks like it is not. Am I missing something? How to set $MODEL variable in this case? I tried to set $MODEL to SX1302 and got following log containing certificate error and "ERROR: Failed to stop TX trigger":

12.03.23 17:56:04 (+0100)  basicstation  2023-03-12 16:56:04.847 [any:INFO] ./lns-ttn/tc.trust: 
12.03.23 17:56:04 (+0100)  basicstation  cert. version     : 3
12.03.23 17:56:04 (+0100)  basicstation  serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
12.03.23 17:56:04 (+0100)  basicstation  issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
12.03.23 17:56:04 (+0100)  basicstation  subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
12.03.23 17:56:04 (+0100)  basicstation  issued  on        : 2000-09-30 21:12:19
12.03.23 17:56:04 (+0100)  basicstation  expires on        : 2021-09-30 14:01:15
12.03.23 17:56:04 (+0100)  basicstation  signed using      : RSA with SHA1
12.03.23 17:56:04 (+0100)  basicstation  RSA key size      : 2048 bits
12.03.23 17:56:04 (+0100)  basicstation  basic constraints : CA=true
12.03.23 17:56:04 (+0100)  basicstation  key usage         : Key Cert Sign, CRL Sign
12.03.23 17:56:04 (+0100)  basicstation  2023-03-12 16:56:04.847 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
12.03.23 17:56:04 (+0100)  basicstation  2023-03-12 16:56:04.914 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.195 [TCE:INFO] Infos: b827:ebff:fe44:a321 muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-B827EBFFFE44A321
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.195 [AIO:DEBU] [3] ws_close reason=1000
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.195 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.195 [AIO:DEBU] [3] WS connection shutdown...
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.196 [any:INFO] ./lns-ttn/tc.trust: 
12.03.23 17:56:05 (+0100)  basicstation  cert. version     : 3
12.03.23 17:56:05 (+0100)  basicstation  serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B
12.03.23 17:56:05 (+0100)  basicstation  issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3
12.03.23 17:56:05 (+0100)  basicstation  subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3
12.03.23 17:56:05 (+0100)  basicstation  issued  on        : 2000-09-30 21:12:19
12.03.23 17:56:05 (+0100)  basicstation  expires on        : 2021-09-30 14:01:15
12.03.23 17:56:05 (+0100)  basicstation  signed using      : RSA with SHA1
12.03.23 17:56:05 (+0100)  basicstation  RSA key size      : 2048 bits
12.03.23 17:56:05 (+0100)  basicstation  basic constraints : CA=true
12.03.23 17:56:05 (+0100)  basicstation  key usage         : Key Cert Sign, CRL Sign
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.196 [AIO:INFO] tc has no cert configured - running server auth and client auth with token
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.252 [TCE:VERB] Connecting to MUXS...
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.492 [TCE:VERB] Connected to MUXS.
12.03.23 17:56:05 (+0100)  basicstation  2023-03-12 16:56:05.545 [SYS:VERB] rinit.sh: Forked, waiting...
12.03.23 17:56:06 (+0100)  basicstation  RAK2287 reset through GPIO17...
12.03.23 17:56:06 (+0100)  basicstation  RAK2287 power enable through GPIO18...
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.530 [SYS:INFO] Process rinit.sh (pid=73) completed
12.03.23 17:56:06 (+0100)  basicstation  ERROR: Failed to stop TX trigger
12.03.23 17:56:06 (+0100)  basicstation  ERROR: Failed to stop TX trigger
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.530 [RAL:INFO] Lora gateway library version: Version: 1.0.5;
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] Connecting to device: /dev/spidev0.0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:DEBU] SX130x txlut table (16 entries)
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  0:  rf_power=12 pa_gain=0 pwr_idx=15
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  1:  rf_power=13 pa_gain=0 pwr_idx=16
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  2:  rf_power=14 pa_gain=0 pwr_idx=17
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  3:  rf_power=15 pa_gain=0 pwr_idx=19
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  4:  rf_power=16 pa_gain=0 pwr_idx=20
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  5:  rf_power=17 pa_gain=0 pwr_idx=22
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  6:  rf_power=18 pa_gain=1 pwr_idx=1
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  7:  rf_power=19 pa_gain=1 pwr_idx=2
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.532 [RAL:VERB] SX1302 txlut  8:  rf_power=20 pa_gain=1 pwr_idx=3
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut  9:  rf_power=21 pa_gain=1 pwr_idx=4
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut 10:  rf_power=22 pa_gain=1 pwr_idx=5
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut 11:  rf_power=23 pa_gain=1 pwr_idx=6
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut 12:  rf_power=24 pa_gain=1 pwr_idx=7
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut 13:  rf_power=25 pa_gain=1 pwr_idx=9
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut 14:  rf_power=26 pa_gain=1 pwr_idx=11
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 txlut 15:  rf_power=27 pa_gain=1 pwr_idx=14
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 rssi_tcomp: coeff_a=0.000 coeff_b=0.000 coeff_c=20.410 coeff_d=2162.560 coeff_e=0.000
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 rxrfchain 0: enable=1 freq=867.5MHz rssi_offset=-215.399994 type=5 tx_enable=1
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 rxrfchain 1: enable=1 freq=868.5MHz rssi_offset=-215.399994 type=5 tx_enable=0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  0: enable=1 rf_chain=1 freq=-400000 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  1: enable=1 rf_chain=1 freq=-200000 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  2: enable=1 rf_chain=1 freq=0 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  3: enable=1 rf_chain=0 freq=-400000 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  4: enable=1 rf_chain=0 freq=-200000 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  5: enable=1 rf_chain=0 freq=0 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  6: enable=1 rf_chain=0 freq=200000 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  7: enable=1 rf_chain=0 freq=400000 bw=0 SF=0 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  8: enable=1 rf_chain=1 freq=-200000 bw=5 SF=7 sync_word=0/0 [STD] Explicit header
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] SX1302 ifchain  9: enable=1 rf_chain=1 freq=300000 bw=0 SF=50000 sync_word=0/0
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.533 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.534 [RAL:ERRO] Concentrator start failed: lgw_start
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.534 [RAL:ERRO] ral_config failed with status 0x08
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.534 [any:ERRO] Closing connection to muxs - error in s2e_onMsg
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.534 [AIO:DEBU] [3] ws_close reason=1000
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.534 [AIO:DEBU] Echoing close - reason=1000
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.581 [AIO:DEBU] [3|WS] Server sent close: reason=1000
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.581 [AIO:DEBU] [3] WS connection shutdown...
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.582 [TCE:VERB] Connection to MUXS closed in state -1
12.03.23 17:56:06 (+0100)  basicstation  2023-03-12 16:56:06.582 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)