Tech Notes

Geocache Notifications via SMS

How to receive notifications of published caches, via SMS..

1. Create a mail account on a linux system. I use Dreamhost as a hosting service, and have an email account set up to receive notification emails (e.g notify@winterdragon.org).

2. Create notifications for publication of each type of cache on geocaching.com, with destination set to the email account from step 1.

3. Redirect mail to a filter script. Dreamhost use postfix as the mail handler, so create a file ".forward.postfix" in the user directory, which points to the script file:

"| /home/notify/bin/notify2sms"

4. Create the first script (notify2sms) to preprocess the email:

sed '1,/^$/ d' | base64 -d | sed -f /home/notify/bin/strip.sed | /usr/sbin/sendmail -oi <phoneno>@email.smsglobal.com

(sed '1,/^$/ d') - strips out all of the mail headers (i.e. everything above the first blank line)

base64 -d - converts the mail content from base64 to text

sed -f /home/notify/bin/strip.sed - strips the message to it's essentials (see 5)

/usr/sbin/sendmail -oi <phoneno>@email.smsglobal.com - emails the result to an email to sms gateway, in this case a commercial account at smsglobal.

5. Create second script, strip.sed:

/Location:/d
/ published /d
/Log Date:/,/^$/d
/^Visit/ /{ ; N; N; N; N ; d/}
/^Profil/,$ d
/^$/d

This strips the notofication text to it's basics to try and fit within the SMS character limits. It retains the GC code, name, cache type, distance and direction, and a link to the website.

USB 3G Modem in Linux

How to get a Virgin broadband USB modem (e.g. Huawei E620) working under Ubuntu (tested on 9.10)

(Based on advice from http://ubuntuforums.org/archive/index.php/t-1014221.html)

1. Edit /etc/ppp/options.  Find the line #-chap, and uncomment (remove the '#'). Save the file.

2. Connect the modem, and let the autoconfiguration run its course.

3. Edit the network settings (System->Preferences->Network Connections. Select Mobile Broadband tab, then Virgin Mobile, then Edit).

4. Change the APN from VirginInternet to VirginBroadband, then save the settings.

You should now be good to go.


Previous page: Misc Links
Next page: Downloads