树莓 iBeacon 未检测到 [英] Raspberry iBeacon not detecting

查看:29
本文介绍了树莓 iBeacon 未检测到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近尝试在树莓派上的 BLE 加密狗(剑桥硅无线电)上配置 ibeacon.参考:http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html

I recently was trying to configure ibeacon on a BLE dongle (cambridge silicon radio) on a raspberry pi. Reference: http://developer.radiusnetworks.com/2013/10/09/how-to-make-an-ibeacon-out-of-a-raspberry-pi.html

我收到这条消息:

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
> HCI Event: 0x0e plen 4
  01 08 20 12

而且该应用程序甚至找不到信标.虽然我可以看到加密狗在此命令上闪烁:

And the app does not even locate the beacon. Though I can see the dongle flashing some light on this command:

sudo hciconfig hci0 leadv 0

但没有检测到任何东西.

But nothing gets detected.

因此,从应用商店中打开一个名为 LIGHTBLUE 的应用,它会检测到具有不同 UUID 的蓝牙.

So go an APP named LIGHTBLUE from the appstore and it detects the bluetooth with a different UUID.

我已经尝试了很多次了.并已完成教程中的所有步骤.但是这个蓝牙设备就是不会出现.

I have tried this a number of times now. And have completed all the steps in the tutorial. But this bluetooth device just wont show up.

另外,我很想知道 0x08 和 0x0008 是什么如果我想投射不同的 UUID,我该怎么办?但那是后面的部分...

Also, I am curious to know what is 0x08 and 0x0008 and if I want to cast a different UUID what should I do? But thats a later part...

现在,THE BLUETOOTH 不会像 Radius Networks 的教程所说的那样投射 Estimote UUID.

Right now, THE BLUETOOTH wont cast the Estimote UUID as said by Radius Networks' tutorial.

希望尽快收到回复.

我写的命令(在此之后我将电源更改为 C9):

Command I wrote (after this not working I changed the power to C9):

$ sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 e 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 000 00 00 00 00 00 00 00 00

令人惊讶的是,错误是:错误:无效的 HCI 命令参数;怎么就无效了?是因为 CSR 支持 128 位而不是 64 位十六进制吗?

and surprisingly, the error is: Error: Invalid HCI Command Parameters; How come its invalid? Is it because CSR supports 128bit rather than 64bit hex?

谢谢!

推荐答案

我看到了与 memoryhole 相同的问题,我必须删除多余的零.在配置广告数据以使其与我的加密狗正常工作之前,我还必须启用广告.

I saw the same issue as memoryhole where I had to remove the extra zeros. I also had to enable advertising before I configured the advertising data for it to work properly with my dongle.

这是对我有用的确切序列/命令:

Here is the exact sequence/commands that worked for me:

sudo hciconfig hci0 up
sudo hciconfig hci0 leadv 3
sudo hcitool -i hci0 cmd 0x08 0x0008 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 c5 00

这就是我的 Radius 脚本版本最终的样子:

This is what my version of the Radius script ended up looking like:

#!/bin/sh
. ./ibeacon.conf
echo "Launching virtual iBeacon..."
sudo hciconfig $BLUETOOTH_DEVICE up
sudo hciconfig $BLUETOOTH_DEVICE leadv 3
sudo hcitool -i $BLUETOOTH_DEVICE cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 $UUID $MAJOR $MINOR $POWER 00
echo "Complete"

这是在带有 ORICO BTA-402-BK 品牌的 BLE 加密狗 (CSR8510 A10) 的 Rasberry Pi 上

This was on a Rasberry Pi with a ORICO BTA-402-BK branded BLE dongle (CSR8510 A10)

(我会留下这个作为评论,但没有足够的代表)

(I would have left this as a comment, but didn't have enough rep)

这篇关于树莓 iBeacon 未检测到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