Michal Čihař - Blog Archives for English

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.

Imported old Czech posts

Just for simple reason having all my blog posts in single place, I've decided to import all Czech blog posts from abclinuxu.cz into this blog. You can now find them in archives, all of them being tagged with Czech.

There is no intention to add new blog posts in Czech for now. In case I would might change my mind sometimes in future, all English posts are tagged with English.

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.

Sonata and others in Debian

There seems to be a little bit of confusion caused by my new year blog post, so it's probably best to clarify that right now.

I'm not going to give up maintenance of mpd related packages right now.. I've even not yet asked for adopting and I clearly have no plans on orphaning the package completely if nobody will step up.

Anyway if somebody is interested help is always welcome (though most of time you will spent on these packages is forwarding bugs upstream) and I can of course still do package uploads when he is not a Debian developer. All sources are stored in public VCS, so ready for cooperation.

Mastering phpMyAdmin 3.3.x for Effective MySQL Management

The book Mastering phpMyAdmin 3.3.x for Effective MySQL Management is already available for some time, but I still think I should promote a little bit in my blog so here it is :-).

The book covers all you might want to know about using phpMyAdmin. It really does not make sense to copy text from book description, so feel free to find yourself what all it does cover.

As every time, this book is written by Marc Delisle, who is for several years project admin, so probably the person who knows most about hidden features. Usually technical review of the book is done by some other developers and this time it was me doing this job (among other reviewers). I hope we did good job and you will like this book.

Mastering phpMyAdmin 3.3.x for Effective MySQL Management book cover

PS: As a nice bonus, the phpMyAdmin project receives money from every purchased book.

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!

Automatic configuring of Gammu

I bear in my mind idea for automatically configuring Gammu for some time. It should not be that hard using udev, Bluez and other tools which we already have available on average Linux system.

Today afternoon I've finally found some time to play with that and it's almost done. Well it's not fully automatic right now, it will just generate configuration file with possible choices, but at least some help. For now only udev and Bluez is supported, but I will add support for libusb soon as well.

The new tool is called gammu-detect and looks at devices available in the system and outputs something, what can be used as configuration file (you can find example in the documentation).

Once it will make reasonable guesses what user actually wants, it might get integrated into libGammu so that other applications like Wammu can benefit from it as well.

Temperature monitoring on OpenWrt

My OpenWrt box has for some time connected TM - RS232 sensor. However for some reason I did never find time to setup it. However as the node is already running lite version of munin, it was really easy to do so. All what was needed is to add another plugin into the /usr/sbin/munin-node script and add temp to list of plugins at top:

config_temp() {             
  echo "graph_title Temperature"
  echo "graph_args --base 1000 -l 0 -u 40"    
  echo "graph_vlabel room temperature"                                                                                        
  echo "graph_category other"                                                                                                                   
  echo "graph_info This graph shows the room temperature."
  echo "temp.label temperature"
  echo "temp.draw LINE2"                             
  echo "temp.info The current room temperature."
fetch_temp() {                                        
  read RES < /dev/ttyUSB0                        
  echo "temp.value" $(echo $RES | tr -d C+)

PS: It looks like reading sometimes produces just bogus results, so here is improved version, which does some level of filtering:

read RES1 < /dev/ttyUSB0                       
read RES2 < /dev/ttyUSB0                 
read RES3 < /dev/ttyUSB0                 
if [ "x$RES1" = "x$RES2" ] ; then                  
    echo "temp.value" $(echo $RES1 | tr -d C+)                          
elif [ "x$RES1" = "x$RES3" ] ; then                                 
    echo "temp.value" $(echo $RES1 | tr -d C+)                 
elif [ "x$RES2" = "x$RES3" ] ; then                        
    echo "temp.value" $(echo $RES2 | tr -d C+)                                    
    echo "temp.value" $(echo $RES2 | tr -d C+)                                                                                            

CTest not submitting to IPv6 dashboard

For some time, I observed that Gammu test dashboard does not get updates from my Debian box. Looking the CTest logs, the problem was in using IPv6 even when the box does not have it enabled:

Failed to connect to 2001:1528:136:dead:beef::1003: Network is unreachable

Due to lack of time I ignored it, but it looks all what was needed is to update curl. The bug was caused by using c-ares resolver, which for some reason favors AAAA records even when the system has no IPv6.