[pkg-opensc-commit] [SCM] OpenCT packaging branch, upstream, updated. 3c76c000a994dbafef45081cb5f66b01f3fa22e3

Eric Dorland eric at debian.org
Sat Sep 1 19:51:51 UTC 2007


The branch, upstream has been updated
       via  3c76c000a994dbafef45081cb5f66b01f3fa22e3 (commit)
      from  57311ca5533a0ec05baf9f48cf9e12bc3decda56 (commit)


- Shortlog ------------------------------------------------------------
3c76c00 Imported openct-0.6.14

Summary of changes:
 NEWS                                              |   13 +
 configure                                         |   20 +-
 configure.ac                                      |    2 +-
 doc/ChangeLog                                     |   69 ++-
 doc/OperatingSystems.html                         |  109 ++-
 doc/QuickStart.html                               |   27 +-
 doc/api/annotated.html                            |    2 +-
 doc/api/apdu_8h-source.html                       |    2 +-
 doc/api/buffer_8h-source.html                     |    2 +-
 doc/api/conf_8h-source.html                       |    2 +-
 doc/api/device_8h-source.html                     |    2 +-
 doc/api/dir_48ff4d8e84c7d8bdad9110a7da283b5f.html |    2 +-
 doc/api/dir_877fe36415f52529fd2e180217ad90f9.html |    2 +-
 doc/api/dir_be5e542b2ca1305501268904b0410904.html |    2 +-
 doc/api/dirs.html                                 |    2 +-
 doc/api/driver_8h-source.html                     |    2 +-
 doc/api/driver_8h.html                            |    2 +-
 doc/api/error_8h-source.html                      |    2 +-
 doc/api/files.html                                |    2 +-
 doc/api/functions.html                            |    2 +-
 doc/api/functions_vars.html                       |    2 +-
 doc/api/ifd_8h-source.html                        |    2 +-
 doc/api/index.html                                |    2 +-
 doc/api/logging_8h-source.html                    |    2 +-
 doc/api/openct_8h-source.html                     |    2 +-
 doc/api/path_8h-source.html                       |    2 +-
 doc/api/protocol_8h-source.html                   |    2 +-
 doc/api/server_8h-source.html                     |    2 +-
 doc/api/socket_8h-source.html                     |    2 +-
 doc/api/structct__buf.html                        |    2 +-
 doc/api/structct__config.html                     |    2 +-
 doc/api/structct__info.html                       |    2 +-
 doc/api/structct__socket.html                     |    2 +-
 doc/api/structct__tlv__builder.html               |    2 +-
 doc/api/structct__tlv__parser.html                |    2 +-
 doc/api/structheader.html                         |    2 +-
 doc/api/structifd__conf__node.html                |    2 +-
 doc/api/structifd__devid.html                     |    2 +-
 doc/api/structifd__driver.html                    |    2 +-
 doc/api/structifd__driver__ops.html               |    2 +-
 doc/api/structifd__iso__apdu.html                 |    2 +-
 doc/api/structifd__reader.html                    |    2 +-
 doc/api/structifd__slot.html                      |    2 +-
 doc/api/tlv_8h-source.html                        |    2 +-
 doc/api/types_8h-source.html                      |    4 +-
 doc/api/unionifd__device__params.html             |    2 +-
 doc/index.html                                    |    5 +
 doc/wbeiuu.html                                   |   40 +-
 etc/Makefile.am                                   |    2 +-
 etc/Makefile.in                                   |    2 +-
 etc/openct.conf.in                                |   10 +-
 etc/openct.fdi                                    |  113 +++
 etc/openct.hald.in                                |   13 +-
 etc/openct.udev                                   |   11 +-
 etc/openct.udev.modalias                          |   39 +-
 etc/openct.usermap                                |    4 +-
 etc/openct_usb.in                                 |   79 +--
 src/ifd/Makefile.am                               |    2 +-
 src/ifd/Makefile.in                               |   11 +-
 src/ifd/ifd-wbeiuu.c                              |  840 ---------------------
 src/ifd/init.c                                    |    2 +-
 src/ifd/internal.h                                |    2 +-
 62 files changed, 463 insertions(+), 1034 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 3c76c000a994dbafef45081cb5f66b01f3fa22e3
Author: Eric Dorland <eric at debian.org>
Date:   Fri Aug 31 02:01:25 2007 -0400

    Imported openct-0.6.14
    
    Summary: Imported openct-0.6.14
    Keywords:
    
    Imported openct-0.6.14
    into Git repository

diff --git a/NEWS b/NEWS
index 1a9d550..dddcfea 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,18 @@
 NEWS for OpenCT -- History of user visible changes
 
+New in 0.6.14; 2007-08-30; Andreas Jellinghaus
+* further fixes to udev script by Kay Sievers
+
+New in 0.6.13; 2007-08-23; Andreas Jellinghaus
+* get hal setup to work
+* more fixes to udev setup. works now without usbfs.
+* fix openct.udev.modalias rule file for openct. tested, now working fine.
+* this version works with linux kernel 2.6.22+ if patched, see
+  http://lkml.org/lkml/2007/8/17/193 for a patch.
+  will be fixed in 2.6.22.6 I hope.
+* improve etc/openct_usb.in script for working without PRODUCT environment
+* comment out wbeiuu driver - use kernel driver plus phoenix driver instead
+
 New in 0.6.12; 2007-07-11; Andreas Jellinghaus
 * add alternative udev rules based on MODALIAS.
 * update wiki export (fix links, add images).
diff --git a/configure b/configure
index 7a139d9..74abe4d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for openct 0.6.12.
+# Generated by GNU Autoconf 2.61 for openct 0.6.14.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='openct'
 PACKAGE_TARNAME='openct'
