Using Gammu with an old phone

1 min read

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!

Was this post helpful or insightful? Buy me a coffee here or here and share this post with others!

Popular posts:

  • The difference between boundaries and rules
  • Review: MAFA - MPD client for Android
  • Organizing and Tiling Your Windows on #Openbox Using Only... Openbox
  • If there's one Nazi (or a racist) at the table...
  • Weekend Project: Whole House and Streaming Audio for Free with MPD
  • Two Ways to get CMYK Separation Using GIMP Instead of Photoshop in 2022

Recent Posts