Since about 2-3 month I have problems with my Wifi.
I use my phone for ~90% of all surfing. Pixel 7 running Android 16. I have set Adguard as my “private DNS”.
Lately I often get the message "Private DNS server cannot be accessed. I often get this about 10-15 times a day, really annoying!
Also I stream YouTube from my phone to a Chromecast and it’s always losing connection also when this happens.
I already tried different DNS services (Mulvad & Quad9), same.
So it’s either the phone, my Wifi or my provider.
What I wanna do now is let my laptop check the connection.
Therefore I need an app (or script; but would prefer a GUI tbh) that does nothing but ping a server every 10 seconds or so and logs if the connection is successful or not.
I’m aware that there are a lot of network testing tools like nmap or Wireshark but since I have zero experience in this field I would prefer something simple.
Any tips welcome, thanks in advance!
Simple is my preferred way and this seems perfect! Already running on my laptop, thank you!
Two more questions: is there an option to show results in terminal also?
And, for sure a dumb question What’s the correct way to stop this? Just close the terminal? Worked for the first test at least.
Oh, and a last one: Will Google notice when I ping the page every 10 seconds for a few days?
Guess I better use https://endeavouros.com/
I have currently Mullvad’s set on the router but I have tried the other two you mentioned before as well. They all have worked.
Also, setting the Private DNS on Android, me too, I have had some connectivity issues but nothing like 10-15 times like you have. Only sporadically.
Nowadays I use https://rethinkdns.com/ on Android.
It is a powerful tool which lets you finetune your connections to a great deal. It takes a little time to configure the way you like it but then you can practically forget about it. It is also quite gentle on the battery. I like it a lot.
I would really consider the app I recommended above. You can choose between some DNS providers, Mullvad, Quad9 and AdGuard included. Also you can load a bunch of ad and content blocker into it. More, it works as Firewall and some more.
I haven’t had any issues with my current DNS (Mullvad) configured in this app. It’s open source too.
If you can afford it, buy a WiFi router from Dlink or Netgear or some reputed brand and connect it to your provider provided router. Disable WiFi and network from your provider provided router and connect it to your personal WiFi router.
Which brand of phone do you have? Also do you have the same issue without the Private DNS setting disabled?
I used my own routers (usually Netgear) in the past but this one works fine, so I didn’t see any reason to replace it so far.
Phone is Google Pixel 7, running the stable branch of Android 16.
And no, the problems just there when I use private DNS.
My suspicion is that Android is trying to contact some server that’s on the blacklist of ad blocking DNS services. Maybe I should try the non blocking version of Quad9 to see if this works.
I let @dbarronoss script run multiple times for several hours. There have been two occasions where the ping wasn’t successful but that’s it. So I’d say that neither the DNS, nor my network or Wifi are the problem.
That leaves my phone.
So I just installed the Linux Terminal app on my phone and tried to run the script there. Seems to work, but the logfile is nowhere to be found.
So I tried
ping -i 10 www.google.com | tee > /storage/emulated/0/Documents/nwtest.txt
I’m aware that’s more an Android question than a Linux one, but maybe anybody can help here?
Edit: Found the solution! If anyone is curious, you can’t access the phones storage directly via the terminal, you can only access the download folder via /mnt/shared
So the correct command is:
ping -i 10 www.google.com | tee > /mnt/shared/nwtest.txt
@Mods/Admins: Can you pls leave this thread open for 2 or 3 more days? Thank you!