Using Gammu with an old phone

There are plenty of tools for using your mobile with linux – but sometimes older phones have limited support. Mine is one of them. I can send and get text messages, but I don’t get automatic notifications of when a text message shows up… and that was the big thing that I wanted. And when it pulls SMS messages from the phone, it pulls them all in one big text file.

This is not good.

Luckily, this is linux, so I was able to bash (ha!) something together on the command line. It’s a combination of bash scripts and a C program that work together. I’m sure there’s a better, more elegant way to do all this… but this works, and you’re welcome to it.

The bash script to show new messages I’m especially happy with – not only does it display the unread messages, but you can reply to them right in your terminal window. Yay!

Please note that lines 116, 120, and 122 of the C code need edited for your appropriate pathnames before compiling. It should be ANSI C compatible with no unusual dependencies. The bash scripts need editing for pathnames as well.

You will also need to run hcitool inq to get the bluetooth address of your phone.

I’ve got the code up at pastebin – here’s the C program, the daemon is here (bash), and the script to show messages is here.

If you improve on them, do let me know!

Popular posts:

  • Moving Beyond Toxic Empathy
  • Genre fiction is more important than literary fiction in our society.
  • Odds and Ends: Optimizing SSHFS, moving files into subdirectories, and getting placeholder images
  • Guns and Holy Week
  • Social Engineering - It can happen to you!
  • 21 Flavors - A Guest 100 Word Story
  • Playing Doctor - A 100 Word Story