【发布时间】:2018-01-20 17:53:49
【问题描述】:
刚开始使用BLE Beacons,写了一个小程序来定位信标并列出一些服务等。以下是我可以在console.log中打印的结果
BLE service:
Service handle: 43
uuid: 00001800-0000-1000-8000-00805f9b34fb
characteristic: 00002a00-0000-1000-8000-00805f9b34fb
characteristic: 00002a01-0000-1000-8000-00805f9b34fb
characteristic: 00002a02-0000-1000-8000-00805f9b34fb
characteristic: 00002a03-0000-1000-8000-00805f9b34fb
characteristic: 00002a04-0000-1000-8000-00805f9b34fb
BLE service:
Service handle: 44
uuid: 00001801-0000-1000-8000-00805f9b34fb
characteristic: 00002a05-0000-1000-8000-00805f9b34fb
descriptor: 00002902-0000-1000-8000-00805f9b34fb
BLE service:
Service handle: 45
uuid: 0000180a-0000-1000-8000-00805f9b34fb
characteristic: 00002a25-0000-1000-8000-00805f9b34fb
characteristic: 00002a26-0000-1000-8000-00805f9b34fb
characteristic: 00002a29-0000-1000-8000-00805f9b34fb
BLE service:
Service handle: 46
uuid: 0000c050-0000-1000-8000-00805f9b34fb
characteristic: 0000c051-0000-1000-8000-00805f9b34fb
characteristic: 0000c052-0000-1000-8000-00805f9b34fb
characteristic: 0000c053-0000-1000-8000-00805f9b34fb
characteristic: 0000c054-0000-1000-8000-00805f9b34fb
characteristic: 0000c055-0000-1000-8000-00805f9b34fb
characteristic: 0000c056-0000-1000-8000-00805f9b34fb
characteristic: 0000c057-0000-1000-8000-00805f9b34fb
characteristic: 0000c058-0000-1000-8000-00805f9b34fb
characteristic: 0000c059-0000-1000-8000-00805f9b34fb
characteristic: 0000c05a-0000-1000-8000-00805f9b34fb
descriptor: 00002902-0000-1000-8000-00805f9b34fb
characteristic: 0000c05b-0000-1000-8000-00805f9b34fb
characteristic: 0000c05c-0000-1000-8000-00805f9b34fb
characteristic: 0000c05d-0000-1000-8000-00805f9b34fb
BLE service:
Service handle: 47
uuid: 0000c090-0000-1000-8000-00805f9b34fb
characteristic: 0000c091-0000-1000-8000-00805f9b34fb
descriptor: 00002902-0000-1000-8000-00805f9b34fb
characteristic: 0000c092-0000-1000-8000-00805f9b34fb
characteristic: 0000c093-0000-1000-8000-00805f9b34fb
characteristic: 0000c094-0000-1000-8000-00805f9b34fb
characteristic: 0000c095-0000-1000-8000-00805f9b34fb
BLE service:
Service handle: 48
uuid: f000ffc0-0451-4000-b000-000000000000
characteristic: f000ffc1-0451-4000-b000-000000000000
descriptor: 00002902-0000-1000-8000-00805f9b34fb
descriptor: 00002901-0000-1000-8000-00805f9b34fb
characteristic: f000ffc2-0451-4000-b000-000000000000
descriptor: 00002902-0000-1000-8000-00805f9b34fb
descriptor: 00002901-0000-1000-8000-00805f9b34fb
这些信标基本上传输 2 个值 - 信标本身的温度和电压。当我阅读更多笔记时,我想知道是否有人可以指出我需要关注哪些 UUID/特性,以便能够获得温度和电压读数?随着我做更多的阅读和研究,如果任何有经验的开发人员可以提供一些指示,我将不胜感激?基本上我需要启用温度和电压服务的通知。我可以从 BLE 库中找出如何启用通知,但如何定位/指向正确的服务/特征/描述符等?再次感谢
我有一块 Arduino 板,可以扫描并从信标中捕获一些数据
[ADV 22587] Packet received from 50:65:83:10:E6:3A
PAYLOAD 30 bytes
02-01-06-1A-FF-6A-00-0F-75-E9-D5-AD-15-DF-FB-48-01-52-4E-8A-4B-B9-3D-0F-00-1E-3B-9E-FF-2C
RSSI -68 dBm
ADV TYPE Connectable undirected
MAN SPEC DATA 6A-00-0F-75-E9-D5-AD-15-DF-FB-48-01-52-4E-8A-4B-B9-3D-0F-00-1E-3B-9E-FF-2C
[SR 22618] Packet received from 50:65:83:10:E6:3A
PAYLOAD 22 bytes
12-09-69-57-45-45-43-41-52-45-20-54-65-6D-70-20-50-61-6C-02-0A-00
RSSI -68 dBm
ADV TYPE Connectable undirected
COMPLETE NAME Temp mini Sensor
TX PWR LEVEL 0
关于我应该如何从这里继续的任何指示?试图掌握它......只是那个难以捉摸的线索......我想我会理解发生了什么:)
【问题讨论】:
-
前三个服务是通用访问、通用属性和设备信息(请参阅此处:bluetooth.com/specifications/gatt/services)。其余的是制造商特定的,只有制造商可以告诉您那里发生了什么。
-
好的,谢谢 Nebr。我正在尝试隔离服务(就像你刚才提到的那些,剩下 3 个,我认为这可能是嫌疑人:) 它可能不是服务句柄:48 uuid:f000ffc0-0451-4000-b000-000000000000 所以我将进一步探讨剩下的两个。看来我越来越近了。谢谢
标签: service notifications bluetooth-lowenergy beacon