# /etc/init.d/pcscd not working

## walkbrot

Hey guys,

on my machine theres a problem with the new pcsc-lite. I am able to start it manually

```
antarctica andre # pcscd -a -d -f

00000000 pcscdaemon.c:230:main() pcscd set to foreground with debug send to stderr

00000098 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d

00000011 pcscdaemon.c:550:main() pcsc-lite 1.7.2 daemon ready.

00007583 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001

00000134 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001

00000122 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/004/001

00000088 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/004/001

00000095 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0C4B, PID: 0x0300, path: /dev/bus/usb/004/002

00000019 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0C4B, PID: 0x0300, path: /dev/bus/usb/004/002

00000004 hotplug_libudev.c:309:HPAddDevice() Adding USB device: REINER SCT cyberJack pp_a

00000029 readerfactory.c:934:RFInitializeReader() Attempting startup of REINER SCT cyberJack pp_a (4964965449) 00 00 using /usr/lib64/readers/usb/libifd-cyberjack.bundle/Contents/Linux/libifd-cyberjack.so                                                                              

CYBERJACK: Started

00000886 readerfactory.c:824:RFBindFunctions() Loading IFD Handler 3.0

00037807 readerfactory.c:290:RFAddReader() Using the pcscd polling thread

00004169 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001

00000111 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001

00000100 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x046D, PID: 0x09A1, path: /dev/bus/usb/002/002

00000095 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x046D, PID: 0x09A1, path: /dev/bus/usb/002/002

00000102 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x046D, PID: 0x09A1, path: /dev/bus/usb/002/002

00000093 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x046D, PID: 0x09A1, path: /dev/bus/usb/002/002

00000089 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001

00000155 hotplug_libudev.c:258:get_driver() Looking for a driver for VID: 0x0471, PID: 0x2057, path: /dev/bus/usb/002/004

00000031 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: REINER SCT cyberJack pp_a (4964965449) 00 00

00000048 hotplug_libudev.c:558:HPEstablishUSBNotifications() udev_monitor_receive_device() error                                                                                            

                                                                                              

00010014 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: REINER SCT cyberJack pp_a (4964965449) 00 00

00010066 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: REINER SCT cyberJack pp_a (4964965449) 00 00

00010069 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: REINER SCT cyberJack pp_a (4964965449) 00 00

00010067 readerfactory.c:1301:RFWaitForReaderInit() Waiting init for reader: REINER SCT cyberJack pp_a (4964965449) 00 00

00008735 eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED

00000013 Card ATR: 3B FF 18 00 FF 81 31 FE 45 65 63 11 08 50 02 50 00 10 40 00 03 24 06 30 4F 

00410986 eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
```

If I try to start the same with the init-script everything looks fine, but the LED the reader has is not blinking and theres no access for any application.

```
antarctica andre # /etc/init.d/pcscd start

 * Starting pcscd ...                                                                   [ ok ]

antarctica andre # /etc/init.d/pcscd status

 * status: started
```

Theres an error which is printed in the /var/log/messages:

```
[...]

Aug  9 09:48:10 antarctica pcscd: readerfactory.c:965:RFInitializeReader() Open Port 0x200000 Failed (usb:0c4b/0300:libudev:0:/dev/bus/usb/004/002)

Aug  9 09:48:10 antarctica pcscd: readerfactory.c:275:RFAddReader() REINER SCT cyberJack pp_a (4964965449) init failed.

Aug  9 09:48:10 antarctica pcscd: hotplug_libudev.c:377:HPAddDevice() Failed adding USB device: REINER SCT cyberJack pp_a

Aug  9 09:48:10 antarctica pcscd: hotplug_libudev.c:558:HPEstablishUSBNotifications() udev_monitor_receive_device() error 
```

Any idea how to fix  that issue?

Thanks, Andre

----------

## sikawob

Hi walkbrot,

just have had the same problem. The reason was a missing udev rule. I found out, that the rule /lib/udev/rules.d/99-pcscd-hotplug.rules has to be modified. I've added this line:

```

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0c4b", ATTRS{idProduct}=="0500", GROUP=="pcscd"

```

with the idVendor and idProduct number as shown with lsusb for your reader (mine is a Reiner-SCT cyberjack RFID standard).

