【发布时间】:2015-07-10 07:17:17
【问题描述】:
我根据https://learn.adafruit.com/pibeacon-ibeacon-with-a-raspberry-pi/setting-up-the-pi等几个教程将Raspberry Pi设置为iBeacon
只要我能找到具有不同应用程序的信标,一切正常。 但我也从 BeaconInside 购买了一个“真正的”iBeacon,在将两个信标的广告数据与蓝牙 LE 扫描应用程序进行比较时,我注意到存在差异:
pi-beacon 缺少“名称(完整)”和“服务数据”记录: http://postimg.org/image/yc5wky7bv/
我还尝试使用 Android BluetoothLeGatt 示例应用程序 (developer.android.com/samples/BluetoothLeGatt/index.html) 扫描两者并得到相同的结果:
信标内部:
8836-8889/com.example.android.bluetoothlegatt D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=78:A5:04:39:8C:3A, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -16, 1, -117, -101, 117, 9, 76, 49, -87, 5, 26, 39, -45, -100, 0, 60, 51, 1, -86, -36, -65]}, mServiceData={0000d00d-0000-1000-8000-00805f9b34fb=[1, 51, -36, -86, 93]}, mTxPowerLevel=0, mDeviceName=BEACON 39:8C:3A], mRssi=-76, mTimestampNanos=387592434672407}
树莓派信标:
8836-8889/com.example.android.bluetoothlegatt D/BluetoothLeScanner﹕ onScanResult() - ScanResult{mDevice=5C:F3:70:61:93:C7, mScanRecord=ScanRecord [mAdvertiseFlags=6, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -30, -59, 109, -75, -33, -5, 72, -46, -80, 96, -48, -11, -89, 16, -106, -32, 17, 17, 18, 17, -56]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-28, mTimestampNanos=387592794842927}
DeviceName 为空且没有 ServiceData。
hciconfig hci0 -a:
hci0:类型:BR/EDR 总线:USB
BD 地址:5C:F3:70:61:93:C7 ACL MTU:1021:8 SCO MTU:64:1
正在运行 PSCAN ISCAN
RX 字节:2785 acl:0 sco:0 事件:73 错误:0
TX 字节:1348 acl:0 sco:0 命令:71 错误:0
特点:0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
数据包类型:DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
链接策略:RSWITCH SNIFF
链接模式:SLAVE ACCEPT
名称:'ABC'
类:0x000000
服务类别:未指定
设备类:杂项,
HCI 版本:4.0 (0x6) 修订:0x1000
LMP 版本:4.0 (0x6) 颠覆:0x220e
制造商:博通公司(15)
有人知道为什么 pi-beacon 没有名称和服务数据记录吗?
【问题讨论】:
标签: linux raspberry-pi bluetooth-lowenergy ibeacon