2022-08-16 01:04 PM
Hey Guys,
I am trying to use the NFC Tap app to transfer data to an ST25DV device I have here, using the FTM mailbox feature.
Mailbox is enabled. I get an error message from the App saying the send had failed.
General question: When the App sends over the data to the device, do I have to read it in that moment or in fact, do I have to do anything at all or does the ST25 takes care of this for me and I just need to know when the transfer is over and read the mailbox's content?
If there is someone here who is working with this and can shade some light on this for me it would be great.
Thank you,
Nir
Solved! Go to Solution.
2022-08-22 12:37 AM
Hello
From these links, you can get sources and retrieve FTM examples and functions call
https://www.st.com/en/embedded-software/stsw-st25ios001.html
https://www.st.com/en/embedded-software/stsw-st25001.html
Mailbox is enabled. I get an error message from the App saying the send had failed. è Have a look to the Mailbox status register (available on iOS/Android app) , it will indicate mailbox status, mailbox written by uRF or Serial interface or Msg missed by RF, …This will give you some more informations regarding failure.
General question: You need to manage synchronization between RF/Serial in order to write from RF, read from serial, write from RF, read from Serial and so on until end of data to be transferred.
Our SDK, used in iOS/Android app take care of this for you and FW provided on our discovery kit did it too.
Regards,FB
2022-08-16 11:35 PM
Hi Nir,
Are you using Android or iOS ST25 NFC Tap App?
Is you ST25DV connected to an MCU and is it powered? These 2 things are mandatory to use the FTM feature.
Then, from a software point of view, if you use the ST25SDK library, the fast transfer mode usage will be very easy because the library will take care of everything for you. You will have an explicit API where you can pass a byte array of any size. The library will take care of sending everything through FTM and will check for errors (in case of errors, retransmission will occur). The source code of Android and iOS ST25 NFC Tap apps is provided. You can have a look to the calls to this API function of ST25SDK:
public byte[] sendCmdAndWaitForCompletion(byte cmdId, byte[] data, boolean isErrorControlNeeded, boolean isResponseExpected, TransferProgressionListener transferProgressionListener, int timeOutInMs) throws STException, InterruptedException;
Best regards
Olivier
2022-08-16 11:44 PM
Hey Oliver and thank you.
Yes, I am using the NFT Tap app on my iPhone so it is iOS. Yes, the ST25DV is powered and connected to an MCU.
Let me clarify my question: I was asking not about the App side but about the hardware side - beside from enabling the mailbox on the ST25DV, do I need to write any other code on the ST25DV so that the App can write to the mailbox?
Nir
2022-08-16 11:54 PM
The FTM feature is a RAM of 256 bytes present in the ST25DV. It is controlled by a set of registers (you will find the description in the datasheet):
MB_CTRL_Dyn is the most important one because this is the status register that will tell to the smartphone or to the MCU that some data is available and also indicates if the data has been read.
So basically a transmission is done through a sequence like this:
Regards
Olivier
2022-08-17 01:14 PM
Hey Olivier,
Thank you. The problem I am facing is that for some reason, I can not get to transfer data
from the phone to the device. When using the "FTM - Data Transfer" screen, I am typing a few letters in, pressing "Start" and attaching the phone to the IC's antenna, I get a message on the app that a few bytes were transmitted but none were acknowledged and then I get a "Upload failed...." message.
On the IC side, I do not get the RF_PUT_MSG of the MB_CTRL_Dyn to be set.
What am I missing here or doing wrong?
Thank you,
Nir.
2022-08-18 09:57 AM
Hey Olivier,,
Would really love to hear back from you on this. BTW, the IC I am working on is the ST25DV04K (and not the C version) hope it does not matter much.
Nir.
2022-08-18 05:19 PM
Sorry but it just occurred to me: I am running the NFC Tap on an iPhone SE (iOS version 15.6) - does it support the MB feature?
2022-08-22 12:37 AM
Hello
From these links, you can get sources and retrieve FTM examples and functions call
https://www.st.com/en/embedded-software/stsw-st25ios001.html
https://www.st.com/en/embedded-software/stsw-st25001.html
Mailbox is enabled. I get an error message from the App saying the send had failed. è Have a look to the Mailbox status register (available on iOS/Android app) , it will indicate mailbox status, mailbox written by uRF or Serial interface or Msg missed by RF, …This will give you some more informations regarding failure.
General question: You need to manage synchronization between RF/Serial in order to write from RF, read from serial, write from RF, read from Serial and so on until end of data to be transferred.
Our SDK, used in iOS/Android app take care of this for you and FW provided on our discovery kit did it too.
Regards,FB
2022-08-22 12:48 AM
Hello
Sorry, i forget to put link for FW side : https://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/stsw-st25dv001.html
Apologize
Reminder: both side, Phone and board FW need to be aligned (same protocol...) otherwise exchange will probably fail, du to the fact that one side did not read and free mailbox after a write for an other write ....
Regards,FB
2022-08-22 09:44 PM
Thank you France,
One last question: Will the MB feature work on an iPhone SE? (iOS version 15.6)
Nir