C++ Bluetooth

The USB BLE adapter for C++

Dongl is a USB Bluetooth Low Energy adapter you drive from C++ with SimpleBLE. Scan, connect, and pair through its own radio on Windows, macOS, and Linux, and give each test fixture its own Dongl and thread.

Kober Engineering
InsuLearn
Meta
Fender
Honeywell
Bionic Labs
Sona
SWT
Moon Smart Focus
Lewitt
Medra
Desko
g.tec
IXI
Innovision
Moonlighting Industries
Kober Engineering
InsuLearn
Meta
Fender
Honeywell
Bionic Labs
Sona
SWT
Moon Smart Focus
Lewitt
Medra
Desko
g.tec
IXI
Innovision
Moonlighting Industries
Kober Engineering
InsuLearn
Meta
Fender
Honeywell
Bionic Labs
Sona
SWT
Moon Smart Focus
Lewitt
Medra
Desko
g.tec
IXI
Innovision
Moonlighting Industries
Get started

Set up in three steps

  1. Get an adapter

    Pre-order a Dongl, or flash the free Dongl firmware onto a Nordic nRF52840 Dongle or DK you already own.

  2. Install SimpleBLE

    Build SimpleBLE with CMake and link simpleble::simpleble. The Dongl backend is on by default.

  3. Select the adapter

    A plugged-in Dongl appears as its own adapter, next to the computer's Bluetooth. Take the adapters of the Dongl backend and your code runs on the Dongl.

Select the Dongl, then scan, connect, and read. This is the code for each step.

#include <simpleble/Backend.h>
#include <simpleble/SimpleBLE.h>

std::vector<SimpleBLE::Adapter> dongls = SimpleBLE::Backend::get_dongl().adapters();
if (dongls.empty()) {
    std::cerr << "No Dongl found." << std::endl;
    return EXIT_FAILURE;
}

SimpleBLE::Adapter adapter = dongls[0];
std::cout << adapter.identifier() << " [" << adapter.address() << "]" << std::endl;
In C++ today

What C++ uses today

C++ reaches Bluetooth through each platform's own API, a framework such as Qt, or a vendor's dongle library.

Platform APIs

WinRT on Windows and CoreBluetooth on macOS work through the computer's one radio. BlueZ on Linux exposes each adapter as hciN. Each platform needs its own code.

Qt Bluetooth

Qt's QLowEnergyController can choose the local adapter only on BlueZ.

pc-ble-driver and BGLib

Nordic's pc-ble-driver opened one nRF dongle per serial port, and Nordic archived it in 2024 with no planned successor. BGLib drove the BLED112, which Silicon Labs no longer makes.

Why Dongl

What a Dongl gives your C++ code

Adapters

One radio per fixture

Each Dongl is another adapter with its own radio. Give each test fixture a Dongl and a thread.

Platforms

One API, three desktops

The same code drives a Dongl on Windows, macOS, and Linux, whatever Bluetooth the computer has.

Addresses

Real addresses on macOS

Scans report each device's real address, so a Mac test station matches devices by the address on their label.

Pairing

Pairing from your C++ code

Your code answers passkey and numeric-comparison prompts, with no system dialog. Bonds stay on the Dongl.

Consistency

The same Bluetooth everywhere

Test stations running the same firmware behave the same, whatever the computer or OS version.

Support

A direct line to the engineers

Commercial customers work directly with the team that builds SimpleBLE and the Dongl firmware.

Plug in a Dongl and run your C++ code

Dongl hardware ships with the firmware installed and includes a commercial license to use SimpleBLE through the Dongl backend.

Frequently
asked questions

Plug in a Dongl, build SimpleBLE with CMake, and take the adapters of the Dongl backend with SimpleBLE::Backend::get_dongl().adapters(). Each Dongl is an adapter with its own radio, and it works through the same API as the computer's Bluetooth.

Yes. Each Dongl is a separate adapter with its own radio. Drive each from its own thread to test several devices in parallel. A Dongl keeps its address across restarts and USB ports.

Nordic archived pc-ble-driver in 2024, and Silicon Labs discontinued the BLED112. SimpleBLE with a Dongl replaces both, and the SimpleBLE docs include a migration guide for each.

Yes. A Dongl needs only a USB port. It works on computers without Bluetooth hardware, with the built-in Bluetooth turned off, and on Linux without BlueZ running.

No. The free Dongl firmware runs on a Nordic nRF52840 Dongle or DK for prototyping, testing, and non-commercial validation. Dongl hardware ships with the firmware installed and includes a commercial license to use SimpleBLE through the Dongl backend.

SimpleBLE is source-available under the Business Source License 1.1 and free for non-commercial use. Evaluation needs no license. Commercial use needs a license, and one agreement covers your whole company, with no per-seat, per-device, or royalty fees. Each Dongl hardware unit includes a commercial license to use SimpleBLE through the Dongl backend.