<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-05-09 1:00 GMT+02:00 Dmitry Eremin-Solenikov <span dir="ltr"><<a href="mailto:dbaryshkov@gmail.com" target="_blank">dbaryshkov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<span class=""><br>
2016-05-08 14:11 GMT+03:00 David Corcoran <<a href="mailto:corcordt@me.com">corcordt@me.com</a>>:<br>
> Hello,<br>
><br>
> I've seen hybrid readers in the past implement a custom SCardControl<br>
> sequence that would allow manipulation of the mag stripe interface.  I'm not<br>
> sure if anything was ever standardized though.<br>
> At least in that manner you can still operate within the context of the<br>
> resource manager and enjoy the transaction features as well.<br>
><br>
> <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa379474(v=vs.85).aspx" rel="noreferrer" target="_blank">https://msdn.microsoft.com/en-us/library/windows/desktop/aa379474(v=vs.85).aspx</a><br>
<br>
</span>Thanks for the pointer to SCardControl.<br>
<br>
Related question: would it be a suitable design, if I implement a<br>
swipe magstripe<br>
reader driver as a simple IFDHandler, not supporting any real ICC functions,<br>
with SCardConnect always returning e.g. SCARD_W_UNRESPONSIVE_CARD,<br>
and just reporting insert event after stripe was read by hw and eject<br>
event after<br>
the app reads the stripe data from the driver (via proprietary<br>
SCardControl call).<br>
Does that sound tooo crazy?<br></blockquote><br></div><div class="gmail_quote">That may work.<br></div><div class="gmail_quote">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].<br><br></div><div class="gmail_quote">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?<br></div><div class="gmail_quote">It may be simpler to define your own specific API to read a magstripe.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">Bye<br></div><div class="gmail_quote"><br>[1] <a href="http://pcsclite.alioth.debian.org/api/group__IFDHandler.html">http://pcsclite.alioth.debian.org/api/group__IFDHandler.html</a><br clear="all"></div><br>-- <br><div class="gmail_signature"> Dr. Ludovic Rousseau</div>
</div></div>