[Pcsclite-muscle] IFD polling

William Roberts bill.c.roberts
Tue Feb 24 10:13:37 PST 2015


The worst part to me is the timeout. Which gets us back to polling right?

Ideally we would want an event based system for this. Perhaps provide a
function pointer to my ifd I can call to trigger this event.

I'm assuming that the interface describes is compliant with pcsc spec? Is
it missing anything?
On Feb 24, 2015 9:40 AM, "Ludovic Rousseau" <ludovic.rousseau at gmail.com>
wrote:

> 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
>
> _______________________________________________
> Pcsclite-muscle mailing list
> Pcsclite-muscle at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20150224/a64fcbbc/attachment.html>



More information about the pcsclite-muscle mailing list