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

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

问题描述

我正在尝试使用 Ruby 以编程方式读取 Bluetooth Low Energy 传输的数据.低功耗蓝牙技术不支持标准规范 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.

我遇到了一些工具,例如 LightBlueXCode 硬件 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天全站免登陆