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 connect/disconnect is not happening on the thingy53.  It only happens on the nrf5340DK.
    I do not have special conf or overlay files for the dk. If the code helps, send me an email from my profile address and I will provide.

  • It seems like you have a central device within BLE range that keeps connecting and disconnecting with your nRF5340 DK, and it's probably filtering on the BLE address since you are not seeing these connection attempts being made when using the Thingy.

    The OUI in the public address of the Bluetooth central is registered to Intel, so I guess the connections are made from a nearby PC with an Intel BT/Wifi chipset. 

  • Impressed you were able to discern that from the information given.  The machine I am using has an intel bt chipset and this DK I have had paired as a mouse using peripheral_hids_mouse.  I tried the other DK board I have and it didn't exhibit the behavior either so that makes sense.

    The hids mouse does not exist in this project yet, I will be attempting to do that.  I'm surprised by the way in which it beats up the connection; if the service doesn't exist, you'd think it would back off at some point.  It looks like a denial of service it connects so many times. 

  • Trying to advertise the peripheral_hids_mouse via advertising_set_create


    [00:00:41.568,359] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    00> [00:00:41.575,408] <err> bt_adv: Failed to start advertiser
    00> Failed to create a connectable advertising set (err -12)

    devzone.nordicsemi.com/.../insufficient-resources-warning-when-connecting
    > The status states BT_HCI_ERR_INSUFFICIENT_RESOURCES, and from what I've found, the opcode 0x2039 stands for BT_HCI_OP_LE_SET_EXT_ADV_ENABLE

    I've up'd the CONFIG_BT_CTLR_ADV_SET and I think that is correct, any suggestions appreciated.

  • Thank you. 

    tldr said:
    The hids mouse does not exist in this project yet, I will be attempting to do that.  I'm surprised by the way in which it beats up the connection; if the service doesn't exist, you'd think it would back off at some point.  It looks like a denial of service it connects so many times. 

    I agree, it seems like it would make sense for the PC to back off after a few attempts. The link is probably terminated by the PC when the peripheral reports "pin or key missing" in response to the encryption request. Since it is HID over GATT, which is natively supported by most operating systems, the re-connections in the background will be handled by the OS and not through an app/program. However, it is possible to make the peripheral ignore connection requests from "unknown" devices by using the Bluetooth Filter Accept List feature

    tldr said:
    [00:00:41.568,359] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    00> [00:00:41.575,408] <err> bt_adv: Failed to start advertiser
    00> Failed to create a connectable advertising set (err -12)

    It may be that the controller does not have the resources to start advertiser at the time of the request. I'm not sure where in your code you are starting the advertiser here, but please try to offload this task to the system workqueue to see if that fixes the problem. 

    Here's an example where advertisment start task is offloaded to the workqueue: https://github.com/nrfconnect/sdk-nrf/blob/b3293095a1374d9fa4a7480fb5d145760155596e/samples/bluetooth/peripheral_hr_coded/src/main.c#L82 

Related