Hello
I want to write some data to Block 2, but I got this error:
Found PN532 with firmware version: 1.6
Waiting for RFID/NFC card to write to!
.Found card with UID: ['0xFF', '0xFF', '0xFF', '0xFF']
PN532 ERROR TIMEOUT
here is my code:
block_number = 2
key_a = b'\x33\xCD\x45\xFA\x45\xFF'
data = bytes([0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F])
try:
pn532.mifare_classic_authenticate_block(
uid, block_number=block_number, key_number=nfc.MIFARE_CMD_AUTH_A, key=key_a)
pn532.mifare_classic_write_block(block_number, data)
if pn532.mifare_classic_read_block(block_number) == data:
print('write block %d successfully' % block_number)
except nfc.PN532Error as e:
print(e.errmsg)
GPIO.cleanup()
where is my mistake? I can read this block, but I can't write :-(
Greetings
Thomas