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

Photo of a week 5

Picture this week is a little bit later because of time spent on FOSDEM and traveling there.

It was taken last Wednesday from Vyšehrad, the Prague castle is disappearing in morning fog.

Foggy morning in Prague

New phpMyAdmin themes

Today, I've made available two new themes for phpMyAdmin on our demo server.

First one is Toba theme which was contributed by Azhari Harahap:

Toba theme

Second one is Graphite theme which I've started during Hackweek and finished during free time around FOSDEM:

Graphite theme

And we're still waiting for more contributions to our Theme contest.

PS: Forgot to mention that new themes are only for 3.4 branch and won't work with others.

OpenWRT and resolving private ranges

For quite a long time, I have a problem, that DNS in my OpenWRT box does not resolv local range on wan interface. Today I have learned that it is doing it in order to protect me:

dnsmasq[15709]: possible DNS-rebind attack detected: jmnet.czf

But hey, my wan interface has 10.* address and I want to resolve 10.* domains there!

A little bit of googling revealed that this is caused by --stop-dns-rebind passed to dnsmasq. Okay, the easiest fix is to disable it. You need to change /etc/config/dhcp:

config 'dnsmasq'
        option 'rebind_protection' '0'

After reading source of /etc/init.d/dnsmasq I realized there is also way to whitelist some domains, what sounds like a slightly better idea. After fighting with syntax, I found the solution to be (again in /etc/config/dhcp):

config 'dnsmasq'
        list 'rebind_domain' '/czf/'

Next thing to explore is why is native IPv6 not working for me on the router though it should...

Screenshot support for Nokia DCT4 phones

After implementing the screenshot functionality for S60 phones, I wanted to add same thing for other phones as well. As there were some basics of the code for Nokia DCT4 phones, it was obvious place where to start.

After little of hacking, screenshots are working, for example this is screenshot of my Nokia 6234 I use for testing:

Nokia 6234 screen

Support for Sony-Ericsson phones should follow soon, Németh Márton is working on it.

phpMyAdmin improvements

As my Gammu Hackweek 6 project went smoothly, I've decided to spend some time today on phpMyAdmin as well.

My work was mostly inspired by (IMHO unfair) comparing of Adminer and phpMyAdmin. I could surely create similar comparing where would be dozens of things why is phpMyAdmin better, but I don't want to go that way and I rather decided to spend my time on coding.

First and easy task was bit which is in comparing described as "Status variables", where I've added documentation links, so phpMyAdmin now has both short executive summary and link to the official documentation. While looking at server status page, I've categorized some newly added variables, so they now appear in right place. I also reconsidered formatting of numbers and hopefully current solution will work for everybody and not produce contradicting bug reports like the old one.

Then I did focus a little bit on testing AJAX and fixed some minor issues, mostly affecting Chrome/Chromium browsers, because they are strict in case of some errors.

Last but not least I've added URL redirector inside phpMyAdmin, so no external links will now reveal what did user actually was doing in phpMyAdmin, but rather the url of the redirector.

And when speaking about phpMyAdmin, I need to mention one thing as well: contribute yourself! You don't have to be developer, there is currently ongoing themes contest and we're always looking for translators.

Gammu supports Symbian (and going for Android)

Hackweek 6 is over and my project is done - Gammu can now talk to Symbian phones. All the work is based on Series60 - remote applet. The changes on Gammu side were not just to implement new protocol, but also some more general improvements it enforced. I think the diffstat summary tells how much was changed:

166 files changed, 23126 insertions(+), 15738 deletions(-)

All code is is available in our Git repository and check documentation for information how to set it up. There will be testing release incorporating these changes next week to give broader audience chance to test it.

So now Gammu has long requested support for Symbian and we need other challenge. That seems to be Android right now and there are already two approaches which might help there. One of them is porting Series60 applet to Android, what is planned by Series60-remote author. There is also other promising way, where I can not share much details right now, but I can give you a little teaser:

$ gammu identify
Device               : 192.168.1.4 5210
Manufacturer         : HTC
Model                : unknown (HTC Nexus One)
Firmware             : FRG**
IMEI                 : **************8
SIM IMSI             : **************7

Yes, getting basic information already works for the developer working on it :-).

Installation of S60 applet to the phone using Gammu

I've (again) changed schedule of what to implement and I've spend fourth Hackweek 6 day by doing more cleanup and documentation work than real coding.

The major new feature is support for direct installation of the applet to the phone, so the installation is now easier. There were minor improvements on the both sides to allow support for calls and deleting of SMS messages. Adding calendar and todo entries is still left for future (hopefully tomorrow).

I've done (more or less) final cleanup of my changes in the applet itself and I've sent changes back upstream hoping for merging them (I'd give you link to the mail, but the archive does not work).

Rest of the time was spent collecting feedback from users testing the code (surprisingly there are already few brave users who gave it a try). It resulted in few bug fixes and improved documentation.

Last but not least - all code is is available in our Git repository and check documentation for information how to set it up.

Sending SMS on Symbian phone using Gammu

Third Hackweek 6 day went a bit differently than I planned, but there is still lot of progress.

I've added some more calls to the Series60 remote protocol, so that some things now work much faster (eg. getting number of contacts, calendar entries). The applet now also has a function to toggle Bluetooth so it does not have to be done elsewhere in phone menus.

On Gammu side I focused on messaging support, so now Gammu can list messages in the phone or send new message.

Modification of calendar entries is left for tomorrow, hopefully I will get to it and the support will be more or less complete and I will have Friday for final cleanup.

And as usual - all code is is available in our Git repository and check documentation for information how to set it up.

Gammu has calendar and screenshot support for Symbian

I've spent second day of Hackweek 6 on more different tasks.

First I tried to add some improvements to Series60 applet. First things to fix were crashes on requesting non existing contact or calendar entry. After that I started to improve user experience a bit, for example by making the menu work and contain some useful things. After that I've added new functionality to capture screenshots of the device. So you can see how the applet actually looks like:

S60 main screen

S60 menu

On the Gammu side, I've implemented reading of contacts and todos. No write support yet, that will be done tomorrow. And of course counterpart for the screenshot function.

I've also spent some time on writing documentation, so now there is some documentation on setting up the S60 connection or the new gammu screenshot command.

All code is is available in our Git repository.