How to run into function tnep_svc_one_selected()?

As the title, in the project "ncs\v3.2.1\nrf\samples\nfc\tnep_tag", how to runt into  function tnep_svc_one_selected()?

I use the NFC tools, Send the hex data, want to select the servive, what hex data must be send? Is there a complete example or debugging method?

Parents
  • Hi

    I'm sorry, but I don't understand what you mean here I'm afraid. Are you using a phone, Android or similar running an NFC debugger app of sorts or a dedicated NFC debugger device? I think the NFC TNEP polling device. 

    Is the issue here that you are not able to switch back to the svc_one service with a button press? If so, I think that is because the sample only lets you switch from 1 to 2 and not back with the same button press, so you need to change this in the source code.

    Or is the issue that you aren't able to change/poll the service from the phone? If so, I think you should look at how the TNEP poller sample does this and implement something like that on the NFC tools on your end.

    Best regards,

    Simon

  • It's like this: I plan to use TNEP for data exchange. What I imagine is being able to use tool software, like NFC TOOL, similar to a serial port debugging assistant, to send and receive hexadecimal data for manual debugging.

  • Hello,

    It could possibly be a bug. I believe this means "write to file, offset 0x0000, length 0x04, data 0x11223344", if I am not mistaken. But it is also dependent that you have already told the receiver what file it is up front. Did you?

    Regarding NFC Tools and this TNEP feature, I am not sure (ChatGPT says that it does not, and it is a fairly new protocol). The sample is tailored to work together with the sample tnep_poller, which can run on another DK, with an NFC Reader connected to it (usually an SPI/I2C device, such as "NFC Reader ST25R3911B Nucleo expansion board (X-NUCLEO-NFC05A1)")

    Best regards,

    Edvin

  • So, give me a solution. I just want to tap my phone on the NFC antenna, and then I can continuously exchange data, with the higher application layer working like a serial port.

  • I am sorry, but I don't know how to do that. You need to figure out whether the reason it is not working for the NFC Tools app is because it is a restriction in the OS, or if it is just a lacking feature in the NFC Tools application. If it is the last one, then you may need to write your own NFC application for the phone. I don't have any experience with phone app development, unfortunately. 

    If TNEP is not supported in the Android OS, then I am afraid you need to find another way of transporting the data, like BLE, USB or some other communication protocol. 

    I know it is probably not the answer you are hoping for, but it seems like this is not possible.

    Best regards,

    Edvin

  • Regarding the tnep_tag project, I think it would be best to have a complete example from computer and mobile to the verification board, showing what data is sent and received, and how to operate it, all demonstrated.https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/nfc/tnep_tag/README.html

  • I will take that as an input for our SDK team. But the sample description says that you should use the tnep_poller as the other device. 

    It could be clearer that it references the tnep_poller sample from the same folder as tnep_tag.

    Until TNEP polling is supported in iOS/Android, there is not much we can do about it, I am afraid.

    Best regards,

    Edvin

Reply
  • I will take that as an input for our SDK team. But the sample description says that you should use the tnep_poller as the other device. 

    It could be clearer that it references the tnep_poller sample from the same folder as tnep_tag.

    Until TNEP polling is supported in iOS/Android, there is not much we can do about it, I am afraid.

    Best regards,

    Edvin

Children
Related