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.

 

Parents
  • Hello,

    You will find some useful information about this in the Bluetooth Low Energy fundamentals course on DevAcademy.

    Let us know if the course is not sufficient for you to progress with this issue.

    Best regards,

    Maria

  • No, I don't see a fundamentals course covering this topic.  I don't see anything better than lesson 3/5 and that's not going to over this error.

    This feels like a punt.  Yes, the computer is turned on.  If there's something relevant there, please specify.

  • I was thinking about Lesson 2 (on advertising) to refresh you on the different types. From the last sentence in your ticket the course tip seemed appropriate:

    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.

    I will adress the contents of your ticket in more detail this week.

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

    My initial hypothesis is that the bonding procedure causes the PC to store the bonding information which causes issues if the nRF5340 tries to initiate a new bonding when the PC recognizes the device as already bonded. Are you able to successfully bond a second time if you "forget" the device before restarting the bonding procedure?

Reply
  • I was thinking about Lesson 2 (on advertising) to refresh you on the different types. From the last sentence in your ticket the course tip seemed appropriate:

    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.

    I will adress the contents of your ticket in more detail this week.

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

    My initial hypothesis is that the bonding procedure causes the PC to store the bonding information which causes issues if the nRF5340 tries to initiate a new bonding when the PC recognizes the device as already bonded. Are you able to successfully bond a second time if you "forget" the device before restarting the bonding procedure?

Children
No Data
Related