mpous / basicstation

LoRa Basics™ Station - The LoRaWAN Gateway Software

Home Page:https://doc.sm.tc/station

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Closing connection to muxs - error in s2e_onMsg

mpous opened this issue · comments

A Raspberry Pi 4 with RAK2287 (with RAK pi hat) (sx1302) with the variables properly defined show this error:

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:42.863 [any:INFO] ./lns-ttn/tc.trust: 

04.06.21 22:15:43 (+0530) <undefined> cert. version     : 3

04.06.21 22:15:43 (+0530) <undefined> serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B

04.06.21 22:15:43 (+0530) <undefined> issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3

04.06.21 22:15:43 (+0530) <undefined> subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3

04.06.21 22:15:43 (+0530) <undefined> issued  on        : 2000-09-30 21:12:19

04.06.21 22:15:43 (+0530) <undefined> expires on        : 2021-09-30 14:01:15

04.06.21 22:15:43 (+0530) <undefined> signed using      : RSA with SHA1

04.06.21 22:15:43 (+0530) <undefined> RSA key size      : 2048 bits

04.06.21 22:15:43 (+0530) <undefined> basic constraints : CA=true

04.06.21 22:15:43 (+0530) <undefined> key usage         : Key Cert Sign, CRL Sign

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:42.863 [AIO:INFO] tc has no cert configured - running server auth and client auth with token

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:42.981 [TCE:INFO] Connecting to INFOS: wss://eu1.cloud.thethings.network:8887

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.530 [TCE:INFO] Infos: dca6:32ff:fedc:83db muxs-::0 wss://eu1.cloud.thethings.network:8887/traffic/eui-DCA632FFFEDC83DB

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.530 [AIO:DEBU] [3] ws_close reason=1000

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.530 [AIO:ERRO] Recv failed: SSL - The peer notified us that the connection is going to be closed

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.530 [AIO:DEBU] [3] WS connection shutdown...

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.531 [any:INFO] ./lns-ttn/tc.trust: 

04.06.21 22:15:43 (+0530) <undefined> cert. version     : 3

04.06.21 22:15:43 (+0530) <undefined> serial number     : 44:AF:B0:80:D6:A3:27:BA:89:30:39:86:2E:F8:40:6B

04.06.21 22:15:43 (+0530) <undefined> issuer name       : O=Digital Signature Trust Co., CN=DST Root CA X3

04.06.21 22:15:43 (+0530) <undefined> subject name      : O=Digital Signature Trust Co., CN=DST Root CA X3

04.06.21 22:15:43 (+0530) <undefined> issued  on        : 2000-09-30 21:12:19

04.06.21 22:15:43 (+0530) <undefined> expires on        : 2021-09-30 14:01:15

04.06.21 22:15:43 (+0530) <undefined> signed using      : RSA with SHA1

04.06.21 22:15:43 (+0530) <undefined> RSA key size      : 2048 bits

04.06.21 22:15:43 (+0530) <undefined> basic constraints : CA=true

04.06.21 22:15:43 (+0530) <undefined> key usage         : Key Cert Sign, CRL Sign

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.531 [AIO:INFO] tc has no cert configured - running server auth and client auth with token

04.06.21 22:15:43 (+0530) <undefined> 2021-06-04 16:45:43.636 [TCE:VERB] Connecting to MUXS...

04.06.21 22:15:44 (+0530) <undefined> 2021-06-04 16:45:44.095 [TCE:VERB] Connected to MUXS.

04.06.21 22:15:44 (+0530) <undefined> 2021-06-04 16:45:44.200 [SYS:VERB] rinit.sh: Forked, waiting...

04.06.21 22:15:44 (+0530) <undefined> ./reset_lgw.sh: 24: echo: echo: I/O error

04.06.21 22:15:44 (+0530) <undefined> RAK2287 reset through GPIO11...

04.06.21 22:15:44 (+0530) <undefined> RAK2287 power enable through GPIO11...

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.042 [SYS:INFO] Process rinit.sh (pid=65) completed

04.06.21 22:15:45 (+0530) <undefined> ERROR: Failed to stop TX trigger