The reason for this is, that pcscd is now running as user nobody in group pcscd. Therefore pcscd can't get access to the reader, as this is in group usb.

Hope this was helpfull.

regards

sikawob

----------

## pgu

Is there some sort of how-to for pcscd and card reader installation for Gentoo?

I seem to be missing /etc/reader.conf.d as well as /usr/lib64/readers/usb after emerge of pcsc-lite.

```
# pcscd -a -d -f 

00000000 pcscdaemon.c:233:main() pcscd set to foreground with debug send to stdout

00000261 configfile.l:287:DBGetReaderList() Parsing conf file: /etc/reader.conf.d

00000101 pcscdaemon.c:518:main() pcsc-lite 1.8.2 daemon ready.

00000352 hotplug_libudev.c:96:HPReadBundleValues() Cannot open PC/SC drivers directory: /usr/lib64/readers/usb

00000031 hotplug_libudev.c:97:HPReadBundleValues() Disabling USB support for pcscd.

00000018 pcscdaemon.c:629:at_exit() cleaning /var/run/pcscd
```

----------

## linuxale

Hi,

I'm trying to use gentoo to connect with activkey but I'm facing with a problem to key my green activkey light on!!!

I've found various question about ActivKey compatibility; I try to resume:

1) libmpt can give problem - http://answerpot.com/showthread.php?3413932-pcsc-lite-1.8.2%2Flibccid-1.4.5+failure+on+OpenBSD

2) new ccid and pcsc-lite library version can give problem http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614376

3) The card is powered off after inactivity - http://ludovicrousseau.blogspot.com/2010/10/card-auto-power-on-and-off.html

I have tried all suggestion from previous post without success.

I have tried old and new version.

The only way to use my ActivKey is to start a KVM machine with Ubuntu and there everything works properly.

So is a problem in my gentoo software stack... But i can't understand where.

If you read my post till here you can sure read my pcscd log: 

