ModemManager-powered location indicator for gnome-shell
TL;DR: Show location information retrieved directly from ModemManager in a gnome-shell indicator.
I’ve been wanting to try to write a gnome-shell extension from some time, and I ended up finding enough free time during the past weeks. So I ended up writing a gnome-shell extension which would show information about your current location as provided by your modem. Note that this information is not coming from GeoClue; the new ModemManager1 interface is not integrated yet there.
ModemManager exposes these types of information in the Location interface:
- 3GPP location, which is given as a set of 4 parameters, and specifies which is the current network cell which is giving mobile coverage to the modem:
- MCC/MNC: Identifies the ‘mobile country code’ and the ‘mobile network code’; i.e. country and operator.
- LAC and Cell ID: Identifies the ‘location area code’ and ‘cell id’ pair.
Once all these items are known, a query to an open database of cell IDs can give us the exact location of the tower giving us coverage, and therefore a good approximation of where we are located.
- GPS location, given if the modem has a built-in GPS. Currently Option/HSO modems are supported, as well as QMI-powered modems with the ‘PDS’ service implemented.
- CDMA Base Station location, given as Latitude/Longitude coordinates, and available in QMI-powered modems prepared for CDMA networks. As with the 3GPP one, this location information specifies where the station giving coverage to your modem is located, which is a good approximation of where you are located.
Beware! You’ll need ModemManager >= 0.7 (i.e. git master) in order for this extension to work.
You can download and install the extension in the following link:
The sources are kept in a git repository in gitorious.org:
If you find the extension itself mostly useless, you may still want to take a look at the source code to see yet another example of how to talk to DBus interfaces from within gnome-shell, including the use of the new standard ObjectManager interface with a Gio.DBusObjectManagerClient.
Posted on January 3, 2013, in Development, FreeDesktop Planet, GNOME Planet, GNU Planet, Planets and tagged 3gpp, cdma, extension, gnome, gnome-shell, gps, location, ModemManager, QMI. Bookmark the permalink. 2 Comments.