For communcation with a Smartcard I use the WINSCARD.DLL as an API to send APDU commands to Smartcards. For a couple of cardreaders this is working as expected, but somehow I get an unkown return (it is not on http://msdn.microsoft.com/en-us/library/ms936965.aspx) value from the method SCardTransmit
if I send the command to a O2Micro reader.
What is working: If I send command (values in hex):
CLA: 00, INS: A4, P1: 02, P2: 04, Lc: 02, Data: "4401", Le: (not present)
I get the response SW1: 61. SW2: 1F
The response tells that there are 0x1F
bytes available. So I send command:
CLA: 00, INS: A4, P1: 02, P2: 04, Lc: 02, Data: "4401", Le: 1F
But on that command I get no data and return value 0x57
.
My question is if anyone knows what the return value 0x57
is telling and maybe a way how to solve or workaround it.