libnfc 1.8.0
nfc-emulate-forum-tag2.c File Reference

Emulates a NFC-Forum Tag Type 2 with a NDEF message This example allow to emulate an NFC-Forum Tag Type 2 that contains a read-only NDEF message. More...

#include <errno.h>
#include <signal.h>
#include <stdlib.h>
#include <nfc/nfc.h>
#include <nfc/nfc-emulation.h>
#include "utils/nfc-utils.h"

Go to the source code of this file.

Detailed Description

Emulates a NFC-Forum Tag Type 2 with a NDEF message This example allow to emulate an NFC-Forum Tag Type 2 that contains a read-only NDEF message.

This example has been developed using PN533 USB hardware as target and Google Nexus S phone as initiator.

This is know to NOT work with Nokia 6212 Classic and could fail with several NFC Forum compliant devices due to the following reasons:

  • The emulated target has only a 4-byte UID while most devices assume a Tag Type 2 has always a 7-byte UID (as a real Mifare Ultralight tag);
  • The chip is emulating an ISO/IEC 14443-3 tag, without any hardware helper. If the initiator has too strict timeouts for software-based emulation (which is usually the case), this example will fail. This is not a bug and we can't do anything using this hardware (PN531/PN533).

Definition in file nfc-emulate-forum-tag2.c.