PN532-RFID-NFC-FAQ

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Puis-je avoir plusieurs shield sur un Arduino?

Nope, the I2C library can have only one address per bus and the address is not adjustable! So one shield per Arduino please!

Can I read or write to Mifare tags with the PN532 and Adafruit Libraries?

Absolutely! The Adafruit libraries include functions to authenticate, read and write individual blocks to Mifare Classic cards. Before you can read or write a block you need to authenticate it with the appropriate key, and once the block is authenticated you can read and write to your hearts content)!

For example, the key functions in the I2C library (which was written to go along with the NFC shield since it defaults to I2C) are:

uint8_t mifareclassic_AuthenticateBlock (uint8_t * uid, uint8_t uidLen,
                                         uint32_t blockNumber, uint8_t keyNumber,
                                         uint8_t * keyData);
uint8_t mifareclassic_ReadDataBlock (uint8_t blockNumber, uint8_t * data);
uint8_t mifareclassic_WriteDataBlock (uint8_t blockNumber, uint8_t * data);

This is all you need to start reading and writing data, and you can verify the data using one of many Android applications that support working with Mifare cards (a search for NFC will turn up plenty).

What level of NDEF support is included in the libraries?

At the moment, all NDEF] features are experimental and incomplete. Only very basic test code has been written to format a card for NDEF messages in a way that any NFC-enabled Android phone should be able to understand it, and it was written and an extremely simple proof of concept.

We would like to improve NDEF support for Mifare tags in the near future and some initial planning has gone into this, but at the moment our suggestion is to stick to plain text and 'vanilla' Mifare Classic reads and writes. You can read and write Mifare Classic and Mifare Ultralight blocks from Android, and you don't need to used the more complicated NDEF standard to simply pass data back and forth via a Mifare Classic or Ultralight card.

Does the PN532 support peer to peer communication to talk with my smartphone?

Yes, the PN532 supports peer to peer communication, but the SW support for this isn't implemented in the Adafruit libraries.

Peer to peer communication with Android is possible, for example, but the actual implementation is quite complicated on the PN532 side. You need to go through a lot of SW layers to communicate with Android in a way that it understands -- it would require developing a full NDEF stack for the messages, SNEP and LLCP stacks, etc. -- which is unfortunately well beyond the scope of what we can offer on a development board at this price point.

All of the HW requirements for this are met with the Adafruit shield and breakout board, but the stack implementation is non trivial and would require us to charge a significant premium for these boards if we implemented this.

We've focused our energy on providing a reliable, proven, properly-tuned HW reference, and enough of a SW building block to get everyone started, but there are too many holes to fill in to cover everything NFC can do with a development board at this price point.

For an example of communicating with a phone via NFC, though, have a look at "Talking With Your Arduino via NFC on Blackberry" which uses the Adafruit NFC Shield. The SW layers required for NFC-based P2P communication with a Blackberry device are apparently much lower than on Android.

Does the PN532 support tag emulation?

Yes, but in reality it's impossible to implement since it requires an external 'secure element' that is very difficult to source (under export control and general NDA from the few manufacturers of them). If you can get one we'd love to see it, though!

Can the PN532 read Tag-It tags from TI?

No. The PN532 is designed to be used with ISO14443 tags, with Mifare Classic probably the most common general-purpose tag type in use. For more information on supported tags see http://www.libnfc.org/documentation/hardware/tags/iso14443 or search for information on the common Mifare tag family based on ISO1443A.


Source: PN532 RFID/NFC Breakout and Shield créé par LadyAda pour AdaFruit Industries. Crédit [www.adafruit.com AdaFruit Industries]

Traduit par Meurisse D. pour MCHobby.be

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.