Difference between revisions of "RFID"

From Tmplab
(Install error)
(EEE Setup)
Line 9: Line 9:
  
 
= EEE Setup =
 
= EEE Setup =
* EEE pc 401
+
* EEE pc 401 with either Xandros or Debian EEE
 
* Debian pcscd package
 
* Debian pcscd package
 
* Debian pcsc-tools package
 
* Debian pcsc-tools package
Line 27: Line 27:
 
  ln -s /usr/local/include/PCSC /usr/include/
 
  ln -s /usr/local/include/PCSC /usr/include/
  
 
+
== driver location problem ==
== Solved errors ==
 
=== driver location problem ===
 
 
  ln -s /usr/local/pcsc/drivers/ifdokrfid_lnx-2.6.0.bundle /usr/lib/pcsc/drivers
 
  ln -s /usr/local/pcsc/drivers/ifdokrfid_lnx-2.6.0.bundle /usr/lib/pcsc/drivers
 
== Remaining errors ==
 
00001732 hotplug_libhal.c:342:HPAddDevice() Adding USB device: usb_device_76b_5321_noserial_if0
 
01013021 readerfactory.c:1135:RFInitializeReader() Attempting startup of OMNIKEY CardMan 5x21 00 00 using /usr/lib/pcsc/drivers/ifdokrfid_lnx-2.6.0.bundle/Contents/Linux/ifdokrfid.so
 
00000830 readerfactory.c:1002:RFBindFunctions() Loading IFD Handler 3.0
 
OK OMNIKEY CardMan RFID  IA32 v2.6.0 support@omnikey.com
 
00000205 readerfactory.c:1174:RFInitializeReader() Open Port 200000 Failed (usb:076b/5321:libhal:/org/freedesktop/Hal/devices/usb_device_76b_5321_noserial_if0)
 
00000022 readerfactory.c:1047:RFUnloadReader() Unloading reader driver.
 
00000079 readerfactory.c:254:RFAddReader() OMNIKEY CardMan 5x21 init failed.
 
00000028 hotplug_libhal.c:395:HPAddDevice() Failed adding USB device: usb_device_76b_5321_noserial_if0
 
00008472 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0000, PID: 0x0000
 
 
and
 
 
eeepc-phil:/home/user/p/ifdokrfid_lnx-2.6.0> pcscd -f -d
 
00000000 pcscdaemon.c:275:main() pcscd set to foreground with debug send to stderr
 
00001338 debuglog.c:239:DebugLogSetLevel() debug level=debug
 
00002157 pcscdaemon.c:493:main() pcsc-lite 1.4.101 daemon ready.
 
00062472 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0951, PID: 0x1606
 
00004763 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0000, PID: 0x0000
 
00005616 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0000, PID: 0x0000
 
00005526 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0000, PID: 0x0000
 
00005646 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x15CA, PID: 0x00C3
 
00004745 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0000, PID: 0x0000
 
00005743 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x076B, PID: 0x5321
 
00001230 hotplug_libhal.c:342:HPAddDevice() Adding USB device: usb_device_76b_5321_noserial_if0
 
01015973 readerfactory.c:1135:RFInitializeReader() Attempting startup of OMNIKEY CardMan 5x21 00 00 using /usr/local/pcsc/drivers/ifdokrfid_lnx-2.6.0.bundle/Contents/Linux/ifdokrfid.so
 
00000815 readerfactory.c:1002:RFBindFunctions() Loading IFD Handler 3.0
 
OK OMNIKEY CardMan RFID  IA32 v2.6.0 support@omnikey.com
 
00000207 readerfactory.c:1174:RFInitializeReader() Open Port 200000 Failed (usb:076b/5321:libhal:/org/freedesktop/Hal/devices/usb_device_76b_5321_noserial_if0)
 
00000020 readerfactory.c:1047:RFUnloadReader() Unloading reader driver.
 
00000082 readerfactory.c:254:RFAddReader() OMNIKEY CardMan 5x21 init failed.
 
00000027 hotplug_libhal.c:395:HPAddDevice() Failed adding USB device: usb_device_76b_5321_noserial_if0
 
00006587 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x0000, PID: 0x0000
 
  
 
= Debian EEE Setyup =
 
= Debian EEE Setyup =

Revision as of 16:26, 25 June 2008

Mac Setup

EEE Setup

  • EEE pc 401 with either Xandros or Debian EEE
  • Debian pcscd package
  • Debian pcsc-tools package
  • Added new source for APT:
