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
  • I tried following the instructions, I was not able to successfully build or even open the codes in Visual Studio 2022 without errors. Is there a version that works with Keil? I tried using the ble connectivity code, I got this message from the log: "Received status with code 0 PKT_SEND_MAX_RETRIES_REACHED, message: 'No response from device. Tried to send packet 6 times.'" and when I pressed the reset button, I would be able to connect, but still be asked to reprogram the dongle firmware, which example can I use as a reference to build my code on such that I won't need to reprogram the dongle? I basically just want the source code of the file that gets downloaded to the dongle after the prompt "Device must be programmed, do you want to proceed?"

  • Hi

    karenl said:
    I was not able to successfully build or even open the codes in Visual Studio 2022 without errors

    You would have to share these errors for me to be able to help with that.

    karenl said:
    Is there a version that works with Keil?

    Keil is not supported.

    karenl said:
    I tried using the ble connectivity code

    I would need more details on how you tried to use it to understand the context here.

    karenl said:
    asked to reprogram the dongle firmware

    I assume it is nRF Connect for Desktop you are using that is asking you to reprogram the dongle?

    The whole point is that if you want to not reprogram your dongle you will have to write your own program that does the same things that nRF Connect for Desktop does in addition to anything else you want your program to do.

    karenl said:
    I basically just want the source code of the file that gets downloaded to the dongle after the prompt "Device must be programmed, do you want to proceed?"

    Then you should look at Hung's answer in the thread you linked.

  • Severity Code Description Project File Line Suppression State
    Error CMake Error at C:/vcpkg/scripts/buildsystems/vcpkg.cmake:838 (_find_package):
    Could not find a configuration file for package "spdlog" that is compatible
    with requested version "".

    The following configuration files were considered but not accepted:

    C:/vcpkg/packages/spdlog_x86-windows/share/spdlog/spdlogConfig.cmake, version: 1.11.0 (32bit) C:/vcpkg/scripts/buildsystems/vcpkg.cmake 838

    This is the error that I'm getting just by opening the folder pc-ble-driver. I didn't show it last time because I thought it's a dependency problem I'll have to solve.

    The ble connectivity firmware that I used, I compiled it from this folder from the SDK I downloaded: nRF5_SDK_17.1.0_ddde560\examples\connectivity\ble_connectivity\pca10056\ser_s140_usb_hci . According to Hung's answer, the connectivity firmware is very close to the firmware that's used to reprogram the dongle, with just some extra patches, what are those extra patches? If I do use the Visual studio to compile the code, which project do i use, there are at least 4 main.c files.

    Thanks for your help.

  • karenl said:
    This is the error that I'm getting just by opening the folder pc-ble-driver.

    What do you mean by "opening the folder"? You mean adding it as a project to VS Code? 

    karenl said:
    the SDK I downloaded: nRF5_SDK_17.1.0

    Are you aware that nRF5 SDK is our old SDK, and we have a new one; nRF Connect SDK (NCS)?

    Do you have any good reasons to use the old one?

  • What do you mean by "opening the folder"? You mean adding it as a project to VS Code? 

    No, I mean just choosing the open folder option, it's the same error I get from the step: 

    $ cmake -G Ninja ..

    in https://github.com/NordicSemiconductor/pc-ble-driver.

    Are you aware that nRF5 SDK is our old SDK, and we have a new one; nRF Connect SDK (NCS)?
    No, I am not aware of it. Will try it now.
Related