good looks like is working..... within opensc project there is "openct" which is for card reades and may substitute pcsc.
ciao Domenico Kevin Reinholz wrote: > Domenico, > > That did the trick! These are the actual flags I used: > > env LIBUSB_CLFAGS="-I/usr/sfw/include" LIBUSB_LIBS="-L/usr/sfw/lib > -lusb" ./configure CCC=/opt/sunstudio12.1/bin/CC > CC=/opt/sunstudio12.1/bin/cc --sysconfdir=/etc --prefix=/usr/local > --enable-usbdropdir=/usr/sfw/lib/libusb_plugins/ --disable-libhal > --enable-libusb --enable-debugatr --enable-scf > > Here's what's pcscd shows when run in the foreground in debug mode: > > reinholz at etrenank:~/Download/PCSC/pcsc-lite-1.5.3$ pfexec > /usr/local/sbin/pcscd -d -f > 00000000 pcscdaemon.c:266:() pcscd set to foreground with debug send > to stderr > 00000285 pcscdaemon.c:505:() pcsc-lite 1.5.3 daemon ready. > 00246620 hotplug_libusb.c:477:() Adding USB device: /dev/usb:4e6.e001/0 > 00018979 readerfactory.c:1023:() Attempting startup of SCM SCR 331 > (21120727G00110) 00 00 using > /usr/sfw/lib/libusb_plugins//ifd-ccid.bundle/Contents/Solaris/libccid.so > 00001938 readerfactory.c:877:() Loading IFD Handler 3.0 > 00000093 ifdhandler.c:1417:() Driver version: 1.3.10 > 00000303 ifdhandler.c:1430:() LogLevel: 0x0003 > 00000284 ifdhandler.c:1450:() DriverOptions: 0x0000 > 00000031 ifdhandler.c:81:() lun: 0, device: > usb:04e6/e001:libusb:/dev/usb:4e6.e001/0 > 00000450 ccid_usb.c:238:() Manufacturer: Ludovic Rousseau > (ludovic.rousseau at free.fr) > 00000280 ccid_usb.c:248:() ProductString: Generic CCID driver > 00000278 ccid_usb.c:254:() Copyright: This driver is protected by > terms of the GNU Lesser General Public License version 2.1, or (at > your option) any later version. > 00018603 ccid_usb.c:408:() Found Vendor/Product: 04E6/E001 (SCM SCR 331) > 00000025 ccid_usb.c:411:() Using USB bus/device: /dev/usb/4e6.e001/0 > 00005742 ccid_usb.c:783:() IFD does not support GET_DATA_RATES > request: I/O error > 00137973 ifdhandler.c:333:() tag: 0xFB0, > usb:04e6/e001:libusb:/dev/usb:4e6.e001/0 (lun: 0) > 00000038 readerfactory.c:249:() Using the pcscd polling thread > 00003990 ifdhandler.c:333:() tag: 0xFAE, > usb:04e6/e001:libusb:/dev/usb:4e6.e001/0 (lun: 0) > 00000034 ifdhandler.c:377:() Reader supports 1 slot(s) > 00000034 hotplug_libusb.c:401:() Driver ifd-ccid.bundle does not > support IFD_GENERATE_HOTPLUG. Using active polling instead. > 00000029 hotplug_libusb.c:411:() Polling forced every 1 second(s) > 86617370 ifdhandler.c:1001:() action: PowerUp, > usb:04e6/e001:libusb:/dev/usb:4e6.e001/0 (lun: 0) > 00356112 ATR: 3B DB 96 00 80 1F 03 00 31 C0 64 77 E3 03 00 82 90 00 C1 > 00000042 atrhandler.c:101:() Conv: 01, Y1: 0D, K: 0B > 00000018 atrhandler.c:118:() TA1: 96, TB1: FFFFFFFF, TC1: 00, TD1: 80 > 00000017 atrhandler.c:152:() T=0 Protocol Found > 00000016 atrhandler.c:118:() TA2: FFFFFFFF, TB2: FFFFFFFF, TC2: > FFFFFFFF, TD2: 1F > 00000016 atrhandler.c:152:() T=15 Protocol Found > 00000018 atrhandler.c:118:() TA3: 03, TB3: FFFFFFFF, TC3: FFFFFFFF, > TD3: FFFFFFFF > 00000025 atrhandler.c:246:() CurrentProtocol: 1, AvailableProtocols: 9 > 00016750 eventhandler.c:429:() Card inserted into SCM SCR 331 > (21120727G00110) 00 00 > 00000061 Card ATR: 3B DB 96 00 80 1F 03 00 31 C0 64 77 E3 03 00 82 90 > 00 C1 > > It detects my CAC properly upon insertion! I don't have time to play > around with it more tonight, but in the next week or so I'll try > accessing the card from opensc via pcsc. Thanks again for your help! > > Kevin > > Domenico Minchella wrote: >> Kevin, >> >> done some work with pcsc and opensc (on opensolaris) I compiled it >> with the following command: >> >> domenico at cobra:~/software/opensc/pcsc-lite-1.5.2$ more >> comando_compilazione >> CC=cc LIBUSB_CFLAGS="-I/usr/sfw/include" LIBUSB_LIBS="-L/usr/sfw/lib >> -lusb" ./configure --prefix=/opt/card_cc --disab >> le-libhal --enable-libusb --enable-debugatr --enable-scf >> >> hope it helps.... >> regards >> Domenico >> >> >> Kevin Reinholz wrote: >>> I cleaned up my compile directions for pcsc-lite and ccid a little: >>> >>> pcsc-lite-1.5.3: >>> >>> ./configure CCC=/opt/sunstudio12.1/bin/CC >>> CC=/opt/sunstudio12.1/bin/cc --sysconfdir=/etc --prefix=/usr/local >>> --enable-usbdropdir=/usr/sfw/lib/libusb_plugins/ >>> >>> make >>> >>> pfexec make install >>> >>> pfexec mkdir /usr/sfw/lib/libusb_plugins/ >>> >>> ccid-1.3.10: >>> >>> env PCSC_CFLAGS=-I/usr/local/include/PCSC >>> PCSC_LIBS="-L/usr/local/lib -lpcsclite" >>> LIBUSB_CFLAGS=-I/usr/sfw/include LIBUSB_LIBS="-L/usr/sfw/lib -lusb" >>> ./configure CCC=/opt/sunstudio12.1/bin/CC >>> CC=/opt/sunstudio12.1/bin/cc --sysconfdir=/etc --prefix=/usr/local >>> --enable-usbdropdir=/usr/sfw/lib/libusb_plugins/ >>> >>> make >>> >>> pfexec make install >>> >>> Running the pcsc daemon in the foreground with my USB card reader >>> plugged in reveals: >>> >>> reinholz at etrenank:~$ pfexec /usr/local/sbin/pcscd -d -f >>> 00000000 pcscdaemon.c:266:() pcscd set to foreground with debug send >>> to stderr >>> 00000302 pcscdaemon.c:505:() pcsc-lite 1.5.3 daemon ready. >>> 00198528 hotplug_libhal.c:307:() Looking a driver for VID: 0x0430, >>> PID: 0x00A2 >>> 00000757 hotplug_libhal.c:307:() Looking a driver for VID: 0x0566, >>> PID: 0x4006 >>> 00000605 hotplug_libhal.c:307:() Looking a driver for VID: 0x0430, >>> PID: 0x100E >>> >>> Which seems to indicate that pcsc isn't communicating with libusb >>> correctly if it's not finding a driver for my SCM SCR331 smart card >>> reader. >>> >>> I also tried opensc (available in the Contrib IPS repository) and >>> openct (only available in the OldPending IPS repository). I had to >>> manually compile opensc from source in order to get it to recognize >>> openct (it probably wouldn't be a bad idea to manually compile >>> openct as well), but openct is able to detect my smart card reader >>> and communicate with it: >>> >>> reinholz at etrenank:~$ openct-tool list >>> 0 CCID Compatible >>> >>> reinholz at etrenank:~$ openct-tool atr >>> Detected CCID Compatible >>> Card present, status changed >>> ATR: 3b db 96 00 80 1f 03 00 31 c0 64 77 e3 03 00 82 90 00 c1 >>> >>> However, openct (and opensc when using openct to communicate with >>> the card reader) cannot read the contents of my smart card, which is >>> an older Oberthur Common Access Card (CAC). >>> >>> reinholz at etrenank:~$ openct-tool read >>> Detected CCID Compatible >>> Card present, status changed >>> failed to read memory card: Operation not supported >>> >>> I can manually compile opensc to use pcsc in addition to or instead >>> of openct to communicate with my card reader, which is my goal so I >>> can use opensc's PKCS#11 module instead of struggling with Red Hat's >>> coolkey (which appears to no longer be developed). However, until I >>> get pcsc to properly detect my card reader, I can't do that. >>> >>> A very tempting alternative is to upgrade to one of the new >>> PIV-compliant CACs that reportedly works smoothly with opensc and >>> openct without the need to fuss with pcsc, coolkey, etc. >>> http://lists.apple.com/archives/fed-talk/2009/Apr/msg00027.html >>> >> >