3

I always get the failure result when using ACR122U tool to authenticate Mifare 1K NFC tag, but I can use Android phone to read/write this tag.

ACR122U Load Authentication Keys
< FF 82 00 00 06 FF FF FF FF FF FF 
> 90 00 
< Key Structure: 00    < Key Number: 00
< Key: FF FF FF FF FF FF
Load Authentication Keys Success

ACR122U Authentication
< FF 86 00 00 05 01 00 00 60 00 
> 63 00 
Operation failed
NathanOliver
  • 171,901
  • 28
  • 288
  • 402
user1223802
  • 31
  • 1
  • 1
  • 2

4 Answers4

5

Your remark about an Android phone being able to read and write this tag suggests it is formatted to contain NDEF data. Instead of the factory default key 0xFFFFFFFFFFFF, you could try to use the MIFARE Application Directory key 0xA0A1A2A3A4A5 for the first sector (blocks 0-3) and the NFC Forum key 0xD3F7D3F7D3F7 for the following sectors. See NFC Type MIFARE Classic Tag Operation for more details.

NFC guy
  • 10,151
  • 3
  • 27
  • 58
  • Thanks for your reply! I've tried your suggestion but still failed. ACR122U Load Authentication Keys < FF 82 00 00 06 A0 A1 A2 A3 A4 A5 > 90 00 < Key Structure: 00 < Key Number: 00 < Key: A0 A1 A2 A3 A4 A5 Load Authentication Keys Success ACR122U Authentication < FF 86 00 00 05 01 00 00 60 00 > 63 00 Operation failed ACR122U Load Authentication Keys < FF 82 00 00 06 D3 F7 D3 F7 D3 F7 > 90 00 < Key Structure: 00 < Key Number: 00 < Key: D3 F7 D3 F7 D3 F7 Load Authentication Keys Success ACR122U Authentication < FF 86 00 00 05 01 00 01 60 00 > 63 00 I have to re-check the PDF... – user1223802 Feb 22 '12 at 17:32
1

Use "NFC TagInfo" application for android. You can read hex data with that app and find out your correct keys. In the end of every sectors there will be "keya, access, keyb" data. First 6 byte (12 hex character) is key a and last 6 byte (12 hex character again) is key b. Use new keys for reading and writing to card.

Batuhan
  • 100
  • 10
0

The authentication of a MF Classic 1k card can be failed with different reasons.

  1. Wrong Key

    a. Length : It should be 6 bytes (12 Hex chars).

    b. Key Matching : The key will be the hex FFFFFFFFFFFF in transport mode (by default) and it can be changed by a card providing vendor. You have to get the exact key from the vendor.

  2. Key Category : The access condition (6-9 bytes of Block 3 of all sectors) will explain which key you have to use to authenticate a corresponding sector for a particular memory operation .To know more details please refer

http://www.nxp.com/documents/data_sheet/MF1S50YYX.pdf

Shihab
  • 111
  • 4
0

I have written an utility for some ACR readers and the ACR 122U with Mifare classic cards is hitting some kind of bug. The identical code works for ACR 1222L.

However Mifare Classic cards are crap, so I suggest switching cards to work around the problem.

ThomasRS
  • 8,215
  • 5
  • 33
  • 48