• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Timeular/noble-mac: Noble MacOS bindings using the official CoreBluetooth API

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Timeular/noble-mac

开源软件地址(OpenSource Url):

https://github.com/Timeular/noble-mac

开源编程语言(OpenSource Language):

Objective-C++ 62.7%

开源软件介绍(OpenSource Introduction):

Note: this project was integrated in @abandonware/noble and is no longer actively maintained

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

Installation

Currently, it has not been published yet on npm, so please try to add the dependence as the following.

"dependencies": {
    "noble-mac": "https://github.com/Timeular/noble-mac.git"
}

Then, please run npm install again.

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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap