tmo-monitor icon indicating copy to clipboard operation
tmo-monitor copied to clipboard

Use technique other than ping to assess connection status

Open hugoh opened this issue 1 year ago • 7 comments

It looks like T-Mobile started blocking pings, and so the connection looks down even when it's not. This broke this tool for me – I'm assuming for others too.

We should add a different mechanism, such as DNS lookup or HTTP request.

hugoh avatar Oct 20 '22 12:10 hugoh

I'm not seeing a block of pings on my connection. Did you make a network change? Or maybe it is happening but geographically. It would be bad network policy to do it though.

tarunVreddy avatar Oct 20 '22 14:10 tarunVreddy

It's unclear how broad it is: https://reddit.com/r/tmobileisp/comments/y3uqto/no_reply_to_pings_today/

hugoh avatar Oct 20 '22 21:10 hugoh

If it helps, this is the route-test script that I use now that I cannot get a ICMP reply on TMOHI:

#!/bin/sh 
# Checks for WAN connectivity
# 
 
# add your website targets here 
targets="1.1.1.1 www.google.com"

reboot_if_fail=$1 

# Print Config 
/tmo-monitor/tmo-monitor.py --skip-bands --ping-count 0

for host in $targets
do
#  curl -Is -m 1 --head http://$host 2>$1 | grep -w "200\|301" > /dev/null
  wget -S --spider -T 1 $host 2>$1
#  nc -zv -w 1 $host http 2>$1
  if [ $? == 0 ]
  then
    echo "Online"
    exit 0
  fi
done 
 
# fail
 echo "Failed"
  if [ $reboot_if_fail == 1 ]
  then
  echo "Forcing Reboot"
    /tmo-monitor/tmo-monitor.py --reboot
  fi
exit 1

Thaine1690 avatar Nov 05 '22 08:11 Thaine1690