如何在Mac OS X 10.9.5上以编程方式读取低功耗蓝牙传输的数据? [英] How do I read Bluetooth Low Energy transmitted data programmatically on Mac OS X 10.9.5?

查看:243
本文介绍了如何在Mac OS X 10.9.5上以编程方式读取低功耗蓝牙传输的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Ruby以编程方式阅读蓝牙低能耗传输的数据.低功耗蓝牙技术不支持标准规范v4.0中的串行端口配置文件(SPP).

I'm trying to read Bluetooth Low Energy transmitted data programtically using Ruby. Bluetooth Low Energy technology provides no support for the Serial Port Profile (SPP) in the standard Specification v4.0.

使用较旧的蓝牙通信方法,只需读取串行端口即可接收蓝牙输入数据(/dev/tty.Bluetooth-Incoming-Port).显然,这不适用于低功耗蓝牙,因为它的工作原理几乎完全不同.

With older Bluetooth communication methods, one can just read the serial port for Bluetooth incoming data (/dev/tty.Bluetooth-Incoming-Port). Clearly, this won’t work for Bluetooth Low Energy, given it works almost completely differently.

我遇到了一些工具,例如 LightBlue XCode硬件IO工具可以读取由上述蓝牙低功耗设备传输的数据,但我不确定它们如何工作.有人可以帮忙吗?

I came across a few tools like LightBlue and XCode Hardware IO tools to read the data transmitted by the said Bluetooth Low Energy device but I’m not sure how they work. Can somebody help?

推荐答案

阅读基础知识确实对我有很大帮助.这是一个链接到解释BLE基础知识的好文章.了解了这一点之后,在OSX上,我使用 noble 结束了我们的连接,并使用另一个库读取BLE传输的UART数据使用名为 blendmicro 的贵族.

Reading up on fundamentals really helped me a lot. Here's a link to great post explaining BLE basics. Having understood this, on OSX I ended us using noble to establish connection and read BLE transmitted UART data using another library using noble called blendmicro.

我们没有使用blendmicro BLE芯片,但仍然能够使用blendmicro-node库.如果您仔细阅读blendmicro.js,可以很容易地对其进行修改,以使其适合任何使用UART进行数据传输的BLE芯片.

We didn't use blendmicro BLE chip but still were able to use blendmicro-node library. If you read through blendmicro.js, it's easily modifiable to suit any BLE chip that uses UART for data transmission.

这篇关于如何在Mac OS X 10.9.5上以编程方式读取低功耗蓝牙传输的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