nRF Connect + nRF52840 USB Dongle

The nRF52840 USB Dongle Tutorial (Part 1)

When it comes to Bluetooth Low Energy modules, chipsets and development kits, prices are only getting lower. Take for example the new nRF52840 USB dongle. The dongle costs only $10 and can serve as a great development kit with a few I/O peripherals including one button, two LEDs (one green, one RGB), and 15 GPIO pins.

The nRF52840 dongle is a compact USB dongle that’s based on the nRF52840 chipset from Nordic Semiconductor. The dongle can be used in two main use cases:

  • As a dongle that enables nRF Connect PC applications such as the Bluetooth Low Energy application (central and peripheral emulator), the nRF Cloud Gateway application, and the RSSI Viewer application.
  • As a development kit that can run your own custom applications or the sample applications provided with the nRF52 SDK. These include Bluetooth Low Energy, Bluetooth mesh, Thread, ZigBee, 802.15.4, ANT and 2.4GHz proprietary applications.

Keep in mind that the dongle does not have debug capabilities, but rather only supports programming or communicating via the USB port. Also, as of the time of this tutorial, the nRF Sniffer application does not support the nRF52840 dongle, but this is inevitable to change. When this feature becomes available, this low-cost dongle will serve as a great sniffer especially for capturing Bluetooth 5 BLE traffic including long-range mode (Coded PHY), high-speed mode (2M PHY), and extended advertisements packets.

In today’s blog post, we will cover how to use the dongle for running the Bluetooth Low Energy nRF Connect application as a central or a peripheral. In an upcoming post, we will go over how to use the dongle to run your own custom BLE application.

More info on the dongle can be found at the Nordic InfoCentral documentation website here: nRF52840 USB dongle.

If you’re interested in buying it, check out this page.

Follow-up posts:

nRF Connect Bluetooth Low Energy application

The nRF Connect application on the desktop supports a few applications (with more being added continuously). It started out as a simple application but is now becoming the single hub for all desktop-based nRF applications. As of the writing of this tutorial, the applications included in the desktop nRF Connect app are:

  • Bluetooth Low Energy application
  • nRF Cloud Gateway application (experimental)
  • Power Profiler
  • Programmer (experimental)
  • RSSI Viewer

Today we will be focusing on using the Bluetooth Low Energy application.

The different applications that support the dongle will automatically prompt you to update the dongle with the appropriate firmware that allows the application to interface with the dongle.

The Bluetooth Low Energy supports two modes of operation:

  • As a BLE central device that can discover advertising devices (broadcasters and peripherals).
  • As a BLE peripheral that advertises, allows connections, and exposes a GATT server. The GATT can be customized with SIG-adopted services and characteristics or your own custom services and characteristics.

Installing the nRF Connect and Bluetooth Low Energy Applications

To get started, follow these steps:

  • Make sure you have the nRF52840 USB dongle connected to your computer
  • Install the nRF Connect desktop application from this link.
    The application is available for Linux, macOS, and Windows.
  • Once you have the application installed, launch the application. you will be presented with the following screen:

    Main nRF Connect Window

    Figure 1: Main nRF Connect window

  • Navigate to the Add/remove apps tab

    Add/Remove apps

    Figure 2: nRF Connect Add/Remove apps

  • Make sure that the Bluetooth Low Energy application is installed. If not, click the Install button.
  • Make sure the application is up-to-date. Navigate to the Settings tab then click Check for updates now.

    nRF Connect Check for Updates

    Figure 3: nRF Connect Check for Updates

  • Navigate back to the Add/remove apps tab. If there’s an update available, click Update.
  • Navigate back to the Launch app tab, and launch the Bluetooth Low Energy application.

    nRF Connect Launch Bluetooth Low Energy app

    Figure 4: Launch nRF Connect BLE app

  • If this is the first time you’re using this application, or if you’ve used the dongle with another app or programmed it with your own application, you will have to update the dongle with the appropriate firmware that enables it to run the Bluetooth Low Energy application. To do this, select the device from the Select serial port drop-down menu and you will be prompted to update the firmware on the device:

    nRF Connect select device from serial port

    Figure 5: nRF Connect select device from the serial port

  • Once it’s programmed correctly, you will see the following screen:

    Connected to USB Dongle

    Figure 6: Connected to USB Dongle

Now you’re ready to run interface with the dongle and use it as either a BLE central or as a BLE peripheral.

BLE Central Mode

