Ubuntu 11.10 Beta(2) Problem: Gemplus GemPC Twin SmartCard Reader + libccid + pcsc

Asked by Stig Endresen

I have spent the better part of a few days trying to get this card reader to work correctly. This card reader function correctly with older distributions of Ubuntu. I actually expected this to work flawless but it seem to me like the device is forced into a sleep mode or maybe something with rights isn't correct.

Below is all logs I managed to produce:

root@eurora:~# pcscd -a -f --debug
00000000 debuglog.c:277:DebugLogSetLevel() debug level=debug
00000855 configfile.l:245:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d
00000163 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/libccidtwin
00000284 pcscdaemon.c:550:main() pcsc-lite 1.7.2 daemon ready.
00001854 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000411 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000249 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x056A, PID: 0x0018, path: /dev/bus/usb/002/003
00000231 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/002/001
00000245 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A12, PID: 0x0001, path: /dev/bus/usb/002/002
00000227 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0A12, PID: 0x0001, path: /dev/bus/usb/002/002
00000297 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001
00000231 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001
00000333 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x08E6, PID: 0x3437, path: /dev/bus/usb/003/002
00000112 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x08E6, PID: 0x3437, path: /dev/bus/usb/003/002
00000069 hotplug_libudev.c:309:HPAddDevice() Adding USB device: Gemalto GemPC Twin
00000390 readerfactory.c:934:RFInitializeReader() Attempting startup of Gemalto GemPC Twin 00 00 using /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so
00000329 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0
00000049 ifdhandler.c:1750:init_driver() Driver version: 1.4.4
00000468 ifdhandler.c:1767:init_driver() LogLevel: 0x0003
00000023 ifdhandler.c:1778:init_driver() DriverOptions: 0x0000
00000087 ifdhandler.c:79:IFDHCreateChannelByName() lun: 0, device: usb:08e6/3437:libudev:0:/dev/bus/usb/003/002
00000358 ccid_usb.c:245:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (<email address hidden>)
00000025 ccid_usb.c:246:OpenUSBByName() ifdProductString: Generic CCID driver
00000016 ccid_usb.c:247:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version.
00128268 ccid_usb.c:504:OpenUSBByName() Found Vendor/Product: 08E6/3437 (Gemalto GemPC Twin)
00000040 ccid_usb.c:506:OpenUSBByName() Using USB bus/device: 3/2
00004768 ccid_usb.c:972:get_data_rates() declared: 10753 bps
00000049 ccid_usb.c:972:get_data_rates() declared: 14337 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 15625 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 17204 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 20833 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 21505 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 23438 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 25806 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 28674 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 31250 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 32258 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 34409 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 39063 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 41667 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 43011 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 46875 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 52083 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 53763 bps
00000004 ccid_usb.c:972:get_data_rates() declared: 57348 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 62500 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 64516 bps
00000004 ccid_usb.c:972:get_data_rates() declared: 68817 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 71685 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 78125 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 83333 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 86022 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 93750 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 104167 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 107527 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 114695 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 125000 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 129032 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 143369 bps
00000004 ccid_usb.c:972:get_data_rates() declared: 156250 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 166667 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 172043 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 215054 bps
00000006 ccid_usb.c:972:get_data_rates() declared: 229391 bps
00000005 ccid_usb.c:972:get_data_rates() declared: 250000 bps
00000004 ccid_usb.c:972:get_data_rates() declared: 344086 bps
00014669 ifdhandler.c:401:IFDHGetCapabilities() tag: 0xFB3, usb:08e6/3437:libudev:0:/dev/bus/usb/003/002 (lun: 0)
00000031 readerfactory.c:295:RFAddReader() Using the reader polling thread
00004141 ifdhandler.c:401:IFDHGetCapabilities() tag: 0xFAE, usb:08e6/3437:libudev:0:/dev/bus/usb/003/002 (lun: 0)
00000038 ifdhandler.c:489:IFDHGetCapabilities() Reader supports 1 slot(s)
00000371 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000145 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001
00000193 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0C45, PID: 0x62C0, path: /dev/bus/usb/001/002
00000149 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0C45, PID: 0x62C0, path: /dev/bus/usb/001/002
00000083 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: Gemalto GemPC Twin 00 00
07903009 ifdhandler.c:1151:IFDHPowerICC() action: PowerUp, usb:08e6/3437:libudev:0:/dev/bus/usb/003/002 (lun: 0)
00051046 eventhandler.c:372:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000030 eventhandler.c:387:EHStatusHandlerThread() Card inserted into Gemalto GemPC Twin 00 00
00000017 Card ATR: 3B 9F 96 40 0A 80 31 E0 6B 04 20 05 02 58 55 55 55 55 55 55
05003981 ifdhandler.c:1151:IFDHPowerICC() action: PowerDown, usb:08e6/3437:libudev:0:/dev/bus/usb/003/002 (lun: 0)
00004022 eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED

