bluez

Bluetooth over uart using hciattach?

余生颓废 提交于 2019-12-23 07:56:27
问题 I am using QN9021 SoC working in controller mode (BLE Bluetooth core specification v4.0). It supports some standard HCI commands as well as some vendor specific commands. I am trying to attach it in my ubuntu laptop. The command that i have used is hciattach . hciattach -s 9600 /dev/ttyUSBx any 9600 noflow nosleep The hcidump shows while executing sudo hciconfig hci1 up . HCI sniffer - Bluetooth packet analyzer ver 5.37 device: hci1 snap_len: 1500 filter: 0xffffffffffffffff > HCI Event:

bluetoothctl No default controller available

删除回忆录丶 提交于 2019-12-23 07:26:50
问题 It's a bit wired here. I have a problem is bluetoothctl always said "No default controller available". I found there are many people had same problem with me. But the situation is a bit different from them. I can see my hciconfig -a have information like below And hcitool dev seems no problem as well. But I have no idea why my bluetoothctl always said "No default controller available" Even I turn down and turn up hci0 several times. It always in the same problem. BTW, my BlueZ is 5.39. And I

How to get device name with D-Bus?

匆匆过客 提交于 2019-12-23 05:15:48
问题 I develop an application in C++ on Linux, which interacts with blueooth devices (such as bluetooth sockets or speakers). I use D-Bus command to get list of paired devices: dbus-send --system --dest=org.bluez --print-reply $BTADAPTER org.bluez.Adapter.ListDevices It returns: method return sender=:1.0 -> dest=:1.90 reply_serial=2 array [ object path "/org/bluez/489/hci0/dev_00_1F_C5_75_45_5E" object path "/org/bluez/489/hci0/dev_F0_13_C3_00_A1_08" object path "/org/bluez/489/hci0/dev_00_11_12

BlueZ hci_* API to make the host discoverable

限于喜欢 提交于 2019-12-22 17:19:41
问题 Environment: Linux BlueZ Bluetooth stack C API No usage of the dbus interface I must say that the HCI BlueZ C API ( hci_lib.h ) is poorly documented, having that said, Is there a C hci_* API controlling the host discover-able state? something similar to "hci_write_simple_pairing_mode" enabling control of discoverability? 回答1: The following hci command makes the adapter discoverable hciconfig hci0 piscan Following is the corresponding code from hciconfig if (!strcmp(opt, "pscan")) dr.dev_opt =

Pulseaudio not detecting bluetooth headset [closed]

喜欢而已 提交于 2019-12-22 08:23:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am trying to connect a bluetooth headset to my RPI. My setup is the following: archlinux-arm, kernel: linux-raspberrypi 3.12.23-1 bluez4 4.101-4 from AUR, built and installed bluez-tools 0.1.38-3 bluez-utils 5.20-1 pulseaudio 5.0-1 pulseaudio-alsa 2-3 I scan for the device, successfully pair it, add as trusted

Setting up a pc bluetooth server for android [duplicate]

情到浓时终转凉″ 提交于 2019-12-20 10:48:11
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Service discovery failed exception using Bluetooth on Android Alright, I've been reading a lot of topics the past two or three days and nothing seems to have asked this. I am writing a PC side server for my andriod device, this is for exchanging some information and general debugging. Eventually I will be connecting to a SPP device to control a microcontroller. I have managed, using the following (Android to pc)

hcitool lescan shows I/O error

三世轮回 提交于 2019-12-20 09:28:03
问题 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? 回答1:

Bluetooth Low Energy : Android Gatt-Client connect to Linux Gatt Server

天大地大妈咪最大 提交于 2019-12-19 04:46:45
问题 I try to connect android to linux via bluetooth low energy GATT mode. There is a example code in Bluez: btgatt-server.c, I use it as server. The Android Side be as the Android official example:Connecting to a GATT Server. That is, use function BluetoothDevice::connectGatt(Context context, boolean autoConnect, BluetoothGattCallback callback). After running, the Android part returned the connection be successful,(the parameter of BluetoothGattCallback::onConnectionStateChange be STATE_CONNECTED

Wrong payload when using BlueZ stack as peripheral

时光怂恿深爱的人放手 提交于 2019-12-18 13:31:09
问题 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

Where is the bluetooth/bluetooth.h located in Linux?

▼魔方 西西 提交于 2019-12-18 12:05:04
问题 I want to build a c file based on BlueZ but seems no bluetooth.h file in my system. fatal error: bluetooth/bluetooth.h: No such file or directory I am sure the bluetooth dongle is running correctly and I have built Bluez successfully. Update For my case, I find the bluetooth.h in /user/include/bluetooth folder 回答1: You need to install libbluetooth-dev package for compiling your code sudo apt-get install libbluetooth-dev That should install the bluetooth header files. 来源: https://stackoverflow