From 44f62e6c226d9887d3e88004f0ba4407b83b8028 Mon Sep 17 00:00:00 2001 From: Yasin Kaya Date: Thu, 26 Nov 2020 14:39:54 +0000 Subject: [PATCH] Added reset power and power up steps to conneciton recovery sequence --- src/reconnect_scripts/reconnect_cellulariot | 4 +++- src/reconnect_scripts/reconnect_cellulariot_app | 2 ++ src/reconnect_scripts/reconnect_tracker | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/reconnect_scripts/reconnect_cellulariot b/src/reconnect_scripts/reconnect_cellulariot index 0436f42..a6fed87 100644 --- a/src/reconnect_scripts/reconnect_cellulariot +++ b/src/reconnect_scripts/reconnect_cellulariot @@ -86,7 +86,9 @@ while true; do if [[ $PINGG -eq 0 ]]; then printf "+" else - debug "Connection is down, reconnecting..." + debug "Connection is down, reconnecting..." + restart_power + if power_up_module -eq 0 ; then sleep 0.1; else debug "Module couldn't be powered up! Check the hardware setup!"; fi if check_network -eq 0; then sleep 0.1; else debug "Network registeration is failed!"; fi sudo pon diff --git a/src/reconnect_scripts/reconnect_cellulariot_app b/src/reconnect_scripts/reconnect_cellulariot_app index d62c779..45963f2 100644 --- a/src/reconnect_scripts/reconnect_cellulariot_app +++ b/src/reconnect_scripts/reconnect_cellulariot_app @@ -87,6 +87,8 @@ while true; do printf "+" else debug "Connection is down, reconnecting..." + restart_power + if power_up_module -eq 0 ; then sleep 0.1; else debug "Module couldn't be powered up! Check the hardware setup!"; fi if check_network -eq 0; then sleep 0.1; else debug "Network registeration is failed!"; fi sudo pon diff --git a/src/reconnect_scripts/reconnect_tracker b/src/reconnect_scripts/reconnect_tracker index 8fb3a36..3cd3d01 100644 --- a/src/reconnect_scripts/reconnect_tracker +++ b/src/reconnect_scripts/reconnect_tracker @@ -87,6 +87,8 @@ while true; do printf "+" else debug "Connection is down, reconnecting..." + restart_power + if power_up_module -eq 0 ; then sleep 0.1; else debug "Module couldn't be powered up! Check the hardware setup!"; fi if check_network -eq 0; then sleep 0.1; else debug "Network registeration is failed!"; fi sudo pon