lorabasics / basicstation

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

Basic station giving error in restarting concentrator. #183

Open shivamkhanna28 opened 1 year ago

shivamkhanna28 commented 1 year ago

I am trying to make a lorawan gateway simulator which I can connect with AWS Iot core for LoraWan service to recieve uplinks. While running basicstaion in this gateway simulator, I am getting issue in restarting concentrator and noticed a pattern in basicstaion logs. First it is tries to restart concentrator for which it runs reset_gw.sh script file and gives "/sys/class/gpio/export: No such file or directory" while running it, after printing some logs it gives "SX130x LBT not enabled" and "FAIL TO CONNECT BOARD", and then it closes MUXS connectin with "error in s2e_onMsg" and log "Server sent close: reason=1000", and then tries to connect with INFOS and logs "sent close: reason=1006", after which it again tries restarting concentrator. Can Someone please explain me about this gpio error and concentrator restart issue. Below I have given pieces of logs for reference.

2023-05-31T04:56:04.752Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:04.752 [SYS:VERB] ./reset_gw.sh: Forked, waiting.... {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:04.752Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:04.752 [SYS:DEBU] execvp argv[0]: <./reset_gw.sh>. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:04.752Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:04.752 [SYS:DEBU] argv[1]: </dev/spidev0.0>. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:04.753Z [INFO] (Copier) abenfat.lorawan.ggbasics: stdout. Restarting the Concentrator.... {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:04.757Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. ./reset_gw.sh: line 5: /sys/class/gpio/export: No such file or directory. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:05.755Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. ./reset_gw.sh: line 7: /sys/class/gpio/gpio17/direction: No such file or directory. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:05.755Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. ./reset_gw.sh: line 8: /sys/class/gpio/gpio17/value: No such file or directory. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:06.757Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. ./reset_gw.sh: line 10: /sys/class/gpio/gpio17/value: No such file or directory. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:06.757Z [INFO] (Copier) abenfat.lorawan.ggbasics: stdout. Done\n. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.760Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.760 [SYS:INFO] Process ./reset_gw.sh (pid=3687) completed.

After it prints some logs of [RAL:INFO]

2023-05-31T04:56:08.765Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [RAL:INFO] SX130x LBT not enabled. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.765Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [RAL:INFO] Station device: /dev/spidev0.0 (PPS capture disabled). {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.765Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [HAL:ERRO] [lgw_start:742] FAIL TO CONNECT BOARD. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.765Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [RAL:ERRO] Concentrator start failed: lgw_start. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.765Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [RAL:ERRO] ral_config failed with status 0x08. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.765Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [any:ERRO] Closing connection to muxs - error in s2e_onMsg. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.766Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [AIO:DEBU] [3] ws_close reason=1000. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.766Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.763 [AIO:DEBU] Echoing close - reason=1000. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.864Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.766 [AIO:DEBU] [3|WS] Server sent close: reason=1000. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.864Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.766 [AIO:DEBU] [3] WS connection shutdown.... {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.864Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.766 [TCE:VERB] Connection to MUXS closed in state -1. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:08.864Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:08.766 [TCE:INFO] INFOS reconnect backoff 10s (retry 1)

then logs for ./tc.trust and ./tc.crt

{scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:18.829Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:18.829 [TCE:INFO] Infos: a647:9bff:fea9:ce67 a647:9bff:fea9:ce67 . {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:18.830Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:18.829 [AIO:DEBU] [3] ws_close reason=1000. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:18.830Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:18.829 [AIO:DEBU] [3|WS] Server sent close: reason=1006. {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING} 2023-05-31T04:56:18.830Z [WARN] (Copier) abenfat.lorawan.ggbasics: stderr. 2023-05-31 04:56:18.829 [AIO:DEBU] [3] WS connection shutdown.... {scriptName=services.abenfat.lorawan.ggbasics.lifecycle.Run.Script, serviceName=abenfat.lorawan.ggbasics, currentState=RUNNING}

Meimurugan11 commented 3 months ago

Hi @shivamkhanna28 , I want to integrate the sx1302 lorawan packet forwarder with aws server it requires aws key, certifates, trust certificates. I am trying to configure with sample configuration files am not sure this format is right. Please help me to resolve this issue.Any help would be greatly appreciated. If possible could you give me the sample station.conf file for aws integration.

Thanks