/var/log/kern.log

Sep 29 11:06:07 eurora kernel: [ 2146.500113] usb 3-1: new full speed USB device number 2 using ohci_hcd
Sep 29 11:06:07 eurora kernel: [ 2147.457220] WARNING! power/level is deprecated; use power/control instead

/var/log/syslog.logSep 29 11:06:07 eurora kernel: [ 2146.500113] usb 3-1: new full speed USB device number 2 using ohci_hcd
Sep 29 11:06:07 eurora mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:03.1/usb3/3-1"
Sep 29 11:06:07 eurora mtp-probe: bus: 3, device: 2 was not an MTP device
Sep 29 11:06:07 eurora kernel: [ 2147.457220] WARNING! power/level is deprecated; use power/control instead
Sep 29 11:07:56 eurora pcscd: pcscdaemon.c:256:main() Can't log APDU (restricted)
Sep 29 11:08:14 eurora pcscd: pcscdaemon.c:256:main() Can't log APDU (restricted)

# dmesg
Sep 29 11:06:07 eurora kernel: [ 2146.500113] usb 3-1: new full speed USB device number 2 using ohci_hcd
Sep 29 11:06:07 eurora mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:03.1/usb3/3-1"
Sep 29 11:06:07 eurora mtp-probe: bus: 3, device: 2 was not an MTP device
Sep 29 11:06:07 eurora kernel: [ 2147.457220] WARNING! power/level is deprecated; use power/control instead
Sep 29 11:07:56 eurora pcscd: pcscdaemon.c:256:main() Can't log APDU (restricted)
Sep 29 11:08:14 eurora pcscd: pcscdaemon.c:256:main() Can't log APDU (restricted)

Hopefully others have figured this or may help finding a solution.

Regards

Stig Endresen

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pcsc-lite Edit question
Assignee:
No assignee Edit question
Solved by:
Stig Endresen
Solved:
Last query:
Last reply:
Revision history for this message
Karel Hacek (d35cbd56b279) said :
#1

I managed to get the Gemplus GemPC Twin SmartCard Reader working on (K)Ubuntu 11.10 (Oneiric) with this:

sudo apt-get install pcsc-tools pcscd

# and add this line to /etc/rc.local before "exit":
pscs_scan

# Afterwards restart

Revision history for this message
Karel Hacek (d35cbd56b279) said :
#2

Perhaps this link could help people with another Debian-based GNU/Linux Distro:
http://support.gemalto.com/fileadmin/user_upload/IAM/FAQ/How_to_install_the_PC-Link_reader_on_Linux.pdf

Revision history for this message
Karel Hacek (d35cbd56b279) said :
#3

In #1 there's a typo. Correct is:
pcsc_scan

Revision history for this message
Stig Endresen (stig-ragnar-endresen) said :
#4

The #1 Does not work for me. The cardreader doesn't sleep but no success in login in on web with it.

pcsc_scan only confirm that card is present. This problem is the same in 12.04 alpha.

Revision history for this message
Stig Endresen (stig-ragnar-endresen) said :
#5

Java expect to find libpcsclite.so within /usr/lib, /usr/lib64, /usr/lib/64, or /usr/local/lib so linking /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0 into /usr/lib solves that. I also needed to remove libopenct and openct packages so that libccid was used by pcscd.

Currently working with openjdk and icedtea-plugin. Hopefully someone can confirm this solution for Ubuntu releases later than 11.04.

Revision history for this message
Stig Endresen (stig-ragnar-endresen) said :
#6

Addon to previous post.

ln -s /lib/x86_64-linux-gnu/libpcsclite.so.1.0.0 /usr/lib/libpcsclite.so is needed for using cardreader with Java. It shouldn't be that different for i386 platform.