c# - APDU Selecting specific file and reading binary data -
i'm trying read specific binary information smart card using pc/sc api in c#.
i want select specific file
00 a4 02 0c 02 05 20
and read binary data
00 b0 00 00 8f
as far know 5 bytes reading binary data in following order:
class, instruction, parameter 1, parameter 2, length
my first question in order select file array of 7 bytes is.
class,instruction, parameter 1, parameter 2, ?,?,?
my second question isocase , protocol should use each command.
following case , protocol seems work reading binary data confuses me since i'm not using smartcard , not rfid.
var apdu = new commandapdu(isocase.case2short,rfidreader.activeprotocol)
using pcsc-sharp.dll https://code.google.com/p/pcsc-sharp/:
using pcsc; using pcsc.iso7816;
i overdid , overlooked important detail. file trying open subfile , not opened until parent opened.
it worked when opened files in correct order before reading binary data.
i didn't have set protocols , isocases. did transmit of bytes.
scardreader reader = new scardreader(); reader.transmit(bytestosend, ref responsebuffer);
Comments
Post a Comment