<?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 Password Authentication - Ntag213 + PN512 in NFC</title>
    <link>https://community.nxp.com/t5/NFC/Password-Authentication-Ntag213-PN512/m-p/640403#M1508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble to remove a password applied to a NTAG213. I set a password to a tag and I can't authenticate to write in tag again. Also, I can't remove the tag password either. Can someone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my&amp;nbsp;code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// already connect to tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Changing password in NTAG213 - sector 2B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;uCla = 0xFF;&amp;nbsp;&lt;BR /&gt; uIns = 0xD6; &lt;SPAN style="color: #999999;"&gt;//write command used by my reader&lt;/SPAN&gt;&lt;BR /&gt; uP1 = 0x00;&amp;nbsp;&lt;BR /&gt; uP2 = 0x2B; &lt;SPAN style="color: #999999;"&gt;//memory block to write&lt;/SPAN&gt;&lt;BR /&gt; Data[0] = 0x40; &lt;SPAN style="color: #999999;"&gt;//PWD data -- @ A B C&lt;/SPAN&gt;&lt;BR /&gt; Data[1] = 0x41;&lt;BR /&gt; Data[2] = 0x42;&lt;BR /&gt; Data[3] = 0x43;&lt;BR /&gt; uLe = 0x04;&amp;nbsp;&lt;SPAN style="color: #999999;"&gt;//Return lenght expected&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt; uLc = 0x04; &lt;SPAN style="color: #999999;"&gt;//Data size&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data); &lt;SPAN style="color: #999999;"&gt;//Everything looks fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; //Activate &amp;nbsp;(AUTH0)&lt;/STRONG&gt;&lt;BR /&gt; uCla = 0xFF;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;uIns = 0xD6; &lt;SPAN style="color: #999999;"&gt;// write &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #999999;"&gt;command used by my reader&lt;/SPAN&gt;&lt;BR /&gt; uP1 = 0x00;&amp;nbsp;&lt;BR /&gt; uP2 = 0x29; &lt;SPAN style="color: #999999;"&gt;//memory block to write&lt;/SPAN&gt;&lt;BR /&gt; Data[0] = 0x04; &lt;SPAN style="color: #999999;"&gt;//Data filled with NTAG213 specs - Strong encript + protect block 04h and foward&lt;/SPAN&gt;&lt;BR /&gt; Data[1] = 0x00;&lt;BR /&gt; Data[2] = 0x00;&lt;BR /&gt; Data[3] = 0x04;&lt;BR /&gt; uLe = 0x04;&amp;nbsp;&lt;BR /&gt; uLc = 0x04;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data); &lt;SPAN style="color: #999999;"&gt;//Everything looks fine&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-- From now on, the tag is protected. With the NXP Writer APP I can unlock it with no problems. I didn't changed the PACK number, because this seems to&amp;nbsp;&lt;EM&gt;lock&amp;nbsp;&lt;/EM&gt;the authentication.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next step, I'll try to authenticate (AUTH_PWD) and write the sector 09h of the tag.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// already connect to tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Authenticate the tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;uCla = 0xFF;&lt;BR /&gt; uIns = 0x00;&lt;BR /&gt; uP1 = 0x00; &lt;BR /&gt; uP2 = 0x00;&lt;BR /&gt; uLc = 0x05;&amp;nbsp;&lt;BR /&gt; uLe = 0xFF;&lt;BR /&gt; Data[0] = 0x1B; &lt;SPAN style="color: #999999;"&gt;//PWD_AUTH command in NTAG213 specs&lt;/SPAN&gt;&lt;BR /&gt; Data[1] = 0x40; &lt;SPAN style="color: #999999;"&gt;//PWD data - @ A B C&lt;/SPAN&gt;&lt;BR /&gt; Data[2] = 0x41;&lt;BR /&gt; Data[3] = 0x42;&lt;BR /&gt; Data[4] = 0x43;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data);&lt;SPAN style="color: #999999;"&gt;&amp;nbsp;//Received response 00 00 90 00 - PACK (00 00) and ACK (90 00)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- As said in NTAG21x docs, after an authentication I can send a write command to the tag and it will accept it. So I tried to write a memory sector:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;//write NXP tag&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;uCla = 0xFF;&amp;nbsp;&lt;BR /&gt;uIns = 0xD6; &lt;SPAN style="color: #999999;"&gt;// write command used by my reader&lt;/SPAN&gt;&lt;BR /&gt;uP1 = 0x00;&amp;nbsp;&lt;BR /&gt;uP2 = 0x09; &lt;SPAN style="color: #999999;"&gt;//memory block to write&lt;/SPAN&gt;&lt;BR /&gt;Data[0] = 0x70; &lt;SPAN style="color: #999999;"&gt;//random hex numbers&lt;/SPAN&gt;&lt;BR /&gt;Data[1] = 0x71;&lt;BR /&gt;Data[2] = 0x72;&lt;BR /&gt;Data[3] = 0x73;&lt;BR /&gt;uLe = 0x04;&amp;nbsp;&lt;SPAN style="color: #999999;"&gt;//Return lenght expected&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;uLc = 0x04; &lt;SPAN style="color: #999999;"&gt;//Data size&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data); &lt;SPAN style="color: #999999;"&gt;//Return 99 00 - unknown error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-- I tried a lot of other commands, but with no luck. It seems I need to use PACK somewhere, but I don't know where. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried the NTAG213 spec commands of Write, It returns 90 00 but no data is written.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank for the help!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Fernando Coelho&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Dec 2016 20:24:50 GMT</pubDate>
    <dc:creator>fernandohcoelho</dc:creator>
    <dc:date>2016-12-01T20:24:50Z</dc:date>
    <item>
      <title>Password Authentication - Ntag213 + PN512</title>
      <link>https://community.nxp.com/t5/NFC/Password-Authentication-Ntag213-PN512/m-p/640403#M1508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having trouble to remove a password applied to a NTAG213. I set a password to a tag and I can't authenticate to write in tag again. Also, I can't remove the tag password either. Can someone help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my&amp;nbsp;code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// already connect to tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Changing password in NTAG213 - sector 2B&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;uCla = 0xFF;&amp;nbsp;&lt;BR /&gt; uIns = 0xD6; &lt;SPAN style="color: #999999;"&gt;//write command used by my reader&lt;/SPAN&gt;&lt;BR /&gt; uP1 = 0x00;&amp;nbsp;&lt;BR /&gt; uP2 = 0x2B; &lt;SPAN style="color: #999999;"&gt;//memory block to write&lt;/SPAN&gt;&lt;BR /&gt; Data[0] = 0x40; &lt;SPAN style="color: #999999;"&gt;//PWD data -- @ A B C&lt;/SPAN&gt;&lt;BR /&gt; Data[1] = 0x41;&lt;BR /&gt; Data[2] = 0x42;&lt;BR /&gt; Data[3] = 0x43;&lt;BR /&gt; uLe = 0x04;&amp;nbsp;&lt;SPAN style="color: #999999;"&gt;//Return lenght expected&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt; uLc = 0x04; &lt;SPAN style="color: #999999;"&gt;//Data size&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data); &lt;SPAN style="color: #999999;"&gt;//Everything looks fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; //Activate &amp;nbsp;(AUTH0)&lt;/STRONG&gt;&lt;BR /&gt; uCla = 0xFF;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;uIns = 0xD6; &lt;SPAN style="color: #999999;"&gt;// write &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #999999;"&gt;command used by my reader&lt;/SPAN&gt;&lt;BR /&gt; uP1 = 0x00;&amp;nbsp;&lt;BR /&gt; uP2 = 0x29; &lt;SPAN style="color: #999999;"&gt;//memory block to write&lt;/SPAN&gt;&lt;BR /&gt; Data[0] = 0x04; &lt;SPAN style="color: #999999;"&gt;//Data filled with NTAG213 specs - Strong encript + protect block 04h and foward&lt;/SPAN&gt;&lt;BR /&gt; Data[1] = 0x00;&lt;BR /&gt; Data[2] = 0x00;&lt;BR /&gt; Data[3] = 0x04;&lt;BR /&gt; uLe = 0x04;&amp;nbsp;&lt;BR /&gt; uLc = 0x04;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data); &lt;SPAN style="color: #999999;"&gt;//Everything looks fine&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-- From now on, the tag is protected. With the NXP Writer APP I can unlock it with no problems. I didn't changed the PACK number, because this seems to&amp;nbsp;&lt;EM&gt;lock&amp;nbsp;&lt;/EM&gt;the authentication.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next step, I'll try to authenticate (AUTH_PWD) and write the sector 09h of the tag.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// already connect to tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//Authenticate the tag&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;uCla = 0xFF;&lt;BR /&gt; uIns = 0x00;&lt;BR /&gt; uP1 = 0x00; &lt;BR /&gt; uP2 = 0x00;&lt;BR /&gt; uLc = 0x05;&amp;nbsp;&lt;BR /&gt; uLe = 0xFF;&lt;BR /&gt; Data[0] = 0x1B; &lt;SPAN style="color: #999999;"&gt;//PWD_AUTH command in NTAG213 specs&lt;/SPAN&gt;&lt;BR /&gt; Data[1] = 0x40; &lt;SPAN style="color: #999999;"&gt;//PWD data - @ A B C&lt;/SPAN&gt;&lt;BR /&gt; Data[2] = 0x41;&lt;BR /&gt; Data[3] = 0x42;&lt;BR /&gt; Data[4] = 0x43;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data);&lt;SPAN style="color: #999999;"&gt;&amp;nbsp;//Received response 00 00 90 00 - PACK (00 00) and ACK (90 00)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- As said in NTAG21x docs, after an authentication I can send a write command to the tag and it will accept it. So I tried to write a memory sector:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #999999;"&gt;//write NXP tag&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;uCla = 0xFF;&amp;nbsp;&lt;BR /&gt;uIns = 0xD6; &lt;SPAN style="color: #999999;"&gt;// write command used by my reader&lt;/SPAN&gt;&lt;BR /&gt;uP1 = 0x00;&amp;nbsp;&lt;BR /&gt;uP2 = 0x09; &lt;SPAN style="color: #999999;"&gt;//memory block to write&lt;/SPAN&gt;&lt;BR /&gt;Data[0] = 0x70; &lt;SPAN style="color: #999999;"&gt;//random hex numbers&lt;/SPAN&gt;&lt;BR /&gt;Data[1] = 0x71;&lt;BR /&gt;Data[2] = 0x72;&lt;BR /&gt;Data[3] = 0x73;&lt;BR /&gt;uLe = 0x04;&amp;nbsp;&lt;SPAN style="color: #999999;"&gt;//Return lenght expected&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;uLc = 0x04; &lt;SPAN style="color: #999999;"&gt;//Data size&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding: 0px;"&gt;response = piccClass.sendCommand(iCaseType, uCla, uIns, uP1, uP2, uLc, uLe, Data); &lt;SPAN style="color: #999999;"&gt;//Return 99 00 - unknown error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-- I tried a lot of other commands, but with no luck. It seems I need to use PACK somewhere, but I don't know where. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried the NTAG213 spec commands of Write, It returns 90 00 but no data is written.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank for the help!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Fernando Coelho&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 20:24:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Password-Authentication-Ntag213-PN512/m-p/640403#M1508</guid>
      <dc:creator>fernandohcoelho</dc:creator>
      <dc:date>2016-12-01T20:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Password Authentication - Ntag213 + PN512</title>
      <link>https://community.nxp.com/t5/NFC/Password-Authentication-Ntag213-PN512/m-p/640404#M1509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Fernando H Cohelo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not familiar with the reader code you use, but from NTAG213 perspective the commands seem correct. PACK is not required for subsequent commands after authentication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please also check that the sector 9 is not locked (read-only) by the static-lock bytes, otherwise it cannot be written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2016 01:01:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/Password-Authentication-Ntag213-PN512/m-p/640404#M1509</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2016-12-15T01:01:24Z</dc:date>
    </item>
  </channel>
</rss>

