[Pcsclite-muscle] Looking/developing magstripe API

Ludovic Rousseau ludovic.rousseau
Mon May 9 00:47:52 PDT 2016


2016-05-09 1:00 GMT+02:00 Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>:

> Hello,
>
> 2016-05-08 14:11 GMT+03:00 David Corcoran <corcordt at me.com>:
> > Hello,
> >
> > I've seen hybrid readers in the past implement a custom SCardControl
> > sequence that would allow manipulation of the mag stripe interface.  I'm
> not
> > sure if anything was ever standardized though.
> > At least in that manner you can still operate within the context of the
> > resource manager and enjoy the transaction features as well.
> >
> >
> https://msdn.microsoft.com/en-us/library/windows/desktop/aa379474(v=vs.85).aspx
>
> Thanks for the pointer to SCardControl.
>
> Related question: would it be a suitable design, if I implement a
> swipe magstripe
> reader driver as a simple IFDHandler, not supporting any real ICC
> functions,
> with SCardConnect always returning e.g. SCARD_W_UNRESPONSIVE_CARD,
> and just reporting insert event after stripe was read by hw and eject
> event after
> the app reads the stripe data from the driver (via proprietary
> SCardControl call).
> Does that sound tooo crazy?
>

That may work.
Your IFD will not return an error code for SCardConnect(). SCardConnect()
is not a function if the IFDHandler. The IFDhandler API (for pcsc-lite) is
defined in [1].

Why do you want to use PC/SC if your application needs to use specific code
to use SCardControl() and then will not be a normal PC/SC application?
It may be simpler to define your own specific API to read a magstripe.

Bye

[1] http://pcsclite.alioth.debian.org/api/group__IFDHandler.html

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



More information about the pcsclite-muscle mailing list