Michal Čihař - Blog Archives for Gammu

Gammu can read and write contacts from Symbian

First day of Hackweek 6 is almost over and my progress is quite good so far. The first step wat to make Gammu connect to the Series60 applet and retrieve basic information:

$ ./gammu/gammu identify
Device               : 5C:57:C8:xx:xx:xx
Manufacturer         : Nokia
Model                : E52 (RM-469)
Firmware             : 3.0
IMEI                 : 359000000000000

That was pretty easy. If you want to try it, you need to install Series60 applet into phone (manually for now, but autoinstallation is planned for future) and configure gammu to talk to it:

[gammu]
connection = blues60
device = 5C:57:C8:xx:xx:xx

Second thing I choose to implement was manipulation with contacts. There are some oddities in the applet (like it simply crashes when giving it wrong contact ID to retrieve), which I will try to fix in future, but for now I stick with existing applet and code functionality only in Gammu. And it works:

$ ./gammu/gammu getmemory ME 215
Memory ME, Location 215
Last name            : "Gammu"
First name           : "Test"
Mobile number        : "123456"
General number       : [home]"654321"
Email address 1      : "gammu-users@lists.sourceforge.net"

0 entries empty, 1 entries filled

Tomorrow I should be able to implement calendar, let's see how will it go.

PS: All code is is available in our Git repository

Hackweek and Symbian support in Gammu

Last year I did not have much time to spend on non work related projects in Hackweek, because we took the opportunity and replaced some internal systems, when people were not using them. It will be different this year and I've decided to spend some time on Gammu.

The plan is to implement support for Symbian phones. It is one of frequently requested features and thanks to Series60-remote I can as well see way how to implement it. Current plan is to add support for their applet, with possible extending it in future and adding some features which it lacks.

You can comment this feature in openFATE or Gammu bug tracker.

PS: Introduction video can be found on blip.tv.

Gammu documentation

I've made cleanup in Gammu documentation and the only place where to look for it is now The Gammu Manual. Reason for this is simple - single documentation format allows easy cross-referencing and is easier to maintain than mixed sources we used to have before. Thanks to using Sphinx it is possible to generate various outputs, you can see the HTML version on the website, you can download PDF variants and the same source is being used for generating man pages.

PS: You can find more details on generating other formats in the documentation.

GPL violation - what next?

After previous series of posts about Gammu usage in proprietary software, finding culprit and getting the sources I got number of questions and suggestions. So what are the suggestions?

Lesson I've learned is that even though the website seems to be dead, the project itself does not have to be. This is what I thought about http://gpl-violations.org/ and I was proven wrong and these guys are now looking at my case.

Another option is Software Freedom Law Center - http://www.softwarefreedom.org/. I've contacted them from the very beginning (about year ago) and got some useful hints, though now my contact seems to be gone (or simply too busy).

FSF also provides information how to proceed in case of license violation.

Maybe these hints will be also useful for somebody else and I hope they will help me as well.

GPL violation - Getting the sources

Having found Gammu usage in proprietary software and finding somebody who is actually having the source code, the only remaining (and the hardest) step was to make them publish it.

I started with explaining what actually GPL means, giving them links to useful documentation what they should do, but I'm probably not good enough in explaining the things.

All I was given is source of some parts of Gammu code they have used (it is available in our git repository since then). Any attempts on explaining them that they should publish full source code of the thing to comply with GPL have simply failed.

The problem with the sources they have given is that it is hardly to reuse in Gammu - it is hard to find on which version they based and more importantly, it really does not include much code which would be useful in Gammu these days.

GPL violation - finding the culprit

After finding that Sonim's software uses GPL licensed Gammu, the obvious step was to ask them for sources of the software. They quickly transferred their responsibility to company which made software for them - A&W (Anwsoft).

It took some iterations to explain them that I'm pretty sure that their software is based on Gammu and finally they gave up pointing to some external contributor for being guilty of this:

Due to the product was developed years ago, and the source code was bought from a SOHO programmer on the first beginning, so we didn’t notice it included some open source code inside.

