@stoprocent/noble 2.4.1 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -268,9 +268,10 @@ import { withBindings } from '@stoprocent/noble';
268
268
  const noble = withBindings('default');
269
269
 
270
270
  // Specific bindings
271
- const nobleHci = withBindings('hci'); // HCI socket binding
272
- const nobleMac = withBindings('mac'); // macOS binding
273
- const nobleWin = withBindings('win'); // Windows binding
271
+ const nobleHci = withBindings('hci'); // HCI socket binding
272
+ const nobleDbus = withBindings('dbus'); // BlueZ D-Bus binding (Linux desktop)
273
+ const nobleMac = withBindings('mac'); // macOS binding
274
+ const nobleWin = withBindings('win'); // Windows binding
274
275
 
275
276
  // Custom options for HCI binding (Using UART HCI Dongle)
276
277
  const nobleCustom = withBindings('hci', {
@@ -288,6 +289,23 @@ const nobleCustom = withBindings('hci', {
288
289
  hciDriver: 'native',
289
290
  deviceId: 0 // This could be also set by env.NOBLE_HCI_DEVICE_ID=0
290
291
  });
292
+
293
+ // D-Bus / BlueZ binding (Linux desktop). Talks to bluetoothd over org.bluez,
294
+ // so it coexists with the system Bluetooth stack and does not need root /
295
+ // CAP_NET_ADMIN. Requires the `dbus-next` package to be installed in the
296
+ // host project — it is not bundled, since it is only useful on Linux:
297
+ //
298
+ // npm install dbus-next
299
+ //
300
+ // Supports basic GATT: scan, connect, service/characteristic/descriptor
301
+ // discovery, read, write, notify/indicate. Does not support raw HCI handle
302
+ // I/O, custom scan parameters, or vendor-specific commands.
303
+ const nobleDbus = withBindings('dbus', {
304
+ adapterId: 'hci0' // optional; defaults to the first BlueZ adapter
305
+ });
306
+
307
+ // Equivalent to withBindings('dbus') without code changes:
308
+ // NOBLE_BINDINGS=dbus node app.js
291
309
  ```
292
310
 
293
311
  ### Core Methods