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.

Parents
  • 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

Reply
  • 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

Children
  • 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.

Related