Home
Dave

Blog
Archives
By Subject

Recent:

Nixie Tubes
Memory
Scavengers
Nightshade
Cobras
Magical Feedback of Oz
Harp Case
Reading List 2023
Moonrise
Local Wildlife
Centipede
Recent Photos
Mouse Teeth
Reading List 2022
Connection Machine Photo
Engraved Photos
Pad One
Whisker
Black Rice
Gabe Serbian

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.