NRF5340 Bluetooth Init Failed in Sample Apps: EINVAL -22

Using nrf5340 DK with v2.7.0 SDK + toolchain. Blinky app works fine.

Tried the sample apps:

- peripheral_hr

- peripheral_ht

Which both reproduced the exact same error. 

Process: Built a configuration for the sample app for nrf5340dk_nrf5340_cpuapp target and flashed to application core. All of this was done using nrf connect with VSCODE. Saw the error on COM6 (attached).

Attempted afterwards to flash the MCU core as well (nrf5340dk_nrf5340_cpunet) with no improvements. I am using the default configurations in prj.conf, which I assumed would function out-of-the-box. 

From what I can tell, the HCI driver is found, but there is an issue in bringing up the bluetooth subsystem settings.

Would appreciate any debugging help on this. 

D.D.

Parents
  • Hi,

    I have attempted to reproduce this without success. Both the peripheral_hr and peripheral_ht runs well when I build for the app core, and the net core image is automatically added as well. This happens both when using sys-build and the older child/parent approahc. I notice you write nrf5340dk_nrf5340_cpuapp, but with SDK nRF Connect SDK 2.7.0 and higher you should use nrf5340dk/nrf5340/cpuapp (hardware model v2).

    If you still cannot make it work, can you upload the full build log so that I see more of what you have done? Also, can you verify that you are using both the 2.7.0 SDK and 2.7.0 toolchain and that you have not made any changes to the SDK code?

  • Hi, Thanks so much for the prompt response.

    I've reinstalled the toolchain and SDK from scratch after a PC of my computer. I repeated the process above using peripheral_ht, and I've taken a quick 3 min video to demonstrate the error I am seeing. In the video, I build, flash and then reset the board so you can see the output on serial port. Build output is fully in view. I have also attached a picture of the physical DK connected to my USB port, in case there are any jumpers/connections missing that you think may impact this test.

    In short summary, the ERR-22 shows up after building peripheral_ht for nrf5340dk/nrf5340/cpuapp on v2.7.0 SDK.

    Video:
    https://www.loom.com/share/26cd4fddc6794c1a952de616b4088835?sid=c2911f04-009c-4cdd-818e-bad1a4866d00

Reply Children
  • Hi,

    I see from the video that you don't get the netcore generated at all, so the error you are getting is expeted given that. However, the net core image should have automatically been added. Moreover,  I see the same on my end now. I need to look a bit more into this to understand why I did not reproduce it before on my Linux system and why this happens, as it is not the intentional behaviour (parent-chilld s

    One solution for now is to specificaylly build with --no-sysbuild (parent-child) which works on my end. (Another could be to add build and program the hci_ipc image for the net core separately).

    Edit: It turns out that on my failing system sysbuild was set as default with west, perhaps that could be the case on youras as well. To change it, open a nRF Connet terminal within VS Code, and type the following command:

    west config --local build.sysbuild False

Related