Idea Log

a record of ideas I've come up with



Script to test internet connectivity and log results

I was having intermittent problems not being able to connect to the internet and needed to find out when and how often it happened.

I also wanted to see if it was WIFI, or entire network that was the problem so i had multiple computers using different connections to the network. So i could run the script and compare logs


So here is the bash script:


DELAY=60 # every 60 sec

while true; do
$WGET -q --tries=20 --timeout=10 -O /tmp/google.idx &> /dev/null
if [ ! -s /tmp/google.idx ]
echo `date` "--- Not Connected..!" 2>&1 | tee -a connectivity.log
echo `date` "--- Connected..!" 2>&1 | tee -a connectivity.log

sleep $DELAY

The script check the internet every 60 seconds and displays date and time with the internet status and logs in to the file connectivity.log

Example output

Mon Sep 10 13:52:31 MDT 2018 --- Connected..!
Mon Sep 10 13:52:37 MDT 2018 --- Connected..!
Mon Sep 10 13:52:42 MDT 2018 --- Connected..!
Mon Sep 10 13:52:48 MDT 2018 --- Connected..!
Mon Sep 10 13:52:53 MDT 2018 --- Connected..!
Mon Sep 10 13:52:59 MDT 2018 --- Connected..!
Mon Sep 10 13:53:04 MDT 2018 --- Connected..!
Mon Sep 10 13:53:10 MDT 2018 --- Connected..!
Mon Sep 10 13:53:15 MDT 2018 --- Connected..!
Mon Sep 10 13:53:21 MDT 2018 --- Connected..!
Mon Sep 10 13:53:26 MDT 2018 --- Connected..!
Mon Sep 10 13:53:32 MDT 2018 --- Connected..!

Idea: Incorporate speaker profiles in computer audio output.

I just read that this article about Apples HomePod speaker performance, and read how the DSP corrects for the actual speakers natural imperfect frequency response.

Ideally you want you audio to have a flat frequency response.  Audio in = audio out at every frequence. Speakers aren’t perfect so this doesn’t happen.  Some are louder at lower frequencies others are louder at mid frequencies, and so on.

What the HomePod does is increases the volume on frequencies the speaker is poor at, so the speakers output has a near perfect frequency response.  This isn’t difficult for a DSP to do if you know the speakers frequency response curve, and this is common thing measured for every speaker.

So my idea is, What if you could enter you speakers “Brand” and “Models number” into your computer and have its DSP auto-correct for your speakers imperfect frequency response.  This should be fairly easy to do.  A database of speaker profiles would have to be created, but after that computer DSPs already accept custom frequency response profiles (bass-boost, vocal, etc)

I have a similar thing with my digital camera and graphics editor.  I can enter my cameras lens in the graphics program and it will correct for my lenses slight distortions in color, geometery, etc.  And this is much more complex than speaker profiles.  Its hard to believe no ones done this.

Some possible challenges.  Speakers distort if volumes are too high volumes.  Having DSPs correcting for speakers poor outputs at certain frequencies  may require the volume to increase at that frequency to make the distortion noticeable.  So these factors would have to be added to the speakers profile.  Such as max volume profile curve to each frequency.  Another factor is the amplifier, or any other stages between computer and speaker.  Audio amplifiers ideally have flat frequency responses, but this is not always true.  So these profiles may want to be added as well.  But these are minor difficulties and easy to correct.

So if anybody want to take up this idea and make it reality, go for it.

Blog at

Up ↑