Niclas Hoyer wrote:
> $ openct-tool list
>   0 CCID Compatible
> $ openct-tool atr
> Detected CCID Compatible
> Card present, status changed
> ATR: 3b ff 96 00 ff 81 31 ...

Good stuff. This means kernel driver and OpenCT are all in order.

In order to work easily with OpenSC and other software that might
want to use the reader I would suggest to replicate the setup I have.

I've built pcsc-lite with support not only for USB CCID but also for
openct, and that is how OpenSC can reach the cm4040.


> 0x7fd1227f8700 19:33:54.493 [opensc-tool] 
> reader-pcsc.c:1023:pcsc_detect_readers: returning with: -1101 (No readers 
> found)
> No smart card readers found.
..
> So, why is opensc trying to talk to pcsc?

I'm not sure OpenSC still supports OpenCT directly. Anyway, taking
the detour through pcscd allows also other software than OpenSC to
use the card, which was a requirement for me.


> Is there anything I have to do, so that opensc recognizes openct
> devices?

pcscd needs a reader.conf to know about the reader:

--8<-- /etc/reader.conf
FRIENDLYNAME "cm4040"
DEVICENAME /dev/null
LIBPATH /usr/lib/openct-ifd.so
CHANNELID 0x0
-->8--

Then I simply run pcscd -f and can watch what is going on with the
card. If I haven't run openct-control init, this is my pcscd output:

$ pcscd -f
Error: can't open /var/run/openct/status: No such file or directory
00000000 readerfactory.c:1050:RFInitializeReader() Open Port 0 Failed 
(/dev/null)
00001082 readerfactory.c:233:RFAddReader() cm4040 init failed.
00330333 tokenparser.l:175:LTPBundleFindValueWithKey() Value/Key not defined 
for: ifdVendorID in /usr/lib/readers/usb/ifd-ccid.bundle/Contents/Info.plist
^C
$ openct-control init
$ openct-tool list
  0 CCID Compatible
$ pcscd -f
00000000 tokenparser.l:175:LTPBundleFindValueWithKey() Value/Key not defined 
for: ifdVendorID in /usr/lib/readers/usb/ifd-ccid.bundle/Contents/Info.plist
^C

The plist error is harmless, everything works for me anyway.

Key is to build pcsc-lite with support for openct.

Watch out with udev rules if you also want to connect a USB CCID
reader. That can be supported both by OpenCT and pcsc-lite. I choose
to let pcsc-lite handle those in my system, so I have to take out the
OpenCT udev rules so that OpenCT leaves them alone, but you may
prefer to use OpenCT.

Let me know if you have any questions.


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

Reply via email to