Topic: nfc-emulate-forum-tag4 input file?

The nfc-emulate-forum-tag4 can take an NDEF file as input. Is this a binary file? Is there a sample somewhere? Thanks!

Re: nfc-emulate-forum-tag4 input file?

Note, I was able to customize the data sent by modifying the code but I'm interested in doing more extensive testing. One of the questions I want to answer is: how much data can a PN532 in emulation mode send out and how fast? In particular, what is the maximum size and speed to a Nexus S?

How much does this depend on the speed that the the the program driving the emulation is running?

Re: nfc-emulate-forum-tag4 input file?

NFC-Forum specifications use many terms which can confused but you have to be precise to understand correctly:
NDEF file is a structure that contains NLEN (lenght of NDEF message) and an NDEF message.
Please see NFC-Forum Tag Type 4 specification, Table 8: Data Structure of the NDEF file.

ektimo wrote:

The nfc-emulate-forum-tag4 can take an NDEF file as input.

According to right terms usage, no nfc-emulate-forum-tag4 can't take an NDEF file but an NDEF message.

ektimo wrote:

Is this a binary file?

Yes, it is.

ektimo wrote:

Is there a sample somewhere?

No but you can use libndef¹ to forge your NDEF message. It implements NFC-Forum NFC Data Exchange Format (NDEF) specifications and all NFC-Forum Record Type Definition Technical Specifications.

[1] http://code.google.com/p/libndef/

Romuald Conty

Re: nfc-emulate-forum-tag4 input file?

ektimo wrote:

how much data can a PN532 in emulation mode send out

According to NFC-Forum Tag Type 4 specification the maximal lenght of the NDEF message can be 0xFFFE (65 534 bytes).

ektimo wrote:

and how fast?

It is theorically calculable using the data rates, remove the overload lenght, etc. but tests should be more efficient: IMHO, the emulation is far slower that theory.

ektimo wrote:

How much does this depend on the speed that the program driving the emulation is running?

IMHO, the slower part is the communication between the device and host.

Romuald Conty

Re: nfc-emulate-forum-tag4 input file?

When you say "host", do you mean the computer (or the microprocessor)?

I'm getting about 1 KB per second between PN532 in emulation mode and Nexus S. I'm using the default connection speed w/PN532 and serial port of 115.2 kbps, i.e. 14.4 KBps. I realize there are many reasons why it will be slower, but this is more than a factor of 10. Is this to be expected?

(It looks like it is sending frames of only 58 bytes. Perhaps this is what Nexus S is asking for.)

Last edited by ektimo (2011-04-18 23:41:44)

Re: nfc-emulate-forum-tag4 input file?

ektimo wrote:

When you say "host", do you mean the computer (or the microprocessor)?

Yes, exactly.

ektimo wrote:

It looks like it is sending frames of only 58 bytes. Perhaps this is what Nexus S is asking for.

I think its related to MLe (Maximum R-ADPU data size) in nfcforum_capability_container[] array. See nfc-emulate-forum-tag4.c line 82 (in trunk).

Romuald Conty

Re: nfc-emulate-forum-tag4 input file?

Sweet! I increased it to max and it is almost twice as fast now. Thanks Romuald!!