I would like to know how to obtain PAN(Primary Account Number) from a debit/credit smart card. I try the Maestro debit card using APDU commands and I get the data in bytes, encoded in TLV. The EMV specification says that PAN is on the tag "A5", but I don't identify it on that tag.
APDU commands:
<<00 A4 04 00 07 A0 00 00 00 04 30 60
>>61 42
<<00 C0 00 00 42
>>6F 40 84 07 A0 00 00 00 04 30 60 A5 35 50 07 4D 41 45 53 54 52 4F 87 01 01 5F 2D 06 65 73 65 6E 70 74 9F 11 01 01 9F 12 07 4D 41 45 53 54 52 4F BF 0C 0F 9F 4D 02 0B 0A 9F 6E 07 08 62 00 00 30 30 00 90 00
decode data:
6F File Control Information (FCI) Template
84 Dedicated File (DF) Name
A0000000043060
A5 File Control Information (FCI) Proprietary Template
50 Application Label
M A E S T R O
87 Application Priority Indicator
01
5F2D Language Preference
e s e n p t
9F11 Issuer Code Table Index
01
9F12 Application Preferred Name
M A E S T R O
BF0C File Control Information (FCI) Issuer Discretionary Data
9F4D Log Entry
0B0A
9F6E Unknown tag
08620000303000
90 Issuer Public Key Certificate