Michal Čihař - Blog Archives for Gammu

Why to make sensible error messages?

Yesterday I faced problem with VMware server that it can not run 64-bit guest system. I'm using 64-bit SUSE and 64-bit VMware, so it should work, right? I can select 64-bit system in VMware, but the guest is simply 32-bit without any error.

In documentation, man can find only "VMware Server supports 64-bit guest operating systems only on host machines with supported processors.". How helpful! After a bit of googling, it turns out that VT needs to be enabled and usually it is not enabled in BIOS (any reason for this?).

So let's reboot, go to BIOS, enable VT and it should work. Unfortunately not, after reboot, still same problem. I was almost given up at this point, but I decided to recheck BIOS, whether I really enabled the right thing. Yes I did, but I did not notice small note, that to apply this setting, I need to power off and on the computer. That was the trick! Now it finally works. I just wonder why it has to be so complicated...

Gammu test version 1.20.94

In few hours after releasing 1.20.93 it became obvious that I will need another testing release, because number of bug fixes grow too much. So here it comes. Schedule for 1.21.0 is Tuesday next week, so please report any problems you face with this testing version.

Full list of changes in 1.20.94:

  • Automatically switch to nodtr connection if DTR/RTS setting fails.
  • More verbose debug messages in API.
  • Free phone data after testing model to avoid memory leaks.
  • Properly handle if IMEI is too long (bug #709).
  • Try to handle situation when CMGL does not list all messages.
  • Fix typo in MySQL file (bug #716).
  • Better parsing of USSD replies (bug #718).
  • Properly restore caller groups on Nokia 2630 (bug #706).
  • Fix listing of used calendar locations on Nokia (bug #710).
  • Properly encode class and coding to SMS (bug #714).
  • SMSD for MySQL no longer fails when sending message (bug #715).
  • SMSD stores signal and battery state in PostgreSQL.
  • Properly handle multiline firmware information.

You can download from usual place: http://cihar.com/gammu/, Debian users will find packages in experimental soon.

Gammu test version 1.20.93

I finally managed to process all my mails and it's not time to push Gammu towards stable release. If everything goes without problems, the just born 1.20.93 will be followed by 1.21.0.

Version 1.20.93 fixes several crashes with parsing strange data from phones and changes a bit initialization of FBUS protocols. If you are using this connection type, please test this new code whether it behaves better or worse than older version.

Full list of changes:

  • Fix crash when decoding EMS pictures (bug #549).
  • Motorola phones sometimes reply in UCS2 instead of HEX (bug #712).
  • Use native functions sleep/usleep if available.
  • Improve FBUS initialization sequence.
  • Fixed reading for ringtones from Nokia 5510 (bug #529).
  • Do not crash if ringtone name is too long (bug #529).
  • Fix possible crash while reading of messages using AT.
  • Increase timeout when writing SMS message (bug #596).
  • Cleaned up issues with reading from Bluez (bug #670).

You can download from usual place: http://cihar.com/gammu/, Debian users will find packages in experimental soon.

Gammu test version 1.20.92

New testing version of Gammu was just born. It brings quite a lot of fixes. Also the Windows binary should be again a bit more stable.

Full list of changes:

  • Fixed Windows binary (define properly MSVCRT to use) (bug #683).
  • Fixed compilation with CURL on Windows.
  • Windows binary now has only MySQL and CURL support (bug #683).
  • Fill in timezone information (bug #696).
  • Detect reserver message type (bug #691).
  • Increase timeout for switching to OBEX (bug #690).
  • Disable postal address for Nokia 2600 (bug #659).
  • Encode phone number only with phones which need it (bug #654).
  • Increase timeout for writing memory entry (bug #654).
  • Handle properly when phoned does not tell SMSC (bug #616).
  • Initial support for waiting calls in AT engine (bug #551).
  • Fixed dialing on some AT phones (bug #471).
  • Support for skipping location when reading (bug #467).
  • Improved detection of serial port Bluetooth channel.
  • SMSD reconnects to MySQL (thanks to Wouter D'Haeseleer).
  • SMSD stores signal and battery state in MySQL (thanks to Wouter D'Haeseleer).
  • Initial support for reading messages in simple text mode.
  • Report if monitor failed because of an error.
  • Handle not found errors on OBEX connect (bug #705).

You can download from usual place: http://cihar.com/gammu/, Debian users will find packages in experimental soon.

PS: I still have about 50 unread mails about Gammu, so please be patient.

Gammu test version 1.20.91

New testing version of Gammu was just born. It brings quite a lot of fixes - I simply release it because changelog got too big :-).

Full list of changes:

  • Report more verbosely that some feature has been disabled on compile time.
  • Add ID for Nokia 5200 (thanks to Andreas Metzler).
  • Add two IDs for Nokia 2600 (bug #659).
  • Add ID for lot's of Sony Ericsson phones.
  • Use AT parser for AT+CPBS? reply.
  • Use all possible ways to get memory status (bug #687).
  • Detect more error codes from Nokia phones (bug #659).
  • Fix decoding of text using iconv (bug #687).
  • Fix linker flags check, caused failures on MacOS X.
  • Add second ID for Nokia 2610 (thanks to Nicolas Forget).
  • Add ID for Nokia 6060.
  • Try to use OPP and PBAP Bluetooth profiles also (not tested!).
  • DumpMessage is not printing last char (bug #692).
  • Support for favorite messaging number (bug #693).
  • Add ID for Nokia 2630 (bug #693).
  • First attempt for Bluetooth support on OS X.
  • Do not open debug file for second time when using global debug.
  • Fix DC memory name printing (bug #698).
  • Add API function GSM_MemoryTypeToString.
  • Report correct size of DC/RC/MC memory on DCT4 phones (bug #699).
  • Store favorite messaging as phone number, not only as ID (bug #693).
  • Avoid empty line at beginning of vCard backup (bug #701).
  • Add ID for Nokia 2760.
  • Catch not acceptable errors in OBEX (bug #702).
  • Operation not allowed is not an unknown problem (bug #678).
  • Add ID for Nokia 5000 (bug #677).
  • Increase limit of files for DCT4 and check array size (bug #676).
  • Allow to enter PIN code from stdin (bug #633).
  • Handle HEX reply instead of UCS-2 from Motorola (bug #697).
  • Avoid decoding of @ in email address (bug #697).

You can download from usual place: http://cihar.com/gammu/, Debian users will find packages in experimental soon.

PS: I still have about 50 unread mails about Gammu, so please be patient.

Please ask on appropriate place

I had to do it once and now the time came. Floating around hundredths of unread mails for Gammu is not a way to go. I'm just middle of processing it, but most of you will get just generic reply, asking you to either file bug report to bug tracker or to write to mailing list. There is simply no reason why so much communication should be private between me and you. I think this is generally valid for any open source project, it usually does not make sense contact main developer directly when there are more appropriate ways to communicate.

If you find a bug or something does not work, simply report it! If you can search for duplicates before it is even better and you might be able to include some additional information, but even if you skip this step, it is much easier to track problems in bug tracker than in mailbox. Also in bug tracker the issue will not disappear until it is not fixed, in mailbox, it gets quickly out of focus and I will forget it.

Once more: If you've found a bug, report it!

If you have some question, you have much better chance to receive answer on mailing list. Simply there are more people hanging around and somebody might have already seen the problem. What is another good thing on mailing list is that they have archives, so that you can look whether somebody did not solve similar problem before. Also others will be then able to find your solution.

Summary again: If you have a question, ask on mailing list!

Number of records in phone database

I was today just too lazy to do much actual work, but I spend time on playing with something new - this time it was Google Chart API or better Python Google Chart module. I wanted to have some visualisation of growth of data in Gammu phone database for a long time and this module seemed to be good way to achieve good charts.

After a bit of playing I got following chart:

Chart showing history of phone database.

What we can see from it? Number of garbage grows very fast. Mostly it is caused by Wammu, which asks user for feedback after some time of active usage and this sometimes leads to duplicate records (but it also brings information which phones are really being used).

The bad thing which is visible here is that mostly half of reports is about unsupported phones! I think we should do something about this as the reality is not really that bad and from my POV, most of failure reports are caused by wrong configuration being used. I know it is sometimes tricky to find working one especially when you use Nokia phone with cable, where exists simply too much possibilities. It's time to tweak up autodetection so that it can handle most of such cases (and recent HAL features to export capabilities of modem devices might also help in this area).

Gammu test version 1.20.90

New testing version of Gammu was just born. It brings quite a lot of fixes and changes API a bit (some things will also change in next testing release).

Full list of changes:

  • ABI change, because of increasing some limits.
  • Config file option rsslevel no longer works, superseded by gammu checkversion.
  • Dropped GSM_ReadHTTPFile from API, gammu now uses CURL instead.
  • Support for longer notes on Nokia phones (bug #607).
  • Add deleteallmemory command.
  • Ignore trailing spaces in AT commands.
  • Fix crash on long lines in vCards.
  • Compatibility with broken iWOW responses (bug #650).
  • Do not use hard delete flag for updating entries (bug #634).
  • Identify Nokia 1200 (bug #649).
  • Fix parsing of date/time reply on Sony Ericsson G900 (bug #647).
  • Increased limit for folder name (bug #646).
  • Fix parsing of empty date (bug #643).
  • Recognize general number on Nokia 6230i (bug #655).
  • Fix writing of phone number using HEX charset (bug #512).
  • Recognize more CME errors, thanks to Paolo oopla@users.sf.net.

You can download from usual place: http://cihar.com/gammu/, Debian users will find packages in experimental as soon as it passes NEW queue.

PS: I still have about 100 unread mails about Gammu, so please be patient.

Phone synchronisation, finally

One of long standing things on my todo list was to make synchronisation work from my cell phone (Sony-Ericsson K750i) to some PIM application on Linux side (as a GNOME user Evolution is the natural choice). I tried it several times but it never actually worked. Today I gave it yet another try and I finally succeeded on first attempt :-).

As a first step I just wanted to make a backup of all things. Gammu can do it quite well and it's the tool I trust for this purpose:

gammu backup /tmp/phonebook.vcf
gammu backup /tmp/calendar.vcs

Now it's time to play with OpenSync. We will use setup guide and SyncML guide as a starting point. As I had in past problems with both sides - both phone and Evolution failed with some random errors, I wanted to go step by step. So I started with setting up phone to files synchronisation:

msynctool --addgroup file2phone
msynctool --addmember file2phone file-sync
msynctool --addmember file2phone syncml-obex-client

Now we need to configure file storage, just tell it where it should store the data:

msynctool --configure file2phone 1

And change path in your editor to something like:

<?xml version="1.0"?>
<config>
  <!-- directory path for file-sync -->
  <path>/home/foo/phone-backup/</path>

  <!-- should care of subdirectories (TRUE or FALSE) -->
  <recursive>FALSE</recursive>
</config>

Now the more tricky part comes, we need to set up phone end:

msynctool --configure file2phone 2

Fortunately we can use example from the SyncML guide and just fill in Bluetooth address (you can get it using hcitool scan) and channel (sdptool browse 00:b0:0b:fa:ce:00):

<?xml version="1.0"?>
<config>
  <bluetooth_address>00:b0:0b:fa:ce:00</bluetooth_address>
  <bluetooth_channel>7</bluetooth_channel>
  <identifier>Sony Ericss</identifier>
  <version>1</version>
  <wbxml>1</wbxml>
  <username></username>
  <password></password>
  <type>2</type>
  <usestringtable>0</usestringtable>
  <onlyreplace>0</onlyreplace>
  <onlyLocaltime>0</onlyLocaltime>
  <recvLimit>0</recvLimit>
  <maxObjSize>0</maxObjSize>
  <contact_db>Contacts</contact_db>
  <calendar_db>Agenda</calendar_db>
  <note_db>Notes</note_db>
</config>

And now we should be able to synchronise whole phonebook from phone to selected directory:

msynctool --sync file2phone

Okay, this works, let's try more complicated thing - include Evolution in the chain. The steps are the same, config file for phone is the same, Evolution plugin has sane defaults you usually don't have to touch:

msynctool --addgroup phone2evo
msynctool --addmember phone2evo evo2-sync
msynctool --addmember phone2evo syncml-obex-client
msynctool --configure phone2evo 1
msynctool --configure phone2evo 2

But now comes the tricky thing - Sony-Ericsson phones usually have something broken around notes (or it is broken in OpenSync, I don't care, simply synchronisation fails without this step) and we have to avoid synchronisation of them. This can be done by changing filter file in group we've created above (usually in file ~/.opensync-0.22/group2/filter.conf):

<?xml version="1.0"?>
<filter>
  <note/>
</filter>

And finally we can start the synchronisation and it should work:

msynctool --sync phone2evo

You can also GUI multisync0.90 to do the configuration and start synchronisation, but it is not much different, you also still have to edit XML files.

Gammu stable version 1.20.0

Good news everyone, new stable Gammu release is out. Since 1.19.91 it brings only few small fixes in OBEX and EMS, but there is quite big list of changes compared to 1.19.0:

  • Do not crash on EMS messages with no text (bug #612).
  • Fixed reading of OBEX files (bug #614).
  • Fixed decoding of Nokia messages (bug #527).
  • Fix handling of UTF8 charset with some Motorola phones.
  • Identify Motorola V635.
  • Set again charset in Motorola phones after changing AT mode.
  • Automatically enable OBEX for Motorola phones.
  • Fix searching of correct Bluetooth channel.
  • Improved SMSD error messages.
  • Fix SMS listing when phone was in text mode (bug #584).
  • Fix compilation when WCONTINUED/WIFCONTINUED is not defined.
  • Fixed listing SMS messages from AT phones in text mode (bug #584).
  • Added smscgi daemon by "Kamanashis Roy Shuva" kamanashisroy@gmail.com.
  • Cache once read messages to avoid reading them again (bug #481).

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