I have this simple code to read my ACR122U Mifare card:
def read_card():
apdu = [0xFF, 0xCA, 0x00, 0x00, 0x00]
cardtype = AnyCardType()
try:
cardrequest = CardRequest(timeout=60, cardType=cardtype)
cardservice = cardrequest.waitforcard()
except CardRequestTimeoutException:
return None
observer = ConsoleCardConnectionObserver()
cardservice.connection.addObserver(observer)
cardservice.connection.connect()
response, sw1, sw2 = cardservice.connection.transmit(apdu)
cardservice.connection.disconnect()
The code works and I can read the card data. I want to read other sectors/blocks, for example sector 15.
I try to change the apdu values but without success.
Is it possible to read other sectors? I haven't found any examples in the official pyscard doc.