Bluetooth Sample central_nfc_pairing with PN7160 NFC Controller

Hello,

I am working on using the Nordic nRF TNEP API to support an NFC Bluetooth tap-to-pair application with negotiated handover. I have been working on programming the NFC Poller side using an nRF 52840. I'm using the Central NFC Pairing example in the 2.8.0 nRF SDK as a starting point.

We are using the PN7160 NFC controller instead of the ST25R3911B that the sample is coded around. The command implementation with this PN7160 chip is different and doesn’t quite line up with the Central NFC Pairing example, so we looking to adapt that example to work with our hardware.

Currently I am able to:

  • Read the serial number and Capability Container from the tag
  • Parse the Capability Container
  • Read an initial NDEF message from our tag
  • Parse the NDEF message
  • Identify a Connection Handover Service

I am trying to select this service using the nfc_tnep_poller_svc_select command right after identifying the service in the initial NDEF message, but the code seems to be hanging up once I run this command. The RTT server is not providing any error logs from this function. The nRF documentation online says that the NFC Poller waits for a “specified period of time”, but I don’t see where this wait time period is set.

Additionally, the section on “Exchanging data with single response communication mode” isn’t very clear about which functions to call.

Here’s a link to the page I’ve been using as a reference: TNEP for polling device

Overall, I have a decent grasp on the low level NDEF procedures with the PN7160. However, I’ve had a lot of confusion about what TNEP API functions need to be called and when, and what the expected behavior from them is.  The PN7160 seems to be a much simpler NFC controller to implement than the ST25R3911B, with automatic anticollision functionality and one interrupt that goes high when a response is available to read from it. Because of this, a lot of the central_nfc_pairing nfc_poller.c code doesn't seem to be directly applicable or useable with the PN7160. If I am able to code low level SPI byte reads and writes to the PN7160, what is the minimum set of function calls required with the Nordic TNEP API to get negotiated pairing to work?

My current idea of the handover sequence is as follows:

  • Poller reads initial NDEF message from Tag device
    • Parses NDEF message and finds a Connection Handover Service
  • Poller creates a new NDEF message that acts as a Connection Handover Request
    • Sends to Tag Device
  • Tag Device sends back a Handover Select NDEF message with the pairing information
  • Poller uses the Handover Select message to pair via Bluetooth.

Any help on the above would be greatly appreciated. Thank you!

Parents Reply Children
Related