Le 8 mars 2012 07:24, Damien Miller <d...@mindrot.org> a écrit :
> Hi,

Hello,

> I'm trying to update OpenBSD's ports of pcsc-lite and add a libccid port.
> They compile fine, but when I attach a Feitian ePass PKI pcscd loops on
> detecting it and then disconnecting it a few seconds later. While the
> card is connected, I can access it okay using opensc-tool etc.
>
> Below is a log of such a session. I'm using OpenBSD -current, libusb-1.0.8
> with Ludovic Rousseau's "60 second disconnect" patch applied, ccid-1.4.5,
> pcsc-lite-1.8.2, openct-0.6.20 and opensc-0.12.2.  My reader.conf file is
> empty.
>
> Any pointers to debugging this would be greatfully appreciated.


> 00000000 pcscdaemon.c:233:main() pcscd set to foreground with debug send to 
> stdout
> 00000588 configfile.l:287:DBGetReaderList() Parsing conf file: 
> /etc/reader.conf.d
> 00000111 pcscdaemon.c:518:main() pcsc-lite 1.8.2 daemon ready.
> 00016519 hotplug_libusb.c:421:HPEstablishUSBNotifications() Driver 
> ifd-ccid.bundle does not support IFD_GENERATE_HOTPLUG. Using active polling 
> instead.
> 00000191 hotplug_libusb.c:430:HPEstablishUSBNotifications() Polling forced 
> every 1 second(s)
> 06132731 hotplug_libusb.c:514:HPAddHotPluggable() Adding USB device: 1:2:0
> 00000114 readerfactory.c:936:RFInitializeReader() Attempting startup of 
> Feitian SCR301 00 00 using 
> /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/OpenBSD/libccid.
> 00000504 readerfactory.c:826:RFBindFunctions() Loading IFD Handler 3.0
> 00000087 ifdhandler.c:1781:init_driver() Driver version: 1.4.5
> 00001589 ifdhandler.c:1798:init_driver() LogLevel: 0x0003
> 00000017 ifdhandler.c:1809:init_driver() DriverOptions: 0x0000
> 00000445 ifdhandler.c:80:IFDHCreateChannelByName() lun: 0, device: 
> usb:096e/0503:libusb-1.0:1:2:0
> 00001297 ccid_usb.c:245:OpenUSBByName() ifdManufacturerString: Ludovic 
> Rousseau (ludovic.rouss...@free.fr)
> 00000019 ccid_usb.c:246:OpenUSBByName() ifdProductString: Generic CCID driver
> 00000014 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
> 00032527 ccid_usb.c:506:OpenUSBByName() Found Vendor/Product: 096E/0503 
> (Feitian SCR301)
> 00000020 ccid_usb.c:508:OpenUSBByName() Using USB bus/device: 1/2
> 00025929 ccid_usb.c:993:get_data_rates() declared: 10753 bps
> 00000017 ccid_usb.c:993:get_data_rates() declared: 14337 bps
> 00000012 ccid_usb.c:993:get_data_rates() declared: 15625 bps
> 00000010 ccid_usb.c:993:get_data_rates() declared: 17204 bps
> 00000036 ccid_usb.c:993:get_data_rates() declared: 20833 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 21505 bps
> 00000012 ccid_usb.c:993:get_data_rates() declared: 23438 bps
> 00000016 ccid_usb.c:993:get_data_rates() declared: 25806 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 28674 bps
> 00000040 ccid_usb.c:993:get_data_rates() declared: 31250 bps
> 00000010 ccid_usb.c:993:get_data_rates() declared: 32258 bps
> 00000013 ccid_usb.c:993:get_data_rates() declared: 34409 bps
> 00000013 ccid_usb.c:993:get_data_rates() declared: 39063 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 41667 bps
> 00000009 ccid_usb.c:993:get_data_rates() declared: 43011 bps
> 00000010 ccid_usb.c:993:get_data_rates() declared: 46875 bps
> 00000013 ccid_usb.c:993:get_data_rates() declared: 52083 bps
> 00000014 ccid_usb.c:993:get_data_rates() declared: 53763 bps
> 00000009 ccid_usb.c:993:get_data_rates() declared: 57348 bps
> 00000010 ccid_usb.c:993:get_data_rates() declared: 62500 bps
> 00000009 ccid_usb.c:993:get_data_rates() declared: 64516 bps
> 00000139 ccid_usb.c:993:get_data_rates() declared: 68817 bps
> 00000014 ccid_usb.c:993:get_data_rates() declared: 71685 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 78125 bps
> 00000009 ccid_usb.c:993:get_data_rates() declared: 83333 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 86022 bps
> 00000009 ccid_usb.c:993:get_data_rates() declared: 93750 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 104167 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 107527 bps
> 00000009 ccid_usb.c:993:get_data_rates() declared: 114695 bps
> 00000017 ccid_usb.c:993:get_data_rates() declared: 125000 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 129032 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 143369 bps
> 00000127 ccid_usb.c:993:get_data_rates() declared: 156250 bps
> 00000118 ccid_usb.c:993:get_data_rates() declared: 166667 bps
> 00000011 ccid_usb.c:993:get_data_rates() declared: 172043 bps
> 00000129 ccid_usb.c:993:get_data_rates() declared: 215054 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 229391 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 250000 bps
> 00000008 ccid_usb.c:993:get_data_rates() declared: 344086 bps
> 00034369 ifdhandler.c:402:IFDHGetCapabilities() tag: 0xFB3, 
> usb:096e/0503:libusb-1.0:1:2:0 (lun: 0)
> 00000015 readerfactory.c:296:RFAddReader() Using the reader polling thread
> 00004026 ifdhandler.c:402:IFDHGetCapabilities() tag: 0xFAE, 
> usb:096e/0503:libusb-1.0:1:2:0 (lun: 0)
> 00000095 ifdhandler.c:490:IFDHGetCapabilities() Reader supports 1 slot(s)
> 00007835 ifdhandler.c:1163:IFDHPowerICC() action: PowerUp, 
> usb:096e/0503:libusb-1.0:1:2:0 (lun: 0)
> 00087062 eventhandler.c:256:EHStatusHandlerThread() powerState: 
> POWER_STATE_POWERED
> 00000042 Card ATR: 3B 9F 95 81 31 FE 9F 00 65 46 53 05 30 06 71 DF 00 00 00 
> 80 6A 82 5E
> 00919047 hotplug_libusb.c:604:HPRemoveHotPluggable() Removing USB device[0]: 
> 1:2:0

hotplug decided to remove the reader.
It looks like a bug in hotplug_libusb.c. Maybe OpenBSD has a special
case regarding libusb.

You can edit hotplug_libusb.c and change line 48 to:
#define DEBUG_HOTPLUG
and generate new logs.

Bye

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to