Problem with implementing nfc pairing along with regular bluetooth pairing (passkey)

Hi! I'm trying to add second option of pairing to my nrf52840DK. I already have pairing using passkey, however I would like to also provide an option of pairing using NFC. Is it even possible, if so could someone explain me how to do it? Already looked up at nfc examples and couldn't work anything out.
I was also wondering if regular advertising and direct advertising would not "cancel" each other, because when I (poorly) tried to implement nfc pairing to my DK(which was working fine), it stopped showing up when I was scanning for it, so I suppose it did not do regular advertise.
Cheers and thanks in advance :)

Parents Reply Children
  • Hi Waatff, 

    If both devices have OOB (NFC) support, they will use OOB as the authentication method and passkey will not be used. 

    If you want to have different mode that you either only support NFC or only support passkey, you can reinitialize the authentication handlers by calling bt_conn_auth_cb_register(NULL) 
    Then you call bt_conn_auth_cb_register() again with the correct callbacks (adding or removing passkey_display or oob_data_request)

    By not having passkey_display or passkey_entry in the callback the device will not request passkey (don't support display or keyboard)

Related