smartcard - How to send and get data using a single APDU in C++? -


i writing c++ code using winscard. noticed that, if send command scardtransmit data sent or data received, there no problem. can send data or correct response. however, when command both sends data , expects response 61xx. know error code 61xx means there xx bytes response le not correct, , checked every possible le, including returned value xx, nothing changes. example let apdu in form cla ins p1 p2 lc data le, , 61xx, send cla ins p1 p2 lc data xx, again 61xx.

i checked card using java , other tools , verified there nothing card.

as far understand, there single byte p3 allocated lc , le. there way responses (apart sw1sw2) datadata commands?

when send command has command data , command expecting result data well, , communication made using t=0 protocol, need send 2 apdus. 1 command itself, , 1 retrieve result.

61xx not error. (successful) status word indicates have xx bytes of response can retrieve using get response (ins=0xc0).

here reference of command.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -