Issue setting NFC_OOB_PAIRING config option in prj.conf for peripheral_hids_keyboard sample application

Hi there,

        I have built and run the peripheral_hids_keyboard sample from the nrf samples folder in SDK V2.10.

It works fine for the HID keyboard service.

I want to try out the NFC OOB pairing that it implements but I am unable to change the config option 

NFC_OOB_PAIRING defined in the kconfig file.
I have updated prj.cong file with
CONFIG_NFC_OOB_PAIRING=y
but always get the warning "CONFIG_NFC_OOB_PAIRING was assigned the value y, but got the value n. Missing dependencies:
HAS_HW_NRF_NFCT"
The kconfig file is as follows..
 
source "Kconfig.zephyr"

menu "Nordic BLE HIDS Keyboard sample"

config NFC_OOB_PAIRING
	bool "Enable NFC OOB pairing"
	depends on HAS_HW_NRF_NFCT
	default y
	select NFC_T2T_NRFXLIB
	select NFC_NDEF
	select NFC_NDEF_MSG
	select NFC_NDEF_RECORD
	select NFC_NDEF_LE_OOB_REC

endmenu
It seems that it is enabled by default by I can't see how to pull that through to my prj.conf file.
Looking at the Guiconfig shows this..
What am I doing wrong?
Cheers
Duncan
Parents
  • Hi Duncan

    I reproduced the issue you are facing, and it lead me down a bit of a rabbit hole. 

    It seems the NFC peripheral is disabled by default in the various nRF52 DK board files, even though they all have the necessary hardware to support NFC. 

    Normally this would lead to an error further down the line when trying to use the NFC peripheral, but apparently the NFC driver only checks whether or not NFC is enabled in the project configuration (Kconfig), and doesn't care about the hardware configuration in the device tree. 
    This is the reason all the samples in the nrf/samples/nfc folder work. 

    In the case of the peripheral_hids_keyboard sample this is not enough, since the NFC_OOB_PAIRING configuration explicitly requires the HAS_HW_NRF_NFCT configuration to be in place, and this in turn depends on whether or not NFC is enabled in the device tree. 

    The short term fix is to make sure the NFC peripheral is enabled in the device tree by adding the following to your overlay file:

    &nfct {
    	status="ok";
    };

    I have reported the issue to the developers, and in the future we should issue an update that would fix the underlying issue as described above. 

    Best regards
    Torbjørn

  • Hi Torbjørn, thanks very much for your quick reply. I'll add what you suggested to my overlay file and try it again.

    Thanks again.

    Duncan

  • Hi Duncan

    Sounds good. If you have any more questions or comments just let me know. 

    Best regards
    Torbjørn

Reply Children
No Data
Related