Michal Čihař - Blog Archives for Gammu

Gammu gets m-obex support

I've found some time to implement m-obex protocol based on documentation provided by samsyncro project. However I don't have any phone to test it, so any testers are welcome :-).

The testing should be quite easy - just get current Git version of Gammu (either using git or use snapshots) and try to use commands which manipulate with contacts and calendar:

gammu getallmemory ME
gammu getallcalendar
gammu getmemory ME 1
gammu getcalendar 1
gammu addnew test.vcf
gammu addnew test.vcs

In case you have not yet used Gammu with your phone, the configuration for USB cable should look like:

[gammu]
device = /dev/ttyACM0
connection = at

And for Bluetooth:

[gammu]
device = address of the phone
connection = blueobex
model = mobex

Of course there is no guarantee that any of the commands will work, because all I could verify is that code compiles and looks correct. It might as well do something bad to your phone, so backup is recommended.

Another step in Gammu documentation

I've just finished another step for new Gammu manual - it includes also documentation for gammu utility. It includes all content from the man page, reformatted and improved in some sections. So now the documentation does cover all important parts and can contain correct cross references.

The only problematic thing was to handle non dash starting commands in Sphinx. Unfortunately it does not seem to like this idea, so I had to invent some ugly hacks, which workaround that (just changing the regexps which sphinx.domains.std uses).

The man page will be from now on generated from this source as well.

Making Gammu use GLib

I had this topic in mind for quite a long time, but it got more recently more attention because of discussions on gammu-users mailing list. Gammu should use some library for do basic stuff like strings or date manipulations, logging and so on.

The reason is that having own implementation of all that is not really useful and just source of another amount of bugs. Currently mi intention is to use GLib, simply because I don't know any C alternative (though there are probably lot of C++ cross platform libraries).

Of course the biggest question is how to make the change, because it will be obviously intrusive and making such big changes will probably lead to several months of work without really making another release. Even if it will be done on separate branch (what would be most likely the case), developers will spend most of time on this issue and not much time will be spent on bug fixes (and backporting them).

Documentation translation

Some weeks ago, I've started to change documentation structure of Gammu to move from separate documents here and there into one comprehensive documentation which would cover it all. As a tool to do this I've chosen Sphinx, simply because I felt most convenient with the format and outputs it provides.

So far the SMSD documentation has been converted from various places and formats, but it also opened up a question - how to deal with translations? So far we used po4a to translate man pages, however using it for generated man pages is slightly complicated (there are some macros which po4a does not understand and it seems to break encoding on the way).

Translating whole new documentation is something what is unlikely to be finished, especially considering fact, that the only real existing translation so far is Czech which was done by me.

For now I decided to keep old translated man pages and postpone the decision, but considering current situation, I will most likely just drop the translations for man pages unless I find some good solution how to translate Sphinx documents (po4a should be able to do that, but it will probably need some tuning).

Learning graphviz

While working on new Gammu documentation I came to need to include some graphs showing some workflows. Looking into Sphinx documentation (which is used for the documentation for Gammu), I've discovered nice integration with graphviz.

Fortunately it was pretty easy to learn the basics, though I've never used it before and here it comes - message processing workflows for SMSD.

Gammu is getting new documentation for developers

During last weeks I finally got upset with state of developer documentation for Gammu and python-gammu. Not that it would be non existing, but it was spread over various places in various formats and partially outdated.

I decided to write all documentation in Shpinx as I know this tool and it seems to fit quite well in mixed C/Python environment.

The first step was to migrate existing docs into same format (reStructuredText) and create documentation structure. I believe this is now completed and you can check results here.

Yes there are still lot of rough edges and lot of work to do, but I anyway think that current state is better then mess we used to have before.

Gammu is being used in vendor software

I always thought Gammu to be workaround for phones whose vendors do not provide software for your favorite operating system. We try to do our best job to work with variety of phones, even though this is hard and never finished job.

However today I was really surprised to find out that some phone vendor built their official application for managing phone on Gammu. The application is of course closed source and available only for Windows, but this does not change anything on the fact they use it. They seem to have modified code slightly, adding some new functions and removing others, separated the code to several DLLs, however I'm 100% sure it is Gammu as they use some unique (read awful) things we have in our code.

I'm not going to disclose their name right now as I want to give them fair amount of time for reaction on my asking for sources. But you will for sure find more information later in my blog.

PS: Gammu is of course not the only free software used inside this application, you can find more there (and you will find there more than I did if you will look longer than few minutes I spent on examining rest of code).

Fun with processing patches from users

Once you release something what gets at least a little bit popular, you can expect to receive fixes in various strange forms. Since I started to use Git for Gammu development merging all these crazy things is much more easier.

The problem with these changes in past was that they are generally based on some random old versions (for example random daily snapshot). Now I just find the right place in history where to start (ChangeLog usually gives good hint where to search in the history), create branch and start to apply changes I received.

I worst case (like it happened today) the "changes" is whole tarball with different changes made to different files. Fortunately I recently found great git add -i, which allows me to pick whatever changes I want from the patch. When all this is done, all I need is to merge changes back to master and Git is usually clever enough to handle it.

PS: And yes, I'd really love if people would be able to send me series of patches, but it does not seem to happen in near future.

New Wammu and Gammu website

I just put online new Wammu and Gammu website at http://wammu.eu/. The reason for this change is that I want all relevant information about Gammu and related programs to be available in one place. You can find there information about Gammu, SMSD and python-gammu as well including some information and documentation which used to be spread in wiki and various other documents.

Also all Gammu and Wammu related announcements will be published only on that website and will no longer pollute my blog (and all planets where my blog is being syndicated). If you followed RSS feed, you should update your reader to http://wammu.eu/news/rss/.

The new website also includes updated Gammu Phone Database, which will look almost same to users, but has been completely rewritten underneath, what will allow some extensions in future and allows easier management of entries for me.

What currently lacks behind old website is Czech translation. The reason is in simple fact that new website contains much more texts and I did not yet have time to translate it. If you want to help, just go to l10n.cihar.com, or just follow translators instructions. This time it will be also possible to add other translations, so if you want to translate website to other language, you are welcome!

Gammu stable version 1.26.1

Gammu 1.26.1 is out! This release just fixes few bugs in AT driver.

Full list of changes:

  • CPIN reply is handled like regular one except in A2D case (bug #994).
  • Fix finding first empty position when memory is empty (bug #996).
  • Fixed parsing of SMS status reports.
  • Fixed parsing of text messages with new lines (bug #995).

You can download from usual place: http://cihar.com/gammu/.

Debian users will find packages in unstable soon, SUSE, Fedora and Mandriva users can check repository in OpenSuse Build Service and Ubuntu in my PPA.