bluez

hcitool lescan shows I/O error

為{幸葍}努か 提交于 2019-12-02 20:07:36
I'm trying to do a lescan using hcitool on the raspberry pi. The command prints out Set scan parameters failed: Input/output error. I'm not sure, what exactly happens here. My iPhone is advertising here. I'm using a BLE dongle from IOGear. However, if I restart my machine, it shows the a MAC address after I issue the lescan command, and starts showing the same error after I issue the lescan command a couple of more times. Is it like, the lescan command cannot be issued more than once? That happens often really often to me. I'm developing with it and it just happens from time to time. I was

android bluedroid

不问归期 提交于 2019-12-02 07:51:58
Android 4.2之前,Google一直使用的是Linux官方蓝牙协议栈BlueZ。BlueZ实际上是由高通公司在2001年5月基于GPL协议发布的一个开源项目,做为Linux 2.4.6内核的官方蓝牙协议栈。随着Android设备的流行,BlueZ也得到了极大的完善和扩展。例如Android 4.1中BlueZ的版本升级为4.93,它支持蓝牙核心规范4.0,并实现了绝大部分的Profiles。 从Android 4.2开始,Google便在Android源码中推出了它和博通公司一起开发的BlueDroid以替代BlueZ。BlueZ的创始者,高通公司也将在基于其芯片的Android参考设计中去除BlueZ,支持BlueDroid。 相比BlueZ,BlueDroid最值得称道的地方就是其框架结构变得更为简洁和清晰。对我们工程师来说这也是个不错的福利,清晰、简洁的架构使我们在debug过程中思路更清晰; 来源: oschina 链接: https://my.oschina.net/u/268088/blog/3060754

BlueZ Compatible kernel version

雨燕双飞 提交于 2019-12-01 08:15:57
I am using the kernel version 3.0.35 with bluez-4.98 in linux. With this I'm able to advertise the ibeacon as per the hcitool command given in one of the SO questions. I am also able to connect to the other ble device but not able to list its services using 'primary' in gatttool. I want to use my device now as a peripheral to let other device to get its Device Information, and later in the Central mode to know the Device Information of other ble devices. Will this kernel version and bluez version be compatible for the task? EDIT: I want the device information like the Firmware Revision,

Attribute requires authentication before read/write

江枫思渺然 提交于 2019-12-01 06:40:53
问题 I am using a Linux computer with bluez version 4.101. I am communicating with a BLE device in slave mode. I am trying to read data from the BLE device. But when I do that the read fails with the following error: "Attribute requires authentication before read/write". I can read data from many other characteristics but I fail on this one. The commands I am using are -gatttool -b 11:22:33:44:55:66 --char-read What do I need to do to read this data? Note: I can read this data from my iPhone. But

BlueZ Compatible kernel version

久未见 提交于 2019-12-01 06:05:21
问题 I am using the kernel version 3.0.35 with bluez-4.98 in linux. With this I'm able to advertise the ibeacon as per the hcitool command given in one of the SO questions. I am also able to connect to the other ble device but not able to list its services using 'primary' in gatttool. I want to use my device now as a peripheral to let other device to get its Device Information, and later in the Central mode to know the Device Information of other ble devices. Will this kernel version and bluez

Direct Control of HCI Device (Bypass Bluetooth Drivers) on Linux

℡╲_俬逩灬. 提交于 2019-11-30 23:53:05
I need to control an HCI device directly without the Linux drivers/kernel interfering. For example, when creating an LE connection to a peripheral, the driver is independently sending an "LE Connection Update" command which I would like to avoid. I though of two approaches to resolve this: Configure the bluetooth drivers to somehow disable interference with the HCI device (similar to the -r flag on hciattach), then control the HCI device using a regular AF_BLUEOOTH socket. Disable this particular HCI device, but keep the parent char device and connect to it directly. So far I did not succeed

Bluetooth LE on Raspbian

混江龙づ霸主 提交于 2019-11-30 22:49:35
I installed bluez-5.15 from source with the following configuration: $ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \ --localstatedir=/var --libexecdir=/lib --disable-systemd Then I had to copy gatttool manually into the /usr/local/bin dir $ sudo cp attrib/gatttool /usr/local/bin/ I rebooted the Raspberry Pi and tried the following to connect to my BLE device: $ sudo hciconfig hci0 up $ sudo hcitool lescan LE Scan ... EA:FB:B5:CE:B0:13 DfuTarg $ sudo hcitool lewladd EA:FB:B5:CE:B0:13 $ sudo hcitool lecc EA:FB:B5:CE:B0:13 Could not create connection: Input/output error So

Bluetooth LE on Raspbian

99封情书 提交于 2019-11-30 17:31:07
问题 I installed bluez-5.15 from source with the following configuration: $ ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc \ --localstatedir=/var --libexecdir=/lib --disable-systemd Then I had to copy gatttool manually into the /usr/local/bin dir $ sudo cp attrib/gatttool /usr/local/bin/ I rebooted the Raspberry Pi and tried the following to connect to my BLE device: $ sudo hciconfig hci0 up $ sudo hcitool lescan LE Scan ... EA:FB:B5:CE:B0:13 DfuTarg $ sudo hcitool lewladd EA

Wrong payload when using BlueZ stack as peripheral

心已入冬 提交于 2019-11-30 10:02:06
I tried to follow the steps provided by davidgyoung in this question . Here are the commands I use: hciconfig hci0 up hciconfig hci0 noleadv hcitool -i hci0 cmd 0x08 0x0008 48 45 4c 4c 4f 57 4f 52 4c 44 hciconfig hci0 leadv Which gives me this output: LE set advertise enable on hci0 returned status 12 < HCI Command: ogf 0x08, ocf 0x0008, plen 10 48 45 4C 4C 4F 57 4F 52 4C 44 > HCI Event: 0x0e plen 4 01 08 20 12 Note that I can't use the advised command hciconfig hci0 leadv 0 because it will throw the error Warning: unknown command - "0" . However, when I try to read out (e.g. with a hcidump -

Bluetooth LE Signal Strength Linux

十年热恋 提交于 2019-11-30 06:26:24
问题 Hello is there any way to get the signal strength of near by bluetooth le devises in linux? Or any good libraries for nodejs, php or mono ( I do know some c++ or python but would prefer to say away from them ) if a tool does not exsist but would be fairly easy to write Thank You 回答1: On Linux, the way to do this is with the hcitool command. However, you have to be connected to get the rssi of a device. If you want to achieve this from the command line, try: #hcitool rssi AA:BB:CC:DD:EE:FF If