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
  • Hi Einar,

    I've that quote from this post:  Example for Performing OTA DFU from NRF52840 Dongle to NRF52 peripheral ?

    What I'd like to do is to use the dongle to transfer data via Bluetooth from my peripheral device to the computer (meaning I have my customized software on the dongle) while also using it to upgrade my firmware on the peripheral device when it needs upgrading. Because currently if I need to use the dongle to upgrade the firmware on the peripheral device, I need to reprogram the dongle with a special firmware from Nordic, and then put my own firmware back in afterwards. I would like to use just one firmware to do both. If that's possible.

    Thanks,

  • Hi

    It seems to me that Hung already provided an answer on how to approach your problem in the post you linked.

    Is there anything specific in his reply that was unclear?

    -Einar

  • 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.

Related