Questions tagged [bluez]

BlueZ is the Bluetooth stack implemented in most Linux kernels.

Its goal is to make an implementation of the Bluetooth wireless standards specifications for Linux.
As of 2006, the BlueZ stack supports all core Bluetooth protocols and layers.
It was initially developed by Qualcomm and is available for Linux kernel versions 2.4.6 and up.

For user space applications, BlueZ essentially provides two ways to implement the stack in the application: Through DBus or through the so-called MGMT API. These methods are high- and low level respectively.

In addition to the basic stack, the bluez-utils and bluez-firmware packages contain low-level utilities such as dfutool, which can interrogate the Bluetooth adapter chipset to determine whether its firmware can be upgraded.

Further information about BlueZ:

Aditionally there are two IRC channels available on freenode.net where you can find developers and other users of BlueZ:

#bluez (development related topics)
#bluez-users (non-development related topics)
979 questions
5
votes
1 answer

Porting a C++ Program to Rust: Of reinterpret_cast, Structs and Bluetooth

I have a C++ program that statically links against libbluetooth/BlueZ, and I would like to port it to Rust as an exercise. One particularly ugly bit of the C++ code reads data from a UNIX file descriptor via read(), and the resulting buffer is then…
E Y
  • 281
  • 2
  • 11
5
votes
2 answers

GATTTool fails to read/write characteristics

I'm trying to use bluez's gatttool to write to some demo characteristics on a BLE custom board. Specifically I'm hoping to write to a characteristic and read the value back out. Here's what I'm doing (where 0x25 is the handle for the…
WKleinberg
  • 53
  • 1
  • 4
5
votes
1 answer

Establishing multiple BLE connections simultaneously using BlueZ

I have a Linux C application which requires making multiple connections to BLE devices. The application uses a library stripped from gatttool. The BLE devices have a very slow advertising rate, so it takes a long time for a to connect to be…
mw.
  • 357
  • 3
  • 18
5
votes
0 answers

Bluez 5.28 gatt server unable to register services for my device

I want to use my Raspberry Pi running Raspbian version 3.18.11+ with a BATTOP Bluetooth CSR 4.0 Dongle as a BLE peripheral and connect to it using an iOS device. I'm using Bluez 5.28 and the gatt_example plugin as a first step before I write a…
Sam
  • 126
  • 9
5
votes
1 answer

Compile code using bluez gatt api

I am currently implementing a BLE server using GATT api from bluez5 in C. I need to use my own service with custom characteristics. Problem is that bluez5 does not install all header of GATT api. Same problem in libbluetooth with does not provide…
ArthurLambert
  • 749
  • 1
  • 7
  • 30
5
votes
1 answer

BlueZ/Pybluez - Bluetooth LE scan while connected to peripheral

Short question: Is it possible to scan for LE devices while periodically connecting to some and reading characteristics a) in general [does the protocol allow it] and b) with the BlueZ stack? Long question: I'm writing a Python script to scan for LE…
thegeebe
  • 625
  • 1
  • 6
  • 17
5
votes
1 answer

Wrong payload when using BlueZ stack as peripheral

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…
marce
  • 781
  • 1
  • 10
  • 20
5
votes
0 answers

How to get Disconnect Event from BLE layer - Bluez/Linux

A previous question How to get Disconnect Event from GATT Server on Bluez/Linux addresses the disconnect event for Bluez stack. However since the disconnection detection is at the GATT layer it takes a while for the disconnection to be detected at…
SC-SL
  • 377
  • 3
  • 19
5
votes
1 answer

Raspberry-pi as connectable beacon

I want to build some kind of two-way bluetooth connection on Raspberry-pi which actually works as beacon. Based on RadiusNetworks tutorial (How to Make an iBeacon Out of a Raspberry Pi…
froger_mcs
  • 13,972
  • 5
  • 23
  • 34
5
votes
3 answers

How to retrieve advertising payload from iBeacon / BLE

How do you retrieve the advertising payload for a Bluetooth LE emitter in Linux? Specifically, I've configured Arduinos and Raspberry Pis using hcitool to act as iBeacons. What I'm looking for is a command to print out what the current advertising…
Samrung
  • 53
  • 1
  • 1
  • 3
5
votes
1 answer

How to scan for Bluetooth low energy devices using bluez API

I'm new in programming Bluetooth low energy using BlueZ. I want to develop a native code c to scan nearby devices using a BlueZ API for Bluetooth low energy under Android 4.0.3. Anyone know which BlueZ methods I should use?
user3432104
  • 81
  • 1
  • 3
5
votes
2 answers

Having difficulty pairing with a bluetooth OBDII device on Ubuntu

I'm attempting to pair with a automotive OBDII bluetooth device from a Beaglebone Black running Ubuntu Linux, and not having a ton of luck. I was able, initially to set up hci0 using bluez-simple-agent, although it never asked me for a PIN. The PIN…
tomgersic
  • 401
  • 6
  • 12
5
votes
1 answer

BlueZ 5.4 DBus API ConnectProfile GATT service UUID

How can I connect to a GATT service using the DBus API with BlueZ? I have used the BlueZ DBUS API to discover a device, connect, and discover the GATT service UUID's. However when I try to ConnectProfile for one of the GATT service UUID's I get a…
sandeepmistry
  • 2,058
  • 4
  • 20
  • 25
4
votes
2 answers

How can a scannable BLE beacon be implemented using the bluez stack?

I'm trying to implement a BLE beacon which allows for additional information to be requested. My understanding so far is that in BLE, a device can broadcast advertisement packets. An advertisement packet can indicate that the device is scannable.…
Hristo Kamenov
  • 103
  • 1
  • 10
4
votes
1 answer

Bluez/Python buffering causes laggy bluetooth connection

I wrote a Python program that both reads and writes a L2CAP connection via a bluetooth socket (see example below) to talk to some hardware. However the code may want to do too much IO for the bluetooth adapter too handle, so I equipped it to handle…
Poohl
  • 1,932
  • 1
  • 9
  • 22