How to create customized software to program boards via bluetooth on nRF Connect

Hi, I'd like to add that "BLE capabilities for nRF Connect" to my customized software in the dongle, is there an example code or template which I can add to my customized code such that it can do that? Because when I tried using the dfu sample codes that come with the SDK 17.1.0, I was stilled asked to program the device to something else.

Parents Reply Children
  • The build was generated by opening the central_smp_client_dfu folder. At the NRF for VS code page, I selected nRF connect 2.0.0 as suggested by the instruction. And I clicked pristine build under "ACTIONS".

    There is nothing at the output terminal, one warning that says "__ASSERT() statements are globally ENABLED". But a bin file is generated none the less as zephyr.bin. There is another one called isrList.bin which I didn't use.

  • By log output I meant the log in the programmer that gave you the error.

    But I don't think that will be necessary as I see you are building for the nRF52840 DK, while you will probably want to build for the nRF52840 dongle instead.


  • Hi Einarh,

    Thanks for your reply, I was building for the nRF52840 because I was trying to follow the instruction here: and I was using a development kid as per the example. I did end up being able to program the client part after a few tries.

    Unfortunately I was still having troubling recreating the server side. 

    "Build and program the sample \zephyr\samples\subsys\mgmt\mcumgr\smp_svr to nRF52840DK_server with the Kconfig fragment \smp_svr\overlay-bt.conf applied"

    I kept trying to install and use "west" but couldn't because of this error: File "C:\Python311\Lib\re\", line 841, in _parse
    raise source.error('global flags not at the start '
    re.error: global flags not at the start of the expression at position 9" 
    while installing the requirements described in this page (It's also described in this nordic page (
    pip install -r %HOMEPATH%\zephyrproject\zephyr\scripts\requirements.txt 
    This happened regardless of whether I was using a virtual environment.


  • Is there any reason you're trying to install this manually?

    I would recommend installing NCS through the Toolchain Manager in nRF Connect for Desktop.


  • Hi Einar,

    I've been trying to repeat the example you have suggested. I got stuck in trying to build the server side: (4) "Build and program the sample \zephyr\samples\subsys\mgmt\mcumgr\smp_svr to nRF52840DK_server with the Kconfig fragment \smp_svr\overlay-bt.conf applied"

    According to the readme file, I'm supposed to sign the sample image as such:
    west sign -t imgtool -- --key bootloader/mcuboot/root-rsa-2048.pem

    But I don't have root-rsa-2048.pem, so I tried downloading the source files and compile it following the instructions here:

    But I failed at the ninja command, with the following error:

    In file included from ←[01m←[KC:/ncs/v2.1.1/zephyr/include/zephyr/sys/kobject.h:36←[m←[K,
    from ←[01m←[KC:/ncs/v2.1.1/zephyr/include/zephyr/kernel_includes.h:41←[m←[K,
    from ←[01m←[KC:/ncs/v2.1.1/zephyr/include/zephyr/kernel.h:17←[m←[K,
    from ←[01m←[KC:/ncs/v2.1.1/zephyr/arch/arm/core/offsets/offsets_aarch32.c:28←[m←[K,
    from ←[01m←[KC:/ncs/v2.1.1/zephyr/arch/arm/core/offsets/offsets.c:9←[m←[K:
    ←[01m←[KC:/sdk-mcuboot/boot/zephyr/build/zephyr/include/generated/kobj-types-enum.h:50:1:←[m←[K ←[01;31m←[Kerror: ←[m←[Kredeclaration of enumerator '←[01m←[KK_OBJ_DRIVER_FLASH←[m←[K'
    50 | ←[01;31m←[KK_OBJ_DRIVER_FLASH←[m←[K,
    | ←[01;31m←[K^~~~~~~~~~~~~~~~~~←[m←[K
    ←[01m←[KC:/sdk-mcuboot/boot/zephyr/build/zephyr/include/generated/kobj-types-enum.h:34:1:←[m←[K ←[01;36m←[Knote: ←[m←[Kprevious definition of '←[01m←[KK_OBJ_DRIVER_FLASH←[m←[K' was here
    34 | ←[01;36m←[KK_OBJ_DRIVER_FLASH←[m←[K,
    | ←[01;36m←[K^~~~~~~~~~~~~~~~~~←[m←[K
    ninja: build stopped: subcommand failed.

    I had a lot of duplicated definitions, but they are all defined in generated files, so I can't just remove them.
    Do you know how I can solve this issue?