NFC Wake Up and TNEP

Context : I'm building an embedded application using the nrf52832, that can turn on/off and be configured via NFC. These functionnality are implemented using the t4t library in R/W mode and are functional, I am able to read and write text NDEF messages using a generic nfc app on my phone, and interpret the modified NDEF on the embedded device. The device also wakes up successfuly when an NFC field is detected.

My problem is the following, when the device wakeup from an nfc field detection, the phone seemingly does not detect it until I move it way from the device and then put it back. What I would like is to be able to place the phone on a turned off device, and be able to "directly" edit the NDEF, without further actions.

I have tried to restart the emulation from the device, but no changes have been noted. If I turn on and off the nfc functionnality on my phone it does works, but I don't think I can do that from a custom app.

Is there a way to achieve my goal ? Can it be affected by the t4t library ? Is it compatible with NFC ? Any leads or informations would be greatly appreciated.

  • Hi

    What NFC app exactly are you using on your phone. In my experience, when using the NFC Tools app for Android, NFC tags pops up instantly when discovered without having to move them away from the device. I can try recreating this on my end tomorrow with the unmodified NDEF sample on a development kit.

    Best regards,

    Simon

  • I mainly use the ST25 app because it's the only one I've found that can edit existing NDEF records, but I've had the same problem with the android NFC tools app, and the nRF NFC Toolbox.

    Just to clarify, the tags do pop up instantly when the device is already on, the problem is when the device is off and starts emulating a tag while the phone RF field is still around.

  • Hi

    Let me make sure I get this straight.

    I tested on my end with the writable NDEF msg sample project now, and as long as I choose in the NFC Tools app that I want to write to a tag it does write to it as soon as I approach it. But if I have not selected "Write" before approaching it I will indeed have to move away from it before being able to write to it again. 

    What you want is to approach the tag as normal, but then write to it without moving away from it to write and edit NDEF records on the spot, correct? I don't think changing to the T4T library will make a change. The only thing I can think of is to uninitialize and reinitialize NFC on the nRF52832 some time after the NFC_T2T_EVENT_FIELD_ON event has been there for a while so that it can be triggered again after initialization as means to "check" for any updates. As far as I know there are no ways to check for changes in the NFC libraries, and moving away from and back to the device is the most common way to do so. Do you have some more details on the use case itself? Why do they need to be constantly close to each other?

    Best regards,

    Simon

  • The use case is a smart sensor that can be turned on/off and be configured over NFC, I feel that the need to move the phone around instead of just keeping it there would be a huge detriment to the user experience, especially for the ones that may be unfamiliar with the system's inner working.

    What I want is for the device to wake up from a phone's NFC field, and be able to edit NDEF records without moving away and back.

    I am already using the t4t, and I also have noticed a strange behavior regarding the field ON/OFF events that may be linked to my problem. When the device is already on, and  I approach it with my phone, the events are called as expected (OFF only when I move away, ON only when I get closer). BUT if the device is Off and I wake it up with the phone's NFC and leave it there (which is the end goal), I repeatedly get the FIELD_OFF event until I move the phone away.

    I have tried restarting the NFC tag emulation (nfc_t4t_emulation_start/stop functions) and noticed no changes, if you meant something else, I'm not aware of how to proceed.

    Thank you for the quick responses, by the way.

  • Hi

    Do you have the project you're working on here so we can try reproduce it on our end? Will it also run on the nRF52832 DK for example? I have asked internally if anyone has any idea of what's going on here, as this sounds very strange indeed.

    Best regards,

    Simon

Related