Whether you’re testing a new feature of your BLE device or want to interact with an existing one, using an application that acts as a BLE central (aka central emulator apps) can help a lot.

It saves you from spending hours programming a custom application to perform your own testing. This is especially useful during the early phases of a project when the mobile companion app is not ready yet and may require a lot of effort to get it working.

There are two main aspects of acting as a central device:

  • Discovering advertising devices in the surrounding area.
  • Connecting to an advertising device (that allows connections). Usually, following a connection, the central will also interact with the peripheral’s GATT server (and vice versa) via reads, writes, notifications, and indications on characteristics.

Let’s cover each of these aspects and how to accomplish them using nRF Connect’s Bluetooth Low Energy application.

Scanning for BLE peripherals

To perform a scan for advertising BLE devices:

  • Start by clicking the Start scan button.

    nRF Connect Start Scan

    Figure 7: nRF Connect Start Scan

  • I find it helpful to sort the list of scanned devices by RSSI.
    You could do this by clicking Options then Sort by signal strength.

    nRF Connect Sort by RSSI value

    Figure 8: Sort by RSSI value

  • To see more details about the advertising device, click the Details button. This will display the advertising data and any fields it contains.

    nRF Connect Advertising details

    Figure 9: Advertising details

Connecting to BLE peripherals

After scanning for devices, you can connect to a device by clicking the Connect button next to a device in the scan results.
Once you’re connected to a peripheral, you can browse and navigate the different services and characteristics exposed by the GATT server on the device.

nRF Connect’s Bluetooth Low Energy app allows you to connect to multiple peripherals at the same time, and they will all be displayed in the same window:

Connected to multiple peripherals

Figure 10: Connected to multiple peripherals

You could also see the parameters and properties of the connection such as:

  • Connection interval
  • Slave latency
  • Supervision timeout
  • Bonding status
  • Pairing status

Figure 11: Connection information

Another feature available is the ability to change the properties of the connection (since the dongle acts in the central role, and hence it controls the parameters) such as:

  • Connection parameters
  • Initiating pairing
  • Disconnecting

Figure 12: Connection parameters

Once you’re connected to a peripheral, you can now interact with the device’s GATT server. For example, you could read, write and enable/disable notifications and indications.

Reading characteristics

To read a characteristic, click on the characteristic of interest then click on the “reload” icon:

Figure 13: Read Characteristic

Now the new value (if any) will be updated.

Writing to characteristics

To write to a characteristic, select the characteristic of interest, then click on the text input box located under the properties (read, write, indicate, etc.). Then enter the value you wish to write, and press the checkmark button:

nRF Connect Writing to a characteristic

Figure 14: Writing to a characteristic

BLE Peripheral Mode

To set up the dongle to act as a peripheral, we first need to configure the different parameters and services and characteristics exposed by the GATT server. To do this, navigate to the Server Setup tab:

nRF Connect Server Setup

Figure 15: Server Setup

You’ll notice that the Generic Access service already exists since it’s a mandatory service. Within the service, you’ll find three characteristics defined:

  • Device Name
  • Appearance
  • Peripheral Preferred Connection Parameters

You can customize each of these characteristics by clicking on them.

Modifying characteristics

Figure 16: Modifying characteristics

You can also add services and characteristics of your own.

Once you’re done with the customizations, click the “Apply to device” button.

Now you can go back to the Connection Map tab. Click the gear button next to the nRF5u dongle listing, then click on Start advertising.

Figure 17: Start Advertising

Once it starts advertising, a wireless icon will be displayed:

Figure 18: Advertising started

To verify the device is advertising and working properly, you can use a BLE client emulator app on a mobile phone such as Nordic nRF Connect or LightBlue Explorer.

Peripheral mode example

Let’s go ahead and set up the nRF52 USB dongle to include the Battery service and Battery Level characteristic, then connect and interact with it from a mobile app. For the mobile app I will be using LightBlue.

Here’s a video showing the whole process:

As you can see, with just a few quick steps we can set up a peripheral, discover it and connect to it from a mobile app. We can also see that changing the value of a characteristic on the device side (via the nRF Connect app on the PC) is reflected and can be seen on the mobile side.


In this tutorial, we introduced the nRF52840 USB dongle. We then talked about the two main use cases of the dongle: as a tool for nRF Connect apps or as a general nRF development kit. Today’s tutorial focused on using the dongle as an nRF Connect tool. IN an upcoming follow-up tutorial, we’ll cover the other use case: how to use the dongle as a general nRF development kit to run your own custom applications.

