Java on x86_64

Fedora, version 9, has OpenJDK (Icedtea) included out of the box and everything works perfectly. The Java runtime, the Java compiler, Eclipse, everything. Even on my 64 bit system.

For my thesis I was playing with developing Java “MIDlets” for mobile phones (J2ME platform) and Java Card applets for Java Card smart cards (or in this case the “Secure Element” of the Nokia 6131 NFC.

This is however not (yet) “free and open” so it can’t be included by default in a Linux distributions and you have to download the (unsupported) GNU/Linux versions of the SDKs from Sun or the “Supported” SDKs for Windows from Sun or Nokia. Since using Windows is a last resort for me I try harder to get everything working in GNU/Linux 🙂

Another problem is the driver for the RFID reader from SCM. They only provide a 32 bit Linux driver that doesn’t work in Fedora 8 or 9, not even on the i386 (32 bit) version. Without this driver it is only possible to use the “contact” part of the card using the CCID drivers included in Fedora.

In the end I decided to run a virtual machine with Fedora 9, the 32 bit version, which didn’t work either. The smart card seemed to return the status code 6E00 all the time. After first testing it in Windows (where it worked) I tried harder in GNU/Linux. Eventually I got it to work with CentOS 5.2 (based on Red Hat Enterprise 5, which is in turn based on Fedora 6) without much problems.

I used virt-manager with KVM to install CentOS (i386 version) with USB pass through. This is a nice little feature in which you specify in the libvirt configuration file (in my case /etc/libvirt/qemu/centos52.xml) what device you want to have available in the virtual machine:

<hostdev mode='subsystem' type='usb'>
    <vendor id='0x04e6'/>
    <product id='0x5121'/>

This is specific for the SCM SDI010 (contact and contactless smart card reader).

Update: It was not as bad as it seemed 🙂 Reworded most of the post and updated the KVM part to include the configuration for USB pass through.

Update (Sep 30th): Even in CentOS it doesn’t work. As soon as you try to upload an applet to a card the (virtual) machine crashes (kernel panic). Not sure if an user space? driver (scmccid) is supposed to be able to do that. So CentOS is also not an option either, which leaves Windows 😦 I give up for now, this card reader sucks 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s