Skip to content
Noble MacOS bindings using the official CoreBluetooth API
Branch: master
Clone or download
Latest commit e7bde32 Feb 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
src Fix readHandle/writeHandle, rename cleanUp to stop (#29) Feb 15, 2019
test add node-pre-gyp and travis (#4) Sep 28, 2018
.gitignore initial commit Sep 18, 2018
.travis.yml
LICENSE initial commit Sep 18, 2018
README.md add node-pre-gyp and travis (#4) Sep 28, 2018
binding.gyp add node-pre-gyp and travis (#4) Sep 28, 2018
index.js initial commit Sep 18, 2018
install.js
package.json
yarn.lock

README.md

Noble (Node.js Bluetooth LE) for MacOS

Build Status

The mac bindings in the noble repository use a XPC connection and an undocumented protocol to communicate directly with the bluetooth daemon. This is error prone, as the protocol needs to be reverse engineered by sniffing the communication between a regular program which uses the official CoreBluetooth API and the bluetooth daemon. Since the protocol is not public Apple can change it at anytime (For now every new OSX release changed the protocol).

This package provides the same functionality as the regular noble mac bindings using the official CoreBluetooth API.

System Requirements

  • Node.js v6.14.2 or later.
  • macOS 10.7 or later

Prerequisites

OS X

Usage

Simply require noble-mac instead of noble:

const noble = require('noble-mac');

On non-Mac platforms this will use the regular noble implementation and on MacOS it will use the native binding using the official CoreBluetooth API.

Note

Be careful to not write to the Client Characteristic Configuration descriptor directly to enable notification. Use subscribe instead to enable and listen to notifications.

Implementation Status

Everything should work that also works with the regular noble mac bindings.

  • Broadcast is not implemented, but it neither was in recent noble mac bindings
You can’t perform that action at this time.