Friday, June 3, 2011

Finding your mother's mobile phone in a large field

So your friend, wife, etc. (or in my case mother) has lost her cell phone in about 1.5 hectares (~3.7 acres for you americans) of field and forrest.
You happen to be 100km away... what do you do?

The only way she's really going to find it before dark is to walk around and look for it... but it would be much easier to find in all that wild space if it was ringing.

This is exactly what happened to my mother.
I started dialling my phone and letting it ring while she went out to walk around... this got pretty tedious after the first little while.

So after all that dialling I noticed that the phone would ring for 59 seconds and then hang up (likely a feature of my carrier) and being the lazy and dumb programmer I am, I decided there must be a way to automate all that dialling.

A quick search with google and sure enough there was!

Lucky for me, I use an Android phone and I have the development tools on my computer. This allowed me to write a small script that simply dialled her over and over again every 70 seconds.

This is what I did:
- I use a Mac Pro (but this should work on linux with a bash shell as well, Windows users are on your own).
- You need the Android SDK installed.
- You need an android phone (I am using a Nexus S currently).

Here is the quick and dirty shell script I wrote to to the job:

#!/bin/bash
echo "Calling every 70 seconds..."
c=1
while [ 1 ]
do
adb -s 173166299F8500EC shell service call phone 2 s16 "13335554444"
sleep 70s;
echo "Calling again ($c) ..."
(( c++ ))
done

The -s ### is the identity of the phone, I have several devices connected to my computer and I needed to indicate which one I wanted to act upon.
The last number in quotes is the number to dial (redacted for security).
The 70s is 70 seconds of course.

This would dial the phone and wait 70 seconds (about 11 seconds longer than the phone would ring), then dial it again.

Warning: If you use this as a prank on someone, I'm not responsible for the hole in your shorts when your ass gets kicked; or if the phone company cuts you off after your buddy complains. Besides, think about it, they are going to know who is doing it to them when your number pops up on the screen.

Oh... and yes... she did find her phone in the end.


Tuesday, March 8, 2011

Gingerbread out for Nexus One

My Nexus one that I use for development has just updated to Gingerbread.

Monday, January 31, 2011

Metered Internet in Canada. Say it ain't so!

I don't know about you, but most of my services now come over the internet.
I rent movies and make telephone calls, do my banking, pay my taxes, renew my car license, interact with my city, provincial and federal governments all through network technology.

The network service providers are aware that more and more we are going to depend on the network for our day to day lives. They want to get the rules changed now before most of us are aware of just how much things are going to change.

What we'll end up with is a system like cell phone where you pay by the minute for every call you make and the cost can be as high as they like it to be.



This is not a good situation for us and will in fact make us a backward country in terms of our future compared to the rest of the world. Don't let this become the way things are. Help change the rules before they rules are implemented.


Monday, January 24, 2011

New Android version released

Well it appears today that that my Nexus One got an OTA update from 2.2.1 to 2.2.2.

The notice said it was a maintenance release, which would make sense based on the version sequence.

More on the update here:

Nexus One Gets Android 2.2.2 Update, Still no Gingerbread

Now if only Samsung would get off their asses and stop screwing their customers.

I am dropping my Galaxy S Captiva as soon as I can!