```

mplinu ccid-1.4.7 # pcscd -fad

00000000 debuglog.c:269:DebugLogSetLevel() debug level=debug

00000221 configfile.l:298:DBGetReaderList() Parsing conf file: /etc/reader.conf.d

00000027 pcscdaemon.c:518:main() pcsc-lite 1.8.3 daemon ready.

libusb: 0.000000 debug [libusb_init] libusb-1.0.9

libusb: 0.000079 debug [find_usbfs_path] found usbfs at /dev/bus/usb

libusb: 0.000106 debug [op_init] bulk continuation flag supported

libusb: 0.000116 debug [op_init] zero length packet flag supported

libusb: 0.000138 debug [op_init] found usb devices in sysfs

libusb: 0.000226 debug [usbi_add_pollfd] add fd 6 events 1

libusb: 0.000241 debug [usbi_io_init] using timerfd for timeouts

libusb: 0.000249 debug [usbi_add_pollfd] add fd 8 events 1

libusb: 0.000256 debug [libusb_init] created default context

libusb: 0.000266 debug [libusb_get_device_list]

libusb: 0.000291 debug [sysfs_scan_device] scan usb1

libusb: 0.000369 debug [sysfs_scan_device] bus=1 dev=1

libusb: 0.000378 debug [enumerate_device] busnum 1 devaddr 1 session_id 257

libusb: 0.000385 debug [enumerate_device] allocating new device for 1/1 (session 257)

libusb: 0.000454 debug [sysfs_scan_device] scan usb2

libusb: 0.000518 debug [sysfs_scan_device] bus=2 dev=1

libusb: 0.000527 debug [enumerate_device] busnum 2 devaddr 1 session_id 513

libusb: 0.000534 debug [enumerate_device] allocating new device for 2/1 (session 513)

libusb: 0.000584 debug [sysfs_scan_device] scan usb3

libusb: 0.000645 debug [sysfs_scan_device] bus=3 dev=1

...

libusb: 0.004550 debug [sysfs_get_active_config_descriptor] active configuration 1

00005614 hotplug_libusb.c:514:HPAddHotPluggable() Adding USB device: 7:5:0

00000031 readerfactory.c:936:RFInitializeReader() Attempting startup of ActivIdentity Activkey Sim 00 00 using /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/lib

00000115 readerfactory.c:826:RFBindFunctions() Loading IFD Handler 3.0

00000053 ifdhandler.c:1832:init_driver() Driver version: 1.4.7

00000540 ifdhandler.c:1849:init_driver() LogLevel: 0x0003

00000022 ifdhandler.c:1860:init_driver() DriverOptions: 0x0004

00000139 ifdhandler.c:83:CreateChannelByNameOrChannel() Lun: 0, device: usb:09c3/0014:libusb-1.0:7:5:0

00000027 ccid_usb.c:228:OpenUSBByName() Using: /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Info.plist

00000438 ccid_usb.c:246:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr)

00000016 ccid_usb.c:247:OpenUSBByName() ifdProductString: Generic CCID driver

00000026 ccid_usb.c:248:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later

libusb: 0.006012 debug [libusb_init] libusb-1.0.9

libusb: 0.006059 debug [find_usbfs_path] found usbfs at /dev/bus/usb

libusb: 0.006078 debug [op_init] bulk continuation flag supported

libusb: 0.006095 debug [op_init] zero length packet flag supported

libusb: 0.006122 debug [op_init] found usb devices in sysfs

libusb: 0.006210 debug [usbi_add_pollfd] add fd 9 events 1

libusb: 0.006234 debug [usbi_io_init] using timerfd for timeouts

libusb: 0.006252 debug [usbi_add_pollfd] add fd 11 events 1

libusb: 0.006271 debug [libusb_get_device_list]

libusb: 0.006299 debug [sysfs_scan_device] scan usb1

libusb: 0.006400 debug [sysfs_scan_device] bus=1 dev=1

libusb: 0.006425 debug [enumerate_device] busnum 1 devaddr 1 session_id 257

libusb: 0.006442 debug [enumerate_device] allocating new device for 1/1 (session 257)

libusb: 0.006502 debug [sysfs_scan_device] scan usb2

libusb: 0.006573 debug [sysfs_scan_device] bus=2 dev=1

...

libusb: 0.009249 debug [libusb_get_device_descriptor]

libusb: 0.009278 debug [libusb_open] open 7.5

libusb: 0.009299 debug [op_open] opening /dev/bus/usb/007/005

libusb: 0.009339 debug [usbi_add_pollfd] add fd 12 events 4

libusb: 0.009371 debug [libusb_get_active_config_descriptor]

libusb: 0.009404 debug [sysfs_get_active_config_descriptor] active configuration 1

libusb: 0.009454 debug [sysfs_get_active_config_descriptor] active configuration 1

libusb: 0.009495 debug [libusb_claim_interface] interface 0

00003532 ccid_usb.c:521:OpenUSBByName() Found Vendor/Product: 09C3/0014 (ActivIdentity Activkey Sim)

00000015 ccid_usb.c:523:OpenUSBByName() Using USB bus/device: 7/5

libusb: 0.009578 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 0.009605 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.009624 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 0.011854 debug [handle_events] poll() returned 1

libusb: 0.011882 debug [reap_for_handle] urb type=2 status=0 transferred=1

libusb: 0.011891 debug [handle_control_completion] handling completion status 0

libusb: 0.011899 debug [disarm_timerfd]

libusb: 0.011906 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2b10

libusb: 0.011914 debug [ctrl_transfer_cb] actual_length=1

00002391 ccid_usb.c:992:get_data_rates() Wrong GET DATA RATES size: 1

libusb: 0.011961 debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line)

libusb: 0.011973 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.011981 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 0.013866 debug [handle_events] poll() returned 1

libusb: 0.013914 debug [reap_for_handle] urb type=2 status=0 transferred=4

libusb: 0.013933 debug [handle_control_completion] handling completion status 0

libusb: 0.013951 debug [disarm_timerfd]

libusb: 0.013966 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2b10

libusb: 0.013984 debug [ctrl_transfer_cb] actual_length=4

libusb: 0.014013 debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line)

libusb: 0.014037 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.014055 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 0.015851 debug [handle_events] poll() returned 1

libusb: 0.015878 debug [reap_for_handle] urb type=2 status=0 transferred=28

libusb: 0.015896 debug [handle_control_completion] handling completion status 0

libusb: 0.015903 debug [disarm_timerfd]

libusb: 0.015910 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2b10

libusb: 0.015917 debug [ctrl_transfer_cb] actual_length=28

libusb: 0.015932 debug [libusb_unref_device] destroy device 1.1

libusb: 0.015940 debug [libusb_unref_device] destroy device 2.1

...

libusb: 0.016020 debug [libusb_unref_device] destroy device 2.23

libusb: 0.016175 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 8

libusb: 0.016201 debug [libusb_submit_transfer] arm timerfd for timeout in 100ms (first in line)

libusb: 0.016212 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.016220 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 0.116211 debug [handle_events] poll() returned 1

libusb: 0.116248 debug [handle_events] timerfd triggered

libusb: 0.116260 debug [disarm_timerfd]

libusb: 0.116278 debug [libusb_cancel_transfer]

libusb: 0.117883 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.117903 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 0.117920 debug [handle_events] poll() returned 1

libusb: 0.117937 debug [reap_for_handle] urb type=1 status=-2 transferred=0

libusb: 0.117950 debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1

libusb: 0.117962 debug [handle_bulk_completion] abnormal reap: urb status -2

libusb: 0.117975 debug [handle_bulk_completion] abnormal reap: last URB handled, reporting

libusb: 0.117987 debug [usbi_handle_transfer_cancellation] detected timeout cancellation

libusb: 0.117999 debug [disarm_timerfd]

libusb: 0.118014 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad42502f40

libusb: 0.118048 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 0.118065 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 0.118075 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.118082 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 0.119846 debug [handle_events] poll() returned 1

libusb: 0.119867 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 0.119875 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 0.119883 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 0.119891 debug [disarm_timerfd]

libusb: 0.119899 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2ae0

libusb: 0.119907 debug [bulk_transfer_cb] actual_length=10

libusb: 0.119922 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 0.119936 debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line)

libusb: 0.119946 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 0.119980 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.119959 debug [handle_events] poll() returned 1

libusb: 1.119994 debug [handle_events] timerfd triggered

libusb: 1.120011 debug [disarm_timerfd]

libusb: 1.120024 debug [libusb_cancel_transfer]

libusb: 1.121849 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.121875 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.121886 debug [handle_events] poll() returned 1

libusb: 1.121900 debug [reap_for_handle] urb type=3 status=-2 transferred=0

libusb: 1.121908 debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1

libusb: 1.121915 debug [handle_bulk_completion] abnormal reap: urb status -2

libusb: 1.121922 debug [handle_bulk_completion] abnormal reap: last URB handled, reporting

libusb: 1.121930 debug [usbi_handle_transfer_cancellation] detected timeout cancellation

libusb: 1.121937 debug [disarm_timerfd]

libusb: 1.121945 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2ae0

libusb: 1.121953 debug [bulk_transfer_cb] actual_length=0

01110056 ccid_usb.c:699:ReadUSB() read failed (7/5): -7 Success

libusb: 1.122006 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.122026 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.122036 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.122044 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.123846 debug [handle_events] poll() returned 1

libusb: 1.123871 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.123878 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.123886 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.123895 debug [disarm_timerfd]

libusb: 1.123902 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2ae0

libusb: 1.123910 debug [bulk_transfer_cb] actual_length=10

libusb: 1.123926 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.123942 debug [libusb_submit_transfer] arm timerfd for timeout in 1000ms (first in line)

libusb: 1.123954 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.123961 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.124844 debug [handle_events] poll() returned 1

libusb: 1.124867 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.124875 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.124883 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.124891 debug [disarm_timerfd]

libusb: 1.124899 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2ae0

libusb: 1.124907 debug [bulk_transfer_cb] actual_length=10

00002949 ifdhandler.c:353:IFDHGetCapabilities() tag: 0xFB3, usb:09c3/0014:libusb-1.0:7:5:0 (lun: 0)

00000010 readerfactory.c:296:RFAddReader() Using the reader polling thread

libusb: 1.124961 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.124977 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.124988 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.124996 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.125856 debug [handle_events] poll() returned 1

libusb: 1.125889 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.125903 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.125916 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.125929 debug [disarm_timerfd]

libusb: 1.125940 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2ae0

libusb: 1.125953 debug [bulk_transfer_cb] actual_length=10

libusb: 1.125973 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.125987 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 1.125997 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.126005 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.126846 debug [handle_events] poll() returned 1

libusb: 1.126870 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.126883 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.126895 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.126907 debug [disarm_timerfd]

libusb: 1.126918 debug [usbi_handle_transfer_completion] transfer 0xcf5bd8 has callback 0x7fad438d2ae0

libusb: 1.126931 debug [bulk_transfer_cb] actual_length=10

00002058 ifdhandler.c:353:IFDHGetCapabilities() tag: 0xFAE, usb:09c3/0014:libusb-1.0:7:5:0 (lun: 0)

00000009 ifdhandler.c:441:IFDHGetCapabilities() Reader supports 1 slot(s)

libusb: 1.127057 debug [libusb_unref_device] libusb: 1.127061 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

destroy device 1.1

libusb: 1.127091 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.127093 debug [libusb_unref_device] destroy device 2.1

libusb: 1.127118 debug [libusb_unref_device] destroy device 3.1

libusb: 1.127125 debug [libusb_unref_device] destroy device 4.1

libusb: 1.127132 debug [libusb_unref_device] destroy device 5.1

libusb: 1.127139 debug [libusb_unref_device] destroy device 6.1

libusb: 1.127146 debug [libusb_unref_device] destroy device 7.1

libusb: 1.127153 debug [libusb_unref_device] destroy device 8.1

libusb: 1.127160 debug [libusb_unref_device] destroy device 1.3

libusb: 1.127167 debug [libusb_unref_device] destroy device 2.21

libusb: 1.127175 debug [libusb_unref_device] destroy device 3.2

libusb: 1.127182 debug [libusb_unref_device] destroy device 2.22

libusb: 1.127189 debug [libusb_unref_device] destroy device 2.23

libusb: 1.127196 debug [libusb_unref_device] destroy device 7.5

00000197 hotplug_libusb.c:421:HPEstablishUSBNotifications() Driver ifd-ccid.bundle does not support IFD_GENERATE_HOTPLUG. Using active polling instead.

00000012 hotplug_libusb.c:430:HPEstablishUSBNotifications() Polling forced every 1 second(s)

00000004 readerfactory.c:1303:RFWaitForReaderInit() Waiting init for reader: ActivIdentity Activkey Sim 00 00

libusb: 1.127104 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.127246 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.127853 debug [handle_events] poll() returned 1

libusb: 1.127885 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.127903 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.127921 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.127939 debug [disarm_timerfd]

libusb: 1.127952 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.127971 debug [bulk_transfer_cb] actual_length=10

libusb: 1.127992 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.128016 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 1.128037 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.128055 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.128857 debug [handle_events] poll() returned 1

libusb: 1.128884 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.128899 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.128906 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.128914 debug [disarm_timerfd]

libusb: 1.128920 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.128928 debug [bulk_transfer_cb] actual_length=10

libusb: 1.128941 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.128953 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.128969 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.128976 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.129855 debug [handle_events] poll() returned 1

libusb: 1.129875 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.129887 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.129900 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.129912 debug [disarm_timerfd]

libusb: 1.129922 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.129938 debug [bulk_transfer_cb] actual_length=10

libusb: 1.129947 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.129958 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 1.129967 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.129974 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.130853 debug [handle_events] poll() returned 1

libusb: 1.130890 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.130920 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.130952 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.130969 debug [disarm_timerfd]

libusb: 1.130982 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.130999 debug [bulk_transfer_cb] actual_length=10

00003794 ifdhandler.c:1114:IFDHPowerICC() action: PowerUp, usb:09c3/0014:libusb-1.0:7:5:0 (lun: 0)

libusb: 1.131041 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.131063 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.131083 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.131100 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.131836 debug [handle_events] poll() returned 1

libusb: 1.131860 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.131878 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.131896 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.131914 debug [disarm_timerfd]

libusb: 1.131933 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.131952 debug [bulk_transfer_cb] actual_length=10

libusb: 1.131973 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 43

libusb: 1.131995 debug [libusb_submit_transfer] arm timerfd for timeout in 60000ms (first in line)

libusb: 1.132016 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.132035 debug [handle_events] poll() 3 fds with timeout in 60000ms

00006325 readerfactory.c:1303:RFWaitForReaderInit() Waiting init for reader: ActivIdentity Activkey Sim 00 00

00010106 readerfactory.c:1303:RFWaitForReaderInit() Waiting init for reader: ActivIdentity Activkey Sim 00 00

00010115 readerfactory.c:1303:RFWaitForReaderInit() Waiting init for reader: ActivIdentity Activkey Sim 00 00

00010114 readerfactory.c:1303:RFWaitForReaderInit() Waiting init for reader: ActivIdentity Activkey Sim 00 00

libusb: 1.173857 debug [handle_events] poll() returned 1

libusb: 1.173890 debug [reap_for_handle] urb type=3 status=-121 transferred=35

libusb: 1.173904 debug [handle_bulk_completion] handling completion status -121 of bulk urb 1/1

libusb: 1.173918 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.173931 debug [disarm_timerfd]

libusb: 1.173943 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.173957 debug [bulk_transfer_cb] actual_length=35

00006324 eventhandler.c:256:EHStatusHandlerThread() powerState: POWER_STATE_POWERED

00000012 Card ATR: 3B FD 18 00 FF 80 B1 FE 45 1F 07 80 73 00 21 13 57 4A 54 48 61 31 47 00 5F

libusb: 1.174033 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.174050 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.174061 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.174068 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.174846 debug [handle_events] poll() returned 1

libusb: 1.174870 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.174883 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.174895 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.174910 debug [disarm_timerfd]

libusb: 1.174916 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.174924 debug [bulk_transfer_cb] actual_length=10

libusb: 1.174934 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 1.174946 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 1.174957 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.174964 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 1.175850 debug [handle_events] poll() returned 1

libusb: 1.175877 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 1.175890 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 1.175903 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 1.175915 debug [disarm_timerfd]

libusb: 1.175926 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad438d2ae0

libusb: 1.175939 debug [bulk_transfer_cb] actual_length=10

libusb: 1.175965 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 8

libusb: 1.175989 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 1.175999 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 1.176007 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 2.127333 debug [libusb_get_device_list]

libusb: 2.127477 debug [sysfs_scan_device] scan usb1

...

```