Don’t forget to enter your email below to stay up-to-date on the latest BLE news as well as be notified when new blog posts and tutorials get published.

Don’t Miss My Next Tutorial

Sign up to be notified when the next tutorial goes live. You’ll also receive a free BONUS report: Top BLE Developer Tools (PDF).


  1. Avatar Tim Kelleher on April 17, 2019 at 9:13 am

    Hello Mohammand,

    I am creating manufacturing test fixture software applications and would like to connect to the “device under test” using the nRF52840 USB Dongle. I would like to create an application that communicates to the dongle over USB similar to nRFConnect. Basically, connect, send data, receive data, and disconnect. Is there an interface specification for how to communicate with the Dongle over USB?

  2. Avatar Peter on April 10, 2019 at 11:22 am

    I have my own peripheral device with 3 custom services and in each service there are a couple of characteristics. After connection I am able to collapse only one service and after clicking at next service it occurs this error: addVsUuidToDriver error (NRF_ERROR_NO_MEM). Moreover after clicking again I received following error: Error when calling ‘reduceApp’: Cannot read property ‘toUpperCase’ of null.

  3. Avatar Peter on April 10, 2019 at 10:52 am

    How can I fix Error: addVsUuidToDriver error (NRF_ERROR_NO_MEM) in nRF Connect BLE application for PC?

    • Mohammad Afaneh Mohammad Afaneh on April 10, 2019 at 11:04 am

      Hi Peter,

      I haven’t seen the error before, can you provide some more information? Like how to reproduce it and possibly attaching or linking to a screenshot showing the error.


  4. Avatar Oliver on March 14, 2019 at 4:30 pm

    hi, is there any option to run all this on command line so we can integrate it into our own application? we can only get the gui to work on the 52840 chips, but on the 51 we can .. any support would be great.

  5. Avatar Hannu on February 5, 2019 at 12:26 pm


    Any ideas why I get “Error: addVsUuidToDriver error (NRF_ERROR_NO_MEM)”. I just follow instructions and try to connect and read stuff form Playbulb candle.

    • Mohammad Afaneh Mohammad Afaneh on February 5, 2019 at 12:30 pm

      Hi Hannu,

      Check the macro definition: #define NRF_SDH_BLE_VS_UUID_COUNT in sdk_config.h. It should have a number sufficient to cover all the custom UUIDs you’re adding to the UUID database.

      e.g. if you have 4 custom UUIDs, then you would define:

      #define NRF_SDH_BLE_VS_UUID_COUNT 4


      • Avatar Hannu on February 6, 2019 at 12:36 am

        Hello Mohammad,

        What sdk_config.h you mean, if I only try to connect some device using “Bluetooth Low Energy” application. Do you mean that I should dowload sources from GitHub, compile it and then try to run again ?


        • Mohammad Afaneh Mohammad Afaneh on February 7, 2019 at 1:32 pm

          Sorry, Hannu. Do you mean you see this error in the nRF Connect BLE application on the desktop? or where do you see it?

  6. Avatar Maria on February 1, 2019 at 11:14 am

    Hi, This was good. Part 2? Coming soon?

    • Mohammad Afaneh Mohammad Afaneh on February 1, 2019 at 11:16 am

      Thanks, Maria. Yep, part 2 is coming next week 🙂

  7. nRF5 SDK: Windows 10 and BLE | Andreas' Blog on January 3, 2019 at 3:22 pm

    […] nRF5284 Dongle The nRF52840 USB Dongle Tutorial (Part 1) […]

  8. Avatar Martin Hunady on December 17, 2018 at 8:19 am

    Very nice article about very useful gadget. Thank you. Only one think I would like to point out. This module for reasonable price contains chip that support Bluetooth mesh and it can be also used as development kit. That’s great. Why it doesn’t contain also embedded battery? It is a bit price difference to build mesh network by tens of nodes of nRF52840 modules vs usb dongle modules. I know that it is not question for you 🙂.

  9. Avatar Roe on November 26, 2018 at 7:26 am

    Great work. I love the simplicity of the stuff as explained by you. Any chance you will be adding more tutorials?

    • Mohammad Afaneh Mohammad Afaneh on November 27, 2018 at 6:22 pm

      Thanks, Roe. Absolutely, I will be adding more mesh-specific tutorials in the near future. Stay tuned!

      I’m also working on a Bluetooth mesh course (if you’re interested):

Leave a Comment