Reputation: 804
I'd like to know how to get a DIN (Driver Identification Number) from a smartcard. The card is a driver card, used to store tachograph data.
I can already communicate with the smartcard reader but I don't have a clue about how to read that information.
Looking at the smartcard faces, it shows a list of (I think) record numbers:
1. Surname
2. Given name(s)
3. Date and place of birth
...
5b. Card Number
The last one is the info I need: Card Number on record 5b.
I'm not experienced with smartcard reading. I don't know what I have to do. I suppose I have to send a "select file" APDU command and then read the 5b record, but don't know which file or how to format that commands.
On the card, there is a rectangle with E1 inside, and 182 under it, don't know if that could be a hint about what to read...
I know driver cards need authentication to read important data but I think the card number is something public (not sure though).
Who can help me?
Upvotes: 6
Views: 2391
Reputation: 40849
I assume you are refering to a tachograph driver card according to the ECC regulation No 3821/85, right?
In that case, the communication flow with the card would be something like the following:
SELECT tachograph application
00 A4 04 0C 06 FF544143484F
SELECT elementary file by file identifier (xxxx
)
00 A4 02 0C 02 xxxx
READ BINARY to get file data (zz
bytes from offset xxyy
)
00 B0 xx yy zz
The card number would typically be in EF Identification (FID 0520
), 16 bytes starting at byte 1.
You can find a complete specification of the driver card's protocol and data structures as part of the regulation document (here).
Upvotes: 10