我正在尝试通过Linux机器与BLE模块通信(该模块正在运行心率配置文件).到目前为止,除了听取通知和指示(例如,听取心率测量通知)之外,我已经能够做我需要的一切.我正在使用内核版本3.5和bluez-5.3.
到目前为止使用的成功命令:
hcitool lescan
hcitool lecc
gatttool -b <Mac Address> --primary
gatttool -b <MAC Address> --characteristics
gatttool -b <MAC Address> --char-read
gatttool -b <MAC Address> --char-desc
gatttool -b <MAC Address> --interactive
Run Code Online (Sandbox Code Playgroud)
命令失败:
gatttool -b <MAC Address> --listen
Run Code Online (Sandbox Code Playgroud)
任何帮助是极大的赞赏.
我正在使用Linux的蓝牙低功耗调制解调器.我正在使用命令行选项,即hcitool.我能够使用命令查找设备:$ hcitool scan
它对我来说很好,我也可以使用以下方式广播我的设备:
sudo hciconfig hci0 leadv
Run Code Online (Sandbox Code Playgroud)
它也工作正常.但我想将调制解调器设备的服务和特性添加到其他设备中.我试过了,sdptool add但它不适合我.有没有人知道如何使用ubuntu中的命令行工具将服务和特性添加到外设?
编辑:我的调制解调器正在广播,但无法探索其他BLE设备的服务和特性.现在我可以使用设置设备的名称hcio name command
编辑:现在我可以通过同时运行sudo hcidump命令来呈现服务和特性.但我无法追踪我从哪里获得这些服务和特征.一个明确的观察是那些服务是从机器渲染的.
我目前正在尝试由RadiusNetworks发布的Raspberry Pi iBeacon教程
http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html
但几秒后我的连接超时有问题.我已经完成了一个新的raspbian构建,并尝试了2个不同的加密狗(AZIO V400和IOGEAR GBU521),我已经尝试使用Bluez 5.8的教程以及Bluez 5.11,两者都在新的Raspbian加载.
当我调用启动脚本时,我看到:
pi@piBlueTest ~ $ ./start
Launching virtual iBeacon...
LE set advertise enable on hci0 returned status 12
< HCI Command: ogf 0x08, ocf 0x0008, plen 44
1E 02 01 1A 1A FF 4C 00 02 15 E2 C5 6D B5 DF FB 48 D2 B0 60
D0 F5 A7 10 96 E0 00 00 00 00 C9 00 00 00 00 00 00 00 00 00
00 00 00 00
> …Run Code Online (Sandbox Code Playgroud) 我正在使用带有bluez版本4.101的Linux计算机.我正在以从属模式与BLE设备通信.我正在尝试从BLE设备读取数据.但是当我这样做时,读取失败并出现以下错误:"属性需要在读/写之前进行身份验证".我可以从许多其他特征中读取数据,但我在这个上失败了.我正在使用的命令是
-gatttool -b 11:22:33:44:55:66 --char-read
我需要做什么才能阅读这些数据?
注意:我可以从iPhone上读取这些数据.但我需要配对,所以也许这是一个配对问题.