
This blog is to describe how to use the nRF52840 dongle (PCA10059) as the development board.
The nRF52840 Dongle is a small, low-cost USB dongle that supports Bluetooth 5, Bluetooth mesh, Thread, ZigBee, 802.15.4, ANT and 2.4 GHz proprietary protocols. The Dongle is the perfect target hardware for use with nRF Connect for Desktop as it is low-cost but still support all the short range wireless standards used with Nordic devices. The dongle has been designed to be used as a wireless HW device together with nRF Connect for Desktop. For other use cases please do note that there is no debug support on the Dongle, only support for programming the device and communicating through USB.
It is supported by most of the nRF Connect for Desktop apps and will automatically be programmed if needed. In addition custom applications can be compiled and downloaded to the Dongle. It has a user programmable RGB LED, a green LED, a user programmable button as well as 15 GPIO accessible from castellated solder points along the edge. Example applications are available in the nRF5 SDK under the board name PCA10059.

The nRF52840 Dongle is supported by nRF Connect for Desktop as well as programming through nRFUtil.
The box includes an nRF52840 Dongle.
https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle
The user guidline of NRF52840 dongle is located at http://infocenter.nordicsemi.com/pdf/nRF52840_Dongle_User_Guide_v1.1.pdf
Programming
The nRF52840 Dongle can be programmed through the built-in USB bootloader. Before you start, check Getting started. To program the Dongle, it must be in bootloader mode.
When you first get the Dongle, it may only be pre-programmed on the USB bootloader and application firmware without softdevice. If you run the BLE application, I recommend to program the hex file (ble_app_bllinky_pca10059_s140.hex) which includes the application together with softdevice at the first time.
The Dongle can be made to enter bootloader mode in one of the two ways:
- Trigger the nRF52840 USB DFU endpoint. The firmware to support this is embedded in all nRF Connect for Desktop apps for the nRF52840 Dongle. If you add the DFU Trigger Library (USB) to your custom device firmware, you will be able to trigger the DFU from nRF Connect for Desktop without using any buttons. For documentation, see DFU Trigger Library (USB), which is part of the nRF5 SDK v15.3.0.
- For Dongles with applications missing the USB DFU endpoint: Press the RESET button.
When the nRF52840 Dongle has entered the bootloader mode, LD2 pulses red. The Dongle is now ready for programming.
All the nRF Connect for Desktop apps require specific firmware to be present on the nRF52840 Dongle to function correctly. The apps will update the firmware if needed. If you want to upload a custom firmware to the Dongle, you can do this by using the dedicated Programmer programming app, or nrfutil.
Open the nRF Connect Desktop

Select the corresponding COM port device

Load the HEX file (default HEX inside the SDK 15.3)


Click the Write ICON to do the USB DFU

Softdevice Version
The following table lists the FWIDs which are used to identify the SoftDevice versions both included in the package and installed on the target device to perform the required SoftDevice version check:
https://github.com/NordicSemiconductor/pc-nrfutil
SoftDevice | FWID (sd-req) |
---|---|
s112_nrf52_6.0.0 | 0xA7 |
s112_nrf52_6.1.0 | 0xB0 |
s112_nrf52_6.1.1 | 0xB8 |
s112_nrf52_7.0.0 | 0xC4 |
s113_nrf52_7.0.0 | 0xC3 |
s130_nrf51_1.0.0 | 0x67 |
s130_nrf51_2.0.0 | 0x80 |
s132_nrf52_2.0.0 | 0x81 |
s130_nrf51_2.0.1 | 0x87 |
s132_nrf52_2.0.1 | 0x88 |
s212_nrf52_2.0.1 | 0x8D |
s332_nrf52_2.0.1 | 0x8E |
s132_nrf52_3.0.0 | 0x8C |
s132_nrf52_3.1.0 | 0x91 |
s132_nrf52_4.0.0 | 0x95 |
s132_nrf52_4.0.2 | 0x98 |
s132_nrf52_4.0.3 | 0x99 |
s132_nrf52_4.0.4 | 0x9E |
s132_nrf52_4.0.5 | 0x9F |
s212_nrf52_4.0.5 | 0x93 |
s332_nrf52_4.0.5 | 0x94 |
s132_nrf52_5.0.0 | 0x9D |
s212_nrf52_5.0.0 | 0x9C |
s332_nrf52_5.0.0 | 0x9B |
s132_nrf52_5.1.0 | 0xA5 |
s132_nrf52_6.0.0 | 0xA8 |
s132_nrf52_6.1.0 | 0xAF |
s132_nrf52_6.1.1 | 0xB7 |
s132_nrf52_7.0.0 | 0xC2 |
s140_nrf52_6.0.0 | 0xA9 |
s140_nrf52_6.1.0 | 0xAE |
s140_nrf52_6.1.1 | 0xB6 |
s140_nrf52_7.0.0 | 0xC1 |
s212_nrf52_6.1.1 | 0xBC |
s332_nrf52_6.1.1 | 0xBA |
s340_nrf52_6.1.1 | 0xB9 |
Examples for NRF52840 Dongle
The following apps are available for the pca10059 dongle in sdk 15.x :
- examples/peripheral/cli,
- examples/peripheral/blinky,
- examples/dfu/open_bootloader,
- examples/connectivity/ble_connectivity,
- examples/ble_peripheral/ble_app_hrs,
- examples/ble_peripheral/ble_app_blinky.
There is also more documentation available here on our Infocenter.
Use the nRF52840 Dongle with nRF Connect Desktop
The nRF52840 dongle can be used to play as the Central / Peripheral on the NRF Connect Desktop (Bluetooth Low Energy).
It can scan for all the peripheral devices or creates as the advertiser. It means that nRF52840 dongle can do the exactly same feature as other nRF52 DK board.
How to run the Bluetooth Low Energy inside the nRF Connect Desktop with nRF52840 dongel
Step 1:
By pressing the button on the nRF52840 dongle to entry the DFU mode and then open the Bluetooth Low Energy inside the nRF Connect Desktop,
Step 2:
Select the target device at the left top corner of NRF Connect (Bluetooth Low Energy). And upgrade the latest bootloader (if have) and upgrade the firmware inside the nRF52840 dongle.
Step 3:
You would see the nRF52840 dongle (USB: Nordic Semiconductor nRF52 Connectivity) as below.