Till here the light is green

```

libusb: 6.148060 debug [libusb_unref_device] destroy device 7.5

libusb: 6.176004 debug [handle_events] poll() returned 1

libusb: 6.176041 debug [handle_events] timerfd triggered

libusb: 6.176053 debug [disarm_timerfd]

libusb: 6.176067 debug [libusb_cancel_transfer]

libusb: 6.177831 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.177851 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.177868 debug [handle_events] poll() returned 1

libusb: 6.177885 debug [reap_for_handle] urb type=1 status=-2 transferred=0

libusb: 6.177898 debug [handle_bulk_completion] handling completion status -2 of bulk urb 1/1

libusb: 6.177911 debug [handle_bulk_completion] abnormal reap: urb status -2

libusb: 6.177923 debug [handle_bulk_completion] abnormal reap: last URB handled, reporting

libusb: 6.177937 debug [usbi_handle_transfer_cancellation] detected timeout cancellation

libusb: 6.177946 debug [disarm_timerfd]

libusb: 6.177952 debug [usbi_handle_transfer_completion] transfer 0xcf5de8 has callback 0x7fad42502f40

libusb: 6.177972 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 6.177989 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 6.178000 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.178008 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.179809 debug [handle_events] poll() returned 1

libusb: 6.179829 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 6.179837 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 6.179845 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 6.179853 debug [disarm_timerfd]

libusb: 6.179860 debug [usbi_handle_transfer_completion] transfer 0xd000e8 has callback 0x7fad438d2ae0

libusb: 6.179868 debug [bulk_transfer_cb] actual_length=10

libusb: 6.179881 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 6.179895 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 6.179906 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.179913 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.180816 debug [handle_events] poll() returned 1

libusb: 6.180844 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 6.180857 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 6.180870 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 6.180883 debug [disarm_timerfd]

libusb: 6.180894 debug [usbi_handle_transfer_completion] transfer 0xd000e8 has callback 0x7fad438d2ae0

libusb: 6.180907 debug [bulk_transfer_cb] actual_length=10

05006911 ifdhandler.c:1114:IFDHPowerICC() action: PowerDown, usb:09c3/0014:libusb-1.0:7:5:0 (lun: 0)

libusb: 6.180943 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 6.180957 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 6.180968 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.180976 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.181813 debug [handle_events] poll() returned 1

libusb: 6.181836 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 6.181845 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 6.181853 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 6.181860 debug [disarm_timerfd]

libusb: 6.181867 debug [usbi_handle_transfer_completion] transfer 0xd000e8 has callback 0x7fad438d2ae0

libusb: 6.181875 debug [bulk_transfer_cb] actual_length=10

libusb: 6.181889 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 6.181903 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 6.181914 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.181943 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.182815 debug [handle_events] poll() returned 1

libusb: 6.182840 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 6.182852 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 6.182865 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 6.182877 debug [disarm_timerfd]

libusb: 6.182887 debug [usbi_handle_transfer_completion] transfer 0xd000e8 has callback 0x7fad438d2ae0

libusb: 6.182900 debug [bulk_transfer_cb] actual_length=10

00001986 eventhandler.c:446:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED

libusb: 6.182936 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 6.182948 debug [libusb_submit_transfer] arm timerfd for timeout in 5000ms (first in line)

libusb: 6.182958 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.182966 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.183813 debug [handle_events] poll() returned 1

libusb: 6.183835 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 6.183848 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 6.183860 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 6.183872 debug [disarm_timerfd]

libusb: 6.183883 debug [usbi_handle_transfer_completion] transfer 0xd000e8 has callback 0x7fad438d2ae0

libusb: 6.183896 debug [bulk_transfer_cb] actual_length=10

libusb: 6.183913 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 10

libusb: 6.183932 debug [libusb_submit_transfer] arm timerfd for timeout in 3000ms (first in line)

libusb: 6.183948 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.183961 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 6.184823 debug [handle_events] poll() returned 1

libusb: 6.184845 debug [reap_for_handle] urb type=3 status=0 transferred=10

libusb: 6.184857 debug [handle_bulk_completion] handling completion status 0 of bulk urb 1/1

libusb: 6.184870 debug [handle_bulk_completion] last URB in transfer --> complete!

libusb: 6.184882 debug [disarm_timerfd]

libusb: 6.184892 debug [usbi_handle_transfer_completion] transfer 0xd000e8 has callback 0x7fad438d2ae0

libusb: 6.184905 debug [bulk_transfer_cb] actual_length=10

libusb: 6.184926 debug [submit_bulk_transfer] need 1 urbs for new transfer with length 8

libusb: 6.184961 debug [libusb_submit_transfer] arm timerfd for timeout in 600000ms (first in line)

libusb: 6.184985 debug [libusb_handle_events_timeout_completed] doing our own event handling

libusb: 6.184992 debug [handle_events] poll() 3 fds with timeout in 60000ms

libusb: 7.148160 debug [libusb_get_device_list]

libusb: 7.148260 debug [sysfs_scan_device] scan usb1

libusb: 7.148367 debug [sysfs_scan_device] bus=1 dev=1

libusb: 7.148376 debug [enumerate_device] busnum 1 devaddr 1 session_id 257

libusb: 7.148385 debug [enumerate_device] allocating new device for 1/1 (session 257)

libusb: 7.148441 debug [sysfs_scan_device] scan usb2

libusb: 7.148504 debug [sysfs_scan_device] bus=2 dev=1

libusb: 7.148513 debug [enumerate_device] busnum 2 devaddr 1 session_id 513

libusb: 7.148520 debug [enumerate_device] allocating new device for 2/1 (session 513)

```

Any Ideas is welcome.

Thanks

----------

## samo

The following hint solved the problem for me *Quote:*   

> I found out, that the rule /lib/udev/rules.d/99-pcscd-hotplug.rules has to be modified. 

 

sys-apps/pcsc-lite 1.7.2-r2

dev-libs/cyberjack 3.99.5_p03

----------

## linuxale

In my case the problem was different; 

to use the ActivKey I've used the follow pkg version:

pcsc-lite-1.5.3

ccid-1.3.11

If needed I will post the full ebuild package.

----------

