From 0ba07617f0a3a111abde38f6081e4eb590e5a999 Mon Sep 17 00:00:00 2001 From: saeedjohar Date: Mon, 10 Jun 2019 19:11:54 +0300 Subject: [PATCH] i. Checks connection every 10s before auto reconnect. ii. Pings Header only to save data. --- ppp_installer/reconnect_baseshield | 4 ++-- ppp_installer/reconnect_cellulariot | 4 ++-- ppp_installer/reconnect_cellulariot_app | 4 ++-- ppp_installer/reconnect_gprsshield | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ppp_installer/reconnect_baseshield b/ppp_installer/reconnect_baseshield index 91e8a98..69b667a 100644 --- a/ppp_installer/reconnect_baseshield +++ b/ppp_installer/reconnect_baseshield @@ -2,7 +2,7 @@ while true; do - ping -I ppp0 -c 1 8.8.8.8 + ping -I ppp0 -c 1 8.8.8.8 -s 0 if [ $? -eq 0 ]; then echo "Connection up, reconnect not required..." @@ -11,5 +11,5 @@ while true; do sudo pon fi - sleep 1 + sleep 10 done diff --git a/ppp_installer/reconnect_cellulariot b/ppp_installer/reconnect_cellulariot index 6c46174..a52bf53 100644 --- a/ppp_installer/reconnect_cellulariot +++ b/ppp_installer/reconnect_cellulariot @@ -19,7 +19,7 @@ while true; do gpio -g write 24 0 sleep 2 else - ping -I ppp0 -c 1 8.8.8.8 + ping -I ppp0 -c 1 8.8.8.8 -s 0 if [ $? -eq 0 ]; then echo "Connection up, reconnect not required..." @@ -29,5 +29,5 @@ while true; do fi fi - sleep 1 + sleep 10 done diff --git a/ppp_installer/reconnect_cellulariot_app b/ppp_installer/reconnect_cellulariot_app index 330fa0b..c23ba39 100644 --- a/ppp_installer/reconnect_cellulariot_app +++ b/ppp_installer/reconnect_cellulariot_app @@ -19,7 +19,7 @@ while true; do gpio -g write 11 0 sleep 2 else - ping -I ppp0 -c 1 8.8.8.8 + ping -I ppp0 -c 1 8.8.8.8 -s 0 if [ $? -eq 0 ]; then echo "Connection up, reconnect not required..." @@ -29,5 +29,5 @@ while true; do fi fi - sleep 1 + sleep 10 done diff --git a/ppp_installer/reconnect_gprsshield b/ppp_installer/reconnect_gprsshield index 0315448..7cc54ec 100644 --- a/ppp_installer/reconnect_gprsshield +++ b/ppp_installer/reconnect_gprsshield @@ -14,7 +14,7 @@ while true; do gpio -g write 26 0 sleep 2 else - ping -I ppp0 -c 1 8.8.8.8 + ping -I ppp0 -c 1 8.8.8.8 -s 0 if [ $? -eq 0 ]; then echo "Connection up, reconnect not required..." @@ -24,5 +24,5 @@ while true; do fi fi - sleep 1 + sleep 10 done