eeepc:/home/user/> more /etc/apt/sources.list
deb http://update.eeepc.asus.com/p701 p701 main
deb http://update.eeepc.asus.com/p701/en p701 main
deb http://ftp.de.debian.org/debian lenny main
eeepc:/home/user/> 
  • Installed driver from Omnikey reader
ifdokrfid_lnx-2.6.0.tar.gz
  • Installed swig for pyscard install
apt-get install swig
  • Installed python-dev for pyscard install
apt-get install python-dev
  • Linked PCSC includes in main location
ln -s /usr/local/include/PCSC /usr/include/

driver location problem

ln -s /usr/local/pcsc/drivers/ifdokrfid_lnx-2.6.0.bundle /usr/lib/pcsc/drivers

Debian EEE Setyup

Commands

Install error

There's a big problem with the install is that you SHOULD NOT install the libhal support which is compiled by default in the debian packages.

When you have libhal support, here is what you get:

13431722 hotplug_libhal.c:305:get_driver() Looking a driver for VID: 0x076B, PID: 0x5321
00000058 hotplug_libhal.c:342:HPAddDevice() Adding USB device: usb_device_76b_5321_noserial_if0
01001266 readerfactory.c:1135:RFInitializeReader() Attempting startup of OMNIKEY CardMan 5x21 00 00 using /usr/lib/pcsc/drivers/ifdokrfid_lnx-2.6.0.bundle/Contents/Linux/ifdokrfid.so
00074319 readerfactory.c:1002:RFBindFunctions() Loading IFD Handler 3.0
OK OMNIKEY CardMan RFID  IA32 v2.6.0 support@omnikey.com
00000913 readerfactory.c:1174:RFInitializeReader() Open Port 200000 Failed (usb:076b/5321:libhal:/org/freedesktop/Hal/devices/usb_device_76b_5321_noserial_if0)
00000377 readerfactory.c:1047:RFUnloadReader() Unloading reader driver.
00000353 readerfactory.c:254:RFAddReader() OMNIKEY CardMan 5x21 init failed.
00000301 hotplug_libhal.c:395:HPAddDevice() Failed adding USB device: usb_device_76b_5321_noserial_if0

In order to get rid of that problem, you must recompile pcsc-lite without the support for LIBHAL. Other problem then arise with for example the fact that the pcsc-lite then doesn't create the /usr/local/pcsc/drivers or /usr/lib/pcsc/drivers directories.

The solution I found was to install the debian packages pcscd and pcsc-omnikey and then to delete the /usr/sbin/pcscd and overwrite it with a compiled version without the libhal support. There are quite some options to give to the ./configure for this, here they are:

./configure --disable-libhal --enable-libusb --enable-usbdropdir=/usr/lib/pcsc/drivers/ --enable-ipcdir=/var/run/pcscd/ --prefix=/usr/ --enable-runpid=/var/run/pcscd/pcscd.pid

Then you just run pcscd:

# /usr/sbin/pcscd -f -d -a

And you'll get a better result ;-)


00000000 pcscdaemon.c:275:main() pcscd set to foreground with debug send to stderr
00000743 debuglog.c:239:DebugLogSetLevel() debug level=debug
00000354 debuglog.c:268:DebugLogSetCategory() Debug options: APDU
00001335 pcscdaemon.c:493:main() pcsc-lite 1.4.101 daemon ready.
00106863 hotplug_libusb.c:476:HPAddHotPluggable() Adding USB device: 001:005
00000499 readerfactory.c:1135:RFInitializeReader() Attempting startup of OMNIKEY CardMan 5x21 00 00 using /usr/lib/pcsc/drivers//ifdokrfid_lnx-2.6.0.bundle/Contents/Linux/ifdokrfid.so
00001266 readerfactory.c:1002:RFBindFunctions() Loading IFD Handler 3.0
OK OMNIKEY CardMan RFID  IA32 v2.6.0 support@omnikey.com
00297640 readerfactory.c:305:RFAddReader() Using the pcscd polling thread
00004511 readerfactory.c:1135:RFInitializeReader() Attempting startup of OMNIKEY CardMan 5x21 00 01 using /usr/lib/pcsc/drivers//ifdokrfid_lnx-2.6.0.bundle/Contents/Linux/ifdokrfid.so
00000523 readerfactory.c:847:RFLoadReader() Reusing already loaded driver for /usr/lib/pcsc/drivers//ifdokrfid_lnx-2.6.0.bundle/Contents/Linux/ifdokrfid.so
00000448 readerfactory.c:1002:RFBindFunctions() Loading IFD Handler 3.0
OK OMNIKEY CardMan RFID  IA32 v2.6.0 support@omnikey.com