Search code examples
nfcndefacr1252

Emulate NdefMessage on ACS ACR1252U-A1


I am trying to emulate an NFC Forum Type 2 tag (Mifare Ultralight) containing an NDEF message with the ACR1252U and then read it out with an Android device.

To archive this, I enter the card emulation mode for Mifare Ultralight with:

E0 00 00 40 03 01 00 00
response: E1 03 01 01 01

The Android app "Nfc Tools" is identifying it as Mifare Ultralight now.

Then I write an NDEF message to the emulated card using the command:

e0 00 00 60 13 01 01 00 0f 03 0c d1 01 08 54 05 64 65 2d 44 45 68 69 fe
response: e1 00 00 00 03 0f 90 00

Unfortunately an Android device (Sony Xperia Z1 Compact) is unable to read the NDEF message.

So is the ACR1252U able to emulate a Type 2 tag with an NDEF message or am I just missing something?


Solution

  • I found a solution:

    1. My NDEF format was wrong. This is a working NDEF message with
      Lock Control TLV + NDEF Message TLV (with NDEF message) + Terminator TLV:

      0103a010440318d10114540564652d444548656c6c6f20576f726c64203a29fe
      

      The NDEF message contains one Text record (LANG = "de-DE", TEXT = "Hello World :)")

    2. The write command of the ACR1252U also needs to be passed the Capability Container (CC), so one need to add the CC bytes to the message:

      e1 10 06 00
      

    So a complete command for the ACR1252U to emulate an NFC Forum Type 2 tag with the NDEF text record "Hello World :)" would look like this:

    e0 00 00 60 28 01 01 00 24 e1 10 06 00 01 03 a0 10 44 03 18 d1 01 14 54 05 64 65 2d 44 45 48 65 6c 6c 6f 20 57 6f 72 6c 64 20 3a 29 fe
    

    To read out the emulator you can use the app "NFC TagInfo by NXP".

    have fun :)