Michal Čihař - Archive for Jan. 1, 2007

python-gammu has asynchronous wrapper

Yesterday I hacked asynchronous wrapper for python-gammu. It is start of progress to make Wammu behave better while talking to phone. My plan is that all operations will go through this asynchronous wrapper and will be completely non blocking to Wammu. This means no progress bar will pop up to front, but entries will appear in window as they are being read. Progress will be of course still shown, but only in status bar.

The current code is only first step, next thing which has to be implemented in python-gammu are virtual commands. Those will be used for things like getting all calendar events from phone, so all you will have to do for getting all is enqueue GetAllCalendar event and worker will do all for you including progress reporting.

If you want to write own application using this new wrapper, you can look at example which is in sources. It shows all current possibilities, but it will be enhanced in future.

Website improvements, videos from Gammu talk

I just spent some time on improving my website. Well I'm not graphic designer, so the site won't ever be according to latest trends and won't look sexy.

Anyway I tried to improve visibility of some things a bit. The main page now includes small screenshots of some programs I want to point out, small screenshots on application page are clickable and there is more visible download link on some pages as users complained they have problems finding this. While working with stylesheets, I also added maximal width of main content. This probably does not work with all browsers, but I don't care, the text is still visible.

Other thing I updated is information about last year talk about Gammu, which now contains links to videos. I haven't seen them yet, but they might contain interesting information for Czech speaking people :-).

Versioning scheme troubles

Current Gammu versioning scheme confuses people a lot. For some time 1.x.0 versions are stable and 1.x.y are testing. However when somebody sees 1.10.5, he things this is updated version of Gammu 1.10.0. So it's probably time to move to something more obvious starting from next development cycle.

To stay as much compatible as possible with current scheme, I thing about minor change - so start testing releases on something like 1.11.90. I thing this is also quite often used (I've seen such versions in PyGTK in past) and nobody will confuse it with patch releases. Or should I switch to something completely different? I currently do not consider 1.11.0-rc1 as I'd like to keep version only numeric.

Gammu test version 1.10.6

I just released new version of Gammu, you can download it from download server. The biggest change is improved gnappled and it's support in Gammu. It also had to became incompatible with previous versions, so you have to upgrade it in your phone. Full list of changes:

  • Backup file uses ; instead of # (bug #85, patch by Marcin).
  • Updated shell script gammu-config to generate configuration.
  • Install gammu-config script to ease generating configuration.
  • Correctly encode text in iCalendar (bug #262).
  • Correctly encode recurrance in iCalendar (bug #262).
  • Read last modified field from vCalendar.
  • Support for last modified field from vCard.
  • Use unsigned char to avoid trimming at 60 chars (bug #274).
  • Properly handle vCard style continuation (bug #268).
  • Detect Motorola specific error while reading SMSes (bug #288).
  • Fix OBEX listing to behave according to specs (bug #290).
  • Fix crash on invalid SMS reply from phone (bug #293).
  • Improved gnapplet and support for it (Matthias Lechner).

I currently do not plan further testing release before next stable one, but in case some serious problem is found, this can change. This time really :-).

My phone finally can make silent photos

This was feature which I always hate - phone made strange sound when taking photo. Fortunately I'm not alone who hates this and there are several howtos on net which should guide you to do this.

The only way which worked for me at the end was replacing sounds in phone filesystem, so that it plays silent sounds. For Sony-Ericsson K750i with CID 49 BROWN you need specially hacked FAR from SE-tuning.cz and just replace files in filesystem (/tpa/preset/system/sound). Now phone magically makes no sounds when taking photos :-).

Too much to translate

When introducing gettext to Gammu, I hoped that next release will be completely translated to Czech. Unfortunately there is too much to translate and too few free time. After hard work on translating, I got to 27%. That's not much.

Anyway it helped a lot in proofreading some texts and I hope I cleaned up a bit language used in Gammu. Also I introduced several calls to ngettext, what means that plurals in different languages should be now better. But this will only help, if somebody will be interested in translating Gammu. If you have free time, go ahead and improve translation to your language!

What happened on last day of April?

I just looked on server statistics and I was shocked by amount of spam and viruses rejected during last three days. Is there some new virus for Windows which tries random email addresses on all servers it can reach? I didn't analyse those messages, as they are rejected at RCPT time, because sender tries random addresses which do not work on my server. For now I try to reduce them by blacklisting in iptables, but this doesn't seem to help much as IP addresses change too often.

I think that graph shows best what big change has happened:

Mail graphs

Update: It seems to be new Sober variant causing this mess.

Gammu test version 1.10.5

I just released new version of Gammu, you can download it from download server. The biggest reason for this release is compatibility with 2.6.21 kernel. Other changes are:

  • Doxygen documentation improvements.
  • Fix USB serial devices with Linux kernel 2.6.21, we don't use ASYNC IO, so we should not set it.
  • Tell user that he should enter text for SMS.
  • Cleaned up transatable strings.
  • Improve networks listing.
  • Allow networks to be listed by country code.
  • Add flag to SMS folders whether it is outbox.

I currently do not plan further testing release before next stable one, but in case some serious problem is found, this can change.

Kernel 2.6.21 hits Gammu

Since Linux kernel 2.6.21 entered higher release candidates, more people started to report that Gammu has problem on that with connecting over USB cable. First I thought it is some misconfiguration of kernel, but when several same reports appeared, I decided to take a look at it.

As great side effect of this, I found out that I can use snapshots of Debian kernel, where current version (2.6.21-rc7) is available as Debian package. This saved me lot of time, thanks guys!

After installing and booting new kernel, I quickly found out that the problem is not SIGSEGV as many people reported, but SIGIO. After quick look at code, it was obvious that setting file to asynchronous I/O causes this.

Well this is how asynchronous I/O is supposed to work and kernel people implemented it now for (some?) serial drivers. I have no idea why there was attempt to use it in Gammu. The code is not at all ready for this and makes no use of asynchronous I/O. So the fix was quite easy - just to remove this flag from file.

Fix now sits in SVN, impatient users who run kernel 2.6.21 can get SVN snapshot :-). Testing release will follow during next week.