Writing w/o NDEF Formatting - Adafruit PN532 NFC/RFID Shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
rockhound21
 
Posts: 1
Joined: Thu Jan 24, 2013 3:46 pm

Writing w/o NDEF Formatting - Adafruit PN532 NFC/RFID Shield

Post by rockhound21 »

Hello,

I bought the PN532 NFC/RFID Shield, with a couple of Mifare Classic RFID cards. I get the shield to read correctly with my Arduino Uno, but I would like to know:

1. Does the shield write to the card without NDEF Formatting? If so, how so?
2. Can one rewrite to a card that is NDEF Formatted?
3. Is NDEF formatting reversible?

Also, the I2C library for Arduino that is downloaded separately from Github only includes a sketch that writes using NDEF Formatting, is there another sketch that would allow people to write 'Mifare Classic-ally' to the card? Does writing to the card in this way allow for re-writing as well?

Thank you for your help!

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Writing w/o NDEF Formatting - Adafruit PN532 NFC/RFID Shield

Post by adafruit_support_bill »

The hardware is capable, but there is very limited support in the library. See this thread for more details: http://forums.adafruit.com/viewtopic.ph ... ef#p167479

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Writing w/o NDEF Formatting - Adafruit PN532 NFC/RFID Shield

Post by ktownsend »

The library supports writing to plain Mifare cards as well. Have a look at the mifareclassic_memdump for example and you can substitute the read commands with the write function:

Code: Select all

uint8_t Adafruit_NFCShield_I2C::mifareclassic_WriteDataBlock (uint8_t blockNumber, uint8_t * data)
You first need to authenticate the block.

As for NDEF, use this with care since you need to change the authentication keys for NDEF support. You CAN still write to the blocks, but they keys will be different, and you should probably consider the format one way and keep separate NDEF and pure Mifare Classic cards for convenience sake.

Have a look here as well as the NDEF page just after this one: http://learn.adafruit.com/adafruit-pn53 ... nfc/mifare

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”