From 6e8f4e0f29c018cac127c3da2bd5295f8134918b Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Sun, 12 Apr 2015 16:14:37 +0200 Subject: [PATCH 1/3] upd doc --- MFRC522.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MFRC522.cpp b/MFRC522.cpp index 88d7478..db466ab 100644 --- a/MFRC522.cpp +++ b/MFRC522.cpp @@ -1141,6 +1141,7 @@ byte MFRC522::PCD_MIFARE_Transceive( byte *sendData, ///< Pointer to the data t /** * Returns a __FlashStringHelper pointer to a status code name. * + * @return const __FlashStringHelper * */ const __FlashStringHelper *MFRC522::GetStatusCodeName(byte code ///< One of the StatusCode enums. ) { @@ -1194,6 +1195,7 @@ byte MFRC522::PICC_GetType(byte sak ///< The SAK byte returned from PICC_Select /** * Returns a __FlashStringHelper pointer to the PICC type name. * + * @return const __FlashStringHelper * */ const __FlashStringHelper *MFRC522::PICC_GetTypeName(byte piccType ///< One of the PICC_Type enums. ) { From c460250b74e55493a79f617dc8632d52f99c207f Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Tue, 19 May 2015 17:45:47 +0200 Subject: [PATCH 2/3] add Troubleshooting to README --- README.rst | 78 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/README.rst b/README.rst index 2813de2..dc25097 100644 --- a/README.rst +++ b/README.rst @@ -47,28 +47,28 @@ There are three hardware components involved: 1. **Micro Controller**: -* An `Arduino`_ or compatible executing the Sketch using this library. + * An `Arduino`_ or compatible executing the Sketch using this library. -* Prices vary from USD 7 for clones, to USD 75 for "starter kits" (which - might be a good choice if this is your first exposure to Arduino; - check if such kit already includes the Arduino, Reader, and some Tags). + * Prices vary from USD 7 for clones, to USD 75 for "starter kits" (which + might be a good choice if this is your first exposure to Arduino; + check if such kit already includes the Arduino, Reader, and some Tags). 2. **Proximity Coupling Device (PCD)**: -* The PCD is the actual RFID **Reader** based on `NXP MFRC522`_ Contactless - Reader Integrated Circuit). + * The PCD is the actual RFID **Reader** based on `NXP MFRC522`_ Contactless + Reader Integrated Circuit). -* Readers can be found on `eBay`_ for around USD 5: search for *"rc522"*. + * Readers can be found on `eBay`_ for around USD 5: search for *"rc522"*. -* You can also find them at several web stores, they are often included in - *"starter kits"*; so check your favourite electronics provider as well. + * You can also find them at several web stores, they are often included in + *"starter kits"*; so check your favourite electronics provider as well. 3. **Proximity Integrated Circuit Card (PICC)**: -* The PICC is the RFID **Card** or **Tag** using the `ISO/IEC 14443A`_ - interface, for example Mifare or NTAG203. + * The PICC is the RFID **Card** or **Tag** using the `ISO/IEC 14443A`_ + interface, for example Mifare or NTAG203. -* One or two might be included with the Reader or *"starter kit"* already. + * One or two might be included with the Reader or *"starter kit"* already. Protocols @@ -76,21 +76,61 @@ Protocols 1. The micro controller and the reader use SPI for communication. -* The protocol is described in the `NXP MFRC522`_ datasheet. + * The protocol is described in the `NXP MFRC522`_ datasheet. -* See the `Pin Layout`_ section for details on connecting the pins. + * See the `Pin Layout`_ section for details on connecting the pins. 2. The reader and the tags communicate using a 13.56 MHz electromagnetic field. -* The protocol is defined in ISO/IEC 14443-3:2011 Part 3 Type A. + * The protocol is defined in ISO/IEC 14443-3:2011 Part 3 Type A. - * Details are found in chapter 6 *"Type A – Initialization and anticollision"*. + * Details are found in chapter 6 *"Type A – Initialization and anticollision"*. - * See http://wg8.de/wg8n1496_17n3613_Ballot_FCD14443-3.pdf for a free version - of the final draft (which might be outdated in some areas). + * See http://wg8.de/wg8n1496_17n3613_Ballot_FCD14443-3.pdf for a free version + of the final draft (which might be outdated in some areas). - * The reader do not support ISO/IEC 14443-3 Type B. + * The reader do not support ISO/IEC 14443-3 Type B. + +Troubleshooting +------- + +* **I don't get input from reader** or **WARNING: Communication failure, is the MFRC522 properly connected?** + + 1. Check your connection, see `Pin Layout`_ . + 2. Check voltage. Most breakouts work with 3.3V. + 3. The SPI only works with 3.3V, most breakouts seems 5V tollerant, but try a level shifter. + + +* **Sometimes I get timeouts** or **tag/card sometimes not work.** + + 1. Try other site of the antenna. + 2. Try to decrease distance between MFRC522. + 3. Increase antenna gain per firmware: ``mfrc522.PCD_SetAntennaGain(mfrc522.RxGain_max);`` + 4. Use better power supply. + 5. Hardware corrupted, most products are from china and sometimes the quality is really low. Contact your seller. + + +* **My tag/card doesn't work.** + + 1. Distance between antenna and token too huge (>1cm). + 2. You got wrong PICC. Is it really 13.56MGhz? Is it really a Mifare Type A? + 3. NFC tokens are not supported. Some may work. + 4. Animal marker are not supported. They use other frequency. + 5. Hardware corrupted, most products are from china and sometimes the quality is really low. Contact your seller. + +* **My mobile phone doesn't recognize the MFRC522** or **my MFRC522 can't read data from other MFRC522** + + 1. Card simmulation is not supported. + 2. Communication with mobile phones is not supported. + 3. Peer to peer communication is not supported. + +* **I need more features.** + + 1. If software: code it and make a pull request. + 2. If hardware: buy a more expensive like PN532 (supports NFC and many more, but costs about $15) + + License ------- This is free and unencumbered software released into the public domain. From 27211e0f23069359a1e1eb15a4d8900399d1d8f5 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Tue, 19 May 2015 17:53:45 +0200 Subject: [PATCH 3/3] correct mistake at README --- README.rst | 78 +++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/README.rst b/README.rst index dc25097..48af024 100644 --- a/README.rst +++ b/README.rst @@ -47,28 +47,28 @@ There are three hardware components involved: 1. **Micro Controller**: - * An `Arduino`_ or compatible executing the Sketch using this library. +* An `Arduino`_ or compatible executing the Sketch using this library. - * Prices vary from USD 7 for clones, to USD 75 for "starter kits" (which - might be a good choice if this is your first exposure to Arduino; - check if such kit already includes the Arduino, Reader, and some Tags). +* Prices vary from USD 7 for clones, to USD 75 for "starter kits" (which + might be a good choice if this is your first exposure to Arduino; + check if such kit already includes the Arduino, Reader, and some Tags). 2. **Proximity Coupling Device (PCD)**: - * The PCD is the actual RFID **Reader** based on `NXP MFRC522`_ Contactless - Reader Integrated Circuit). +* The PCD is the actual RFID **Reader** based on `NXP MFRC522`_ Contactless + Reader Integrated Circuit). - * Readers can be found on `eBay`_ for around USD 5: search for *"rc522"*. +* Readers can be found on `eBay`_ for around USD 5: search for *"rc522"*. - * You can also find them at several web stores, they are often included in - *"starter kits"*; so check your favourite electronics provider as well. +* You can also find them at several web stores, they are often included in + *"starter kits"*; so check your favourite electronics provider as well. 3. **Proximity Integrated Circuit Card (PICC)**: - * The PICC is the RFID **Card** or **Tag** using the `ISO/IEC 14443A`_ - interface, for example Mifare or NTAG203. +* The PICC is the RFID **Card** or **Tag** using the `ISO/IEC 14443A`_ + interface, for example Mifare or NTAG203. - * One or two might be included with the Reader or *"starter kit"* already. +* One or two might be included with the Reader or *"starter kit"* already. Protocols @@ -76,20 +76,20 @@ Protocols 1. The micro controller and the reader use SPI for communication. - * The protocol is described in the `NXP MFRC522`_ datasheet. +* The protocol is described in the `NXP MFRC522`_ datasheet. - * See the `Pin Layout`_ section for details on connecting the pins. +* See the `Pin Layout`_ section for details on connecting the pins. 2. The reader and the tags communicate using a 13.56 MHz electromagnetic field. - * The protocol is defined in ISO/IEC 14443-3:2011 Part 3 Type A. +* The protocol is defined in ISO/IEC 14443-3:2011 Part 3 Type A. - * Details are found in chapter 6 *"Type A – Initialization and anticollision"*. - - * See http://wg8.de/wg8n1496_17n3613_Ballot_FCD14443-3.pdf for a free version - of the final draft (which might be outdated in some areas). - - * The reader do not support ISO/IEC 14443-3 Type B. + * Details are found in chapter 6 *"Type A – Initialization and anticollision"*. + + * See http://wg8.de/wg8n1496_17n3613_Ballot_FCD14443-3.pdf for a free version + of the final draft (which might be outdated in some areas). + + * The reader do not support ISO/IEC 14443-3 Type B. Troubleshooting @@ -97,38 +97,38 @@ Troubleshooting * **I don't get input from reader** or **WARNING: Communication failure, is the MFRC522 properly connected?** - 1. Check your connection, see `Pin Layout`_ . - 2. Check voltage. Most breakouts work with 3.3V. - 3. The SPI only works with 3.3V, most breakouts seems 5V tollerant, but try a level shifter. + #. Check your connection, see `Pin Layout`_ . + #. Check voltage. Most breakouts work with 3.3V. + #. The SPI only works with 3.3V, most breakouts seems 5V tollerant, but try a level shifter. * **Sometimes I get timeouts** or **tag/card sometimes not work.** - 1. Try other site of the antenna. - 2. Try to decrease distance between MFRC522. - 3. Increase antenna gain per firmware: ``mfrc522.PCD_SetAntennaGain(mfrc522.RxGain_max);`` - 4. Use better power supply. - 5. Hardware corrupted, most products are from china and sometimes the quality is really low. Contact your seller. + #. Try other site of the antenna. + #. Try to decrease distance between MFRC522. + #. Increase antenna gain per firmware: ``mfrc522.PCD_SetAntennaGain(mfrc522.RxGain_max);`` + #. Use better power supply. + #. Hardware corrupted, most products are from china and sometimes the quality is really low. Contact your seller. * **My tag/card doesn't work.** - 1. Distance between antenna and token too huge (>1cm). - 2. You got wrong PICC. Is it really 13.56MGhz? Is it really a Mifare Type A? - 3. NFC tokens are not supported. Some may work. - 4. Animal marker are not supported. They use other frequency. - 5. Hardware corrupted, most products are from china and sometimes the quality is really low. Contact your seller. + #. Distance between antenna and token too huge (>1cm). + #. You got wrong PICC. Is it really 13.56MGhz? Is it really a Mifare Type A? + #. NFC tokens are not supported. Some may work. + #. Animal marker are not supported. They use other frequency. + #. Hardware corrupted, most products are from china and sometimes the quality is really low. Contact your seller. * **My mobile phone doesn't recognize the MFRC522** or **my MFRC522 can't read data from other MFRC522** - 1. Card simmulation is not supported. - 2. Communication with mobile phones is not supported. - 3. Peer to peer communication is not supported. + #. Card simmulation is not supported. + #. Communication with mobile phones is not supported. + #. Peer to peer communication is not supported. * **I need more features.** - 1. If software: code it and make a pull request. - 2. If hardware: buy a more expensive like PN532 (supports NFC and many more, but costs about $15) + #. If software: code it and make a pull request. + #. If hardware: buy a more expensive like PN532 (supports NFC and many more, but costs about $15) License