Bluetooth initialization fails - bt_hci_core driver open fails with error -11

We are starting to develop on a custom board running an NRF5340; when we try even something very simple like the iBeacon demo, we are unable to start bluetooth. Below are the output messages from the console:

*** Booting nRF Connect SDK v2.5.0 ***
Starting iBeacon Demo
[00:00:01.001,220] <err> bt_hci_driver: Endpoint binding failed with -11
[00:00:01.001,251] <err> bt_hci_core: HCI driver open failed (-11)
Bluetooth init failed (err -11)

I think the issue might be clock related - we dont have an external LFXO, only the high frequency Xtal on XC1 and XC2. The other code (SPI, GPIO) all seem to work.

Here is our prj.conf file if that helps:

#GPIO
CONFIG_GPIO=y
CONFIG_PINCTRL=y

#UART & SERIAL
CONFIG_SERIAL=y

#SYSTEM & CLOCK
CONFIG_SOC_HFXO_CAP_EXTERNAL=y
CONFIG_SOC_HFXO_CAP_INTERNAL=n
# CONFIG_SOC_ENABLE_LFXO=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

CONFIG_CPP=y
CONFIG_NEWLIB_LIBC=y
CONFIG_REQUIRES_FULL_LIBCPP=y
CONFIG_STD_CPP20=y

#i2C
CONFIG_I2C=y

#spi
CONFIG_SPI=y

#flash
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_FILE_SYSTEM=y
CONFIG_SOC_FLASH_NRF=y

#BLE
CONFIG_BT=y
CONFIG_BT_DEVICE_NAME="XYZZY"

I can include the entire Build folder if you would like.

I am programming through VSCode, and can confirm there is _something_ in the network core.

We are using SDK 2.5 if that helps somehow.

Thank you for your time and assistance!

Parents
  • Hi,

    The error indicates a problem communication with the network core. The _something_ you have in you network core - what exactly is it? Is it the hci_rpmsg which is normally built as a sub image for Bluetooth samples? If yes, have you modified it in any way, if so how? If not, then make sure you put the hci_rpmsg sample on the network core.

    Do you get this working on the DK (if you remove any parts that depends on resources on your custom board)? If yes, what is the difference in the board configuration of your custom board versus the DK? Other differences?

    I can include the entire Build folder if you would like.

    Yes, if you don't make progress, that could be useful (and also your project code and configs in case you have more than the prj.conf). 

  • he error indicates a problem communication with the network core. The _something_ you have in you network core - what exactly is it?

    That is an excellent question; how do I make sure my project puts the hci_rpmsg on the network core? I dont need to make any changes, the stock image would be perfectly fine.

Reply Children
  • The default behavior is that hci_rpmsg is included by default as a child image when you build a BLE application for the application core. You can then find this under your build folder, and when you flash from VS code it will also be flashed. So unless you have done anything to prevent it, that should be included (I can check for you if you share your project including the build folder).

    Alternatively, you can build the hci_rpmsg sample yourself for the network core, and program that separately.

  • Hello, and thank you for your reply. I have re-tested with the eddystone beacon demo, as a sanity check. I used both the dev board and our custom board, in both cases with the same project config file (I figured it would be best to have as few variables as possible). Everything works fine with the dev board, but we get the error with our custom board.

    The main difference between the two is related to the external resonators/crystals. The dev board has two crystals, whereas we only have the HF crystal, and rely instead on the NRF using its internal oscillator for the low frequency clock. Is it possible I have a config set wrong, such that we have the application core using the internal oscillator but not the network core?

    I dont think it matters, but we are using the even smaller BGA package (CLAA?) compared to the dev board.

    Please find attached the build folder from the eddystone demo, in case that helps you.

    8080.build.zip

Related