Michal Čihař - Blog Archives for English

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+)                                    
else                                                                       
    echo "temp.value" $(echo $RES2 | tr -d C+)                                                                                            
fi

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.

Save as WWF, Save a Tree?

I know ecologists often come with great ideas how to save some random resource. There was a "green" font, which contained holes and was supposed to save ink/toner from printers. It turned out not to be that big saver as the font itself was actually a bit wider than usual...

Today I got to know about "new" file format called WWF. Technically it is just a PDF with disabled printing. Well at least it is not a new format, so users of other operating systems (WWF software is available for Mac OS X only right now) are not lost and can use existing tools to view the files (on Linux you can for example use Evince).

And if Evince rejects to print this document, just disable these restrictions:

gconftool-2 -s /apps/evince/override_restrictions -t bool 1

Is it really helpful for environment to spend resources on creating yet another useless file format?

New features in Gammu

I've just released new version of Gammu, which comes with some things, which are worth mentioning.

First thing is m-obex support (which I've already announced). Since last announcement, there were some improvements, but I'm affraid it still does not work, because it was not completely tested. So the very same request applies - testers welcome and we need feedback.

The second big change is universal SQL backend for Gammu SMSD, which consolidates code of former MySQL, PostgreSQL and DBI backends. It also adds option to configure SQL queries it will use. This was tested using usual testsuite, so it is working, but there still might be some glitches, which will need polishing before we can declare it stable.

Cleanup of personal Debian repository

When I accidentally looked at my personal Debian repository, I realized that it is time to remove obsolete things from it.

There were packages for polld, for which which I don't see need anymore (it is now properly handled by kernel), hacked acpid packages, which were doing special things for Toshiba M30 notebook (which I don't use with Linux anymore and nobody else probably knew about these packages) or wmmp, a Window Maker applet for MPD, which I haven't used for quite a long time. All those are gone now and I don't think anybody will miss them (if you do, please tell me).

What stayed there are daily snapshots of dictionaries for StarDict and gnaughty package, which was rejected as possibly causing troubles.

New phpMyAdmin features - AJAX and Javascript

phpMyAdmin 3.4 is just in the alpha state (second alpha release being done right now), so it's time to continue in presenting new features. As usual, just download 3.4 alpha or try them on our demo server. If you find any problems while playing with it, do not hesitate and ask or report bug.

phpMyAdmin is now much faster in modern browsers, thanks to using AJAX in lot of places instead of loading whole new page. This is probably the most intrusive change made in 3.4 and at time of writing this post, there are still some rough edges, but the developers are polishing them right now.

Also there is not only AJAX, but lot of user input can be validated on client side now allowing faster reactions on invalid input.

This feature was implemented by Ninad Pundalik during Google Summer of Code 2010.

Call for phpMyAdmin translations

As phpMyAdmin is heading closer to 3.4 release, we would like to invite translators to be able to bring this version localized as much as possible.

We don't expect any message changes to happen in 3.4 anymore, so it's best time to start translating right now. You can find more information about translating on our website, but you can as well start translating right now at translation server.

There are so many languages, but majority of languages are really in bad shape right now. This is your chance to contribute to the free software!

Upgrading OpenWrt

While doing some bigger downloads, my wifi network used to have big problems, seeing tx errors, frame errors on the router. The router is old ASUS WL-500g Deluxe which was running OpenWrt Kamikaze up to now. I was anyway thinking going for something with 802.11a or 802.11n support, so I started to look for replacement. While looking for it and checking what newer boxes are supported by OpenWrt, I noticed, that I can finally try using 2.6 kernel and I should get working wireless as well with free (what was not possible for very long time).

I gave it a try and upgraded to Backfire 10.03.1-rc4. And looks there is no need to upgrade hardware right now. No more tx errors, the wireless is much more stable and faster.

Thanks to anybody who helped to create free drivers for Broadcom 4306 wireless chip.

PS: Upgrading OpenWrt while keeping configuration lead to horrible mess in my case, so I rather did clean install reconfiguring everything and rediscovering all errors I've made in the past.

More on Attachmate and Novell

Surprisingly, my Monday blog post has received much more attention than I did expect and was source for at least one article full of speculations (in Czech). Hey, there was no new information in the post, nor some secret information leak (not that I know something what is not known publicly).

Anyway meanwhile public announcement about UNIX copyrights has been made. I don't think it changes much, but it seems to be one if things people wanted to know.

What I find more interesting (and hard to read and understand) is explanation of the currently publicly available bits from a transactional lawyer at The Standards Blog. At least it gave me basic idea why some things are so complex in this deal and just confirmed that I want to avoid need for contact with lawyers language as much as possible :-).

New phpMyAdmin features - user interface cleanup

Next article highlighting some new features which will come in phpMyAdmin 3.4 is about more little changes. You can try them it out on our demo server. Or just wait few hours for first alpha release of 3.4.

The user interface cleanup is partly connected with previous changes, because some functionality simply required more Javascript (for example editor for ENUM/SET fields). Besides these there were major changes in export and import pages, which now should be easier to understand, hiding advanced options from unexperienced users, while still providing ability to change them.

New phpMyAdmin export page

This feature was implemented by Lori Lee during Google Summer of Code 2010.