cancel
Showing results for 
Search instead for 
Did you mean: 

ST25 NFC App: Where is data from "Reading from Tag" in Mailbox Mode saved?

PNege
Associate

Hi,

I am trying to set up the fast transfer mode with the X-Nucleo-NFC04A1 board and the ST25 NFC app for android. At the moment, the mailbox management as well as writing and reading from the mailbox on the dev-board works fine.

Now I want to read the data stored via I2C on the ST25DV with the smartphone.

When I tap on "Start transfer" the stopwatch starts and the progress bar works, but I can't find the actual data to verify the transfer.

I appreciate your help!

1 ACCEPTED SOLUTION

Accepted Solutions
France Berthelot
ST Employee

Hello

We do not have simple use case as you describe.

You have the “Data transfer�? feature on the application that enable to Send/Receive buffer from/to Host/Phone. This feature follows also the protocol (proprietary one) described in the following document.

Demo user manual: https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/4d/09/8b/42/28/3f/47/59/DM00288894/files/DM00288894.pdf/jcr:content/translations/en.DM00288894.pdf

We do not put in place basic read/write to MB like you request as this need also synchro with host side in order to be in a right situation. Host put a message so phone can read or MB is empty and  RF put message and host is now able to read,…...etc...

The phone application do not have this kind of feature.

According to your requirements, on Phone side, you just need to check that host has write to the MB, then read message length then read the message with the following pseudo calls:

mST25DVTag.hasHostPutMsg(true)

if true {

int length = mST25DVTag.readMailboxMessageLength()

tmpBuffer = mST25DVTag.readMailboxMessage((byte) offset, size);

}

In file ST25DVTransferTask you have an example on function

private byte[] readMessage() throws STException

Warning: keep in mind you need to manage also the RX/TX RF available buffer size…..(see readMessage implementation)

Our Application do not allow to do basic Read or Write To/From MB. The result you have “Transfer failed" according to your context is a correct behavior of the application.

To summarize:

So i want to ask, if it is even possible to do this with this application?  No (because application is built on top of a communication protocol including frame header, exchange protocol and content exchanged check) – Please see what is provided in term of source on both side, phone and host. Both must be aligned.

If yes, should i configure message header in other way? (I tried also with ftc = MB_H2RSIMPLETRANSFER): Message header is used by the protocol, refers to the “Demo user manual�? for more details.

Regards

FBE

View solution in original post

3 REPLIES 3
France Berthelot
ST Employee

Hello

On the X-Nucleo-NFC04A1 board, there is only one small example on FTM which write and read the data previously written. Nothing in relation with an external device and or demonstration of FTM as we do not have any available screen.

On Android device, the Stopwatch starts and go forward until first data written on mailbox which then wait for embedded device read… and so on (except if device not near the DV). The demo use a dedicated protocol used for all demos and explained on following documents and sources.

These document and sources have been done for the demonstrations used with the Discovery kit, not the X-Nucleo. All demos only works with the Discovery kit, but can be adapted by your own to the X-Nucleo, based on the Discovery delivered sources.

Discovery embedded sources : https://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/stsw-st25dv001.html

Demo user manual: https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/4d/09/8b/42/28/3f/47/59/DM00288894/files/DM00288894.pdf/jcr:content/translations/en.DM00288894.pdf

Discovery : https://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/st25-nfc-rfid-eval-tools/st25-nfc-rfid-eval-boards/st25dv-discovery.html

Hope this clarify and answer to your raised point.

BR

MFo.1
Associate II

Hello,

i have simillar problem. Namely i want to write simple message to the mailbox and read it by NFC Tap application.

I can write message to the mailbox via i2c, but when i want to read it by NFC Tap application i always get "Transfer failed".

Below is code how i configured message header:

static const char* ID = "NFC04A1_STD25DV04k";
const uint16_t ID_LEN = strlen(ID);
MB_HEADER_T idHeader = {              .fctcode = MB_H2RDATATRANSFER,
								.chaining = MB_NOTCHAINED,
								.cmdresp = MB_COMMAND,
								.error = MB_NOERROR,
								.framelength = ID_LEN,
								.fulllength = ID_LEN,
								.totalchunk  = 1,
								.chunknb = 1,
								.pData = ID
		};

As you can see i want to send simple, not-chained frame. As i understand, reader (smartphone) should write crc to the tag after receiving last chunk (in my case the first one is the last one), but it never happend.

So i want to ask, if it is even possible to do this with this application? If yes, should i configure message header in other way? (I tried also with ftc = MB_H2RSIMPLETRANSFER)

And in case of success, where the data that i sent will be stored? Or will it be displayed like image, directly after successful transfer?.

Regards,

mf

France Berthelot
ST Employee

Hello

We do not have simple use case as you describe.

You have the “Data transfer�? feature on the application that enable to Send/Receive buffer from/to Host/Phone. This feature follows also the protocol (proprietary one) described in the following document.

Demo user manual: https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/4d/09/8b/42/28/3f/47/59/DM00288894/files/DM00288894.pdf/jcr:content/translations/en.DM00288894.pdf

We do not put in place basic read/write to MB like you request as this need also synchro with host side in order to be in a right situation. Host put a message so phone can read or MB is empty and  RF put message and host is now able to read,…...etc...

The phone application do not have this kind of feature.

According to your requirements, on Phone side, you just need to check that host has write to the MB, then read message length then read the message with the following pseudo calls:

mST25DVTag.hasHostPutMsg(true)

if true {

int length = mST25DVTag.readMailboxMessageLength()

tmpBuffer = mST25DVTag.readMailboxMessage((byte) offset, size);

}

In file ST25DVTransferTask you have an example on function

private byte[] readMessage() throws STException

Warning: keep in mind you need to manage also the RX/TX RF available buffer size…..(see readMessage implementation)

Our Application do not allow to do basic Read or Write To/From MB. The result you have “Transfer failed" according to your context is a correct behavior of the application.

To summarize:

So i want to ask, if it is even possible to do this with this application?  No (because application is built on top of a communication protocol including frame header, exchange protocol and content exchanged check) – Please see what is provided in term of source on both side, phone and host. Both must be aligned.

If yes, should i configure message header in other way? (I tried also with ftc = MB_H2RSIMPLETRANSFER): Message header is used by the protocol, refers to the “Demo user manual�? for more details.

Regards

FBE