Solaris 11 and pcsc-lite

William To <[email protected]>
Newsgroups gmane.comp.lib.muscle
Message-ID <CAA9EAxWNR5_Mggypj6-hRdz3Pk8WgOoj1xdGy-FXWppByX6TmA@mail.gmail.com>
Hi All,

I know this may not be the best place to ask, but I am really exhausted
from trying to find information from Google and Oracle about their
pcsc-lite on Solaris 11.

What I have now is a Solaris 11 box with a PC/SC reader (SCM SCR-331 DI)
attached to the USB port. My intention is to access a smart card using
PC/SC using the locally attached reader on the USB port.

I have downloaded the Solaris PCSC_lite_1.3 and CCID_IFD_1.3.10 and set up
according to Oracle's instructions (installing the packages etc.) After
installing the packages I expected the rdrlist in the pcsctools directory
would list out the locally installed reader, but what I got is
"SCardEstablishContext error: Service not available." error message. I
checked out the documentation and it means "the pcscd service is not
started". I used "ps -ef | grep pcscd" and found the process.

I then launched the pcscd daemon in the foreground and found the message
like this:

wto@solaris:~$ sudo /usr/lib/smartcard/pcscd -L -f -d DEBUG -a
Password:
validate.c:174:() PCSCLITE_LIB_DIR=/usr/lib/smartcard,
argv[0]:pcscdValidate.so.1
debuglog.c:298:() Debug options: APDU
cfgfuncs.c:913:() launchMode............ LAUNCHER
cfgfuncs.c:913:() logLevel ............. DEBUG
cfgfuncs.c:913:() logType .............. STDERR
cfgfuncs.c:913:() logFile .............. <null>
cfgfuncs.c:913:() baseDir .............. /var/run/pcscd
cfgfuncs.c:913:() instanceScript........ <null>
cfgfuncs.c:913:() ifdPluginDir ......... <null>
cfgfuncs.c:913:() pcscdPIDFile ......... /var/run/pcscd/pcscd.pid
cfgfuncs.c:913:() pcscConfigFile........ /etc/smartcard/pcscd.conf
cfgfuncs.c:913:() readerConfigFile...... <null>
cfgfuncs.c:913:() netBindFile .......... <null>
cfgfuncs.c:913:() pcscdMemMappedFile.... <null>
cfgfuncs.c:913:() argv0 ................ /usr/lib/smartcard/pcscd
cfgfuncs.c:913:() transportType ........ SOCKET_INETV4
cfgfuncs.c:913:() portNbr .............. 5999
cfgfuncs.c:913:() dpyNbr ............... -1
cfgfuncs.c:913:() screenNbr ............ -1
cfgfuncs.c:913:() xHostIp .............. 255.255.255.255
cfgfuncs.c:913:() useMappedMemory....... FALSE
cfgfuncs.c:913:() runInForeground ...... TRUE
cfgfuncs.c:913:() apduDebug ............ FALSE
cfgfuncs.c:913:() verbose .............. 0
cfgfuncs.c:913:() portNbrWild .......... FALSE
cfgfuncs.c:913:() baseDirWild .......... FALSE
cfgfuncs.c:913:() useAuthentication..... TRUE
cfgfuncs.c:913:() instanceTimeout ...... 0
cfgfuncs.c:913:() statusPollRate ....... 400000
cfgfuncs.c:913:() fifoPingTimeout ...... 20
cfgfuncs.c:913:() relaunchThreshold .... 2
cfgfuncs.c:913:() relaunchInterval ..... 1
launcher.c:558:() Setup launcher signal handlers

When I tried to launch in "instance mode" I got the following error message:

wto@solaris:~$ sudo /usr/lib/smartcard/pcscd -I -f -d DEBUG -a
Password:
validate.c:174:() PCSCLITE_LIB_DIR=/usr/lib/smartcard,
argv[0]:pcscdValidate.so.1
pcscdaemon.c:413:() pcscd PID=8983 logging...

debuglog.c:298:() Debug options: APDU
instance.c:101:() Initializing new instance: pcscd -I -x :0, pid=8983

instance.c:103:() Setup instance signal handlers
pargs: cannot examine 8872: no such process or core file
instance.c:146:() putenv(DISPLAY=:0)
instance.c:177:() Couldn't open fifo No such file or directory

When I tried to launch in "default mode" I got the following:

wto@solaris:~$ sudo /usr/lib/smartcard/pcscd -f -d DEBUG -a
validate.c:174:() PCSCLITE_LIB_DIR=/usr/lib/smartcard,
argv[0]:pcscdValidate.so.1
debuglog.c:298:() Debug options: APDU
cfgfuncs.c:913:() launchMode............ DEFAULT
cfgfuncs.c:913:() logLevel ............. DEBUG
cfgfuncs.c:913:() logType .............. STDERR
cfgfuncs.c:913:() logFile .............. <null>
cfgfuncs.c:913:() baseDir .............. /var/run/pcscd
cfgfuncs.c:913:() instanceScript........ <null>
cfgfuncs.c:913:() ifdPluginDir ......... /usr/lib/smartcard/ifd-ccid.bundle
cfgfuncs.c:913:() pcscdPIDFile ......... /var/run/pcscd/pcscd.pid
cfgfuncs.c:913:() pcscConfigFile........ /etc/smartcard/pcscd.conf
cfgfuncs.c:913:() readerConfigFile...... /etc/smartcard/reader-Local.conf
cfgfuncs.c:913:() netBindFile .......... <null>
cfgfuncs.c:913:() pcscdMemMappedFile.... <null>
cfgfuncs.c:913:() argv0 ................ /usr/lib/smartcard/pcscd
cfgfuncs.c:913:() transportType ........ SOCKET_INETV4
cfgfuncs.c:913:() portNbr .............. 0
cfgfuncs.c:913:() dpyNbr ............... 0
cfgfuncs.c:913:() screenNbr ............ 0
cfgfuncs.c:913:() xHostIp .............. 127.0.0.1
cfgfuncs.c:913:() useMappedMemory....... FALSE
cfgfuncs.c:913:() runInForeground ...... TRUE
cfgfuncs.c:913:() apduDebug ............ FALSE
cfgfuncs.c:913:() verbose .............. 0
cfgfuncs.c:913:() portNbrWild .......... FALSE
cfgfuncs.c:913:() baseDirWild .......... FALSE
cfgfuncs.c:913:() useAuthentication..... TRUE
cfgfuncs.c:913:() instanceTimeout ...... 0
cfgfuncs.c:913:() statusPollRate ....... 400000
cfgfuncs.c:913:() fifoPingTimeout ...... 20
cfgfuncs.c:913:() relaunchThreshold .... 2
cfgfuncs.c:913:() relaunchInterval ..... 1
pcscdaemon.c:827:() Invalid reader config file:
/etc/smartcard/reader-Local.conf: No such file or directory
pcscdaemon.c:1054:() Cleaning per-instance files

