Node.js Bluetooth

The USB BLE adapter for Node.js

Dongl is a USB Bluetooth Low Energy adapter you drive from Node.js with SimpleJSBLE. Scan, connect, and pair through its own radio on Windows, macOS, and Linux, with promises from the first call.

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 SimpleJSBLE

    Run npm install simplejsble.

  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.

import { Backend } from 'simplejsble';

const adapters = await (await Backend.getDongl()).adapters();
if (adapters.length === 0) throw new Error('No Dongl found.');

const [adapter] = adapters;
console.log(`${adapter.identifier()} [${adapter.address()}]`);
In Node.js today

What Node.js uses today

On current Windows, Node.js BLE libraries use the built-in radio. Reaching a USB adapter takes extra setup.

noble

@abandonware/noble uses Windows' own Bluetooth on Windows 10 and later. To use a USB dongle instead, you replace the dongle's driver with WinUSB through Zadig, and Windows no longer sees it as a Bluetooth adapter.

@stoprocent/noble

This active fork of noble selects HCI devices by ID and supports UART HCI dongles.

node-ble

node-ble talks to BlueZ over D-Bus and selects an adapter by name, on Linux only.

BleuIO

BleuIO's JavaScript library drives its dongle with AT commands over a serial port.

Why Dongl

What a Dongl gives your Node.js code

Drivers

No driver swap

The Dongl works on Windows, macOS, and Linux as it comes. Plug it in and select it from code.

Async

Promises in parallel

Calls on different Dongls run in parallel, so Promise.all checks several devices at the same time.

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 Node.js code

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

Adapters

One Dongl per fixture

Each Dongl is another adapter, with a stable address across restarts and USB ports.

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 Node.js 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, install SimpleJSBLE from npm, and take the adapters of the Dongl backend with Backend.getDongl(). Each Dongl is an adapter with its own radio, and it works through the same API as the computer's Bluetooth.

No. SimpleJSBLE opens the Dongl as it comes, on Windows, macOS, and Linux. On Linux, add your user to the dialout group so it can open the Dongl, as the SimpleBLE docs describe.

Yes. Each Dongl is a separate adapter, and calls on different adapters run in parallel, so Promise.all can scan, connect, and read through several Dongls at the same time.

Yes. Use SimpleJSBLE from Electron's main process and send plain data to renderers over IPC.

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.