Michal Čihař - Blog Archives

Gammu test version 1.21.94

New Gammu testing release has just born. The largest changes are in vCard handler. It now supports photos in vCard and should properly handle error states which previously would lead to crash. This also leads to changed API for encoding/decoding vCard/vCalendar/vNote entries. Rest of changes is usual amount of bug fixes.

Full list of changes:

  • Better skipping of currupted messages in AT (bug #768).
  • Autoload 6510 module if phone is S40 (bug #767).
  • Add ID for Nokia 6500s (bug #770).
  • Add automatic detection of Nokia phones (bug #770).
  • Catch error when calls can not be deleted (bug #738).
  • Better documentation of addnew (bug #734).
  • Fix detection of OBEX capability on older Siemens phones.
  • Try to detect wrongly formatted CMGL reply (bug #771);
  • Handle phones which fail to report supported charsets.
  • Fixed encoding of WAP indicator messages.
  • Support for photos in vCard (bug #227).
  • vC* saving now protects against buffer overflows.

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

Debian users will find packages in experimental soon.

Speed up SSH logins

I just discovered (not new) feature of OpenSSH, which allows to have several sessions over a single network connection. If you are once connected to the server, all other sessions can use existing connections and this makes much faster things like working with remote SVN or shell completion of remote filenames.

All you need in config file to make it work is something like this:

Host *
    ControlPath ~/.ssh/sock/%r@%h:%p
    ControlMaster auto

Semantic phpmyadmin.net

Today I published set of changes to phpMyAdmin website, which add microformats attributes where applicable. Currently hCard and hAtom were added. The first one enables you to grab contacts directly from web page (if your browser supports it, currently you need some extension such as Operator). I also added some rel attributes to links, so application browsing the website can know relevance of some links.

Radosti s OpenCard

Jak už jsem tu popisoval , za nemalého úsilí se mi podařilo pořídit tramvajenku na OpenCard. Tušil jsem, že spolehlivost dosavadního papírového řešení je nedostižná (kolikrát se vám stalo, že by nešel papírový kupón přečíst?), ale zážitky z dvou týdnů používání OpenCard předčily má očekávání.

Protože bydlím na okraji Prahy, kam jezdí příměstské linky (3xx), mám tu úžasnou možnost otestovat spolehlivost čteček na OpenCard v každodenním provozu - při nástupu člověk musí ukázat platnou jízdenku. Zhýčkaný jinými místy, kde RFID používám, jsem začal nejjednodušším způsobem - peněženku, ve které je několik RFID karet, dám ke čtečce a předpokládám, že ta bude natolik inteligentní, že se domluví s tou správnou kartou. Bohužel to jí očividně dělá problémy a po několika chybách při čtení jsem donucen kartu stejně vyndat. U samostatné karty už je pravděpodobnost úspěchu o něco vyšší, ale zatím se stejně pohybuje někde kolem 50% - na první pokus málokdy uspějete. Nakonec to mnohokrát končí mávnutím ruky řidiče, a vy můžete vesele nastoupit, aniž by veděl jestli na OpenCard něco nahraného je, nebo není.

Dnes mě ovšem dorazila kontrola revizorem v metru. Naštěstí jsem měl cestu dlouhou a kontrola probíhala za jízdy, takže mi nevadil jeho desetiminutový boj s tímto zázrakem techniky. Aspoň měli případní černí pasažéři dost času se přesunout z jeho dosahu :-). Ale pěkně po pořádku - po té co mu dávám kartu, loví z brašny čtečku, přikládá kartu a v zápětí cosi zamumlá. Z tašky vytáhne jakousi svojí kartu a přikládá jí ke čtečce. Pak mnohokrát karty prohazuje a zjevně se pořád nemůže přiblížit ke kýženému výsledku. Nakonec se mě zeptá co tam mám nahráno za kupón, po odpovědi že mám měsíční prohlásil, že je to v pořádku a vrací mi kartu. S omluvou, že to ještě nefunguje úplně dokonale odešel a slečny sedící naproti mě už neudržely záchvat smíchu...

Gammu test version 1.21.93

After few weeks of debugging build system, new Gammu version is out. This time most fixes are in build system area, especially now it is possible to compile Gammu using Borland C++ 5.5. Also my hacks for crosscompilation to Windows on Linux have been dropped in favour of crosscompilation features in CMake 2.6.

Full list of changes:

  • Drop own crosscompilation support, rely on CMake one.
  • Also standard CMake parameters used when possible (eg. BUILD_SHARED_LIBS).
  • Search does not create thread for non existing devices.
  • Fixed possible crash when backing up ringtones.
  • Fix possible race condition in searching.
  • Fixed invoking of CMake with output to custom directory.
  • Compile on platforms where ssize_t does not exist.
  • Fix detection of towlower on some compilers.
  • Make Bluetooth compile using BCC.
  • Fix compilation if strtoull does not exist.
  • Compile on platforms where intptr_t does not exist.
  • Fixed compilation in BCC (see changes above).
  • Check whether compiler supports __FUNCTION__.

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

Debian users will find packages in experimental soon.

So simple patch...

Today again somebody commented on probably simplest patch I ever attempted contribute to some free software. And it memorized me the funny fact that this simple change lies for five years in bugtracker without single comment from developers. Only occasionally some random hacker founds it and ask why such simple issue has not yet been solved. Latest change in bug adds flag, that this is still broken in all recent Python versions including 3.0 :-).

I'm not a robot!

Dear Google,

can you please tell me, why I have to retype f**king captcha, every time I want to use searching? Guess what I'm even logged in using Google account and I've already retyped several captchas, so I would have been really clever robot, if I would be able to do this.

Thanks

PS: I've tried different set of parameters to search, but it does not matter what I type. The only thing which does matter is that I'm connected through local provider which does NAT of hundredths computers to single IP address and some of these computers probably did something evil to Google.

Nové stránky phpMyAdmina

Už delší dobu se mi nelíbilo, na jakých stránkách prezentujeme phpMyAdmina a chtěl jsem s tím něco udělat. Ale prostě je pořád těžší a těžší najít si čas a tenhle úkol čekal v mojí frontě poměrně dlouho.

Největším problém se stránkami je asi způsoben hostováním na SourceForge.net a omezeními, která tam pro webhosting mají nasavená. V podstatě je nemožné do stránek nějak začlenit externí zdroje (když nepočítám JavaScript/AJAX a podobná řešení), přitom externí zdroje (resp. RSS feedy ze SourceForge.net) obsahují velkou část informací, které na webu mají být (novinky, informace o vydáních atd.). Jediná rozumné řešení je generovat statické stránky jinde a nahrávat je na web server SourceForge.net.

Toto řešení problému bylo jasné a je také jasné, že pro statické generování HTML není PHP zrovna nejlepší jazyk. Tak jsem se rozhodl použít můj oblíbený Python spolu s šablonovacím nástrojem Genshi . Ano je to tak, jedna z nejoblíbenějších aplikací napsaných v PHP používá Python pro vytváření svého webu.

Začal jsem si hrát s Genshi a feedparserem asi před měsícem, bez jakékoliv představy o vzhledu a jakékoliv naděje na úspěch, prostě jsem se jen chtěl naučit je používat. Ale hned první nástřel se pokusným králíkům (kamarádi, členové týmu phpMyAdmina a častí návštěvnící kanálu #phpmyadmin) zalíbil a tak jsem na něm trochu zapracoval, aby stránky byly připraveny před vydáním verze 3.1.0.

A dnes nastal okamžik, kdy byly nahrazeny staré stránky a už se těším na kritiku. Tož podívejte se na http://www.phpmyadmin.net/ .

phpMyAdmin has new website

I really did not like phpMyAdmin project website for some time and wanted to change it. However it is harder and harder to find time to do some bigger thing, so this task was stuck in my queue for quite a long time.

One of biggest problem is that the website is hosted on SourceForge.net and they limit quite a lot what you can do there. Especially including external resources is hard - the website should include lot of information from SourceForge.net as news posts, file releases etc. The only reasonable option to get all external data into the website is to generate static content and push it to SourceForge.net web server.

This decision was quite clear to me and it lead me to using Python with Genshi templating to generate the website. Yes, you read it correctly - one of most popular PHP applications is using Python to generate its website.

I started to play with Genshi and feedparser about one month ago, with no clear concept of pages design, just to learn the technologies. However after creating first proposal and showing it to some friends, phpMyAdmin team members and frequent visitors to phpmyadmin IRC channel, I was quite surprised about positive feedback, so I started to work a bit harder to make it possible to have new website before we release 3.1.0.

And here it comes, just check it out at http://www.phpmyadmin.net/.

Gammu test version 1.21.92

Good news everyone, new Gammu testing version is out. This time biggest fix is Bluetooth support for Mac OS X, accompanied with fixed locking on some architectures and improved debug configuration, to allow proper integration with python-gammu.

Full list of changes:

  • Reimplement locking and add tests for it.
  • GSM_SetDebugFileDescriptor now accepts flag whether file descriptor can be closed (bug #749).
  • Soname change due to API breakage (see above).
  • Fixed compilation on Mac OS X, thanks to Juan A. Bertolin for testing.

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

Debian users will find packages in experimental soon.