lookup meaning of bt_hci_core: opcode 0x2036 status 0x07

I have a project that I'm pulling in code from multiple_adv_sets using v2.7.0 and sysbuild.


Where can I find definition of bt_hci_core: opcode 0x200a status 0x09??? 

talks about the opcodes and status being in the spec?
https://www.bluetooth.com/specifications/specs/core-specification-5-3/

That spec is pretty large, it isn't clear to me where these are specified.  I did search for 2036.

Created adv: 0x200037d0
[00:00:00.084,136] <wrn> bt_hci_core: opcode 0x2036 status 0x07
Failed to create a connectable advertising set (err -5)

For additional background,
On startup from power off, the bt_hci_core output doesn't get all the way through, it is not always terminated at the same place.

[00:00:00.050,964] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.051,849] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
[00:00:00.052,734] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 214.51162 Build 1926957230
[00:00:00.054,779] <inf> b[00:00:08.118,682]

it then continues to run but its not clear from output what was and wasn't run after the bt_hci_core fails to initialize.

----

[00:00:00.055,908] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.056,793] <inf> bt_hci_core: HW Variant: nRF53x (0x0003)
[00:00:00.057,678] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 214.51162 Build 1926957230
[00:00:00.059,661] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:00.062,835] <inf> bt_hci_core: Identity: X:X:X:X:X:X (random)
[00:00:00.063,720] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x21fb, manufacturer 0x0059
[00:00:00.064,849] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x21fb

If I wake sense after the initial power on, all the normal bt_hci_core output lines show with the -5 return code and the opcode and status code.

The code that is returning the -5 is:

err = advertising_set_create(&ext_adv[CONNECTABLE_ADV_IDX], connectable_adv_param,
                     connectable_data, ARRAY_SIZE(connectable_data));
    if (err) {
        printk("Failed to create a connectable advertising set (err %d)\n", err);
    }

I have defined to support existing code.

CONFIG_BT_BROADCASTER=y
CONFIG_BT_OBSERVER=y

and I'm now trying to use multiple_adv_sets to provide the beacon and connectable service.
I've pulled all the settings from the prj.conf in multiple_adv_sets.  I'm using sysbuild and I have the ipc_radio prj.conf defined.
The original existing broadcast/observer code is working even though this bt_hci_core has crashed/failed to initialize.

CONFIG_BT_PERIPHERAL was assigned the value y, but got the value n. Missing dependencies:
BT_RPC_STACK || (BT_HCI && BT)


I've tried adding BT_RPC_STACK and defining BT_HCI

CONFIG_BT_HCI was assigned the value y, but got the value n. Missing dependencies:
<choice BT_STACK_SELECTION>

I've got more notes; I've spent some time on this.  Any help is greatly appreciated.
  • The hids_mouse also does the workqueue to decouple the advertising and I pulled that in.  I also attempted to wrap my other calls that were from adv_multi sample in a workqueue and did not see a difference.

    Let me know if you have any other ideas.  I will keep shuffling code...
    -----
    Everything looks to be working now from nrf connect.  Any ideas on why I would not be seeing the device on my windows PC since changing it to bt_le_ext_adv_start?
    ----
    Nordic_HIDS_mouse shows up and it connects and shortly after it tells me driver error.  I will keep trying...if you know of a way to debug the interaction between the mouse and the windows pc. lmk
    ---
    Working!  Had to get the Kconfig correct; you can't do windows mouse without 
    BT_HIDS_SECURITY_ENABLED

    I had troubles with 
    BT_DIRECTED_ADVERTISING

    I disabled that; with it I could not see the device.  Regardless, thank you for your help Vidar.


  • I marked the ticket as closed.  But;

    [00:00:05.356,994] <wrn> bt_hci_core: opcode 0x2036 status 0x07
    Failed to create a connectable advertising set hids_mouse (err -5)

    I still get 

        SDC_HCI_OPCODE_CMD_LE_SET_EXT_ADV_PARAMS = 0x2036,

    0x07 Memory Capacity Exceeded

    after multiple connection attempts.  Aside from putting things in a work queue or upping the CONFIG_BT_CTLR_ADV_SET any other suggestions?

    It pairs fine and works on first pair.  It's hard to understand why the mouse is disconnecting and reconnecting.
  • I find that I have to do recover to get the board flashed, I just do it every time.

    I'm wondering if this affects the bond/pairing information.
    -- runners.nrfjprog: Recovering and erasing flash memory for both the network and application cores.
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.
    Writing image to disable ap protect.
    Recovering device. This operation might take 30s.
    Erasing user code and UICR flash areas.

    I set the CONFIG_BT_CTLR_ADV_SET to 6 and haven't seen 0x2036 since.

  • I'm glad to hear that it works now after you increased the number of adv. sets. Thanks for the updates. Regarding the recover command, this should ideally be a one time operation. It disables the APPROTECT mechanism on the chip (i.e., readback protection). However, certain actions can cause it to become enabled again. For instance, if you erase the firmware on the netcore or appcore followed by a reset, as the firmware (in the startup files) is responsible for performing the software unlocking of the protection on boot. A crash very early in the boot process can also lead to the same symptoms.

    It may also be worth adding that a --recover or --chiperase command will erase the whole chip, including any bonding information that may be stored in the settings partition. In that case, you will need to delete the bond on the PC and repeat the pairing procedure.

    https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/nrf/security/ap_protect.html 

Related