It took me two years to come to this revelation, which is sadly two years too late for me, but I hope this helps out some others.
When I first started using Ubuntu in Kenya, I was more than pleased to notice that the Safaricom modem, a Huawei E160 by model name, is seamlessly supported by the stock Ubuntu kernel from as early as version 8.04 I believe. Of course, though the modem is seamlessly supported, not all of the features found in the Huawei dialing app bundled with the modem, are supported. This includes such functionality as the ability to send an SMS through the modem, particularly useful for activating new data bundles and checking your existing bundle’s remaining balance.
To rectify this situation, I first started to hack my own program to send an SMS, as searches were returning very few positive results. Wanting to push something out quick, I found myself settling on Python (of course), and scouting out various libraries for interacting with AT commands over a serial interface. This project didn’t go over well and I always seemed to find myself with more pressing concerns, [insert other hacker excuses here]. For the past two years I have stuck with the good ole’ switcheroo method of taking my modem SIM out of the modem, putting it in a phone, performing any necessary SMS-based functions, and then replacing the SIM in the modem. Clunky but functional.
It turns out that over the past two years I have been searching for the wrong terms and the application I have wanted has been here all along. It is known in the Ubuntu graphical universe as Phone Manager and in the command line world as gnome-phone-manager.
What threw me off the scent was that the app is heavily advertised as focusing on working with phones via Bluetooth, whereas my modem uses a USB connection. Upon reading the fine print, I noticed that some descriptions also include, “and other serial connections.” Well, hmm, that changes the situation a bit. While the app installed, I crossed my fingers hoping it included a halfway-decent serial port selection mechanism.
It does. It’s so decent that it even lets specify the device node directly! Huzzah! For Huawei modems, once the USB Modeswitch finishes its song and dance, the modem portion of the device will settle on /dev/ttyUSB0. Under the Phone Manager app preferences, just throw that into the “Other port” input box and you are good to go.
Now with just a click of the icon I can be sending balance check SMS and even activation SMS through Ubuntu and my Safaricom modem. To activate new bundles, just sambaza your modem credit from another phone, or MPESA, and you are good to go. Ubuntu (and other Linux) are first-class modem users after all. Take that Windows.
One response to “Ubuntu Revelations: Better Safaricom Integration, One App Away”
Dude …. That rocks! Thanks for working on this. Are you putting it on sourceforge or just going to email it to me 🙂
The Camara guys would probably love you for this too.