Noble (Node.js Bluetooth LE) for MacOS
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.
- Node.js v6.14.2 or later.
- macOS 10.7 or later
- install Xcode
noble-mac instead of
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.
Be careful to not write to the
Client Characteristic Configuration descriptor directly to enable notification.
subscribe instead to enable and listen to notifications.
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