Sync Palm via IrDA

Desktop, Gentoo, Palm August 3rd, 2006

I have complained the lame Palm Sync socket for quite a long time, eventually, I decide to try HotSync my Palm via IrDA on my Dell Latitude D600, which is equipped with SMSC IrDA Controller.

Prepare Hardware

The very first thing is to enable IrDA in the BIOS setting, since D600 has a COM1 serial port, IrDA is then assigned to COM2, aka /dev/ttyS1 in Linux.

BIOS setting



Boot to the overweighted Windows XP, and check the IRQ/DMA/SIR/FIR in Device Manager.

Device Manager


The findchip in irda-utils package is supposed to probe the system, unfortunately, it does not work in D600.

Build the Kernel

Just follow this HOWTO to build IrDA modules.

IrDA (infrared) subsystem support
  IrDA protocol
<M>  IrLAN protocol
<M>  IrNET protocol
<M>  IrCOMM protocol
[*]   Ultra (connectionless) protocol
  IrDA options
[*]   Cache last LSAP
[*]   Fast RRs (low latency)

SIR device drivers                  
<M> IrTTY (uses Linux serial driver)
<M> IrPORT (IrDA serial driver)      
FIR device drivers                  
<M> SMSC IrCC (EXPERIMENTAL)

SIR stands for Standard IR, which uses generic serial protocol to talk with IrDA; FIR needs specific driver to achieve Fast IR. Although IrLAN and IrNET are rarely used, it does not hurt to build them as modules.

Test drive

Since /dev/ttyS1 is also driven by serial, we need explicitly to tell the kernel this device is controlled by irda:

sudo setserial /dev/ttyS1 uart none

Then configure the module options in a Gentoo way, put the information collected from Windows into /etc/modules.d/irda:

options smsc-ircc2 ircc_irq=3 ircc_dma=3 ircc_sir=0x2f8 ircc_fir=0×280
alias irda0 smsc-ircc2

run modules-update to refresh the environment.

Insert the necessary modules and bind the device and port together:

sudo modprobe smsc-ircc2
sudo modprobe irda
sudo modprobe rcomm
sudo modprobe ircomm_tty
sudo /usr/sbin/irattach irda0 -s

Open another console and run

sudo irdadump

If everything is OK, some packets are dumped when the Palm is close to the laptop’s IR port.

Sync the Palm

I am using korganizer/kontact/kpilot suite. Configure the Pilot device as /dev/ircomm0[1]; Uncheck Do not sync when screensaver is active, this is essential for the lightweight WM(e.g FVWM, Fluxbox) users. Bingo !

Glue the pieces together

Inspired by Gentoo official irda init script and this. I develops the /etc/init.d/irda-fir, and /etc/conf.d/irda-fir. Add irda-fir to default runlevel if Palm is a part of your life.

Further work

[1] Are we still using the high-speed FIR if the kopete is configured to access /dev/ircomm0? Since FIR maps IR port to the network interface, irda0, I have tried to configure the Pilot devcie to net:irda0 or net:any according to this undocumented hack, but it does not work and kpilot hangs sometimes.

I still prefer the USB sync when downloading huge files for the sake of speed. Any idea to make dbus/ivman to link /dev/pilot to /dev/ircomm0 or /dev/ttyUSB0 automatically?

Gelman on Sf.net — Rejected

Desktop, Development, Python April 11th, 2006

Eventually, I could not tolerate myself to postpone the development of gelman, a eBook management system any longer, so I registered a new project in Sf.net: gelman

Gelman is named after the Gelman library in GWU. Both of them are lightweight.

  • All immutable meta data is stored online, aka Amazon Web Service (AWS)
  • User preference is stored in sqlite in-process database
  • Implemented by PyKDE
  • Tag support
  • Script and plug-in support

Here is the proposal to sf.net:

Yet another personal media management system. What makes the gelman distinguishing?

1. plug-in. The user may override the default behavior
2. lightweight.
3. Tag support Organize the media in del.icio.us way
4. scriptable

UPDATE: This project is rejected by sf.net due to the vague description. Since I do not have an developement environment for PyKDE right now, I would revise the proposal and re-submit it later.

Review: Kopete 0.11

Desktop March 21st, 2006

Kopete 0.11 is released with KDE 3.5. The most significant improvement is the WebCam support for MSN & Yahoo Messenger. In the Settings | Configure …, a new tab page named “Devices” emerges for the Video device configuration, like this:
Woody in WebCam
However, the video support is not so reliable, it may cause the kopete crash from time to time. It might be interesting to build the debug version of Kopete and locate the bug.

Update: Here is an encrypted MSN Messenger, it might be interesting to implement Kopete plugin as the the cipher/decipher filter for the traffic.

HOWTO import Outlook contacts to KAddressBook

Desktop, Gentoo January 28th, 2006

Outlook was once the central application to manage my emails, TODOs, appointments and contacts. Now I have migrated to Linux, and KDE Kontact would fulfill the responsibility of PIM. I googled around to figure out how to import legacy Outlook PST to KAddressbook.

Export contacts as vCard from Outlook, then import
Sorry, no Windows, no Outlook.

Export contacts via Outport
Outport is an open-source utility to export Outlook items. It accesses PST file via MAPI, the native Outlook component. It is useless without Outlook installed.

Read PST via libpst
libpst is the open-source utility to convert the Outlook PST to standard Unix mbox and vCard format.

$ readpst Outlook.pst

Since GBK is used as the built-in text encoding in Outlook, the file names and contents of the generated files by readpst were mess in my UTF-8 encoded linux box.

$ ls -la | iconv -f gbk -t utf8

Check the size of Contacts, in my case, it is 26542

$ cat `fine  ./ -size 26542c` | iconv -f gbk -t utf8 > lianxiren.vcf

Then just import the lianxiren.vcf from KAddressBook. Done.

Flame, Flame, Flame …

Desktop, Misc December 14th, 2005

There is a hot debat on slashdot about KDE vs. Gnome, ” Torvalds Says ‘Use KDE”. Thousands of Gnome users are arguing that Gnome is more elegant or relatively close to Mac OSX than KDE.

Gnome application may lacks the functionality than KDE

Hey, that is the problem, KDE application is easy to integrate the imporvement from the core by using KPart.

But it runs fast than KDE

You bet, but it is true that KDE has a larger footprint.

QT/KDE are bloated, slow

Again, I am reeeeeeeally tired of this stupid conclusion. With KDE split-ebuilds, this neat feature would be enabled in KDE 4, you just install what you want instead of the meta packages.

Here is an imcomplete list for the flamers, choose your favorite and start the engine:

  • Vim vs. Emacs
  • Gnome vs. KDE
  • FreeBSD vs. Linux
  • Reiser/Reiser4 vs. Ext3