04.06.21 22:15:45 (+0530) <undefined> ERROR: Failed to stop TX trigger

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.043 [RAL:INFO] Lora gateway library version: Version: 1.0.5;

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] Connecting to device: /dev/spidev0.0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:DEBU] SX130x txlut table (16 entries)

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  0:  rf_power=12 pa_gain=0 pwr_idx=15

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  1:  rf_power=13 pa_gain=0 pwr_idx=16

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  2:  rf_power=14 pa_gain=0 pwr_idx=17

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  3:  rf_power=15 pa_gain=0 pwr_idx=19

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  4:  rf_power=16 pa_gain=0 pwr_idx=20

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  5:  rf_power=17 pa_gain=0 pwr_idx=22

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  6:  rf_power=18 pa_gain=1 pwr_idx=1

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  7:  rf_power=19 pa_gain=1 pwr_idx=2

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  8:  rf_power=20 pa_gain=1 pwr_idx=3

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut  9:  rf_power=21 pa_gain=1 pwr_idx=4

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut 10:  rf_power=22 pa_gain=1 pwr_idx=5

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut 11:  rf_power=23 pa_gain=1 pwr_idx=6

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut 12:  rf_power=24 pa_gain=1 pwr_idx=7

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut 13:  rf_power=25 pa_gain=1 pwr_idx=9

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut 14:  rf_power=26 pa_gain=1 pwr_idx=11

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 txlut 15:  rf_power=27 pa_gain=1 pwr_idx=14

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [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

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 rxrfchain 0: enable=1 freq=909.1MHz rssi_offset=-215.399994 type=5 tx_enable=1

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 rxrfchain 1: enable=1 freq=909.8MHz rssi_offset=-215.399994 type=5 tx_enable=0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 ifchain  0: enable=1 rf_chain=0 freq=-400000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 ifchain  1: enable=1 rf_chain=0 freq=-200000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 ifchain  2: enable=1 rf_chain=0 freq=0 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 ifchain  3: enable=1 rf_chain=0 freq=200000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 ifchain  4: enable=1 rf_chain=1 freq=-300000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.044 [RAL:VERB] SX1302 ifchain  5: enable=1 rf_chain=1 freq=-100000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.045 [RAL:VERB] SX1302 ifchain  6: enable=1 rf_chain=1 freq=100000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.045 [RAL:VERB] SX1302 ifchain  7: enable=1 rf_chain=1 freq=300000 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.045 [RAL:VERB] SX1302 ifchain  8: enable=1 rf_chain=0 freq=300000 bw=6 SF=8 sync_word=0/0 [STD] Explicit header

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.045 [RAL:VERB] SX1302 ifchain  9: enable=0 rf_chain=0 freq=0 bw=0 SF=0 sync_word=0/0

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.045 [RAL:VERB] Station device: /dev/spidev0.0 (PPS capture disabled)

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.048 [RAL:ERRO] Concentrator start failed: lgw_start

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.048 [RAL:ERRO] ral_config failed with status 0x08

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.048 [any:ERRO] Closing connection to muxs - error in s2e_onMsg

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.048 [AIO:DEBU] [3] ws_close reason=1000

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.048 [AIO:DEBU] Echoing close - reason=1000

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.157 [AIO:DEBU] [3|WS] Server sent close: reason=1000

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.157 [AIO:DEBU] [3] WS connection shutdown...

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.157 [TCE:VERB] Connection to MUXS closed in state -1

04.06.21 22:15:45 (+0530) <undefined> 2021-06-04 16:45:45.157 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

04.06.21 22:15:55 (+0530) <undefined> ERROR: UNKNOWN TX STATUS 0x00

04.06.21 22:15:55 (+0530) <undefined> ERROR: UNKNOWN TX STATUS 0x00

After power cycling the RPi setup AND removing the LoRa hat between power cycles does seem to resolve the issue.

Looks like the issue is related with the reset_lgw.sh.

It's also relevant to research on the power enable pin which can't be the same pin than the reset pin.

[mpous] This issue has attached support thread https://jel.ly.fish/a4116df0-aaf6-4f31-a743-8fefdb251865