pcscdaemon.c:838:() pcsc-lite 1.1 daemon ready.
hotplug_libusb.c:103:() HPReadBundleValues(): Drop Dir: /usr/lib/smartcard
hotplug_libusb.c:272:() Found matching USB device: /dev/usb:4e6.5111/0
hotplug_libusb.c:413:() Adding USB device: /dev/usb:4e6.5111/0
readerfactory.c:1105:() Attempting startup of SCM SCR 331-DI (901001B6) 00
00 using /usr/lib/smartcard/ifd-ccid.bundle/Contents/Solaris/libccid.so
readerfactory.c:976:() Loading IFD Handler 3.0
ifdhandler.c:1518:init_driver() Driver version: 1.3.10
ifdhandler.c:1530:init_driver() LogLevel: 0x0003
ifdhandler.c:1554:init_driver() DriverOptions: 0x0000
ifdhandler.c:87:IFDHCreateChannelByName() lun: 0, device:
usb:04e6/5111:libusb:/dev/usb:4e6.5111/0
ccid_usb.c:238:OpenUSBByName() Manufacturer: Ludovic Rousseau (
[email protected])
ccid_usb.c:248:OpenUSBByName() ProductString: Generic CCID driver
ccid_usb.c:254: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.
ccid_usb.c:410:OpenUSBByName() Found Vendor/Product: 04E6/5111 (SCM SCR
331-DI)
ccid_usb.c:412:OpenUSBByName() Using USB bus/device: /dev/usb/4e6.5111/0
ccid_usb.c:784:get_data_rates() IFD does not support GET_DATA_RATES
request: I/O error
ifdhandler.c:117:IFDHCreateChannelByName() IFDHCreateChannelByName:
OpenPortByName succeeded
ifdhandler.c:357:IFDHGetCapabilities() tag: 0xFAE,
usb:04e6/5111:libusb:/dev/usb:4e6.5111/0 (lun: 0)
ifdhandler.c:404:IFDHGetCapabilities() Reader supports 2 slot(s)
ifdhandler.c:543:IFDHGetCapabilities() Returning *Length = 1
ifdhandler.c:550:IFDHGetCapabilities() Returning *Value = 
ifdhandler.c:357:IFDHGetCapabilities() tag: 0xFAC,
usb:04e6/5111:libusb:/dev/usb:4e6.5111/0 (lun: 0)
ifdhandler.c:543:IFDHGetCapabilities() Returning *Length = 1
ifdhandler.c:550:IFDHGetCapabilities() Returning *Value =
readerfactory.c:1105:() Attempting startup of SCM SCR 331-DI (901001B6) 00
01 using /usr/lib/smartcard/ifd-ccid.bundle/Contents/Solaris/libccid.so
readerfactory.c:822:() Warning library pointer not NULL
readerfactory.c:976:() Loading IFD Handler 3.0
ifdhandler.c:87:IFDHCreateChannelByName() lun: 1, device:
usb:04e6/5111:libusb:/dev/usb:4e6.5111/0
ccid_usb.c:238:OpenUSBByName() Manufacturer: Ludovic Rousseau (
[email protected])
ccid_usb.c:248:OpenUSBByName() ProductString: Generic CCID driver
ccid_usb.c:254: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.
ccid_usb.c:349:OpenUSBByName() Opening slot: 1
ifdhandler.c:117:IFDHCreateChannelByName() IFDHCreateChannelByName:
OpenPortByName succeeded
ifdhandler.c:1099:IFDHPowerICC() action: PowerUp,
usb:04e6/5111:libusb:/dev/usb:4e6.5111/0 (lun: 0)
12:47 Card ATR: 3B BE 96 00 00 41 05 20 00 00 00 00 00 00 00 00 00 90 00
hotplug_libusb.c:272:() Found matching USB device: /dev/usb:4e6.5111/0
hotplug_libusb.c:286:() Refresh USB device: /dev/usb:4e6.5111/0
hotplug_libusb.c:272:() Found matching USB device: /dev/usb:4e6.5111/0
hotplug_libusb.c:286:() Refresh USB device: /dev/usb:4e6.5111/0
hotplug_libusb.c:272:() Found matching USB device: /dev/usb:4e6.511

But no matter what mode I launched the pcscd daemon, the rdrlist still
returns "SCardEstablishContext error: Service not available."

What I don't understand is, does Solaris pcsc-lite actually support
accessing an USB CCID reader attached locally to the box? If yes, what
configuration am I missing?

Thanks very much and Best Regards

William To

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.