我买了一个开发工具包Radius Networks
,包括a ioGear GBU521 BLE 4.0 dongle
和a Raspberry Pi
.我也买了他们的一个RadBeacon iBeacons
.他们都像宣传的那样工作,但我对我得到的东西感到惊讶.
我以为RaspPi
可以检测到iBeacons
.相反,该套件设置为创建一个iBeacon
.我的用例是检测何时forklift
进入特定房间,以便我可以将工作发送给他们.我的想法是在叉车上放一个iBeacon然后把RaspPi搜索到iBeacons.当检测到iBeacon(叉车)时,您可以断定它在附近.我会将RaspPi连接到LAN
并通过它传达信息REST or similar
.我知道我可以放一个合适的Android or Apple device
并以这种方式完成它,但我不明白为什么这个加密狗无法检测到这些iBeacons
并告诉我它们UUID's
是什么?我错过了什么?
我想在2个蓝牙le usb适配器上同时读取蓝牙低能量信标的RSSI.我正在使用带有bluez 5的fedora 20系统和LogiLink BT0015适配器(CSR芯片).
当只连接一个适配器时,我的代码就像一个魅力,但在连接第二个适配器后,我收到输入/输出错误.
有人知道代码有什么问题吗?
还有其他方法可以读出RSSI吗?
#include <rssi.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#include <time.h>
#include <unistd.h>
class Adapter {
const char* bt_addr;
int hci_deviceid;
int hciSocket;
uint16_t hciHandle;
int l2capSock;
struct sockaddr_l2 sockAddr;
struct l2cap_conninfo l2capConnInfo;
socklen_t l2capConnInfoLen;
void init();
public:
Adapter(int hci_deviceid, const char* bt_addr);
Adapter(const char * bt_addr);
int getHciDeviceId();
int8_t read_rssi(int to);
};
Adapter::Adapter(int hci_deviceid, const char* bt_addr) {
this->hci_deviceid = hci_deviceid;
this->bt_addr = bt_addr;
init();
} …
Run Code Online (Sandbox Code Playgroud) 我正在寻找一种方便的方法来检测iPhone何时接近,几乎触及Raspberry Pi.检测应该从覆盆子进行.我不一定需要交换任何数据,我需要知道的是设备非常靠近或接触时.
我一直在集思广益,但是需要你的手,这是我的想法:
这是我的想法,我相信你有更好的想法,我很高兴听到他们!任何输入都很有价值:)