[Pcsclite-muscle] IFD polling

Ludovic Rousseau ludovic.rousseau
Tue Feb 24 09:39:41 PST 2015


2015-02-24 15:49 GMT+01:00 William Roberts <bill.c.roberts at gmail.com>:
>
> ---------- Forwarded message ----------
> From: "William Roberts" <bill.c.roberts at gmail.com>
> Date: Feb 23, 2015 6:51 PM
> Subject: IFD polling
> To: "OpenSC-devel" <opensc-devel at lists.sourceforge.net>
> Cc:
>
>> I am working on an IFD, and it looks like it just polls the presence API.
>> I have some logging turned on to trace the calls in my IFD, and I see:
>>
>> 00000022 ifd_entry.c-IFDHICCPresence()-98: Exit: 616
>> 00400112 ifd_entry.c-IFDHICCPresence()-95: Enter: Lun: 0
>> 00000022 ifd_entry.c-IFDHICCPresence()-98: Exit: 616
>> 00400141 ifd_entry.c-IFDHICCPresence()-95: Enter: Lun: 0
>> 00000022 ifd_entry.c-IFDHICCPresence()-98: Exit: 616
>> 00400124 ifd_entry.c-IFDHICCPresence()-95: Enter: Lun: 0
>> 00000023 ifd_entry.c-IFDHICCPresence()-98: Exit: 616
>>
>> This is less than ideal. Reading the docs
>> here:
>> http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#gabb9fe35a68fa080ce9397f0b830b1e7e
>>
>> Shows the IFDHGetCapabilities() function. It mentions things about polling
>> threads. I can essentally event trigger off of a card insert in my
>> architecture, is their a way to minimize the polling and go to an event
>> driven system?

Your driver need to support TAG_IFD_POLLING_THREAD_WITH_TIMEOUT so
that the "polling" is done by your driver.
See http://pcsclite.alioth.debian.org/api/group__IFDHandler.html#ga799aa26945bbd3f61aaa57107f63ae0b

The idea is that pcscd will call your provided polling function. Your
function should return on card events or timeout.

Maybe I should document this part in more details.
Please try to use the feature and propose a change to the
documentation. You have a new eye on the subject so you know best what
is missing in the documentation.

Do not hesitate to ask for more details.

Bye

-- 
 Dr. Ludovic Rousseau




More information about the pcsclite-muscle mailing list