Reputation: 69
I have successfully sent the PPSE, Select AID and GPO commands to my EMV guanine card. Now I do have a problem with the Read Record command and I could not figure out the SFI (P2) from the AFL that I got. What I am missing as I tried the AFL (94 04 10 02 05 00) to read the records and still getting an error. I appreciate any help
No.1 Send: 00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00 Expt: 90 00 [IGNORE DATA] Recv: 6F 3A 84 0E 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 A5 28 BF 0C 25 61 23 4F 07 A0 00 00 00 03 10 10 50 0A 56 69 73 61 20 44 65 62 69 74 87 01 03 9F 0A 08 00 01 05 01 00 00 00 00 90 00 [SW: No Error] Time used: 54.000 ms
No.2 Send: 00 A4 04 00 07 A0 00 00 00 03 10 10 00 Expt: 90 00 [IGNORE DATA] Recv: 6F 52 84 07 A0 00 00 00 03 10 10 A5 47 50 0A 56 69 73 61 20 44 65 62 69 74 87 01 03 9F 38 18 9F 66 04 9F 02 06 9F 03 06 9F 1A 02 95 05 5F 2A 02 9A 03 9C 01 9F 37 04 BF 0C 1A 9F 5A 05 31 08 26 08 26 9F 0A 08 00 01 05 01 00 00 00 00 BF 63 04 DF 20 01 80 90 00 [SW: No Error] Time used: 72.000 ms
No.3 Send: 80 A8 00 00 23 83 21 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Expt: 90 00 [IGNORE DATA] Recv: 77 4D 82 02 20 00 94 04 10 02 05 00 57 13 47 51 39 05 86 29 91 07 D2 21 02 21 99 20 00 00 00 00 0F 5F 34 01 00 9F 10 07 06 01 0A 03 A0 00 00 9F 26 08 92 FB E4 3F 5B D5 3D B6 9F 27 01 80 9F 36 02 00 1B 9F 6C 02 2E 00 9F 6E 04 20 70 00 00 90 00 [SW: No Error] Time used: 121.000 ms
Upvotes: 0
Views: 1275
Reputation: 1237
Five most significant bits of the first byte indicate SFI (in your case 02), second byte is the starting record number (you have 02), third byte is last record number (you have 05). Remember that P2 in Read Record is not SFI, but also indicates that P1 is a record number.
All of that is well described in chapter 10.2 of EMV Book 3 that is directly referenced in both VCPS as well as C-3 kernel spec. I would strongly advise referring to the documentation before asking, especially as what you are asking is not a programming question.
You might also want to consider constructing real PDOL data (although syntax is correct, the date, amount, currency, etc. are currently missing).
Upvotes: 1