[Pcsclite-muscle] How to recover from momentary loss of pcscd connection in psycard.

Ludovic Rousseau ludovic.rousseau
Tue Oct 18 00:39:09 PDT 2016


Hello,

2016-10-18 3:58 GMT+02:00 Ben Mehlman <ben.mehlman at sweetsams.com>:

>
> Using the higher level classes of pyscard (CardRequest, CardService).. if
> pcscd is shut down temporarily, it results in a ListReadersException.  I
> would like to catch this exception, retry, and recover from it when pcscd
> becomes available again.
>
> I tried recreating the CardRequest but that wasn't sufficient to recreate
> the connection to pcscd.
> Is there a correct way to handle this?
>

You need to re-establish a connection to the server using
SCardEstablishContext().
That may not be easy to do from the high level API.

Why is pcscd shut down?

Bye

-- 
 Dr. Ludovic Rousseau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20161018/4c84184d/attachment.html>



More information about the pcsclite-muscle mailing list