macos 是否有任何 OS X 等效于 `hcitool`?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/110661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Are there any OS X equivalents to `hcitool`?
提问by Matt
I'd like to write some quick scripts to play with bluetooth devices (scan etc…), for the Mac. Under linux I'd probably use hcitool
, or the python bluez library.
我想为 Mac 编写一些快速脚本来使用蓝牙设备(扫描等)。在 linux 下,我可能会使用hcitool
,或 python bluez 库。
What tools are there for the Mac?
Mac 有哪些工具?
回答by cubex
hcitool
is a command that comes with BlueZ, which is specific to the Linux kernel.
hcitool
是BlueZ附带的命令,它特定于 Linux 内核。
Unfortunately, I don't have Mac OSX, so I can't test this, but as far as I know, Darwinshares a lot with BSD, so they both use Netgraph frameworkfor bluetooth drivers. There's some information on how to use Bluetooth in FreeBSD, I think they might be helpful, at least as a starting point. The hcitool
equivalent in FreeBSD is hccontrol
.
不幸的是,我没有 Mac OSX,所以我无法对此进行测试,但据我所知,Darwin与 BSD 共享很多,因此它们都使用Netgraph 框架作为蓝牙驱动程序。有一些关于如何在 FreeBSD 中使用蓝牙的信息,我认为它们可能会有所帮助,至少作为一个起点。hcitool
FreeBSD 中的等价物是hccontrol
.