opcode 0x2027 status 0x12 - "Failed to add IRK to controller"

I am receiving the following errors:

[00:00:00.117,187] <wrn> bt_hci_core: opcode 0x2027 status 0x12
[00:00:00.118,133] <err> bt_id: Failed to add IRK to controller
Which is:

    {0x2027, "LE Add Device To Resolving List"},
    {0x12, "Invalid HCI Command Parameters", "At least one of the HCI command parameters is invalid."},

I did try to do some research:

https://github.com/zephyrproject-rtos/zephyr/issues/45827 - points at the spec and ends with not an issue.

 "Failed to add IRK to controller" Error during startup on nrf_connect app - ends with problem be resolved via reflash.
Start advertisement hci error - ends with a request for what board.

I am also receiving the following 
[00:00:02.156,341] <wrn> bt_gatt: Link is not encrypted
[00:00:02.157,165] <wrn> bt_gatt: Link is not encrypted

which has:
RE: 1st connection is bonded authenticated encrypted link, but 2nd connection becomes not bonded unencrypted link 

I am having great success on first pair/bond.  Subsequent connections do not do as well.  I have done full recovery.

I am using ncs v2.7.0 on a nRF5340DK and thingy53 - pairing to a windows 11.

The code is the combination of multiple_adv_sets and peripheral_hids_mouse samples.

settings I feel you might consider when this issue occurs:

CONFIG_BT_SMP=y
CONFIG_BT_SMP_ALLOW_UNAUTH_OVERWRITE=y
CONFIG_BT_HIDS_SECURITY_ENABLED=y
CONFIG_BT_DIRECTED_ADVERTISING=n

I did not enable directed advertising; not sure what this is or if I want it but I remember having an issue turning it on.

 

Related