Reputation: 1
I am using reader HID OMNIKEY 5321 CL
to read the Mifare DESFire card
. With the help of a python code given below, I am able to read unique identification number (UID). But I need to read the visual id printed on the card. The UID for my card is 04 11 64 FA BC 24 80
and the visual ID printed on card is 30307877
.
Python code by which I am able to read uid.
from smartcard.System import readers
from smartcard.util import toHexString
#Establish connection with the card reader
reader = readers()[0]
connection = reader.createConnection()
connection.connect()
#Transmit APDU command to retrieve data from the card
command = [0xFF, 0xCA, 0x00, 0x00, 0x00] # Change this command based on your specific needs
response, sw1, sw2 = connection.transmit(command)
#Print the response data
if sw1 == 0x90 and sw2 == 0x00:
print("Data successfully read from the card:")
print(toHexString(response))
else:
print("Error reading data from the card.")
# Disconnect from the card reader
connection.disconnect()
Specifications of reader:
FW : 5.20
Op Mode : ISO
Lib : 200
Por: USB
USB Serial No : OKCM007040812072942435634869263
ITEM NO : R53210038-1
REVISION : B
VERSION INDEX: ELZ00120
Mifare Desfire card specification:
Smartcard name: MiFare DESFire
ATR : 3B 81 80 01 80 80
UID : 04 1A 68 FA BC 24 80
Protocol: ISO 14443A T=CL
PICCtoPCD : 424 kbps
Frequency : 13.56 Mhz
PCDtoPICC
Can someone please provide me with the python code to read the visual ID or human readable id printed on my Desfire card?
I am able to get UID with the above python code. So, please provide me the python code to read visual id or human readable id printed on my desfire card.
Upvotes: 0
Views: 554