Command Line Interface with BLE on NRF52840 dongle plus debugging log through USB interface.
I did the example on the ble_app_blinky for the PCA10059 as below block diagram. I added the virtual two COM port through USB interface.

In order to get the log through USB, I add the compile option (NRF_LOG_BACKEND_USB_ENABLED) inside the sdk_config.h.
// <e> NRF_LOG_BACKEND_USB_ENABLED - nrf_log_backend_usb - Log USB backend
//==========================================================
#ifndef NRF_LOG_BACKEND_USB_ENABLED
#define NRF_LOG_BACKEND_USB_ENABLED 1
#endif
#if CLI_OVER_USB_CDC_ACM
NRF_CLI_CDC_ACM_DEF(m_cli_cdc_acm_transport);
NRF_CLI_DEF(m_cli_cdc_acm,
"usb_cli:~$ ",
&m_cli_cdc_acm_transport.transport,
'\r',
CLI_EXAMPLE_LOG_QUEUE_SIZE);
#endif //CLI_OVER_USB_CDC_ACM
static void cli_init(void)
{
ret_code_t ret;
#if CLI_OVER_USB_CDC_ACM
ret = nrf_cli_init(&m_cli_cdc_acm, NULL, true, true, NRF_LOG_SEVERITY_INFO);
APP_ERROR_CHECK(ret);
#endif
By open two terminals, one is for the command line interface., the another is for the debug log (print out).

How to run this demo
You can program the demo hex ( https://github.com/jimmywong2003/nrf52840-dongle-example/blob/master/test_hex/combine.hex ) through the nRF Progrmmer.
All the source codes are placed at https://github.com/jimmywong2003/nrf52840-dongle-example/ .
how to program the dongle to be as a beacon
LikeLike
You can use ble_app_beacon as baseline and port on the ble_app_blinky which I post on my github.
The idea is to use the non-connectable advertising payload instead of undirected connectable.
LikeLike
If you have two dongles. you can use one as a debugger for the other. Instructions at https://github.com/markrages/blackmagic/tree/nRF52840/src/platforms/nRF52840
LikeLike
Hi Jimmy, what serial settings did you use to connect? I’ve flashed “combined.hex” to my nrf52840 dongle and
with settings { 115200 baud, 1 Stop bit, no parity, no flow control } Termite didn’t show any data from either COM port. Thanks!
LikeLike
Hi Jimmy, thanks for this project. It looks great, but need some help. After flashing combined.hex to my nrf52840 dongle, the two COM ports show in Device Manager. I tried then to connect to either in Termite with these serial settings: { 115200 baud, 8 data bits, 1 stop bit, no parity, no flow control }. I don’t see any data printing. What serial settings did you use? Thanks!
LikeLike
hi,
You can find such source code at my github.
https://github.com/jimmywong2003/nrf52840-dongle-example/blob/master/ble_app_blinky_cli_usb_log/pca10059/s140/config/sdk_config.h
the default is 115200.
LikeLike