-PACKAGE_VERSION='0.6.12'
-PACKAGE_STRING='openct 0.6.12'
+PACKAGE_VERSION='0.6.14'
+PACKAGE_STRING='openct 0.6.14'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/ifd/ifdhandler.c"
@@ -1419,7 +1419,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures openct 0.6.12 to adapt to many kinds of systems.
+\`configure' configures openct 0.6.14 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1489,7 +1489,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of openct 0.6.12:";;
+     short | recursive ) echo "Configuration of openct 0.6.14:";;
    esac
   cat <<\_ACEOF
 
@@ -1608,7 +1608,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-openct configure 0.6.12
+openct configure 0.6.14
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1622,7 +1622,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by openct $as_me 0.6.12, which was
+It was created by openct $as_me 0.6.14, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2292,7 +2292,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='openct'
- VERSION='0.6.12'
+ VERSION='0.6.14'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -23684,7 +23684,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by openct $as_me 0.6.12, which was
+This file was extended by openct $as_me 0.6.14, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23737,7 +23737,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-openct config.status 0.6.12
+openct config.status 0.6.14
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.ac b/configure.ac
index ef02029..de97ef3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
 
 # Require autoconf 2.52
 AC_PREREQ(2.52)
-AC_INIT([openct], [0.6.12])
+AC_INIT([openct], [0.6.14])
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
 
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 9587d88..e93831e 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,6 +1,73 @@
+2007-08-30 18:17  aj
+
+	* releases/openct-0.6.14: create new release openct 0.6.14.
+	* trunk/NEWS, trunk/configure.ac: create new version openct 0.6.14.
+
+2007-08-27 08:38  aj
+
+	* trunk/etc/openct_usb.in: fixed typo ("-u" instead of "-z") and
+	  other improvements by Kay Sievers.
+
+2007-08-23 20:13  aj
+
+	* trunk/configure.ac: trunk is now post 0.6.13.
+
+2007-08-23 20:12  aj
+
+	* trunk/NEWS: Document many provements we did in 0.6.13.
+
+2007-08-23 07:09  aj
+
+	* trunk/etc/openct.fdi, trunk/etc/openct.hald.in: update hal
+	  configuration and addon script.
+
+2007-08-22 08:20  aj
+
+	* trunk/etc/openct.udev, trunk/etc/openct.udev.modalias,
+	  trunk/etc/openct_usb.in: commit changes so this code works
+	  without CONFIG_USB_DEVICEFS.
+
+2007-08-22 07:17  aj
+
+	* trunk/etc/Makefile.am, trunk/etc/openct.fdi: add fdi file for
+	  hal.
+
+2007-08-21 09:26  aj
+
+	* trunk/NEWS: document latest changes.
+
+2007-08-21 09:22  aj
+
+	* trunk/etc/openct_usb.in: fix typo.
+
+2007-08-21 09:04  aj
+
+	* trunk/etc/openct_usb.in: simply PRODUCT regeneration.
+
+2007-08-21 08:53  aj
+
+	* trunk/etc/openct_usb.in: fix missing quotes.
+
+2007-08-21 07:06  aj
+
+	* trunk/etc/openct_usb.in: reconstruct PRODUCT from MODALIAS
+	  setting.
+
+2007-08-21 07:01  aj
+
+	* trunk/NEWS, trunk/etc/openct.conf.in, trunk/etc/openct.udev,
+	  trunk/etc/openct.udev.modalias, trunk/etc/openct.usermap,
+	  trunk/src/ifd/Makefile.am, trunk/src/ifd/init.c,
+	  trunk/src/ifd/internal.h: disable wbeiuu driver - not working
+	  yet, but kernel alternative works with phoenix driver.
+
+2007-08-21 06:55  aj
+
+	* trunk/etc/openct.udev.modalias: fix modalias rules.
+
 2007-07-11 14:45  aj
 
-	* releases/openct-0.6.12: release openct 0.6.12
+	* trunk/configure.ac: trunk is now after 0.6.12.
 
 2007-07-11 14:44  aj
 
diff --git a/doc/OperatingSystems.html b/doc/OperatingSystems.html
index 834d27f..6184627 100644
--- a/doc/OperatingSystems.html
+++ b/doc/OperatingSystems.html
@@ -7,22 +7,16 @@
 Serial readers should work fine on all operating systems. Usb needs hotplug support, so that you can plugin
 some new usb device, and if it is a smart card reader, openct needs to be notified. Unfortunatly hotplug on
 linux is currently moving from hotplug to udev or hald, so we document all three systems. Freebsd has
-usbd and dev, and no idea about all other systems.
-</p>
-<p>
-Ubuntu Linux has a special problem: they bind-mount /dev/bus/usb to /proc/bus/usb, and as a result openct
-gets notified of new hardware and kernel/udev pass the device name of the file, but the file does not exist
-and will not be created, until openct event handler has finished. OpenCT 0.6.12 contains a work-around for this problem.
+usbd and dev, and no idea about all other systems. Readers in PCMCIA and PC-Card format are experimental
+and only supported under linux so far, tested only with the udev setup (but adapting the setup should be easy).
 </p>
+<h2 id="Linux">Linux</h2>
 <p>
-Linux kernel recently got much faster with improvements in the scheduler. This also triggers new race conditions in OpenCT.
-Starting with OpenC 0.6.12 wait for certain SYSFS properties and we sleep 100ms hoping the device will show up. But both might
-not always work. As new alternative we include a rules file for udev that uses the MODALIAS environment instead of SYSFS attributes
-and thus should work around those race conditions quite well.
+We will discuss the very old hotplug setup below which nearly noone uses these days, the current udev setup and problems we know with it, and the new
+hald setup.
 </p>
-<h2 id="Linux">Linux</h2>
+<h3 id="OldHotplugSetup">Old Hotplug Setup</h3>
 <p>
-Linux should work fine, and is tested all the time.
 Serial support needs nothing special (only the serial driver for your
 serial device), but usb support on linux has a few requirements:
 </p>
@@ -32,30 +26,89 @@ serial device), but usb support on linux has a few requirements:
 </li><li>CONFIG_USB_DEVICEFS so we can talk to usb devices from userspace.
 </li><li>mount usbfs (kernel 2.4: usbdevfs) at /proc/bus/usb, to do that put this line into your /etc/fstab:
 <pre class="wiki" xml:space="preserve">usbfs           /proc/bus/usb   usbfs   defaults                0       0
-</pre></li></ul><p>
-(replace "usbfs" with "usbdevfs" for linux kernel 2.4.* - will work on kernel 2.6.* too)
+</pre>(replace "usbfs" with "usbdevfs" for linux kernel 2.4.* - will work on kernel 2.6.* too)
+</li></ul><p>
+Also the hotplug files need to be installed (see <a class="wiki" href="QuickStart.html" shape="rect">QuickStart</a> for full installation instructions):
 </p>
+<pre class="wiki" xml:space="preserve"># cp etc/openct.usermap /etc/hotplug/usb/openct.usermap
+# cp etc/openct_usb /etc/hotplug/usb/openct
+</pre><h3 id="NewudevSetup">New udev Setup</h3>
 <p>
-Unfortunatly the situation is no longer this easy. There are three new trends in linux/hotplug:
-1.) replace hotplug shell scripts with udev. 
-2.) create usb device files in /dev/bus/usb/, obsolete /proc/bus/usb/
-3.) use hal in addition to udev, programs like openct should be called by hal.
+Serial support needs nothing special (only the serial driver for your
+serial device), but usb support on linux has a few requirements:
+</p>
+<ul><li>Libusb needed during compilation and runtime.
+</li><li>CONFIG_HOTPLUG so the kernel can let us know if you plugin a reader or token.
+</li><li>udev needs to be installed. This comes with your distribution, and you are advised
+not to install or update it yourself.
+</li></ul><p>
+OpenCT before 0.6.13 also needs:
+</p>
+<ul><li>CONFIG_USB_DEVICEFS so we can talk to usb devices from userspace. 
+</li><li>mount usbfs (kernel 2.4: usbdevfs) at /proc/bus/usb, to do that put this line into your /etc/fstab:
+<pre class="wiki" xml:space="preserve">usbfs           /proc/bus/usb   usbfs   defaults                0       0
+</pre>(replace "usbfs" with "usbdevfs" for linux kernel 2.4.* - will work on kernel 2.6.* too)
+</li></ul><p>
+Also the udev files need to be installed (see <a class="wiki" href="QuickStart.html" shape="rect">QuickStart</a> for full installation instructions):
+</p>
+<pre class="wiki" xml:space="preserve"># cp etc/openct.udev /etc/udev/rules.d/50-openct.rules
+# cp etc/openct_usb /lib/udev/openct_usb
+# cp etc/openct_pcmcia /lib/udev/openct_pcmcia
+# cp etc/openct_serial /lib/udev/openct_serial
+</pre><p>
+Some common problems with udev:
+</p>
+<ul><li>kernel versions and udev rules do not fit. Several kernels required new udev versions, so updating
+the kernel without udev will not work. Updating udev is something you shouldn't do yourself, best
+use the distribution udev. As a result you cannot update the kernel or need to update your whole
+distribution.
+</li><li>For a long time every distribution had usbfs mounted on /proc/bus/usb. Some stopped doing that and
+thus broke OpenCT. This is fixed in OpenCT 0.6.13+. Note: OpenSuse uses hal for connecting linux kernel
+and OpenCT and thus should work without usbfs mounted on /proc/bus/usb.
+</li><li>Ubuntu 7.04 ("feisty") and maybe also older versions had usbfs mounted on /proc/bus/usb/.usbfs and
+a bind mount from /dev/bus/usb to /proc/bus/usb. This broken OpenCT as the device we wanted to open
+was always created to late. OpenCT 0.6.12 has added a work around for this. Ubuntu 7.10 will drop this
+practice (but maybe not have /proc/bus/usb at all).
+</li><li>Linux Kernel 2.6.22 has changes to the usb code that result in some uevents missing PRODUCT and TYPE
+and DEVICE information. This will be fixed in 2.6.23 and 2.6.22.5. Please update your kernel.
+</li><li>Linux Kernel 2.6.22+ has a new option CONFIG_USB_DEVICE_CLASS, which is marked deprecated. As long as
+it is on everything is fine. But if turned off there could be problems. This option doesn't harm OpenCT
+per se, but might break your udev code to generate /dev/bus/usb/xxx/yyy devices. As a result libusb
+will not find any device (because /dev/bus/usb exists it doesn't look at /proc/bus/usb even if that one
+is fine), and thus also our coldplug code run by "/etc/init.d/openct start" breaks.
+</li><li>People could compile their kernel without the CONFIG_USB_DEVICEFS option. This option was only needed for
+usbfs, and some might think with /dev/bus/usb it is no longer needed to have usbfs on /proc/bus/usb. But
+without this option the kernel also doesn't add the DEVICE information to the kernel events, and thus
+OpenCT can be notified by udev about new devices, but will not have the name of the new device and thus
+cannot process this information. OpenCT 0.6.13+ can work without CONFIG_USB_DEVICEFS.
+</li><li>udev has a mechanism as alternative to DEVICE, it is called DEVNAME. But it only works with the proper udev
+rules and on many distributions those are not in place, resulting in DEVNAME like /dev/2-1.7 - something
+openct can't work with. A proper udev rules looks like this:
+<pre class="wiki" xml:space="preserve">  SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
+    NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
+</pre>OpenCT 0.6.13+ has this rule and a modified script so we can construct the device name from udev information
+stored from a previous event and read by udevinfo later.
+</li></ul><h3 id="haldsetup">hald setup</h3>
+<p>
+Hald needs a fdi config file and a script it runs when something in the fdi config file matches.
+To install these files:
+</p>
+<pre class="wiki" xml:space="preserve"># mkdir -p /usr/share/hal/fdi/information/10freedesktop/
+# cp etc/openct.fdi /usr/share/hal/fdi/information/10freedesktop/10-usb-openct.fdi
+# cp etc/openct.hald /usr/bin/hald-addon-openct
+</pre><p>
+OpenSuse ships OpenCT connected via hald to the kernel events. The fdi config file for hald in openct-0.6.12-10 however
+does not match usb class information and thus will not work with all reades. Also the hald-addon-openct in openct-0.6.12-10
+seems to be broken, as it uses /proc/bus/usb/ PATH, but as far as we know OpenSuse only has devices in /dev/bus/usb.
 </p>
 <p>
-The first trend is easy: we added a file "openct.udev" to etc/ in the source.
-Copy it into /etc/udev/rules/ as "95-openct.rules" and you should be fine.
-<a class="wiki" href="QuickStart.html" shape="rect">QuickStart</a> has the details about it. Even if your system still uses hotplug this should be ok.
-Note you also need the files in /etc/hotplug/.
+OpenCT 0.6.13+ comes with a hald fdi file and we hope the packages OpenSuse creates for this new version will work.
 </p>
 <p>
-The second trend is ok: we changed openct so it works with either paths to the usb devices.
+PCMCIA and PC-Card readers are not yet supported via hald, advice and patches are very welcome.
 </p>
 <p>
-The third trend is difficult: So far hal has nearly no documentation at all, so we can't use it.
-Also it seems to have less functionality: while hotplug and udev have a mechanism to match any
-event against a list of what we are interested in, I have not seen anything like that in hal.
-So using hal would be very inefficient we guess. Also so far noone told us why we should change
-a running system. Till we learn more about it, hal remains a mysterious new technology.
+Hald documentation is available online at <a class="ext-link" href="http://people.freedesktop.org/~david/hal-spec/hal-spec.html" shape="rect"><span class="icon">http://people.freedesktop.org/~david/hal-spec/hal-spec.html</span></a>
 </p>
 <h2 id="FreeBSD">FreeBSD</h2>
 <p>
diff --git a/doc/QuickStart.html b/doc/QuickStart.html
index 36bea3c..a37e0ba 100644
--- a/doc/QuickStart.html
+++ b/doc/QuickStart.html
@@ -4,15 +4,14 @@
           </style></head><body><div class="wikipage">
     <div id="searchable"><h1 id="Aquickinstallationguidetoopenct">A quick installation guide to openct</h1>
 <p>
-Warning: Linux distributions are moving from hotplug to udev. Starting with openct 0.6.9  we move some files used in hotplugging around to reflect
-this change. If you use OpenCT before 0.6.9, please see the documentation that is included with your version instead. Thanks.
+Please read <a class="wiki" href="OperatingSystems.html" shape="rect">OperatingSystems</a> page first for the general concept and problems and then come back here for step by step instructions. Thanks.
 </p>
 <p>
 To install openct, please do as user,
 </p>
-<pre class="wiki" xml:space="preserve">$ wget http://www.opensc-project.org/files/openct/openct-0.6.9.tar.gz
-$ tar xfvz openct-0.6.9.tar.gz
-$ cd openct-0.6.9
+<pre class="wiki" xml:space="preserve">$ wget http://www.opensc-project.org/files/openct/openct-0.6.13.tar.gz
+$ tar xfvz openct-0.6.13.tar.gz
+$ cd openct-0.6.13
 
 $ ./configure --prefix=/usr --sysconfdir=/etc
 </pre><p>
@@ -91,16 +90,16 @@ can leave some smart cards confused up to the point of being unusable.
 This is rare, but it happends (especially while a card is initialized).
 </p>
 <p>
-Linux distributions are using the new "udev" mechanism these days
-to hotplug devices. If your distribution uses udev, here is what to
-do.
+Linux distributions know three menchanism for hotplugging:
+hotplug and hotplug-ng (both old), udev (medium), hald (new).
+If your distribution uses udev, here is what to do. 
 </p>
 <pre class="wiki" xml:space="preserve"># cp etc/openct.udev /etc/udev/rules.d/95-openct.rules
 # cp etc/openct_usb /lib/udev/openct_usb
 # cp etc/openct_pcmcia /lib/udev/openct_pcmcia
 # cp etc/openct_serial /lib/udev/openct_serial
 </pre><p>
-If your linux distribution is still using hotplug, you can
+If your linux distribution is still using old hotplug or hotplug-ng, you can
 instead do this:
 </p>
 <pre class="wiki" xml:space="preserve"># cp etc/openct.usermap /etc/hotplug/usb/openct.usermap
@@ -114,6 +113,16 @@ hotplug setup. If it works for you, please report back, so we
 can include it in OpenCT.
 </p>
 <p>
+If your linux distribution uses the new hald setup, you can do this instead:
+</p>
+<pre class="wiki" xml:space="preserve"># mkdir -p /usr/share/hal/fdi/information/10freedesktop/
+# cp etc/openct.fdi /usr/share/hal/fdi/information/10freedesktop/10-usb-openct.fdi
+# cp etc/openct.hald /usr/bin/hald-addon-openct
+</pre><p>
+Note that hald setup does not support readers in pcmcia or pc-card so far.
+But for usb it was tested and is working fine.
+</p>
+<p>
 See <a class="wiki" href="OperatingSystems.html" shape="rect">OperatingSystems</a> for more details and information
 on other operating systems.
 </p>
diff --git a/doc/api/annotated.html b/doc/api/annotated.html
index 1c17dc1..9be3d54 100644
--- a/doc/api/annotated.html
+++ b/doc/api/annotated.html
@@ -34,7 +34,7 @@
   <tr><td class="indexkey"><a class="el" href="structifd__reader.html">ifd_reader</a></td><td class="indexvalue"></td></tr>
   <tr><td class="indexkey"><a class="el" href="structifd__slot.html">ifd_slot</a></td><td class="indexvalue"></td></tr>
 </table>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/apdu_8h-source.html b/doc/api/apdu_8h-source.html
index 3bb361f..82a5a46 100644
--- a/doc/api/apdu_8h-source.html
+++ b/doc/api/apdu_8h-source.html
@@ -62,7 +62,7 @@
 <a name="l00046"></a>00046 <span class="preprocessor">#endif</span>
 <a name="l00047"></a>00047 <span class="preprocessor"></span>
 <a name="l00048"></a>00048 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_APDU_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/buffer_8h-source.html b/doc/api/buffer_8h-source.html
index caa404f..0f59338 100644
--- a/doc/api/buffer_8h-source.html
+++ b/doc/api/buffer_8h-source.html
@@ -58,7 +58,7 @@
 <a name="l00042"></a>00042 <span class="preprocessor">#endif</span>
 <a name="l00043"></a>00043 <span class="preprocessor"></span>
 <a name="l00044"></a>00044 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_BUFFER_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/conf_8h-source.html b/doc/api/conf_8h-source.html
index 8596502..f3d12cd 100644
--- a/doc/api/conf_8h-source.html
+++ b/doc/api/conf_8h-source.html
@@ -68,7 +68,7 @@
 <a name="l00052"></a>00052 <span class="preprocessor">#endif</span>
 <a name="l00053"></a>00053 <span class="preprocessor"></span>
 <a name="l00054"></a>00054 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_CONF_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/device_8h-source.html b/doc/api/device_8h-source.html
index 51f4901..19602c8 100644
--- a/doc/api/device_8h-source.html
+++ b/doc/api/device_8h-source.html
@@ -141,7 +141,7 @@
 <a name="l00125"></a>00125 <span class="preprocessor">#endif</span>
 <a name="l00126"></a>00126 <span class="preprocessor"></span>
 <a name="l00127"></a>00127 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_DEVICE_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/dir_48ff4d8e84c7d8bdad9110a7da283b5f.html b/doc/api/dir_48ff4d8e84c7d8bdad9110a7da283b5f.html
index 7986405..e44ebc6 100644
--- a/doc/api/dir_48ff4d8e84c7d8bdad9110a7da283b5f.html
+++ b/doc/api/dir_48ff4d8e84c7d8bdad9110a7da283b5f.html
@@ -20,7 +20,7 @@
 <tr><td class="memItemLeft" nowrap align="right" valign="top">directory &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_877fe36415f52529fd2e180217ad90f9.html">include</a></td></tr>
 
 </table>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/dir_877fe36415f52529fd2e180217ad90f9.html b/doc/api/dir_877fe36415f52529fd2e180217ad90f9.html
index 7f28d5d..1cceaab 100644
--- a/doc/api/dir_877fe36415f52529fd2e180217ad90f9.html
+++ b/doc/api/dir_877fe36415f52529fd2e180217ad90f9.html
@@ -20,7 +20,7 @@
 <tr><td class="memItemLeft" nowrap align="right" valign="top">directory &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="dir_be5e542b2ca1305501268904b0410904.html">openct</a></td></tr>
 
 </table>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/dir_be5e542b2ca1305501268904b0410904.html b/doc/api/dir_be5e542b2ca1305501268904b0410904.html
index ffbc419..50402e3 100644
--- a/doc/api/dir_be5e542b2ca1305501268904b0410904.html
+++ b/doc/api/dir_be5e542b2ca1305501268904b0410904.html
@@ -51,7 +51,7 @@
 <tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><b>types.h</b> <a href="types_8h-source.html">[code]</a></td></tr>
 
 </table>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/dirs.html b/doc/api/dirs.html
index 3d45e53..a5241b8 100644
--- a/doc/api/dirs.html
+++ b/doc/api/dirs.html
@@ -21,7 +21,7 @@
 </ul>
 </ul>
 </ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/driver_8h-source.html b/doc/api/driver_8h-source.html
index d156b18..d504548 100644
--- a/doc/api/driver_8h-source.html
+++ b/doc/api/driver_8h-source.html
@@ -92,7 +92,7 @@
 <a name="l00346"></a>00346 <span class="preprocessor">#endif</span>
 <a name="l00347"></a>00347 <span class="preprocessor"></span>
 <a name="l00348"></a>00348 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_DRIVER_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/driver_8h.html b/doc/api/driver_8h.html
index 0a7a1ac..d70dce0 100644
--- a/doc/api/driver_8h.html
+++ b/doc/api/driver_8h.html
@@ -53,7 +53,7 @@ Internal driver API.
 <p>
 Copyright (C) 2003, Olaf Kirch &lt;<a href="mailto:okir at suse.de">okir at suse.de</a>&gt; 
 <p>
-Definition in file <a class="el" href="driver_8h-source.html">driver.h</a>.<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+Definition in file <a class="el" href="driver_8h-source.html">driver.h</a>.<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/error_8h-source.html b/doc/api/error_8h-source.html
index 05cb89b..9b96d87 100644
--- a/doc/api/error_8h-source.html
+++ b/doc/api/error_8h-source.html
@@ -65,7 +65,7 @@
 <a name="l00049"></a>00049 <span class="preprocessor">#endif</span>
 <a name="l00050"></a>00050 <span class="preprocessor"></span>
 <a name="l00051"></a>00051 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_ERROR_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/files.html b/doc/api/files.html
index a9a7c1b..dc0c030 100644
--- a/doc/api/files.html
+++ b/doc/api/files.html
@@ -29,7 +29,7 @@
   <tr><td class="indexkey"><b>tlv.h</b> <a href="tlv_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
   <tr><td class="indexkey"><b>types.h</b> <a href="types_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
 </table>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/functions.html b/doc/api/functions.html
index a14bed9..aaad823 100644
--- a/doc/api/functions.html
+++ b/doc/api/functions.html
@@ -308,7 +308,7 @@ Here is a list of all documented struct and union fields with links to the struc
 <li>xid
 : <a class="el" href="structheader.html#28e4e80bd5ac5a2c5028521d9cf5d574">header</a>
 </ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/functions_vars.html b/doc/api/functions_vars.html
index 30d288f..92486c8 100644
--- a/doc/api/functions_vars.html
+++ b/doc/api/functions_vars.html
@@ -308,7 +308,7 @@
 <li>xid
 : <a class="el" href="structheader.html#28e4e80bd5ac5a2c5028521d9cf5d574">header</a>
 </ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/ifd_8h-source.html b/doc/api/ifd_8h-source.html
index b72bf02..d99a76b 100644
--- a/doc/api/ifd_8h-source.html
+++ b/doc/api/ifd_8h-source.html
@@ -210,7 +210,7 @@
 <a name="l00194"></a>00194 <span class="preprocessor">#endif</span>
 <a name="l00195"></a>00195 <span class="preprocessor"></span>
 <a name="l00196"></a>00196 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_IFD_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/index.html b/doc/api/index.html
index 286c995..10181b7 100644
--- a/doc/api/index.html
+++ b/doc/api/index.html
@@ -14,7 +14,7 @@
   </ul></div>
 <h1>OpenCT Documentation</h1>
 <p>
-<h3 align="center">0.6.12 </h3><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<h3 align="center">0.6.14 </h3><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/logging_8h-source.html b/doc/api/logging_8h-source.html
index 79b7490..00a1bbd 100644
--- a/doc/api/logging_8h-source.html
+++ b/doc/api/logging_8h-source.html
@@ -39,7 +39,7 @@
 <a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
 <a name="l00024"></a>00024 <span class="preprocessor"></span>
 <a name="l00025"></a>00025 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_LOGGING_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/openct_8h-source.html b/doc/api/openct_8h-source.html
index d3f8c47..36ac65a 100644
--- a/doc/api/openct_8h-source.html
+++ b/doc/api/openct_8h-source.html
@@ -116,7 +116,7 @@
 <a name="l00100"></a>00100 <span class="preprocessor">#endif</span>
 <a name="l00101"></a>00101 <span class="preprocessor"></span>
 <a name="l00102"></a>00102 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_OPENCT_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/path_8h-source.html b/doc/api/path_8h-source.html
index 61874e2..098fc62 100644
--- a/doc/api/path_8h-source.html
+++ b/doc/api/path_8h-source.html
@@ -33,7 +33,7 @@
 <a name="l00017"></a>00017 <span class="preprocessor"></span>}
 <a name="l00018"></a>00018 <span class="preprocessor">#endif</span>
 <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#endif                          </span><span class="comment">/* OPENCT_PATH_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/protocol_8h-source.html b/doc/api/protocol_8h-source.html
index 750136b..a62fb6a 100644
--- a/doc/api/protocol_8h-source.html
+++ b/doc/api/protocol_8h-source.html
@@ -86,7 +86,7 @@
 <a name="l00070"></a>00070 <span class="preprocessor">#endif</span>
 <a name="l00071"></a>00071 <span class="preprocessor"></span>
 <a name="l00072"></a>00072 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_PROTOCOL_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/server_8h-source.html b/doc/api/server_8h-source.html
index 8942cf7..ff5fe6f 100644
--- a/doc/api/server_8h-source.html
+++ b/doc/api/server_8h-source.html
@@ -38,7 +38,7 @@
 <a name="l00022"></a>00022 <span class="preprocessor">#endif</span>
 <a name="l00023"></a>00023 <span class="preprocessor"></span>
 <a name="l00024"></a>00024 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_SERVER_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/socket_8h-source.html b/doc/api/socket_8h-source.html
index 802c9b3..41d9b5c 100644
--- a/doc/api/socket_8h-source.html
+++ b/doc/api/socket_8h-source.html
@@ -100,7 +100,7 @@
 <a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
 <a name="l00085"></a>00085 <span class="preprocessor"></span>
 <a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_SOCKET_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structct__buf.html b/doc/api/structct__buf.html
index 4278a1c..7639fe7 100644
--- a/doc/api/structct__buf.html
+++ b/doc/api/structct__buf.html
@@ -43,7 +43,7 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
 <p>
 Definition at line <a class="el" href="buffer_8h-source.html#l00016">16</a> of file <a class="el" href="buffer_8h-source.html">buffer.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="buffer_8h-source.html">buffer.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structct__config.html b/doc/api/structct__config.html
index e026845..c185019 100644
--- a/doc/api/structct__config.html
+++ b/doc/api/structct__config.html
@@ -55,7 +55,7 @@ const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
 <p>
 Definition at line <a class="el" href="conf_8h-source.html#l00014">14</a> of file <a class="el" href="conf_8h-source.html">conf.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="conf_8h-source.html">conf.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structct__info.html b/doc/api/structct__info.html
index 9c84c78..1c3efcb 100644
--- a/doc/api/structct__info.html
+++ b/doc/api/structct__info.html
@@ -46,7 +46,7 @@ pid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="str
 <p>
 Definition at line <a class="el" href="openct_8h-source.html#l00020">20</a> of file <a class="el" href="openct_8h-source.html">openct.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="openct_8h-source.html">openct.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structct__socket.html b/doc/api/structct__socket.html
index 3992af2..5cdf38d 100644
--- a/doc/api/structct__socket.html
+++ b/doc/api/structct__socket.html
@@ -82,7 +82,7 @@ uid_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="str
 <p>
 Definition at line <a class="el" href="socket_8h-source.html#l00028">28</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="socket_8h-source.html">socket.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structct__tlv__builder.html b/doc/api/structct__tlv__builder.html
index 9e169d0..116c9bd 100644
--- a/doc/api/structct__tlv__builder.html
+++ b/doc/api/structct__tlv__builder.html
@@ -43,7 +43,7 @@ unsigned char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el"
 <p>
 Definition at line <a class="el" href="tlv_8h-source.html#l00025">25</a> of file <a class="el" href="tlv_8h-source.html">tlv.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="tlv_8h-source.html">tlv.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structct__tlv__parser.html b/doc/api/structct__tlv__parser.html
index 0e924a5..615962a 100644
--- a/doc/api/structct__tlv__parser.html
+++ b/doc/api/structct__tlv__parser.html
@@ -37,7 +37,7 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
 <p>
 Definition at line <a class="el" href="tlv_8h-source.html#l00019">19</a> of file <a class="el" href="tlv_8h-source.html">tlv.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="tlv_8h-source.html">tlv.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structheader.html b/doc/api/structheader.html
index e3d1fa2..2eef99c 100644
--- a/doc/api/structheader.html
+++ b/doc/api/structheader.html
@@ -40,7 +40,7 @@ uint16_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="
 <p>
 Definition at line <a class="el" href="socket_8h-source.html#l00021">21</a> of file <a class="el" href="socket_8h-source.html">socket.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="socket_8h-source.html">socket.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__conf__node.html b/doc/api/structifd__conf__node.html
index 7ccdbd9..8cd50ce 100644
--- a/doc/api/structifd__conf__node.html
+++ b/doc/api/structifd__conf__node.html
@@ -40,7 +40,7 @@ char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
 <p>
 Definition at line <a class="el" href="conf_8h-source.html#l00026">26</a> of file <a class="el" href="conf_8h-source.html">conf.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="conf_8h-source.html">conf.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__devid.html b/doc/api/structifd__devid.html
index 1388876..5cab881 100644
--- a/doc/api/structifd__devid.html
+++ b/doc/api/structifd__devid.html
@@ -37,7 +37,7 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
 <p>
 Definition at line <a class="el" href="device_8h-source.html#l00056">56</a> of file <a class="el" href="device_8h-source.html">device.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="device_8h-source.html">device.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__driver.html b/doc/api/structifd__driver.html
index 0f4f3b4..138fc84 100644
--- a/doc/api/structifd__driver.html
+++ b/doc/api/structifd__driver.html
@@ -34,7 +34,7 @@ const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
 <p>
 Definition at line <a class="el" href="ifd_8h-source.html#l00039">39</a> of file <a class="el" href="ifd_8h-source.html">ifd.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="ifd_8h-source.html">ifd.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__driver__ops.html b/doc/api/structifd__driver__ops.html
index 40826c8..c72b32e 100644
--- a/doc/api/structifd__driver__ops.html
+++ b/doc/api/structifd__driver__ops.html
@@ -466,7 +466,7 @@ Called by: sync_write at proto-sync.c. <dl class="return" compact><dt><b>Returns
 </div><p>
 <hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="driver_8h-source.html">driver.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__iso__apdu.html b/doc/api/structifd__iso__apdu.html
index 777725b..75ebfef 100644
--- a/doc/api/structifd__iso__apdu.html
+++ b/doc/api/structifd__iso__apdu.html
@@ -64,7 +64,7 @@ unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" hr
 <p>
 Definition at line <a class="el" href="apdu_8h-source.html#l00014">14</a> of file <a class="el" href="apdu_8h-source.html">apdu.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="apdu_8h-source.html">apdu.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__reader.html b/doc/api/structifd__reader.html
index d7bd2f8..4fbe1e5 100644
--- a/doc/api/structifd__reader.html
+++ b/doc/api/structifd__reader.html
@@ -58,7 +58,7 @@ void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
 <p>
 Definition at line <a class="el" href="ifd_8h-source.html#l00059">59</a> of file <a class="el" href="ifd_8h-source.html">ifd.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="ifd_8h-source.html">ifd.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/structifd__slot.html b/doc/api/structifd__slot.html
index 4ad6974..d285842 100644
--- a/doc/api/structifd__slot.html
+++ b/doc/api/structifd__slot.html
@@ -52,7 +52,7 @@ void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="st
 <p>
 Definition at line <a class="el" href="ifd_8h-source.html#l00045">45</a> of file <a class="el" href="ifd_8h-source.html">ifd.h</a>.<hr>The documentation for this struct was generated from the following file:<ul>
 <li><a class="el" href="ifd_8h-source.html">ifd.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/tlv_8h-source.html b/doc/api/tlv_8h-source.html
index 7abe69d..037702e 100644
--- a/doc/api/tlv_8h-source.html
+++ b/doc/api/tlv_8h-source.html
@@ -75,7 +75,7 @@
 <a name="l00059"></a>00059 <span class="preprocessor">#endif</span>
 <a name="l00060"></a>00060 <span class="preprocessor"></span>
 <a name="l00061"></a>00061 <span class="preprocessor">#endif </span><span class="comment">/* OPENCT_TLV_H */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/types_8h-source.html b/doc/api/types_8h-source.html
index 92498db..0b45e69 100644
--- a/doc/api/types_8h-source.html
+++ b/doc/api/types_8h-source.html
@@ -17,7 +17,7 @@
 <h1>types.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _SRC_INCLUDE_OPENCT_TYPES_H</span>
 <a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _SRC_INCLUDE_OPENCT_TYPES_H 1</span>
 <a name="l00003"></a>00003 <span class="preprocessor"></span><span class="preprocessor">#ifndef _GENERATED_STDINT_H</span>
-<a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#define _GENERATED_STDINT_H "openct 0.6.12"</span>
+<a name="l00004"></a>00004 <span class="preprocessor"></span><span class="preprocessor">#define _GENERATED_STDINT_H "openct 0.6.14"</span>
 <a name="l00005"></a>00005 <span class="preprocessor"></span><span class="comment">/* generated using a gnu compiler version gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */</span>
 <a name="l00006"></a>00006 
 <a name="l00007"></a>00007 <span class="preprocessor">#include &lt;stdint.h&gt;</span>
@@ -31,7 +31,7 @@
 <a name="l00015"></a>00015   <span class="comment">/* once */</span>
 <a name="l00016"></a>00016 <span class="preprocessor">#endif</span>
 <a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/api/unionifd__device__params.html b/doc/api/unionifd__device__params.html
index 2c5f429..99127de 100644
--- a/doc/api/unionifd__device__params.html
+++ b/doc/api/unionifd__device__params.html
@@ -64,7 +64,7 @@ struct {</td></tr>
 <p>
 Definition at line <a class="el" href="device_8h-source.html#l00028">28</a> of file <a class="el" href="device_8h-source.html">device.h</a>.<hr>The documentation for this union was generated from the following file:<ul>
 <li><a class="el" href="device_8h-source.html">device.h</a></ul>
-<hr size="1"><address style="align: right;"><small>Generated on Mon Jul 16 10:48:01 2007 for OpenCT by&nbsp;
+<hr size="1"><address style="align: right;"><small>Generated on Thu Aug 30 20:21:19 2007 for OpenCT by&nbsp;
 <a href="http://www.doxygen.org/index.html">
 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
 </body>
diff --git a/doc/index.html b/doc/index.html
index e4a7b10..183856c 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -17,6 +17,11 @@ OpenCT was written by an international team and is licensed as <a class="ext-lin
 under the <a class="ext-link" href="http://www.opensource.org/licenses/lgpl-license.php" shape="rect"><span class="icon">LGPL license</span></a>.
 For a list of all authors and contributers as well as detailed license information see <a class="wiki" href="AuthorsAndCredits.html" shape="rect">AuthorsAndCredits</a>.
 </p>
+<h2 id="LinuxNote">Linux Note</h2>
+<p>
+We found a number of problems with linux kernel, udev, and distribution setup. We document our findings
+and how to solve them in <a class="wiki" href="OperatingSystems.html" shape="rect">OperatingSystems</a> and <a class="wiki" href="QuickStart.html" shape="rect">QuickStart</a>.
+</p>
 <h2 id="Readers">Readers</h2>
 <p>
 All recent usb readers most likely implement the CCID specification and thus the generic <a class="wiki" href="ccid.html" shape="rect">USB CCID</a> driver should work.
diff --git a/doc/wbeiuu.html b/doc/wbeiuu.html
index 882c8a0..1e2dc7a 100644
--- a/doc/wbeiuu.html
+++ b/doc/wbeiuu.html
@@ -4,32 +4,38 @@
           </style></head><body><div class="wikipage">
     <div id="searchable"><h1 id="WBElectronicsInfinityUSBUnlimited">WB Electronics' Infinity USB Unlimited</h1>
 <p>
-The <a class="ext-link" href="http://www.wbe.dk/default.asp?show=productsdetail&amp;ProductID=11" shape="rect"><span class="icon">WB Electronics' Infinity USB Unlimited</span></a>, in short <strong>wbeiuu</strong>, is a neat card programmer popular among AVR and PIC based smart card hackers.
+There is a native openct driver - under development - and there is a driver for the linux kernel
+that can be combined with the OpenCT "phoenix" driver.
 </p>
+<h2 id="LinuxKerneldriver">Linux Kernel driver</h2>
 <p>
-OpenCT &gt; 0.6.6 + patches supports WB Electronics' Infinity USB Unlimited card readers.
+A driver for the linux kernel is available at <a class="ext-link" href="http://eczema.ecze.com/iuu_phoenix.html" shape="rect"><span class="icon">http://eczema.ecze.com/iuu_phoenix.html</span></a>
+This driver has been tested and reported as working fine. Compile the kernel module
+and install it and then use 
 </p>
-<p>
-OpenCT &gt; 0.6.7 will support WB Electronics' Infinity USB Unlimited card readers.
+<pre class="wiki" xml:space="preserve">insmod iuu_phoenix.ko cdmode=1
+</pre><p>
+to load the module. Now you have an extra serial port and can use OpenCT phoenix driver
+with this serial port. Edit openct.conf and add this section:
 </p>
-<h2 id="TestResults">Test Results</h2>
-<p>
-OpenCT &gt; 0.6.6 + patches is able to retrieve ATRs though the driver functionality as of today (20/Apr/2006) is quite limited. 
+<pre class="wiki" xml:space="preserve">reader iuu {
+        driver = phoenix;
+        device = serial:/dev/ttyUSB0;
+};
+</pre><p>
+and restart openct with
 </p>
-<p>
-In OpenCT 0.6.7 there is a bug in openct.conf(.in): please edit that file, at the buttom you will find an entry for wbeiuu.
-The identification line is "usb:104f:0004," but it should be "usb:104f/0004," i.e. with a dash between product and vendor number,
-not a colon.
+<pre class="wiki" xml:space="preserve">/etc/init.d/openct restart
+</pre><p>
+and you are all set.
 </p>
-<h2 id="Wheretobuy">Where to buy</h2>
+<h2 id="NativeOpenCTdriver">Native OpenCT driver</h2>
 <p>
-The manufacturer is <a class="ext-link" href="http://www.wbe.dk" shape="rect"><span class="icon">WB_Electronics</span></a>, a Danish company.
-</p>
-<p>
-According to their web site, European distributors include <a class="ext-link" href="http://www.cardwriter.nl/" shape="rect"><span class="icon">CardWriter</span></a> in the Netherlands,  <a class="ext-link" href="http://www.maxking.com/" shape="rect"><span class="icon">Manigo</span></a> in UK and <a class="ext-link" href="http://www.satmedia.com/" shape="rect"><span class="icon">SatMedia</span></a> in Germany. All three have online shops.
+The native openct driver "wbeiuu" is under development and not working so far :-(
 </p>
+<h2 id="TestResults">Test Results</h2>
 <p>
-The number of small retailers having this product in their catalog is of course much larger. Check your electronics shop of choice, be it local or online.
+Alain Degreffe reported the kernel driver plus openct working fine. (OpenCT 0.6.11) 2007-08-08
 </p>
 </div>
    </div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
diff --git a/etc/Makefile.am b/etc/Makefile.am
index 65543fe..6f8c64a 100644
--- a/etc/Makefile.am
+++ b/etc/Makefile.am
@@ -7,7 +7,7 @@ DISTCLEANFILES = openct.conf init-script openct.hald reader.conf \
 
 EXTRA_DIST = Info.plist openct.usermap openct.udev openct.udev.modalias \
 	openct.conf.in init-script.in openct.hald.in reader.conf.in \
-	openct_usb.in openct_pcmcia.in openct_serial.in
+	openct_usb.in openct_pcmcia.in openct_serial.in openct.fdi
 
 noinst_DATA = openct.conf reader.conf
 
diff --git a/etc/Makefile.in b/etc/Makefile.in
index d3161d1..e7995f6 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -194,7 +194,7 @@ DISTCLEANFILES = openct.conf init-script openct.hald reader.conf \
 
 EXTRA_DIST = Info.plist openct.usermap openct.udev openct.udev.modalias \
 	openct.conf.in init-script.in openct.hald.in reader.conf.in \
-	openct_usb.in openct_pcmcia.in openct_serial.in
+	openct_usb.in openct_pcmcia.in openct_serial.in openct.fdi
 
 noinst_DATA = openct.conf reader.conf
 noinst_SCRIPTS = openct_usb openct_pcmcia openct_serial init-script openct.hald
diff --git a/etc/openct.conf.in b/etc/openct.conf.in
index 014a879..edf6bd9 100644
--- a/etc/openct.conf.in
+++ b/etc/openct.conf.in
@@ -126,8 +126,8 @@ driver pertosmart1038 {
 		usb:072f/90d0,
 	};
 };
-driver wbeiuu {
-	ids = {
-		usb:104f/0004,
-	};
-};
+#driver wbeiuu {	#	driver not working yet
+#	ids = {
+#		usb:104f/0004,
+#	};
+#};
diff --git a/etc/openct.fdi b/etc/openct.fdi
new file mode 100644
index 0000000..8495f76
--- /dev/null
+++ b/etc/openct.fdi
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
+<deviceinfo version="0.2">
+  <device>
+    <match key="info.bus" string="usb">
+
+      <match key="usb.vendor_id" int="0x0973">
+	<match key="usb.product_id" int="0x0001">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x0529">
+	<match key="usb.product_id" int="0x050c">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x0529">
+	<match key="usb.product_id" int="0x0514">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x0529">
+	<match key="usb.product_id" int="0x0600">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x0529">
+	<match key="usb.product_id" int="0x0700">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x073d">
+	<match key="usb.product_id" int="0x0005">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x04b9">
+	<match key="usb.product_id" int="0x1200">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x04b9">
+	<match key="usb.product_id" int="0x1300">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x096e">
+	<match key="usb.product_id" int="0x0005">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.interface.class" int="0xb">
+	<match key="usb.interface.subclass" int="0x0">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x04e6">
+	<match key="usb.product_id" int="0x0003">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x072f">
+	<match key="usb.product_id" int="0x0001">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x072f">
+	<match key="usb.product_id" int="0x8009">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x072f">
+	<match key="usb.product_id" int="0x9000">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+      <match key="usb.vendor_id" int="0x072f">
+	<match key="usb.product_id" int="0x90d0">
+	  <merge key="info.category" type="string">smart_card_reader</merge>
+	  <append key="info.addons" type="strlist">hald-addon-openct</append>
+	</match>
+      </match>
+
+    </match>
+  </device>
+</deviceinfo>
diff --git a/etc/openct.hald.in b/etc/openct.hald.in
index 6d414b6..dbc35a4 100644
--- a/etc/openct.hald.in
+++ b/etc/openct.hald.in
@@ -1,17 +1,16 @@
 #!/bin/bash
 
-PRODUCT="$HAL_PROP_USB_DEVICE_VENDOR_ID/$HAL_PROP_USB_DEVICE_PRODUCT_ID"
+PRODUCT="`printf %x/%x/%x $HAL_PROP_USB_VENDOR_ID $HAL_PROP_USB_PRODUCT_ID \
+	$HAL_PROP_USB_DEVICE_REVISION_BCD`"
 
-DEVICE=`printf /dev/bus/usb/%03u/%03u \
-	$HAL_PROP_USB_DEVICE_BUS_NUMBER \
-	$HAL_PROP_USB_DEVICE_LINUX_DEVICE_NUMBER`
+DEVICE="`printf /dev/bus/usb/%03u/%03u \
+	$HAL_PROP_USB_BUS_NUMBER $HAL_PROP_USB_LINUX_DEVICE_NUMBER`"
 
 if test -e $DEVICE
 then
 	exec SBINDIR/openct-control attach usb:$PRODUCT usb $DEVICE
 fi
 
-DEVICE=`printf /proc/bus/usb/%03u/%03u \
-	$HAL_PROP_USB_DEVICE_BUS_NUMBER \
-	$HAL_PROP_USB_DEVICE_LINUX_DEVICE_NUMBER`
+DEVICE="`printf /proc/bus/usb/%03u/%03u \
+	$HAL_PROP_USB_BUS_NUMBER $HAL_PROP_USB_LINUX_DEVICE_NUMBER`"
 exec SBINDIR/openct-control attach usb:$PRODUCT usb $DEVICE
diff --git a/etc/openct.udev b/etc/openct.udev
index 08ed70e..ab983e6 100644
--- a/etc/openct.udev
+++ b/etc/openct.udev
@@ -13,6 +13,13 @@
 SUBSYSTEM!="usb", GOTO="openct_usb_rules_end"
 ACTION!="add", GOTO="openct_usb_rules_end"
 
+# some distributions might not have a proper rule to set the name.
+# this is needed without USB_DEVICEFS the kernel doesn't tell us about
+# DEVICE. so we need to know the name of the device created by udev in
+# /dev/bus/usb.
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
+	NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
+
 # last file created by the kernel, if this is present everything should be
 KERNEL=="[0-9]*:*", WAIT_FOR_SYSFS="bInterfaceProtocol"
 
@@ -51,8 +58,8 @@ SYSFS{idVendor}=="072f", SYSFS{idProduct}=="8009", RUN+="/lib/udev/openct_usb"
 # pertosmart1038
 SYSFS{idVendor}=="072f", SYSFS{idProduct}=="9000", RUN+="/lib/udev/openct_usb"
 SYSFS{idVendor}=="072f", SYSFS{idProduct}=="90d0", RUN+="/lib/udev/openct_usb"
-# wbeiuu
-SYSFS{idVendor}=="104f", SYSFS{idProduct}=="0004", RUN+="/lib/udev/openct_usb"
+# wbeiuu	- driver not working yet.
+#SYSFS{idVendor}=="104f", SYSFS{idProduct}=="0004", RUN+="/lib/udev/openct_usb"
 
 LABEL="openct_usb_rules_end"
 
diff --git a/etc/openct.udev.modalias b/etc/openct.udev.modalias
index 1710a35..701fc65 100644
--- a/etc/openct.udev.modalias
+++ b/etc/openct.udev.modalias
@@ -13,40 +13,47 @@
 SUBSYSTEM!="usb", GOTO="openct_usb_rules_end"
 ACTION!="add", GOTO="openct_usb_rules_end"
 
+# some distributions might not have a proper rule to set the name.
+# this is needed without USB_DEVICEFS the kernel doesn't tell us about
+# DEVICE. so we need to know the name of the device created by udev in
+# /dev/bus/usb.
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
+	NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
+
 # egate
 ENV{MODALIAS}=="usb:v0973p0001*", RUN+="/lib/udev/openct_usb"
 # eToken
 ENV{MODALIAS}=="usb:v0529p050C*", RUN+="/lib/udev/openct_usb"
 ENV{MODALIAS}=="usb:v0529p0514", RUN+="/lib/udev/openct_usb"
 # eToken 64
-ENV{MODALIAS}=="usb:v0529p0600", RUN+="/lib/udev/openct_usb"
-ENV{MODALIAS}=="usb:v0529p0700", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v0529p0600*", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v0529p0700*", RUN+="/lib/udev/openct_usb"
 # eutron
-ENV{MODALIAS}=="usb:v073Dp0005", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v073Dp0005*", RUN+="/lib/udev/openct_usb"
 # ikey2k
-ENV{MODALIAS}=="usb:v04B9p1200", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v04B9p1200*", RUN+="/lib/udev/openct_usb"
 # ikey3k
-ENV{MODALIAS}=="usb:v04B9p1300", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v04B9p1300*", RUN+="/lib/udev/openct_usb"
 # starkey
-ENV{MODALIAS}=="usb:v096Ep0005", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v096Ep0005*", RUN+="/lib/udev/openct_usb"
 # cardman
-#ENV{MODALIAS}=="usb:v076Bp0596", RUN+="/lib/udev/openct_usb"
-#ENV{MODALIAS}=="usb:v076Bp1784", RUN+="/lib/udev/openct_usb"
-#ENV{MODALIAS}=="usb:v08D4p0009", RUN+="/lib/udev/openct_usb"
+#ENV{MODALIAS}=="usb:v076Bp0596*", RUN+="/lib/udev/openct_usb"
+#ENV{MODALIAS}=="usb:v076Bp1784*", RUN+="/lib/udev/openct_usb"
+#ENV{MODALIAS}=="usb:v08D4p0009*", RUN+="/lib/udev/openct_usb"
 
 # ccid
 ENV{MODALIAS}=="usb:*ic0Bisc00*", RUN+="/lib/udev/openct_usb"
 
 # spr 532 - ccid, but with wrong interface class (vendor) :(
-ENV{MODALIAS}=="usb:v04E6p0003", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v04E6p0003*", RUN+="/lib/udev/openct_usb"
 # pertosmart1030
-ENV{MODALIAS}=="usb:v072Fp0001", RUN+="/lib/udev/openct_usb"
-ENV{MODALIAS}=="usb:v072Fp8009", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v072Fp0001*", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v072Fp8009*", RUN+="/lib/udev/openct_usb"
 # pertosmart1038
-ENV{MODALIAS}=="usb:v072Fp9000", RUN+="/lib/udev/openct_usb"
-ENV{MODALIAS}=="usb:v072Fp90D0", RUN+="/lib/udev/openct_usb"
-# wbeiuu
-ENV{MODALIAS}=="usb:v104Fp0004", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v072Fp9000*", RUN+="/lib/udev/openct_usb"
+ENV{MODALIAS}=="usb:v072Fp90D0*", RUN+="/lib/udev/openct_usb"
+# wbeiuu - driver not working yet
+#ENV{MODALIAS}=="usb:v104Fp0004*", RUN+="/lib/udev/openct_usb"
 
 LABEL="openct_usb_rules_end"
 
diff --git a/etc/openct.usermap b/etc/openct.usermap
index d6b6ad0..3fea26c 100644
--- a/etc/openct.usermap
+++ b/etc/openct.usermap
@@ -34,5 +34,5 @@ openct               0x0003      0x072f   0x8009    0x0000       0x0000       0x
 # pertosmart1038
 openct               0x0003      0x072f   0x9000    0x0000       0x0000       0x00         0x00            0x00            0x0b            0x00               0x00               0x00000000
 openct               0x0003      0x072f   0x90d0    0x0000       0x0000       0x00         0x00            0x00            0x0b            0x00               0x00               0x00000000
-# wbeiuu
-openct               0x0003      0x104f   0x0004    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
+# wbeiuu - driver not working yet
+#openct               0x0003      0x104f   0x0004    0x0000       0x0000       0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
diff --git a/etc/openct_usb.in b/etc/openct_usb.in
index 669e252..45d57cf 100644
--- a/etc/openct_usb.in
+++ b/etc/openct_usb.in
@@ -1,52 +1,43 @@
 #!/bin/sh
 
-test "$ACTION" = "add" || exit 0
-test -n "$DEVICE" -o -n "$DEVNAME" || exit 0 
-test -e /var/run/openct/status || exit 0
-
-(
-
-if [ -n "$DEVICE" ]
-then
-	for A in `seq 10`
-	do
-		if test -e $DEVICE
-		then
-			# if you see two ifdhandlers for one device, then you can
-			# either comment out the next line here ...
-			SBINDIR/openct-control attach usb:$PRODUCT usb $DEVICE
-			exit 0
-		fi
-		sleep 0.1
-	done
-	echo "$0 waited for $DEVICE but it did not appear." \
-		|logger -p daemon.error
-	exit 1
+[ -n "$DEVPATH" ] || exit 0
+[ "$ACTION" = "add" ] || exit 0
+[ -e /var/run/openct/status ] || exit 0
+
+# try to get the device node from the parent device
+if [ -z "$DEVNAME" ]; then
+	DEVNAME=/dev/$(udevinfo --query=name --path=$(dirname $DEVPATH))
+fi
+
+# if udev supplied a device node directly from the usb-device, we use it,
+# because it is guaranteed to exist at the time we run
+if [ -n "$DEVNAME" -a -e "$DEVNAME" ]; then
+	DEVICE="$DEVNAME"
 fi
 
-if [ -n "$DEVNAME" ]
-then
-	for A in `seq 10`
-	do
-		if test -e $DEVNAME
-		then
-			V="`cat /sys/$DEVPATH/device/idVendor |sed -e "s/^0*//"`"
-			P="`cat /sys/$DEVPATH/device/idProduct|sed -e "s/^0*//"`"
-			D="`cat /sys/$DEVPATH/device/bcdDevice |sed -e "s/^0*//"`"
-			PRODUCT="$V/$P/$D"
-			# or the following line. both should disable that effect.
-			SBINDIR/openct-control attach usb:$PRODUCT usb $DEVNAME
-
-			exit 0
-		fi
-		sleep 0.1
-	done
-	echo "$0 waited for $DEVNAME but it did not appear." \
-		|logger -p daemon.error
-	exit 1
+[ -n "$DEVICE" ] || exit 0
+
+if [ -z "$PRODUCT" -a -n "$MODALIAS" ]; then
+	PRODUCT=$(echo $MODALIAS | sed -e 's/usb:v\(....\)p\(....\)d\(....\).*/\1\/\2\/\3/g' |tr A-F a-f)
 fi
 
-) &
-disown %1
+if [ -z "$PRODUCT" ]; then
+	V=$(cat /sys$(dirname $DEVPATH)/idVendor | sed -e 's/^0*//')
+	P=$(cat /sys$(dirname $DEVPATH)/idProduct | sed -e 's/^0*//')
+	D=$(cat /sys$(dirname $DEVPATH)/bcdDevice | sed -e 's/^0*//')
+	PRODUCT="$V/$P/$D"
+fi
+
+[ -n "$PRODUCT" ] || exit 0
+
+# we may neeed to wait for the device node, when usbfs is used
+for A in "0 1 2 3 4 5 6 7 8 9"; do
+	if [ -e "$DEVICE" ]; then
+		SBINDIR/openct-control attach usb:$PRODUCT usb $DEVICE
+		exit 0
+	fi
+	sleep 0.1
+done
 
+echo "$0 waited for $DEVICE but it did not appear." | logger -p daemon.error
 exit 0
diff --git a/src/ifd/Makefile.am b/src/ifd/Makefile.am
index ab3d0e0..e181d0c 100644
--- a/src/ifd/Makefile.am
+++ b/src/ifd/Makefile.am
@@ -17,7 +17,6 @@ libifd_la_SOURCES = \
 	ifd-etoken.c ifd-etoken64.c ifd-eutron.c ifd-gempc.c ifd-ikey2k.c \
 	ifd-ikey3k.c ifd-kaan.c ifd-pertosmart1030.c ifd-pertosmart1038.c \
 	ifd-smartboard.c ifd-smph.c ifd-starkey.c ifd-towitoko.c cardman.h \
-	ifd-wbeiuu.c \
 	\
 	proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \
 	proto-trans.c proto-escape.c \
@@ -25,6 +24,7 @@ libifd_la_SOURCES = \
 	sys-sunray.c sys-solaris.c sys-bsd.c sys-linux.c sys-null.c sys-osx.c \
 	\
 	ria.c
+# new driver not working yet: ifd-wbeiuu.c
 libifd_la_LIBADD = ../ct/libopenct.la $(LTLIBLTDL) $(LIBUSB_LIBS)
 
 ifdhandler_SOURCES = ifdhandler.c
diff --git a/src/ifd/Makefile.in b/src/ifd/Makefile.in
index 5e0e6be..edad6d6 100644
--- a/src/ifd/Makefile.in
+++ b/src/ifd/Makefile.in
@@ -70,10 +70,10 @@ am_libifd_la_OBJECTS = apdu.lo atr.lo checksum.lo conf.lo ctbcs.lo \
 	ifd-etoken.lo ifd-etoken64.lo ifd-eutron.lo ifd-gempc.lo \
 	ifd-ikey2k.lo ifd-ikey3k.lo ifd-kaan.lo ifd-pertosmart1030.lo \
 	ifd-pertosmart1038.lo ifd-smartboard.lo ifd-smph.lo \
-	ifd-starkey.lo ifd-towitoko.lo ifd-wbeiuu.lo proto-gbp.lo \
-	proto-sync.lo proto-t0.lo proto-t1.lo proto-trans.lo \
-	proto-escape.lo sys-sunray.lo sys-solaris.lo sys-bsd.lo \
-	sys-linux.lo sys-null.lo sys-osx.lo ria.lo
+	ifd-starkey.lo ifd-towitoko.lo proto-gbp.lo proto-sync.lo \
+	proto-t0.lo proto-t1.lo proto-trans.lo proto-escape.lo \
+	sys-sunray.lo sys-solaris.lo sys-bsd.lo sys-linux.lo \
+	sys-null.lo sys-osx.lo ria.lo
 libifd_la_OBJECTS = $(am_libifd_la_OBJECTS)
 am__installdirs = "$(DESTDIR)$(sbindir)"
 sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
@@ -244,7 +244,6 @@ libifd_la_SOURCES = \
 	ifd-etoken.c ifd-etoken64.c ifd-eutron.c ifd-gempc.c ifd-ikey2k.c \
 	ifd-ikey3k.c ifd-kaan.c ifd-pertosmart1030.c ifd-pertosmart1038.c \
 	ifd-smartboard.c ifd-smph.c ifd-starkey.c ifd-towitoko.c cardman.h \
-	ifd-wbeiuu.c \
 	\
 	proto-gbp.c proto-sync.c proto-t0.c proto-t1.c \
 	proto-trans.c proto-escape.c \
@@ -253,6 +252,7 @@ libifd_la_SOURCES = \
 	\
 	ria.c
 
+# new driver not working yet: ifd-wbeiuu.c
 libifd_la_LIBADD = ../ct/libopenct.la $(LTLIBLTDL) $(LIBUSB_LIBS)
 ifdhandler_SOURCES = ifdhandler.c
 ifdhandler_LDADD = libifd.la
@@ -369,7 +369,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifd-smph.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifd-starkey.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifd-towitoko.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifd-wbeiuu.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifdhandler.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ifdproxy.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/init.Plo at am__quote@
diff --git a/src/ifd/ifd-wbeiuu.c b/src/ifd/ifd-wbeiuu.c
deleted file mode 100644
index 3cbcb62..0000000
--- a/src/ifd/ifd-wbeiuu.c
+++ /dev/null
@@ -1,840 +0,0 @@
-/*
- * Driver for WB Electronics' Infinity USB Unlimited card readers
- *
- * Copyright (C) 2006, Juan Carlos Borrás <jcborras at gmail.com>
- */
-
-#include "internal.h"
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <sys/poll.h>
-
-#define USB_TIMEOUT	1000
-
-#if 0
-typedef struct wbeiuu_status_ {
-	/* We need a GBP driver to talk to serial readers */
-	int convention;
-	int baud_rate;
-	int clk_freq;
-	int protocol;
-	int card_state;
-	unsigned char tx_buffer[1024];
-} wbeiuu_status_t;
-
-static wbeiuu_status_t wbeiuu_status;
-#endif
-
-// PENDING: 
-
-// 1.- ATRs vary depending on whether the card is inserted before or
-// after the wbeiuu is recognized and ifdhandler is launched.  (not
-// only spurious bytes set to zero but also different ATR reporting
-// depending whether it is dondone by wbeiuu_print_bytestring or
-// inside wbeiuu_card_reset()
-
-// 2.- Another problem I see is the structure ifd_device_params_t
-// defined in include/openct/device.h. you can get a pointer to in by
-// calling ifd_device_get_parameters. It is a good thing to have it
-// but I does not take into account that the wbeuiu can set
-// independently CLK frequency and the speed of the uart. Actually
-// according to that structure the wbeiuu would be a serial device
-// rather than a usb device.
-//
-// Therefore I presume we are going to need a struct params holding
-// things like all uart params (stopbits, parity, speed) and CLK
-// frequency. Specially because it is a waste of time to work at
-// 3.865MHz and 9600 while the OBFG makes the card tick up to a 25MHz
-
-// 3.- The wbeiuu is not properly released after ifdhandler is
-// killed. Which is anoying since it forces you to reset it somehow.
-
-// 4.- Add LED special effects
-
-// 5.- wbeiuu_open() fails on even calls to it
-
-// 6.- ifd_device_close(dev); // Should I remove it and all the others?
-// Maybe RED meaning dev open and off when closing it would help debugging
-
-// 7.- Inverse Convention conversion for the ATR and all other
-// transmissions
-
-// 8.- A struct for saving the wbeiuu state and the inserted card params
-
-static int wbeiuu_set_led(ifd_device_t * dev, uint16_t R, uint16_t G,
-			  uint16_t B, uint8_t F)
-{
-#define BUFSIZE 8
-	int status;
-	uint8_t buf[BUFSIZE];
-
-	buf[0] = 0x04;		// Set LED command
-	buf[1] = R & 0xFF;
-	buf[2] = (R >> 8) & 0xFF;
-	buf[3] = G & 0xFF;
-	buf[4] = (G >> 8) & 0xFF;
-	buf[5] = B & 0xFF;
-	buf[6] = (B >> 8) & 0xFF;
-	buf[7] = F;
-
-	status = ifd_sysdep_usb_bulk(dev, 0x02, buf, BUFSIZE, USB_TIMEOUT);
-	if (status < 0)
-		ifd_debug(1,
-			  "%s:%d Tranmission failure when setting the LED. status=%d",
-			  __FILE__, __LINE__, status);
-
-	return status;
-#undef BUFSIZE
-}
-
-static void wbeiuu_print_bytestring(unsigned char *ptr, int length)
-{
-	static const char hexconv[16] = {
-		'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
-		'A', 'B', 'C', 'D', 'E', 'F'
-	};
-
-	int i;
-	unsigned char msb, lsb;
-	unsigned char *str;
-
-	str = calloc(3 * length + 1, sizeof(char));	// (2*char+1space)/byte + '\0'
-
-	for (i = 0; i < length; i++) {
-		msb = ptr[i] / 16;
-		lsb = ptr[i] % 16;
-		str[3 * i] = hexconv[msb];
-		str[3 * i + 1] = hexconv[lsb];
-		str[3 * i + 2] = ' ';
-	}
-	str[3 * length + 1] = 0x00;
-
-	ifd_debug(1, "%s:%d %s", __FILE__, __LINE__, str);
-	free(str);
-}
-
-static int wbeiuu_open(ifd_reader_t * reader, const char *dev_name)
-{
-	int status;
-	ifd_device_t *dev;
-	ifd_device_params_t params;
-
-	ifd_debug(1, "%s:%d wbeiuu_open()", __FILE__, __LINE__);
-
-	reader->name = "WB Electronics Infinity USB Unlimited";
-	reader->nslots = 1;	// I has physically two, but electrically only one
-
-	dev = ifd_device_open(dev_name);
-
-	//  if ((!dev = ifd_device_open(device_name)))
-	if (!dev) {
-		ifd_debug(1, "%s:%d Error when opening device %s.",
-			  __FILE__, __LINE__, dev_name);
-		return -1;
-	}
-
-	if (ifd_device_type(dev) != IFD_DEVICE_TYPE_USB) {
-		ifd_debug(1, "%s:%d device %s is not a USB device", __FILE__,
-			  __LINE__, dev_name);
-		ct_error("wbeiuu: device %s is not a USB device", dev_name);
-		//ifd_device_close(dev);
-		return -1;
-	}
-
-	params = dev->settings;
-	params.usb.interface = 0;
-	if (ifd_device_set_parameters(dev, &params) < 0) {
-		ct_error("wbeiuu: setting parameters failed", dev_name);
-		ifd_device_close(dev);
-		return -1;
-	}
-
-	reader->device = dev;
-	dev->timeout = USB_TIMEOUT;
-
-	// Why twice??
-	ifd_debug(1, "%s:%d Sending CTS message", __FILE__, __LINE__);
-	status =
-	    ifd_usb_control(dev, 0x03, 0x02, 0x02, 0x00, NULL, 0, USB_TIMEOUT);
-	//ifd_debug(1, "%s:%d status = %d", __FILE__, __LINE__, status);
-	if (status < 0) {
-		ifd_debug(1,
-			  "%s:%d Transmission failure when sending CTS message. status = %d",
-			  __FILE__, __LINE__, status);
-		//ifd_device_close(dev);
-		return -1;
-	}
-	//ifd_debug(1, "%s:%d Setting the LED", __FILE__, __LINE__);
-//  status = wbeiuu_set_led(dev, 0x0000, 0x0000, 0x1000, 0x80);
-//      if (status < 0) {
-//              ifd_debug(1, "%s:%d Tranmission failure when setting the LED. status=%d", 
-//              __FILE__, __LINE__, status);
-//              //ifd_device_close(dev);
-//              return -1;
-//      }
-
-	return 0;
-}
-
-static int wbeiuu_close(ifd_reader_t * reader)
-{
-	ifd_debug(1, "%s:%d wbeiuu_close()", __FILE__, __LINE__);
-	//ifd_device_close(reader->device);
-	return 0;
-}
-
-static int wbeiuu_activate(ifd_reader_t * reader)
-{
-	char cmd[4];
-	char product_name[17];
-	char firm_version[5];
-	char loader_version[5];
-	int status;
-	//unsigned char buf[256];
-	ifd_device_t *dev;
-
-	ifd_debug(1, "%s:%d wbeiuu_activate()", __FILE__, __LINE__);
-
-	dev = reader->device;
-
-	status = wbeiuu_set_led(dev, 0x0000, 0x1000, 0x0000, 0x80);
-	if (status < 0) {
-		ifd_debug(1,
-			  "%s:%d Tranmission failure when setting the LED. status=%d",
-			  __FILE__, __LINE__, status);
-		ifd_device_close(dev);
-		return -1;
-	}
-
-	cmd[0] = 0x02;		// GET_PRODUCT_NAME
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &cmd, 1, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error. status = %d", __FILE__, __LINE__,
-			  status);
-		ifd_device_close(dev);
-		return -1;
-	}
-
-	status = ifd_sysdep_usb_bulk(dev, 0x82, &product_name, 20, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error. status = %d", __FILE__, __LINE__,
-			  status);
-		//ifd_device_close(dev);
-		return -1;
-	} else {
-		ifd_debug(1, "%s:%d No errors and status = %d", __FILE__,
-			  __LINE__, status);
-		// Which means that status returns the number of bytes read
-	}
-
-	product_name[16] = '\0';
-	ifd_debug(1, "%s:%d Product Name: %s", __FILE__, __LINE__,
-		  product_name);
-
-	cmd[0] = 0x01;		// GET_FIRMWARE_VERSION
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &cmd, 1, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error. status = %d", __FILE__, __LINE__,
-			  status);
-		//ifd_device_close(dev);
-		return -1;
-	}
-
-	status =
-	    ifd_sysdep_usb_bulk(dev, 0x82, &firm_version, 100, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error. status = %d", __FILE__, __LINE__,
-			  status);
-		//ifd_device_close(dev);
-		return -1;
-	} else {
-		ifd_debug(1, "%s:%d No errors and status = %d", __FILE__,
-			  __LINE__, status);
-		// Which means that status returns the number of bytes read
-	}
-	firm_version[4] = '\0';
-	ifd_debug(1, "%s:%d Firmware version: %s", __FILE__, __LINE__,
-		  firm_version);
-
-	cmd[0] = 0x50;		// GET_LOADER_VERSION
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &cmd, 1, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error. status = %d", __FILE__, __LINE__,
-			  status);
-		//ifd_device_close(dev);
-		return -1;
-	}
-
-	status =
-	    ifd_sysdep_usb_bulk(dev, 0x82, &loader_version, 10, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error. status = %d", __FILE__, __LINE__,
-			  status);
-		//ifd_device_close(dev);
-		return -1;
-	} else {
-		ifd_debug(1, "%s:%d No errors and status = %d", __FILE__,
-			  __LINE__, status);
-		// Which means that status returns the number of bytes read
-	}
-	loader_version[4] = '\0';
-	ifd_debug(1, "%s:%d Loader version: %s", __FILE__, __LINE__,
-		  loader_version);
-
-	/*
-	   // Check what happens when we read and there is nothing
-	   ifd_debug(1, "%s:%d Try to read while nothing to read", __FILE__, __LINE__);
-	   status = ifd_sysdep_usb_bulk(dev, 0x82, &buf, 128, USB_TIMEOUT);
-	   if (status < 0) {
-	   ifd_debug(1, "%s:%d Error as expected: %d", __FILE__, __LINE__, status);
-	   //ifd_device_close(dev);
-	   //return -1;
-	   } else {
-	   ifd_debug(1, "%s:%d Funny. No errors", __FILE__, __LINE__);    
-	   }
-	   // status = -5. That's an error
-	 */
-
-	// Enable the so-called "phoenix" mode
-	cmd[0] = 0x49;		// IUU_UART_ENABLE
-	cmd[1] = 0x02;		// 9600  
-	cmd[2] = 0x98;		// bps
-	cmd[3] = 0x21;		// one stop bit, even parity
-
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &cmd, 4, USB_TIMEOUT);
-	if (status < 0) {
-		ifd_debug(1, "%s:%d Error as expected: %d", __FILE__, __LINE__,
-			  status);
-		//ifd_device_close(dev);
-		return -1;
-	} else {
-		ifd_debug(1, "%s:%d Device set in phoenix mode", __FILE__,
-			  __LINE__);
-	}
-
-	/*
-
-	   // Check what happens when we phoenix read and there is nothing
-	   cmd[0] = 0x56;
-	   ifd_debug(1, "%s:%d Phoenix read while nothing to read", __FILE__, __LINE__);
-
-	   unsigned char tmp=0x00;
-	   status = ifd_sysdep_usb_bulk(dev, 0x02, cmd, 1, USB_TIMEOUT);
-	   if (status < 0) {
-	   ifd_debug(1, "%s:%d Error: %d", __FILE__, __LINE__, status);
-	   // -5 is communication error ($OPENCT/src/incldue/openct/error.h)
-	   } else {
-	   ifd_debug(1, "%s:%d No errors. %d bytes read", __FILE__, __LINE__, status);    
-	   if (status==1) {
-	   ifd_debug(1, "%s:%d whose value is %x", __FILE__, __LINE__, tmp);    
-	   }
-	   }
-	 */
-
-	/*
-	   ifd_debug(1, "%s:%d Reading how many bytes in FIFO", __FILE__, __LINE__);
-	   status = ifd_sysdep_usb_bulk(dev, 0x82, &buf, 1, USB_TIMEOUT);
-	   if (status) {
-	   ifd_debug(1, "%s:%d Error as expected: %d", __FILE__, __LINE__, status);
-	   } else {
-	   ifd_debug(1, "%s:%d No errors. Bytes to read: %u\n", 
-	   __FILE__, __LINE__, status);    
-	   }
-
-	   unsigned int n = buf[0];
-	   ifd_debug(1, "%s:%d Reading all bytes  in FIFO\n", __FILE__, __LINE__);
-	   status = ifd_sysdep_usb_bulk(dev, 0x82, &buf, n, USB_TIMEOUT);
-	   if (status) {
-	   ifd_debug(1, "%s:%d Error as expected: %d", __FILE__, __LINE__, status);
-	   } else {
-	   ifd_debug(1, "%s:%d Funny. No errors", __FILE__, __LINE__);
-	   }
-	 */
-
-	/*
-	   Code for retrieving the ATR comes here
-	   char myatr[1024];
-	   size_t atr_len;
-	   status = wbeiuu_card_reset(reader, 0, myatr, atr_len);
-	   if (status < 0) {
-	   ifd_debug(1, "%s:%d Error. status=%d", __FILE__, __LINE__, status);
-	   } else {
-	   ifd_debug(1, "%s:%d Funny. No errors", __FILE__, __LINE__);
-	   return 0;
-	   }
-	 */
-
-	status = wbeiuu_set_led(dev, 0x0000, 0x0000, 0x1000, 0xff);
-	if (status < 0) {
-		ifd_debug(1,
-			  "%s:%d Tranmission failure when setting the LED. status=%d",
-			  __FILE__, __LINE__, status);
-		ifd_device_close(dev);
-		return -1;
-	}
-
-	return 0;
-}
-
-static int wbeiuu_deactivate(ifd_reader_t * reader)
-{
-	unsigned char buf = 0x4A;	// IUU_UART_DISABLE
-
-	ifd_debug(1, "%s:%d wbeiuu_deactivate()", __FILE__, __LINE__);
-
-	if (ifd_sysdep_usb_bulk(reader->device, 0x02, &buf, 1, USB_TIMEOUT) < 0) {
-		//ifd_device_close(reader->device);
-		return -1;
-	}
-
-	return 0;
-}
-
-static int wbeiuu_change_parity(ifd_reader_t * reader, int parity)
-{
-	//int status;
-
-	ifd_debug(1, "%s:%d wbeiuu_chage_parity()", __FILE__, __LINE__);
-
-	// PENDING:
-	// 1.- USB devices do not have "parity", but the wbeiuu is
-	//     a sort of serial device
-	// 2.- The annoying thing is that the wbeiuu parity can only be
-	//     set by setting all the other uart params at once
-	// 3.- Which means we have to keep the wbeiuu state in a bunch of
-	//     static vars (phoenix_mode=on|off, baudrate, stopbits and so on...
-	// parity values defined in $OPENCT/src/include/device.h
-
-	switch (parity) {
-	case IFD_SERIAL_PARITY_NONE:
-		ifd_debug(1, "%s:%d Would set parity to none if implemented",
-			  __FILE__, __LINE__);
-		break;
-	case IFD_SERIAL_PARITY_ODD:
-		ifd_debug(1, "%s:%d Would set odd parity if implemented",
-			  __FILE__, __LINE__, parity);
-		break;
-	case IFD_SERIAL_PARITY_EVEN:
-		ifd_debug(1, "%s:%d Would set even parity if implemented",
-			  __FILE__, __LINE__, parity);
-		break;
-	default:
-		ifd_debug(1, "%s:%d parity parameter cannot be %d",
-			  __FILE__, __LINE__, parity);
-		return -1;
-	}
-
-//  buf[0] = IUU_UART_ESC;
-//  buf[1] = IUU_UART_CHANGE;
-//  buf[2] = (uint8_t) ((br >> 8) & 0x00FF);   /* high byte */
-//  buf[3] = (uint8_t) (0x00FF & br);   /* low byte */
-//  buf[4] = (uint8_t) (parity & sbits);        /* both parity and stop now */
-//  
-//  status = iuu_write(inf, buf, 5);
-//   if (status != IUU_OPERATION_OK)
-//     iuu_process_error(status, __FILE__, __LINE__);
-
-	return 0;
-}
-
-static int wbeiuu_change_speed(ifd_reader_t * reader, unsigned int speed)
-{
-	// PENDING:
-	// 1.- Speed in bits per second is one thing, but being able to
-	//     set CLK frequency is another different matter than cannot
-	//     go wasted
-	ifd_debug(1, "%s:%d wbeiuu_chage_speed()", __FILE__, __LINE__);
-	return 0;
-}
-
-static int wbeiuu_card_reset(ifd_reader_t * reader, int slot, void *atr,
-			     size_t atr_len)
-{
-	int status;
-	unsigned char buf[256];
-	unsigned char len;
-	ifd_device_t *dev;
-
-	ifd_debug(1, "%s:%d wbeiuu_card_reset()", __FILE__, __LINE__);
-
-	dev = reader->device;
-
-//  status = wbeiuu_set_led(dev, 0x1000, 0x0000, 0x0000, 0x80);
-//      if (status < 0) {
-//              ifd_debug(1, "%s:%d Tranmission failure when setting the LED. status=%d", 
-//              __FILE__, __LINE__, status);
-//              //ifd_device_close(dev);
-//              return -1;
-//      }
-
-	// Flushing (do we have to flush the uart too?)
-	status = ifd_sysdep_usb_bulk(dev, 0x82, &buf, 256, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Error. If status=-5 then OK. status=%d.",
-			  __FILE__, __LINE__, status);
-		//return -1;
-	}
-	// Resetting card
-	buf[0] = 0x52;		// IUU_RST_SET
-	buf[1] = 0x06;		// IUU_DELAY_MS
-	buf[2] = 0x0c;		// milliseconds
-	buf[3] = 0x53;		// IUU_RST_CLEAR
-
-	ifd_debug(1, "%s:%d Resetting the card()", __FILE__, __LINE__);
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &buf, 4, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out. status=%d", __FILE__, __LINE__,
-			  status);
-		return -1;
-	}
-	// waiting for the IUU uart to be filled by the card
-	usleep(500000);
-	// The wait time depend on the CLK signal frequency
-
-	ifd_debug(1, "%s:%d Retrieving the ATR", __FILE__, __LINE__);
-	buf[0] = 0x56;		// wbeiuu uart rx
-	status = ifd_sysdep_usb_bulk(dev, 0x02, buf, 1, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out. status=%d", __FILE__, __LINE__,
-			  status);
-		return -1;
-	}
-	ifd_debug(1, "%s:%d How many bytes waiting at the FIFO?", __FILE__,
-		  __LINE__, status);
-	status = ifd_sysdep_usb_bulk(dev, 0x82, &len, 1, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Error. status=%d.", __FILE__, __LINE__,
-			  status);
-		//return -1;
-	} else {
-		ifd_debug(1, "%s:%d %d bytes waiting at the fifo", __FILE__,
-			  __LINE__, len);
-	}
-
-	ifd_debug(1, "%s:%d Retrieving now the ATR", __FILE__, __LINE__,
-		  status);
-	status = ifd_sysdep_usb_bulk(dev, 0x82, buf, len, 10 * USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Error. status=%d.", __FILE__, __LINE__,
-			  status);
-		//return -1;
-	} else if (status != len) {
-		ifd_debug(1,
-			  "%s:%d Error. Expecting %d bytes, but read only %d",
-			  __FILE__, __LINE__, len, status);
-	}
-	wbeiuu_print_bytestring(buf, len);
-
-//  int i;
-//  char *tmp = atr;
-//  for (i=0; i<len; i++) {
-//    //tmp = (char) atr[i];
-//    ifd_debug(1, "%s:%d buf[%d] = %x ; ATR[%d] = %x", 
-//              __FILE__, __LINE__, i, 0x00FF & buf[i], i, 0x00FF & tmp[i]); 
-//  }
-
-	// Now we just have to copy it back
-	if (len <= atr_len) {
-		ifd_debug(1, "%s:%d %d is smaller than %d so it should fit",
-			  __FILE__, __LINE__, len, atr_len);
-		memcpy(atr, buf, len);
-	} else {
-		ifd_debug(1,
-			  "%s:%d Retrieved ATR is %d bytes but the buffer is only %d",
-			  __FILE__, __LINE__, len, atr_len);
-		return -1;
-	}
-
-//  tmp = atr;
-//  for (i=0; i<len; i++) {
-//    //tmp = (char) atr[i];
-//    ifd_debug(1, "%s:%d buf[%d] = %x ; ATR[%d] = %x", 
-//              __FILE__, __LINE__, i, 0x00FF & buf[i], i, 0x00FF & tmp[i]); 
-//  }
-
-	return len;
-}
-
-static int wbeiuu_card_status(ifd_reader_t * reader, int slot, int *status)
-{
-	// PENDING:
-	// 1.- Make sure that both slots are not occupied
-	// 2.- Remove all card params after extraction (i.e. Inverse Convention)
-
-	int usb_status;
-	char st = 0x03;		// IUU_GET_STATE_REGISTER
-	ifd_device_t *dev;
-
-	//ifd_debug(1, "%s:%d wbeiuu_card_status()", __FILE__, __LINE__);
-
-	dev = reader->device;
-	usb_status = ifd_sysdep_usb_bulk(dev, 0x02, &st, 1, USB_TIMEOUT);
-	if (usb_status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out", __FILE__, __LINE__);
-		return -1;
-	}
-
-	usb_status = ifd_sysdep_usb_bulk(dev, 0x82, &st, 1, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out", __FILE__, __LINE__);
-		return -1;
-	}
-	//ifd_debug(4, "%s:%d Status register: %x", __FILE__, __LINE__, st);
-
-	if (st == 0x05) {	// both slots occupied
-		*status = IFD_CARD_STATUS_CHANGED;
-		return IFD_ERROR_NO_CARD;
-	}
-
-	if (st == 0x01 || st == 0x04)
-		*status = IFD_CARD_PRESENT;
-
-	return 0;
-}
-
-static int wbeiuu_send(ifd_reader_t * reader, unsigned int dad,
-		       const unsigned char *buffer, size_t len)
-{
-	int status;
-	unsigned char buf[3];
-	ifd_device_t *dev;
-
-	ifd_debug(1, "%s:%d wbeiuu_send()", __FILE__, __LINE__);
-
-	dev = reader->device;
-
-	status = wbeiuu_set_led(dev, 0x0000, 0x0000, 0x1000, 0x80);
-	if (status < 0) {
-		ifd_debug(1,
-			  "%s:%d Tranmission failure when setting the LED. status=%d",
-			  __FILE__, __LINE__, status);
-		//ifd_device_close(dev);
-		return -1;
-	}
-	// The wbeiuu uart fifo is just 255 bytes
-	// anything bigger than that must be sent in smaller chunks
-	// which is turn must be syncronized with the card swalloing
-	// capabilites
-	if (len > 255) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out: len>255 = %d", __FILE__,
-			  __LINE__, len);
-		return -1;
-	}
-
-	buf[0] = 0x5e;		// IUU_UART_ESC;
-	buf[1] = 0x04;		// IUU_UART_TX;
-	buf[2] = len;
-
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &buf, len, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out.", __FILE__, __LINE__);
-		return -1;
-	}
-
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &buffer, len, USB_TIMEOUT);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out.", __FILE__, __LINE__);
-		return -1;
-	}
-
-	ifd_debug(1, "%s:%d Returning status = %d.", __FILE__, __LINE__,
-		  status);
-
-	return status;
-}
-
-static int wbeiuu_recv(ifd_reader_t * reader, unsigned int dad,
-		       unsigned char *buffer, size_t len, long timeout)
-{
-	// PENDING:
-	// 1.- Chunking if len>255
-	// 2.- Ensuring the wbeiuu is in phoenix mode
-	int status;
-	ifd_device_t *dev;
-	unsigned char cmd = 0x55;	// wbeiuu uart rx
-	unsigned char nbytes = 0x00;
-	unsigned char buf[255];
-
-	ifd_debug(1, "%s:%d wbeiuu_recv()", __FILE__, __LINE__);
-
-	dev = reader->device;
-
-	ifd_debug(1, "%s:%d wbeiuu_recv()", __FILE__, __LINE__);
-	status = wbeiuu_set_led(dev, 0x0000, 0x0000, 0x1000, 0x80);
-	if (status < 0) {
-		ifd_debug(1,
-			  "%s:%d Tranmission failure when setting the LED. status=%d",
-			  __FILE__, __LINE__, status);
-		//ifd_device_close(dev);
-		return -1;
-	}
-	// Checking that the buffer fits in the wbeiuu uart
-	if (len > 255) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out: len>255 = %d", __FILE__,
-			  __LINE__, len);
-		return -1;
-	}
-	// Sending the command
-	status = ifd_sysdep_usb_bulk(dev, 0x02, &cmd, 1, timeout);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out", __FILE__, __LINE__);
-		return -1;
-	}
-	// Reading how many bytes are ready to be retrieved
-	status = ifd_sysdep_usb_bulk(dev, 0x82, &nbytes, 1, timeout);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out", __FILE__, __LINE__);
-		return -1;
-	}
-
-	ifd_debug(1, "%s:%d Reading %d bytes from the UART", __FILE__, __LINE__,
-		  nbytes);
-	status = ifd_sysdep_usb_bulk(dev, 0x82, &buf, nbytes, timeout);
-	if (status < 0) {
-		//ifd_device_close(dev);
-		ifd_debug(1, "%s:%d Bailing out", __FILE__, __LINE__);
-		return -1;
-	}
-
-	memcpy(buffer, buf, nbytes);
-
-	return nbytes;
-}
-
-static int wbeiuu_card_request(ifd_reader_t * reader, int slot,
-			       time_t timeout, const char *message,
-			       void *atr, size_t atr_len)
-{
-	ifd_debug(1, "%s:%d wbeiuu_card_request", __FILE__, __LINE__);
-	return 0;
-}
-
-static int wbeiuu_card_eject(ifd_reader_t * reader, int slot,
-			     time_t timeout, const char *message)
-{
-	ifd_debug(1, "%s:%d wbeiuu_card_eject", __FILE__, __LINE__);
-	return 0;
-}
-
-static int wbeiuu_output(ifd_reader_t * reader, const char *message)
-{
-	ifd_debug(1, "%s:%d wbeiuu_output", __FILE__, __LINE__);
-	return 0;
-}
-
-static int wbeiuu_perform_verify(ifd_reader_t * reader,
-				 int slot, unsigned int timeout,
-				 const char *prompt, const unsigned char *data,
-				 size_t data_len, unsigned char *resp,
-				 size_t resp_len)
-{
-	ifd_debug(1, "%s:%d wbeiuu_perform_verify", __FILE__, __LINE__);
-	return 0;
-}
-
-#if 0
-/* not used so far */
-static int wbeiuu_set_protocol(ifd_reader_t * reader, int slot, int protocol)
-{
-	ifd_debug(1, "%s:%d wbeiuu_set_protocol", __FILE__, __LINE__);
-
-	switch (protocol) {
-	case IFD_PROTOCOL_T0:
-		return IFD_SUCCESS;
-		break;
-	case IFD_PROTOCOL_T1:
-	default:
-		return IFD_ERROR_NOT_SUPPORTED;
-	}
-
-	return 0;
-}
-#endif
-
-static int wbeiuu_transparent(ifd_reader_t * reader, int slot,
-			      const void *sbuf, size_t slen,
-			      void *rbuf, size_t rlen)
-{
-	ifd_debug(1, "%s:%d wbeiuu_transparent", __FILE__, __LINE__);
-	//ifd_driver_t *dev = reader->driver_data;
-
-//  switch (dev->icc_proto) {
-//  case IFD_PROTOCOL_T0:
-//    //return cm_transceive_t0(reader, sbuf, slen, rbuf, rlen);
-//  case IFD_PROTOCOL_T1:
-//    return IFD_ERROR_NOT_SUPPORTED; /* not yet */
-//  default:
-//    return IFD_ERROR_NOT_SUPPORTED;
-//  }
-
-	return 0;
-}
-
-static int wbeiuu_sync_read(ifd_reader_t * reader, int slot, int proto,
-			    unsigned short addr,
-			    unsigned char *rbuf, size_t rlen)
-{
-	ifd_debug(1, "%s:%d wbeiuu_sync_read", __FILE__, __LINE__);
-	return 0;
-}
-
-static int wbeiuu_sync_write(ifd_reader_t * reader, int slot, int proto,
-			     unsigned short addr,
-			     const unsigned char *sbuf, size_t slen)
-{
-	ifd_debug(1, "%s:%d wbeiuu_sync_write", __FILE__, __LINE__);
-	return 0;
-}
-
-/*
- * Driver operations
- */
-static struct ifd_driver_ops wbeiuu_driver;
-
-void ifd_wbeiuu_register(void)
-{
-	wbeiuu_driver.open = wbeiuu_open;
-	wbeiuu_driver.close = wbeiuu_close;
-
-	wbeiuu_driver.change_parity = wbeiuu_change_parity;
-	wbeiuu_driver.change_speed = wbeiuu_change_speed;
-
-	wbeiuu_driver.activate = wbeiuu_activate;
-	wbeiuu_driver.deactivate = wbeiuu_deactivate;
-
-	wbeiuu_driver.card_status = wbeiuu_card_status;
-	wbeiuu_driver.card_reset = wbeiuu_card_reset;
-	wbeiuu_driver.card_request = wbeiuu_card_request;
-	wbeiuu_driver.card_eject = wbeiuu_card_eject;
-
-	wbeiuu_driver.output = wbeiuu_output;
-	wbeiuu_driver.perform_verify = wbeiuu_perform_verify;
-
-	wbeiuu_driver.send = wbeiuu_send;
-	wbeiuu_driver.recv = wbeiuu_recv;
-
-	//wbeiuu_driver.set_protocol = wbeiuu_set_protocol;
-	wbeiuu_driver.transparent = wbeiuu_transparent;
-	wbeiuu_driver.sync_read = wbeiuu_sync_read;
-	wbeiuu_driver.sync_write = wbeiuu_sync_write;
-
-	ifd_driver_register("wbeiuu", &wbeiuu_driver);
-}
diff --git a/src/ifd/init.c b/src/ifd/init.c
index 68cc064..f3d7801 100644
--- a/src/ifd/init.c
+++ b/src/ifd/init.c
@@ -40,7 +40,7 @@ int ifd_init(void)
 	ifd_smph_register();
 	ifd_starkey_register();
 	ifd_towitoko_register();
-	ifd_wbeiuu_register();
+	/* ifd_wbeiuu_register();	driver not working yet */
 	/* ccid last */
 	ifd_ccid_register();
 
diff --git a/src/ifd/internal.h b/src/ifd/internal.h
index a255821..a622984 100644
--- a/src/ifd/internal.h
+++ b/src/ifd/internal.h
@@ -133,7 +133,7 @@ extern void ifd_smartboard_register(void);
 extern void ifd_smph_register(void);
 extern void ifd_starkey_register(void);
 extern void ifd_towitoko_register(void);
-extern void ifd_wbeiuu_register(void);
+/* extern void ifd_wbeiuu_register(void); driver not working yet */
 
 /* reader.c */
 extern int ifd_send_command(ifd_protocol_t *, const void *, size_t);

-- 
OpenCT packaging



More information about the pkg-opensc-commit mailing list