繁体   English   中英

使用 android 信标库检测 ibeacon

[英]detect ibeacon with android beacon library

尝试使用 android 信标库(使用 xamarin 绑定)检测 raspberry PI 上的 iBeacon 设置

想知道我在这里做错了什么:

sudo hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 17 D1 AD 07 A9 61 00 01 00 00 C8 00

并像这样设置 Beacon Parser

beaconManager.BeaconParsers.Add(new BeaconParser().SetBeaconLayout("m:0-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"));

我可以在 Android 上使用例如“BeaconScope”来检测这个信标,但我无法使用 android 信标库检测到它。

我可以从调试中看到以下输出

[BeaconParser] Processing pdu type FF: 02011a1aff4c000215e20a39f473f54bc4a12f17d1ad07a96100010000c80000000000000000000000000000000000000000000000000000000000000000 with startIndex: 5, endIndex: 29
[BeaconParser] Ignoring pdu type 06
[BeaconParser] This is not a matching Beacon advertisement. (Was expecting be ac.  The bytes I see are: 02011a1aff4c000215e20a39f473f54bc4a12f17d1ad07a96100010000c80000000000000000000000000000000000000000000000000000000000000000

设置为 AltBeacon 有效!

sudo hcitool -i hci0 cmd 0x08 0x0008 1F 02 01 1A 1B FF 18 01 BE AC 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01 C5 01

这是图书馆检测到的。

我错过了什么?

我检测到 RadButton 设置为 iBeacon,但无法通过 raspberry PI 使其工作

尝试改变这个:

"m:0-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"

对此:

"m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"

注意第一个数字是 2 而不是 0

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM