As said before, the respond is the "card" requesting an IFS change ... The Aruino has to answer it correctly so that further communication is possible .. To anser it try the following code, after receiving the above response ...
data[b++] = 0x00;
data[b++] = 0xA4;
data[b++] = 0x08;
data[b++] = 0x00;
data[b++] = 0x06;
data[b++] = 0x3d;
data[b++] = 0x10;
data[b++] = 0x3d;
data[b++] = 0x20;
data[b++] = 0x2f;
data[b++] = 0x10;
data[b++] = 0x00;
Serial.print("Select File : (OpenPGP) ... ");
sc.send_IBlock(0x00, data, b);
bytes_received = sc.receiveBytes(data2, 255);
// bytes_received should be 5 and normally I would check
// if data2[1] == SBLOCK_IFS_REQ, but for testing this should be
// okay
// Create IFS response
data[0]= 0xFE;
sc.send_SBlock(0, SBLOCK_IFS_RESP, data, 1);
// Now wait for the "actual" answer to your request
bytes_received = sc.receiveBytes(data2, 255);
Regards
Angus71
Last edit: angus71 2018-06-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your work and discussion thread are very helpful with amazing details. I faced a similar issue when using t0, always Received 0. Then changed to t1 and it works well in APDU.
Many thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Fatih,
As said before, the respond is the "card" requesting an IFS change ... The Aruino has to answer it correctly so that further communication is possible .. To anser it try the following code, after receiving the above response ...
Regards
Angus71
Last edit: angus71 2018-06-18
hi angus
thank you very very very much...
it worked.
you are king of the arduinooooooooooooooooooooooooo
Regardsssssssssssssssssssssssssss
Fatih
Hello, I have a few questions about your program and your attempts.
Are you available?
Angus and Fatih,
Your work and discussion thread are very helpful with amazing details. I faced a similar issue when using t0, always Received 0. Then changed to t1 and it works well in APDU.
Many thanks