Flashing example .hex file to NRF52840 dongle (PCA10059) to achieve UART over BLE

Hi,

I would like to use the NRF52840 dongle (PCA10059) to transfer UART over BLE.

It seems there are some examples available that look promising, but after a day of struggling to find a .hex file or to compile a .hex file myself I'm reaching out to you.

At first I followed the instructions here: https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-VS-Code/Tutorials#infotabs however it seems that flashing via VScode is not enabled for the NRF52840 dongle.

Then I started searching for pre-compiled examples and found instructions here: https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgetting_started_precompiled.html&cp=8_5_4_1_0

I downloaded nRF5_SDK_17.1.0_ddde560.zip and it does include some examples that might have the functionality I'm looking for.

I would like to flash this example to NRF52840 dongle (PCA10059) nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\hex\ but there seems no pre-compiled .hex file for this hardware.

I tried to flash ble_app_uart_pca10056_s140.hex using the programmer in the nRFconnect app, and while it seems to have transferred to the NRF52840 dongle.

I'm able to find the NRF52840 dongle using the nRFconnect app (on android).

And I'm able to send a value on the RX Characteristic.

However the NRF52840 dongle is not showing up as COM port under my PC.

I also tried adding the dongle to my PC by searching / adding a new Bluetooth device, but there the dongle does not show up as a device that I can add.

Probably this would not help, but I also enabled a COM port on my PC that should show incoming Bluetooth data.

So after this I gave up... and I hope you can help me further.

Many thanks,

Kind regards,


Coen

Parents
  • Hi Coen,

    Two different SDKs

    I will start by addressing a common misunderstanding, which I suspect is present here.

    We have two different Software Development Kits (SDKs):

    1. The nRF5 SDK (old)
    2. The nRF Connect SDK (New, recommended for new projects)

    This is explained in more depth in our nRF Connect SDK and nRF5 SDK statement.

    For your case specifically, VS Code is for the nRF Connect SDK, while the infocenter sample you have linked to are for the nRF5 SDK.

    Since you are starting a new project here, I strongly recommend using the nRF Connect SDK.

    For a step-by-step guide on how to set up + basics for the nRF Connect SDK, see https://academy.nordicsemi.com/.

    Samples for the nRF Connect SDK can be found in our nRF Connect SDK docs:

    nRF52840 Dongle vs nRF52840 Development Kit (DK)

    While the nRF52840 Dongle you use are fine for doing testing for the nRF52840, the nRF52840DK is arguably better.

    The main difference between the Dongle and the DK is that the DK has an onboard Debugger chip, making it easier to program.

    As you have already discovered, you can not just program the Dongle using VS Code.
    This is because VS Code uses "west flash", which invokes nrfjprog to program the nRF52840.
    nrfjprog uses a debugger to directly flash the nRF52840.

    The Dongle on the other hand, must have a bootloader running as part of its firmware, to be able to load applications.
    To load a new application onto the Dongle, you must write to it using UART requires nrfutil. But worry not, the nRF Connect for Desktop Programmer app should work for this as well.

    If you want some more in-depth on Dongle programming, here is a guide on how to manual nRF52840 Dongle Programming Tutorial.

    Summary

    • I recommend that you stick to the nRF Connect SDK, get started by using https://academy.nordicsemi.com/.
    • Using the Dongle should be fine, but the nRF52840DK will make your life easier.
    • Try to use the Bluetooth: Peripheral UART sample, and see if you can program the Dongle in that case?

    If you  have any questions to this, let me know!

    Regards,
    Sigurd Hellesvik

  • Dear Sigurd,

    Due to vacation it took some time to get back to you, but thank you for providing such a detailed reply. It looks like the desired functionality is not available in the sample code that I could flash to the dongle. This would mean that I would need to alter the code and have to use the DK instead of dongle as that would allow debugging and flashing.

    For now I have found a quick alternative solution by using a CSR BC417143 based board. It is intended for serial communication and preloaded with serial port profile (SPP) firmware. This is not the most configurable solution, but it does the job for now.

    When I find some free time in-between project work I will keep on playing with the Nordic boards. It will take a bit more time, but on the long term this enables to build more complex projects.

    Once again thanks for the reply,

    Many thanks,

    Regards,

    Coen

Reply
  • Dear Sigurd,

    Due to vacation it took some time to get back to you, but thank you for providing such a detailed reply. It looks like the desired functionality is not available in the sample code that I could flash to the dongle. This would mean that I would need to alter the code and have to use the DK instead of dongle as that would allow debugging and flashing.

    For now I have found a quick alternative solution by using a CSR BC417143 based board. It is intended for serial communication and preloaded with serial port profile (SPP) firmware. This is not the most configurable solution, but it does the job for now.

    When I find some free time in-between project work I will keep on playing with the Nordic boards. It will take a bit more time, but on the long term this enables to build more complex projects.

    Once again thanks for the reply,

    Many thanks,

    Regards,

    Coen

Children
No Data
Related