windows - Contactless 'Reset' Failure -


my application working in aspects apart when wish remove contactless card 'a', , replace contactless card 'b'.

once card b present, run following pcsc functions:

    lresult = pcsc.scarddisconnect(hcard, scard_reset_card)     lresult = pcsc.scardreleasecontext(hcontext)     lmode = scard_share_exclusive     lprotocol = scard_protocol_t0      lresult = pcsc.scardestablishcontext(scard_scope_user, 0, 0, hcontext)      if lmode = scard_share_direct         lresult = pcsc.scardconnect(hcontext, connreadername, lmode, 0, hcard, lactiveprotocol)     else         lresult = pcsc.scardconnect(hcontext, connreadername, lmode, lprotocol, hcard, lactiveprotocol)     end if 

despite code disconnecting, releasing context, re-establishing context , reconnecting card, seem 8010000f protocol mismatch error. both cards t=0. after testing have discovered thing works wait 10 seconds of no activity after introducing contactless card b field, whereupon reader's activity light flashes again, seemingly resetting card , allowing transaction go ahead normal.

why happen? , there way can force eventual reset sooner?

i did separate out scarddisconnect , scardreleasecontext commands, performing them whilst contactless card still in field, made no difference.


Comments