diff --git a/src/configure_modem.sh b/src/configure_modem.sh index 3d3b251..e7f6f15 100644 --- a/src/configure_modem.sh +++ b/src/configure_modem.sh @@ -177,5 +177,5 @@ fi # Check the network is ready # -------------------------- -if check_network -eq 0; then exit 0; else debug "Network registeration is failed!. Modem configuration is unsuccesfully ended!"; exit 1; fi +if check_network -eq 0; then exit 0; else debug "Network registration is failed!. Modem configuration is unsuccesfully ended!"; exit 1; fi diff --git a/src/functions.sh b/src/functions.sh index 035f191..4e7d1e9 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -31,7 +31,7 @@ function check_network() if [[ $SIM_READY -ne 0 ]]; then atcom AT+CPIN? | grep "CPIN:"; fi - debug "Network Registeration Status: " "-n" # no line break + debug "Network Registration Status: " "-n" # no line break NR_TEXT=`atcom AT+CREG? | grep "CREG:"` echo $NR_TEXT @@ -41,7 +41,7 @@ function check_network() # For native SIM echo $NR_TEXT | grep "CREG: 0,1" > /dev/null NETWORK_REG_2=$? - # Combined network registeration status + # Combined network registration status NETWORK_REG=$((NETWORK_REG+NETWORK_REG_2)) if [[ $SIM_READY -eq 0 ]] && [[ $NETWORK_REG -le 1 ]]; then @@ -50,10 +50,10 @@ function check_network() return 0 break else - debug "Retrying network registeration..." + debug "Retrying network registration..." fi sleep 2 done - debug "Network registeration is failed! Please check SIM card, data plan, antennas etc." + debug "Network registration is failed! Please check SIM card, data plan, antennas etc." return 1 } diff --git a/src/reconnect_scripts/reconnect_basehat b/src/reconnect_scripts/reconnect_basehat index 6593766..5ac685e 100644 --- a/src/reconnect_scripts/reconnect_basehat +++ b/src/reconnect_scripts/reconnect_basehat @@ -24,7 +24,7 @@ if check_network -eq 0; then PPP_IS_DEFAULT=$? if [[ $PPP_IS_DEFAULT -ne 0 ]]; then sudo route add default ppp0; debug "ppp0 is added as default interface manually."; fi else - debug "Network registeration is failed!"; + debug "Network registration is failed!"; fi while true; do @@ -45,7 +45,7 @@ while true; do printf "+" else debug "Connection is down, reconnecting..." - if check_network -eq 0; then sleep 0.1; else debug "Network registeration is failed!"; fi + if check_network -eq 0; then sleep 0.1; else debug "Network registration is failed!"; fi sudo pon # check default interface diff --git a/src/reconnect_scripts/reconnect_baseshield b/src/reconnect_scripts/reconnect_baseshield index 00f80c7..c7ea026 100755 --- a/src/reconnect_scripts/reconnect_baseshield +++ b/src/reconnect_scripts/reconnect_baseshield @@ -12,7 +12,7 @@ if check_network -eq 0; then PPP_IS_DEFAULT=$? if [[ $PPP_IS_DEFAULT -ne 0 ]]; then sudo route add default ppp0; debug "ppp0 is added as default interface manually."; fi else - debug "Network registeration is failed!"; + debug "Network registration is failed!"; fi while true; do @@ -33,7 +33,7 @@ while true; do printf "+" else debug "Connection is down, reconnecting..." - if check_network -eq 0; then sleep 0.1; else debug "Network registeration is failed!"; fi + if check_network -eq 0; then sleep 0.1; else debug "Network registration is failed!"; fi sudo pon # check default interface diff --git a/src/reconnect_scripts/reconnect_cellulariot b/src/reconnect_scripts/reconnect_cellulariot index be9d093..d06070c 100644 --- a/src/reconnect_scripts/reconnect_cellulariot +++ b/src/reconnect_scripts/reconnect_cellulariot @@ -66,7 +66,7 @@ if check_network -eq 0; then if [[ $PPP_IS_DEFAULT -ne 0 ]]; then sudo route add default ppp0; debug "ppp0 is added as default interface manually."; fi else - debug "Network registeration is failed!"; + debug "Network registration is failed!"; fi while true; do @@ -89,7 +89,7 @@ while true; do 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 + if check_network -eq 0; then sleep 0.1; else debug "Network registration is failed!"; fi sudo pon # check default interface diff --git a/src/reconnect_scripts/reconnect_cellulariot_app b/src/reconnect_scripts/reconnect_cellulariot_app index b1053f1..79c68fc 100644 --- a/src/reconnect_scripts/reconnect_cellulariot_app +++ b/src/reconnect_scripts/reconnect_cellulariot_app @@ -66,7 +66,7 @@ if check_network -eq 0; then PPP_IS_DEFAULT=$? if [[ $PPP_IS_DEFAULT -ne 0 ]]; then sudo route add default ppp0; debug "ppp0 is added as default interface manually."; fi else - debug "Network registeration is failed!"; + debug "Network registration is failed!"; fi while true; do @@ -89,7 +89,7 @@ while true; do 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 + if check_network -eq 0; then sleep 0.1; else debug "Network registration is failed!"; fi sudo pon # check default interface diff --git a/src/reconnect_scripts/reconnect_gprsshield b/src/reconnect_scripts/reconnect_gprsshield index a630ff2..9042901 100644 --- a/src/reconnect_scripts/reconnect_gprsshield +++ b/src/reconnect_scripts/reconnect_gprsshield @@ -55,7 +55,7 @@ if check_network -eq 0; then PPP_IS_DEFAULT=$? if [[ $PPP_IS_DEFAULT -ne 0 ]]; then sudo route add default ppp0; debug "ppp0 is added as default interface manually."; fi else - debug "Network registeration is failed!"; + debug "Network registration is failed!"; fi while true; do @@ -76,7 +76,7 @@ while true; do printf "+" else debug "Connection is down, reconnecting..." - if check_network -eq 0; then sleep 0.1; else debug "Network registeration is failed!"; fi + if check_network -eq 0; then sleep 0.1; else debug "Network registration is failed!"; fi sudo pon # check default interface diff --git a/src/reconnect_scripts/reconnect_tracker b/src/reconnect_scripts/reconnect_tracker index cda4543..abb2f92 100644 --- a/src/reconnect_scripts/reconnect_tracker +++ b/src/reconnect_scripts/reconnect_tracker @@ -66,7 +66,7 @@ if check_network -eq 0; then PPP_IS_DEFAULT=$? if [[ $PPP_IS_DEFAULT -ne 0 ]]; then sudo route add default ppp0; debug "ppp0 is added as default interface manually."; fi else - debug "Network registeration is failed!"; + debug "Network registration is failed!"; fi while true; do @@ -89,7 +89,7 @@ while true; do 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 + if check_network -eq 0; then sleep 0.1; else debug "Network registration is failed!"; fi sudo pon # check default interface