<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: NTAG213 - Authentication Error with Raspberry Pi MFRC522 in NFC</title>
    <link>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/1152475#M7665</link>
    <description>&lt;P&gt;Did you get a solution ?&lt;/P&gt;</description>
    <pubDate>Sun, 13 Sep 2020 19:49:49 GMT</pubDate>
    <dc:creator>Bikos</dc:creator>
    <dc:date>2020-09-13T19:49:49Z</dc:date>
    <item>
      <title>NTAG213 - Authentication Error with Raspberry Pi MFRC522</title>
      <link>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/939756#M5806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been searching all over the internet and can't seem to find a clear answer, hoping someone can help out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Components being used in the project:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using Raspberry Pi (is preferred because this is an extension of an existing project and the Pi is available, the rest of the program runs on it + Gpio pins are available, as to not having to introduce another hardware part like an arduino).&amp;nbsp;&lt;BR /&gt;Using the mfrc522 library&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Using the RFID reader/writer module (works with NFC) from RobotDyn (convenient 5V extra pin and smaller size) (see image below this)&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Example MFRC522 Reader writer pinout.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/87926iF0609114121CF2E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Example MFRC522 Reader writer pinout.png" alt="Example MFRC522 Reader writer pinout.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Using "&lt;SPAN&gt;On-metal Round NFC Tags NTAG213 22mm" (see image)&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Anti Metal NTAG213.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/88239iAB76D00600690E62/image-size/large?v=v2&amp;amp;px=999" role="button" title="Anti Metal NTAG213.JPG" alt="Anti Metal NTAG213.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem to be solved:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Authentication error&lt;BR /&gt;I need a way (in python preferably) to write code that authenticates (gives the correct key) and then makes it able to change the password.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Preferred workflow:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Ntag213 tags gets authenticated and given a password by us. (Initial registration).&lt;BR /&gt;Python program for initial registration&lt;/LI&gt;&lt;LI&gt;Registered ntags will then be need to be able to mainly read and occasionally be overwritten with different data (Only some numbers for identification purposes in a database handled by other code on the raspberry pi)&lt;BR /&gt;Python program for reading&lt;BR /&gt;Python program for writing&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a dump of the NTAG213 (read by the RobotDyn MFRC522):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Datadump Ntag213.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/88585i398FB9B1B0592BA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Datadump Ntag213.jpg" alt="Datadump Ntag213.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've read in the documentation that the authentication is being checked on black 7? Is that right?&lt;/P&gt;&lt;P&gt;I just have no idea how to change this key it uses.&lt;/P&gt;&lt;P&gt;Example of error reading it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Error reading.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/88711i7DC9164C9148C341/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error reading.JPG" alt="Error reading.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Example of error writing to it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Error writing.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/89096iD5731C0A40554266/image-size/large?v=v2&amp;amp;px=999" role="button" title="Error writing.JPG" alt="Error writing.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code example of writing script (basic one just for testing): (SimpleMFRC522 source:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/pimylifeup/MFRC522-python/blob/master/mfrc522/SimpleMFRC522.py" title="https://github.com/pimylifeup/MFRC522-python/blob/master/mfrc522/SimpleMFRC522.py"&gt;MFRC522-python/SimpleMFRC522.py at master · pimylifeup/MFRC522-python · GitHub&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#!/usr/bin/env python&lt;/P&gt;&lt;P&gt;import RPi.GPIO as GPIO&lt;BR /&gt;from mfrc522 import SimpleMFRC522&lt;/P&gt;&lt;P&gt;reader = SimpleMFRC522()&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;&amp;nbsp;text = input('New data:')&lt;BR /&gt;&amp;nbsp;print("Now place your tag to write")&lt;BR /&gt;&amp;nbsp;reader.write(text)&lt;BR /&gt;&amp;nbsp;print("Written")&lt;BR /&gt;finally:&lt;BR /&gt;&amp;nbsp;GPIO.cleanup()&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm guessing I need to include code in my read/write and registration script to authenticate first (giving the auth key) and if necessary (during write/read) giving a password (after I've set a password during the registration step).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just have no idea which values or in which way I should give the auth key in script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anybody can help in any way or point me in the right direction that'd be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2019 07:34:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/939756#M5806</guid>
      <dc:creator>icezman</dc:creator>
      <dc:date>2019-09-03T07:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: NTAG213 - Authentication Error with Raspberry Pi MFRC522</title>
      <link>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/939757#M5807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Hello Ice,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 14.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;I'd recommend to follow the flow chart that is on page 8 of the &lt;A href="https://www.nxp.com/docs/en/data-sheet/NTAG213_215_216.pdf"&gt;User Manual for the NTAG 213&lt;/A&gt;. In the following pages the commands that should be used to appropriately enter the authenticated state are described.&amp;nbsp; Section 8.8 explains how to proceed in configuring the password itself and the commands to be used.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 14.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;The commands themselves are also described in the same document. Unfortunately we do not have any example code made with python.&amp;nbsp; You can check the &lt;A href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.nxp.com%2Fproducts%2Fidentification-and-security%2Fnfc%2Fnfc-reader-ics%2Fnfc-reader-library-software-support-for-nfc-frontend-solutions%3ANFC-READER-LIBRARY%3Ftab%3DIn-Depth_Tab"&gt;NFC Reader library&lt;/A&gt; that has examples created in C, it does use different modules but you may get a general idea of what needs to occur in order to properly read and write the Tag.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 14.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;As an observation in your code, it does need more information so your tag properly receives the instructions in needs to access certain areas of the memory. As you mentioned yourself you need to include the part that authorizes the user. This you will find described in the flow chart I've mentioned above.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 14.0pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 14.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Hope this helps,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 14.0pt;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Sabina&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2019 16:13:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/939757#M5807</guid>
      <dc:creator>Sabina_Bruce</dc:creator>
      <dc:date>2019-09-09T16:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: NTAG213 - Authentication Error with Raspberry Pi MFRC522</title>
      <link>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/939758#M5808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem, did anyone find a solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 16:39:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/939758#M5808</guid>
      <dc:creator>alex5</dc:creator>
      <dc:date>2020-02-07T16:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: NTAG213 - Authentication Error with Raspberry Pi MFRC522</title>
      <link>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/1152475#M7665</link>
      <description>&lt;P&gt;Did you get a solution ?&lt;/P&gt;</description>
      <pubDate>Sun, 13 Sep 2020 19:49:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/NTAG213-Authentication-Error-with-Raspberry-Pi-MFRC522/m-p/1152475#M7665</guid>
      <dc:creator>Bikos</dc:creator>
      <dc:date>2020-09-13T19:49:49Z</dc:date>
    </item>
  </channel>
</rss>

