Home
Dave

Blog
Archives
By Subject

Recent:

De Futura Shirt
Usher 1928
Rambutan
Rotating Ethernet
Arcs
Raamat
Centrifuge Rotor
Resistors
Photomultiplier
Providence 1990
Maszyna Trurla
Standard Unit
Chitty Chatty
Hydrogen Thyratron
Tango
Jim Crow
GL-869B
SMS
Conqueror Worm
Cherry Wainer

SMS

I really love playing with text messaging from my computer. It's such a simple interface: phone number & one line of text. Writing code that sends or responds to sms is like 80s programming. The web has gotten so complex that I really don't want to deal with it anymore (in terms of programming). sms though... sms is still fun.

This is my "phone":

It's a 3g modem board in a Cisco router. The router is configured so that telnetting to a specific tcp port gives you access to the modem's AT command level prompt. My sms-daemon program runs on a server running OpenBSD.

This is the script for my twitter bot:



#!/bin/sh

cd /home/dave/sys/lib/bowie
f=lyrics.txt
n=`next`

send-sms twitter `sed -n ${n}p $f`

Trivial, yet functional. It's called from crontab every night at midnight, and posts one line of text from a Bowie song to twitter. Lovely. I have a year and a half worth of lyrics queued up.

For incoming sms, my sms-deamon lanches the "process-sms" script for every message received. This allows for all sorts of fun things, home automation, etc.