Michal Čihař - Blog Archives for Gammu

Gammu test version 1.22.93

It took again one week and here comes new Gammu testing version. Again number of changes is quite impressive, to name the most important - new DBI backend for SMSD, which allows to easily support wide range of databases, SMSD now exports some information in shared memory segment, what allows monitoring of its state, python-gammu bindings now support some basic SMSD operations, libusb-1.0 based driver for Nokia cables (especially DKU-2) and last but not least, Gammu finally has fake phone driver, which can be used for testing and writing applications and performs all operations in selected directory on filesystem.

Full list of changes:

  • Fixed privileges dropping in SMSD.
  • SMSD inject now properly uses PhoneID.
  • Improve SMSD documentation.
  • Translations improvements.
  • Add ID for Nokia 7373.
  • Do not try to use filesystem OBEX if IrMC access was forced.
  • Fix possible crash in LMB decoder.
  • Avoid string length overflow in Nokia phonebook encoder.
  • Introduced backward compatibility of gammu.StateMachine.SetConfig.
  • Experimental dku-2 userspace driver using libusb-1.0 (fbususb).
  • python-gammu can now inject messages into SMSD (gammu.SMSD object).
  • SMSD stores summary counts of sent/received messages in database.
  • Added gammu-smsd-monitor program to monitor state of SMSD.
  • python-gammu can now monitor SMSD state.
  • Do not try to use OBEX 1.0 it's too old (bug #807).
  • Better parse ATI replies from Samsung (bug #806).
  • Better parse CSQ replies from Samsung (bug #806).
  • Add small delays to SMS sending/saving (bug #794).
  • SMSD monitor can now run for configured number of loops.
  • Added DBI backend for SMSD, so we now support wide range of databases.
  • SMSD does not delete SMS from phone when it's saving has failed.
  • Added SQL structure for sqlite, which can be used through DBI.
  • python-gammu can run and stop SMSD.
  • Initial implementation of dummy phone driver for testing.
  • Allow to configure path to config from command line.
  • SMSD monitor allows output in CSV.

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

Debian users will find packages in experimental soon.

Gammu news

Okay, I'm again not ready for release on Friday, so I will probably switch to Monday releases ;-). But I think it's good to announce some news which you can expect in next Gammu version.

Besides usual bunch of bug fixes (many of them were revealed by testing with Valgrind) the new testing version will have few interesting features.

For Nokia users on Linux is great news, that Gammu can now use directly FBUS USB interface (through libusb-1.0. This is especially good news for DKU-2 cable owners, as before they did not have possibility to use Gammu without compiling separate (and broken) module. This connection type is called fbususb and is heavily inspired by implementation in Gnokii, but uses newer libusb API and behaves more nicely when CDC ACM driver has already hooked some interfaces. I would specially like to thank to Peter Stuge for testing this feature (I'm still without a Nokia cable).

The second big news is monitoring of SMSD state. SMSD now exports shared memory segment, where some information about it's runtime can be found. Little program called gammu-smsd-monitor can display you these information.

The third update is for python-gammu users, which now gain ability to interact with SMSD through new gammu.SMSD object. For now it can inject SMSD messages and get SMSD status (see previous paragraph), but more features can come in future. I want to use this for creating some GUI for SMSD, which will allow to send messages and monitor it's state. But this is still future and if you want to write something like this, you're welcome!

New downloads mirror

The downloads amount for Gammu and Wammu is still increasing and when Ben Waymark offered me possibility to make an mirror, I happily accepted it. So from now, you can choose alternate download location for all downloads on my site!

The mirror is placed in UK, so if you have for whatever reason problems with connectivity to Czech Republic (where the primary site lives), it can be also good benefit for you to use alternate download location.

Call for Gammu/Wammu translators

New releases for both Gammu and Wammu are getting closer and I'd like to invite anybody to translating these programs to his language. Both projects use gettext, so if you are familiar with it, you can download po files from SVN and translate in your favorite editor. If you prefer an easy way, you can use web based interface (Pootle):

For Wammu: https://l10n.cihar.com/projects/wammu/

For Gammu: https://l10n.cihar.com/projects/gammu/

You don't have to translate everything at once, but every translated term counts!

If you hesitate where to start, fist look at Wammu, it is usually the application, which user tries first and having it translated is nice.

Starting from this release, Gammu man pages can be also translated and these can be also considered a priority translate material to ease learning curve for unfamiliar users, their texts are located in separate po file - docs.po.

To translate, just go to translation server, where you can translate online (registration is required) or checkout po files from SVN (svn://svn.cihar.com/wammu/trunk or svn://svn.cihar.com/gammu/trunk) and send me diff of po file.

Gammu test version 1.22.92

It took more than a week this time, because I was ill, but new testing Gammu version is here. This time there are finally no really major changes, only fixes of regressions (PostgreSQL SMSD brokeness) and bugs found by testing and reported by users.

Full list of changes:

  • Fixed getting of network name from saved message.
  • Fixed encoding of text to some encodings in AT engine.
  • Detect more Siemens CME error codes.
  • Windows binary is again with MySQL support.
  • Initial native support for Motorola phonebook (bug #748).
  • Use getpass if available for PIN code prompt.
  • Fixed parsing of phone number from incoming calls.
  • Added ID for Nokia 1112.
  • Dropped obsolete packaging/debian and point users to proper packages.
  • Fix crash when operator logo is empty.
  • Fix memory leak in SMS backup.
  • Fixed processing of SMSD outbox with PostgreSQL (bug #803).
  • Automatic detection of lib64 directory for installation.
  • Allow separate installation of some components on Windows.

You can download sources and Windows binaries (now for first time you can select which parts you want to install) from usual place: http://cihar.com/gammu/,

Debian users will find packages in experimental soon and RPM users can use my repository at OpenSUSE Build Service.

PS: I'd like to thank to "j t" who kindly donated me Nokia 6822 for testing.

Gammu test version 1.22.91

After another week, new Gammu testing version is out. The biggest change is integration of python-gammu into Gammu. This makes easier to test everything together and new tests revealed lot of bugs and memory leaks which were immediately fixed. Besides these changes, Windows Service support has been fixed and added possibility to run more SMSD instances.

  • Fixed setting remote number for SMS in some cases.
  • Fixed compilation under cygwin.
  • Externalize eventlog support to ease Cygwin compilation.
  • Integrate python-gammu into Gammu, they are anyway bound quite tightly together.
  • Python C module is now gammu._gammu and not gammu.Core.
  • Introduce testing for python module.
  • Fixed decoding of formatted EMS messages.
  • Fixed reading of RTTL ringtones.
  • Fixed crash with too many animation frames.
  • Fixed possible crash in LMB writer.
  • Fixed several memory leaks.
  • Better support for Samsung phones (bug #790).
  • Fixed Windows Service Startup (bug #451).
  • New possibility to run more instances of Windows Service (bug #451).

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

Debian users will find packages in experimental soon.

Cygwin in Wine?

As some people complained that Gammu does not build under Cygwin, I decided to setup a test environment. And of course I'm not going to use real Windows, that would not allow me to use it effectively, so let's do it in Wine. I currently have 1.1.12, which is in Debian packages (in experimental), so I blindly downloaded Cygwins installer, started it and (even if Wine complained quite loudly about not supported things) it installed without a single problem!

So let's try to compile Gammu in it. First attempt fails, because Cygwin symlinks do not work in Wine. But there is an easy workaround - just copy as.exe and ld.exe instead of symlinks and now even the compiler works. Rest is surprisingly without any problems, so I can nicely get test results to Gammu dashboard.

Kudos to all people who make this work.

Say good bye to python-gammu

python-gammu has been here for more than five years and now it is gone! Well not really, I only integrated it into regular Gammu sources, what is anyway logical place where it belongs. Especially when looking on last releases, which were anyway bound together.

The fact that several past releases have to happen together for both python-gammu and Gammu is not the only reason for merge. The other two major reasons are cross-compilation and testing. Besides this, with merged source, it will be easier for some distributions to deploy newer Gammu to released products.

For testing I definitely could use some python based test framework, but I'd like to have all test results in a single place and I didn't find something what would easily integrate some python test framework with some dashboard and also would be capable of doing C testing. Also current CTest/CDash combo used in Gammu really fits my needs for good overview what is going on in daily tests, so I preferred to stay with current system.

Cross-compilation support is really missing in distutils and I was using set of hacks to make it properly produce binaries for Windows on Linux. With current CMake based setup, all this is just matter of providing Python instance to use.

On the downside, I can not really drop distutils usage, as they will still be needed for creating binary installer for Windows, unless I'll find some clever way how to do this in CMake (which I really doubt).

Gammu test version 1.22.90

After lot of development, I finally decided to release new testing release of Gammu.

The biggest changes are in SMS daemon, which got lot of improvements and is now in separate binary gammu-smsd. It can log better (support for syslog and Windows Event Log has been added), it can work as a proper daemon or Windows Service, it can be debugged easier (Gammu logs go to same log as other messages, SQL queries can be logged), can reload configuration on the fly.

In libGammu, debugging has also improved (you can now use callback to process messages), some memory leaks were fixed and some minor bugs has been fixed.

Command line interface now supports text for text messages to be entered through parameter and not only using standard input, it has a new command chekfirmware which obsoletes UsePhoneDB configuration option and other bug fixes has happened, for example messages sending is now again working on Windows.

And last but not least, SMS daemon, all related things and gammu configuration files now have man pages, which boosts documentation level from none to almost perfect ;-).

As a special bonus for Czech users, Gammu translation is now more complete and all new man pages are translated to Czech.

Full list of changes:

  • Fix some memory leaks found by cppcheck.
  • Fix unsafe sprintf usage in some modules.
  • Improve debugging facilities to use state machine debug configuration when possible.
  • Separate SMS daemon out of gammu binary.
  • SMSD now requires [gammu] section in config file.
  • UsePhoneDB option replaced by chekfirmware command.
  • Added pkgconfig support for gsmsd (SMSD library).
  • Debug logging can be handled by custom function in application.
  • SMSD log now includes gammu log messages.
  • SMSD now can log to syslog.
  • SMSD can now deamonize itself.
  • All callbacks can now pass user data along.
  • SMSD can now write PID file.
  • Added man pages for gammu-smsd(1), gammu-smsdrc(5) and gammurc(5).
  • SMSD can now natively run as a Windows service (bug #451).
  • SMSD debugging can be now enabled by DebugLevel directive.
  • Proper reconnecting support for MySQL.
  • Better error logging of PostgtreSQL SMSD service.
  • SMSD now properly frees allocated memory.
  • SMSD now handles SIGHUP for rereading configuration.
  • Added LSB init script for SMSD.
  • SMSD can now log to stderr/stdout.
  • RunOnReceive now can get IDs of received messages.
  • Avoid duplicating of same code in command line and tests for messages displaying.
  • New binary gammu-smsd-inject to inject messages to SMSD.
  • Gammu binary now does not support any SMSD operations.
  • Sending TEXT message now accepts text using -text parameter.
  • Improved logging differentiation of SMSD log messages.
  • Properly remove messages from queue when sending fails (bug #778).
  • Use own test handler instead of asserts.
  • Separate gammu and libgammu messages, libgammu no longer sets textdomain.
  • Use po4a for translating man pages.
  • Dump more information in dct3trac, thanks to Duncan Salerno.
  • SMSD cal log to Windows Event Log.
  • Added man pages for SMSD backend services.
  • Dropped static configuration files for MSVC, they were broken anyway and CMake now works good with MSVC.
  • Script gammu-config supports also cdialog.
  • Reduce stack usage on message composing (fixes crash on Windows).
  • Fixed returned saved location on AT engine.
  • Added support for dropping privileges in SMSD.

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

Debian users will find packages in experimental as soon as they will go through NEW queue.

Gammu SMSD changes

SMS daemon in Gammu is one of it's widely deployed applications. However I never really liked the way how it is integrated into Gammu. I did not know much the code, so I did not want to touch it. But recent posts on gammu-users mailing list convinced me to do something about it.

So in next Gammu release, many things will change. The most important thing is that SMSD is no longer part of gammu binary, but has an own binary gammu-smsd. Among other reasons, this will allow to split binary packages in distributions and reducing dependencies of gammu package (database backends are used only is SMSD).

The other changes are more platform specific and will allow better integration of a daemon into system. Linux users will benefit from proper daemon support and optional logging to syslog, while Windows users can now use SMSD as a Windows service.

And as a bonus, SMSD and it's configuration file now filanny have man pages: gammu-smsd and gammu-smsdrc.

All mentioned changes are already in SVN, but I want to do some polishing before making a testing release. The testing release will definitely happen in next week, however impatient users can download SVN snapshots and test them.