Log warning message: bt_hci_core: opcode 0x200a status 0x0d

I get the warning log message in the subject related to values of CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT and CONFIG_BT_MAX_CONN in an application that is acting as both a central and peripheral.  Questions:

  • Where can I find the definitions of the opcode and status shown in the warning log message?
  • This application will have 1 peripheral connection and 1 central connection.  Never the less, if CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=1, the warning message will appear.  Set to 2 and no warning is generated.  Why?

Thanks,

Ken

Parents
  • Hi Ken,

    Where can I find the definitions of the opcode and status shown in the warning log message?

    The OpCodes are defined in the Bluetooth Core Specification. As you are working on a Bluetooth Low Energy (LE) application, a large part of the relevant OpCodes will be defined in Vol 4, Part E, Section 7.4, LE Controller Command.

    Note that the most significant 6 bits of an OpCode is the OpCode Group Field. For a LE Controller Command, the value is 8 (0b00_1000).

    Another large part of the OpCodes in a nRF Connect SDK application is the Vendor Specific OpCodes. You can find a list of them in sdc_hci_vs.h under <SDK root>/nrfxlib/softdevice_controller/include.

    Under the same folder, you can find the Bluetooth Specification's standard OpCode listed as well. Thus, a different approach to finding the definition is to search the OpCode against all files in that folder.

    The status code is also defined in the Bluetooth Core Specification, Vol 1, Part F. It is also defined in code in <SDK root>/zephyr/include/zephyr/bluetooth/hci_types.h.

    This application will have 1 peripheral connection and 1 central connection.  Never the less, if CONFIG_BT_CTLR_SDC_PERIPHERAL_COUNT=1, the warning message will appear.  Set to 2 and no warning is generated.  Why?

    From the resource above, we can see that OpCode 0x200a is enabling advertising, and the error 0x0d is Limited/Insufficient Resource. One common scenario where this happens is that you enable a connectable advertisement, when the device is already in as many connections as it can.

    If you want to advertise while the device is already maintaining its maximum number of connections, it is possible. However, the advertisement has to be non-connectable.

    Hieu

  • Excellent detailed answer Hieu!  Thank you very much.  Have a great day,

    Ken

Reply Children
Related