The good thing in the same thing was that they were willing to cooperate:

We are willing to cooperate with you to follow GPL License and provide corresponding sources.

As it turned out in upcoming communication, they didn't have (and still don't have) idea what GPL license contains and what they should publish. But that's story for the next post.

Gammu supports Samsung phone through m-obex

The main part of the code was in Gammu for almost two months, but now it was finally debugged and confirmed working. For now you need to use version from git, but upcoming 1.28.95 will include it as well.

The support is implemented through m-obex protocol, which can be switched on from standard AT commands, giving transparent support for all supporting phones without need to change existing configuration. The code was heavily based on documentation and code created by samsyncro project, thought their documentation missed some important bits.

I'd really like to thank to Matthieu Patou for debugging problems of code I blindly wrote, because there were lot of issues (well it's hard to write code if you have no chance to test it).

Finding a GPL violation

As the communication in this case seems to be stuck and the issue is almost one year old, it's time to make bits of it public. The first post will just describe how I've discovered it, later will bring more details.

All started innocently with bug report on Gammu that it fails to work with some Sonim phones. We started to dig some information about what extensions does Sonim use and one of obvious ways was to try their software. I picked up software for Sonim XP3.20 Quest and started to look at it (if you are not going to install them, but want to look, you need unrar and unshield to unpack it). Actually all their software with exception of the one for XP2.10 Spirit is based on same code, so it does not matter that much which one you choose.

At first look the names of DLLs looked familiar to me and running strings on the DLLs just confirmed my suspicion - the phone which is not supported by Gammu bases it's official software on it. I was able to recognize at least seven DLLs derived from (GPL licensed) Gammu (they even use same names as Gammu modules had in that time):

  • At.dll
  • ATgen.dll
  • Common.dll
  • FBus.dll
  • IRDA.dll
  • ObexGen.dll
  • Serial.dll

To make the thing more interesting they use several other components released under free software licenses, where they also should provide sources for them:

  • ID3LIB.DLL - id3lib (LGPL)
  • WbXmlParser.dll- libwbxml (LGPL)
  • lame_enc.dll - lame (LGPL)

There might be more, but I did not want to spend more time on deep analysis, because I already had enough information.

Impressed by xz compression

I knew that xz (or lzma) provides better compression ratio than bz2 or others, but I never thought the difference might be so huge. Simply I was impressed after I've enabled xz compressed snapshots for Gammu - the bz2 compressed tarball has 5.4M while xz compressed on only 1.6M. Wow.

New year

It's new year (for almost 18 hours here) and it's time to balance a bit what has happened in year 2010.

I'm not going to expose details from my personal life and anything related to work, so all what remains are open source projects where I am active.

For phpMyAdmin it was year of quite big changes, most of them beeing agreed on Fosdem 2010. We have migrated to git from svn, what was great step forward and I really like the change. It was also decided to use gettext (or rather php-gettext) for translations in upcoming release. I can see this move (together with online translation service) has definitely attracted more contributors (hey, but there are still many languages not translated, you're welcome!). Also we've participated in Google Summer of Code 2010, what lead to several big projects being merged into our code base (see my summary for more details). All in all, we're heading to 3.4 release in first months of 2011, which will be quite major step and hopefully heading in right direction.

In Gammu and Wammu, there were lot of code improvements, most of them probably going into Gammu SMS Daemon (the latest one being unified SQL backend removing lot of code duplication). Another major improvement is The Gammu Manual covering everything from Gammu command line, through SMSD up to python and C API. On the other side I've bought me a Symbian based phone, which does not work with Gammu and I use Series60-Remote for that, so my interest in Gammu has declined a bit.

Even though I've started adopting some packages in Debian, so it looked like I will end up with much more than last year, but at the end I've decided I'm too overloaded with some of them (and don't use them anymore), so I've given some for adoption and got rid of nanoblogger (and nanoblogger-extra) and looking for somebody to pick up gpointing-device-settings. Maybe all mpd related packages will follow soon, because I currently do not use mpd, so it limits quite a bit my ability to test them.

And of course: Happy New Year 2011!