[Muscle] ccid driver: "usb_bulk_read: Resource temporarily
unavailable"
Ludovic Rousseau
ludovic.rousseau at gmail.com
Tue Dec 4 08:09:45 PST 2007
2007/12/4, Nagy Gabor <ngaba at bibl.u-szeged.hu>:
> Hi!
Hello,
> You probably know about this problem, because I found the following comment in
> ifdhandler.c:
> /* This "warm up" sequence is sometimes needed when pcscd is
> * restarted with the reader already connected. We get some
> * "usb_bulk_read: Resource temporarily unavailable" on the first
> * few tries. It is an empirical hack */
>
> Well, this hack may be acceptable, but I have a problem:
> When pcscd does this hack, it _lies_ to the caller app, that the reader is not
> present. This is a problem, because most people (like me), have an S50pcscd in
> /etc/rc?.d/ and something like S51card_eventmanager which depends on pcscd. On
> my machine card_eventmanager (I use my patched version:
> http://jedlik.vein.hu:60080/linux/scard_tools/scard_tools-en.html) cannot start,
> because SCardListReaders returns with empty reader-list. It took a while to
> found the reason for this problem (I had to add 'sleep 4' to the end of pcscd
> init-script as a workaround).
> So I would prefer if SCardListReaders returned with the correct results (even if
> my program must wait 4 sec for the result) or an internally delayed pcscd start.
The readers may not be immediately available after the script to start
pcscd has finished. pcscd may not even have really started when the
script exits.
A solution would be for card_eventmanager to wait until a reader is available.
bye
--
Dr. Ludovic Rousseau
More information about the Muscle
mailing list