This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Which NFC mode I should use

Other Parts Discussed in Thread: TRF7970A, DLP-7970ABP

I want to build a demo. A device would like to send data (could be 10KB size) to the smartphone APP via NFC. After the smartphone received the data, it will do same processing and send the results (could be 10KB size) to the device.

My question is: which operation mode should I select for the device and smartphone in these two stages. Is the P2P mode the first choice for my case?

Regards,

Jimmy

  • Hi Jimmy,

    P2P is certainly a possible solution to transmit that amount of data back and forth between a smartphone and another NFC device.

    Another possibility is to use the smartphone as a reader and the device as a dynamic tag, and then read the data from tag (i.e. your device) and write new data to it. The tag would need to be large enough to store your data though.

    A possible limitation is that NFC applications for Android require a tap to send data. So while you can transfer data from your device to your smartphone by just presenting the phone, sending the data back is not as simple. You would need to select the data you want to send and then tap to actually initiate the send. You may even need to pull the device back and re-present it depending on the application (I believe all tag writing apps I have used function in that manner). Just keep that in mind, as I am not sure how you envision the demo occurring.

    As far as your device goes, if you use P2P then you have to provide a way for it to know when to transmit it's data. You could send the data immediately after a connection is established, or have a data packet sent that requests the device to send it's data instead (this would need to be implemented in software by you). If appropriate for your demo, you could also use something like a user input via a push button to send the data.

    If using a dynamic tag, the smartphone would automatically read the data from the tag without needing any user inputs. It will always read the data when presented unless it is attempting to write data instead.

    Overall, either P2P or a Reader/Writer + Tag implementation can work and they each have their own trade offs. If you would like additional input, then it would help me if you could describe what you envision the demo looking like in terms of the user experience.

  • Hi Ralph,

    This is very helpful. 

    I do not want a user input via a push button to send the data to the device. So, it is not easy to send the data from the smartphone to the device via P2P mode. 

    For the Reader/Writer+Tag method, how much data we can send each time? As the capacity of the Tag 1 or 2 is 2KB, several transmissions are needed. How long it will take in total?

    Thx,

    Jimmy

  • Hi Jimmy,

    Regarding the push button:

    To clarify, the push button idea was just one possible suggestion that has been used in a number of use cases. You do not have to take that approach. It is possible to setup the software for the device to automatically send the data through P2P when certain conditions are met such as a successful connection or a message that the device interprets as 'send data now'.

    Regarding the Reader/Writer+Tag method:

    If you were to use type 1 or 2 tags then yes you do have limited memory, but what you could use is a TRF7970A paired with an MCU that has 10k RAM or FRAM available to store your data.

    The TRF7970A supports Card Emulation of Type 4A and Type 4B tags, which can easily send that much data over the air when configured properly. This would allow you to transfer your data in a single transmission.

    Most newer smartphones should be able to read a 10kB file in under 2 seconds (this is a bit slower than P2P).

    We have a Boosterpack available for the TRF7970 to use with our Launchpads if you are interested: http://www.ti.com/tool/dlp-7970abp

    If you decide you want to use the Reader/Writer+Tag approach I could provide you with a Card Emulation demo we are developing currently to work with as a starting point if you are interested.

    If you want to use P2P instead, we also have a P2P application note with example code on the web: http://www.ti.com/lit/an/sloa192/sloa192.pdf

  • Hi Ralph,

    For the Reader/Writer+Tag method, what is the writing speed for the tag? As my application needs to send the data from my device to the smartphone frequently (every 2 minutes). 

    Another question for the dynamic tag is how many times it can be re-written?

    Thx,

    Jimmy

  • Hi Jimmy,

    The writing speed for tags will be around the same time frame as reading. The data transfer process is identical between reading and writing, and it is only the command that is issued which differentiates the two processes.

    However, based on what you have described, it sounds to me like you would like to leave your phone by the device and have it communicate with the device at certain time intervals on its own? If that is the case, you would need to use P2P mode because a smartphone will not read data autonomously as a Reader/Writer. With P2P, it is possible to leave the phone in presence of the NFC device and the device could then transmit data at set intervals (which you can determine in software) to the phone. This would also require the phone remain awake the whole time as well (i.e. screen cannot be off) because smartphones do not activate NFC when they are idle. 

    Depending on exactly how you want your smartphone and device to interface and what your role as the user will be, you may be limited on which mode you can use. You also may need to write a custom Android application if, for example, you also need the phone to send data back every 2 minutes autonomously. If I am not understanding your desired application, please further explain the intended user experience.

    As far as the tag writing is concerned that would be determined by the amount of times you can write to the RAM where the data will be stored. That information is found on the datasheets for the RAM. I believe that those numbers typically fall into the millions.