The code written in the webinar for "developing Bluetooth Low Energy products using the nRF Connect SDK" does not work on my nRF5340DK

I first compiled and uploaded the code to my nrf5340dk_nrf5340_cpuapp card. I can't see it broadcasting from my Android device. Output on terminal screen:
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.428,436] <inf> app: Hello World nrf5340dk_nrf5340_cpuapp

[00:00:00.428,588] <inf> remote: Initializing bluetooth...
[00:00:00.440,704] <err> remote: Couldn't start advertising (err = -11)
[00:00:00.440,734] <err> app: bt_enable returned -11
[00:00:00.440,765] <inf> app: Running...

When I select and install the code nrf5340dk_nrf5340_cpunet, it appears on my Android device, but data is not exchanged. Text in terminal:
*** Booting Zephyr OS build v3.2.99-ncs1 ***
[00:00:00.254,241] <inf> app: Hello World! nrf5340dk_nrf5340_cpuapp

[00:00:00.254,394] <inf> remote: Initializing bluetooth...
[00:00:01.255.401] <err> bt_hci_driver: Endpoint binding failed with -11
[00:00:01.255,432] <err> bt_hci_core: HCI driver open failed (-11)
[00:00:01.255,462] <err> remote: bt_enable returned -11
[00:00:01.255,462] <err> app: bt_enable returned -11
[00:00:01.255,493] <err> app: Running...

What should I do about this problem I am experiencing?

  • Hi,

    Based on your log, you are using nRF Connect SDK v2.2.0. The project in the webinar was developed in v1.7.1, so the failure to enable Bluetooth can be due to the project being incompatible with the version of nRF Connect SDK that you are using. I would recommend using the latest tagged release of the SDK, which in this case is v2.2.0, but in your case, I would recommend downloading v1.7.1 and building the project there to verify that it works with your board. After this, you can look into migrating the project to v2.2.0.

    What version is your nRF5340 DK? There should be a sticker on the board, and the version number should be on the line directly under PCA10095.

    Best regards,

    Marte

  • Even though I converted the nRF Connect SDK version to v1.7.1, the result did not change. I compiled the code and uploaded it to my nrf5340dk_nrf5340_cpuapp card. I can't see it broadcasting from my Android device. Output on terminal screen:
    **Bootloding Zephyr OS build v2.6.99-ncs1-1 ***
    [00:00:00.433,532] <inf> app: Hello World! nrf5340dk_nrf5340_cpuapp

    [00:00:00.433,532] <inf> remote: Initializing bluetooth...
    [00:00:00.440,185] <err> remote: Couldn't start advertising (err = -11)
    [00:00:00.440,216] <err> app: bt_enable returned -11
    [00:00:00.440,216] <inf> app: Running...

    When I select and install the code nrf5340dk_nrf5340_cpunet, it shows up on my Android device, but no data is exchanged. Text in terminal:
    *** Booting Zephyr OS build v2.6.99-ncs1-1 ***
    [00:00:00.254,913] <inf> app: Hello World! nrf5340dk_nrf5340_cpuapp

    [00:00:00.255,035] <inf> remote: Initializing bluetooth...


    Version of my nRF5340 DK: 0.11.0

  • Hi,

    How are you programming the DK? Are you using command line or VS Code. Do you program the cores separately, and if so, which core do you program first?

    Best regards,
    Marte

  • Hello Marte,

    I am programming the DK with VS Code, just like I learned in the tutorial video. I program the kernels individually: First I program by selecting nrf5340dk_nrf5340_cpuapp in VS Code, test, then I program and test by selecting nrf5340dk_nrf5340_cpunet.

    Kind regards,
    Cemal

  • Hi Cemal,

    If you program the cores separately, you must first program the network core. Please try this and see if the issue persists.

    Best regards,
    Marte

Related