Re: Looking/developing magstripe API

Ludovic Rousseau <[email protected]>
Newsgroups gmane.comp.lib.muscle
Message-ID <CAGstE8C-DZgGcjOA=sr2LNkpz3cc552MqTO=euBgZbD2SeS4Pw@mail.gmail.com>
2016-05-09 1:00 GMT+02:00 Dmitry Eremin-Solenikov <[email protected]>:

> Hello,
>
> 2016-05-08 14:11 GMT+03:00 David Corcoran <[email protected]>:
> > 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

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.