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
4
votes
1 answer

iOS Central with BlueZ Peripheral disconnect due to insufficient auth

In our system, we have a BLE Peripheral (in this example, running on RPi4) using BlueZ 5.50. We have an iOS app that connects to this Peripheral as a Central. This connection can be seen in btmon, all looks ok: > HCI Event: LE Meta Event (0x3e) plen…
Matt
  • 367
  • 1
  • 5
  • 20
4
votes
0 answers

BLE Gatt custom services - How to notify only registered centrals (app level based)

Context An app connects via BLE 5.0 to a device for simple configuration/to get some information of the device. (Used as a service tool) It is not allowed to communicate with the device without some kind of registration before. Therefore, one can…
4
votes
1 answer

bluetoothctl does not show bluetooth low energy (BLE) device

I would like to pair my Bluetooth Low Energy Sport Watch (Suunto Ambit 3) to my Raspberry PI 3 B V1.2 I am using the RaspianOS Version 10 buster with kernel Version 5.4.79-v7+ This OS contains the bluez stack in version 5.50 which was installed…
4
votes
2 answers

(Bluez) How to get bluetooth headset buttons input?

I have a bluetooth headset connected to a linux device. I would like to programmatically receive the play/pause/next/previous/volUp/volDown button press. After some research I found out that I can interact with Bluez with dbus. I tried to register a…
lapinozz
  • 190
  • 2
  • 6
4
votes
1 answer

Automatically reconnecting a trusted BLE device

I am trying to automatically reconnect to a BLE device, a Taidoc Thermometer in this case. I have scanned for the device, then issued a 'pair' command which succeeds and then a 'trust' command which also succeeds. If I do 'info' on the device it is…
4
votes
1 answer

How can I kill/end/cancel/join a socket blocking thread?

I have made a thread which is able to read bluetooth messages sent from phone. My problem came when I realised I have no way of killing that thread safely. Method so far was user input which called exit() from within that thread, all weird stuff…
mega_creamery
  • 667
  • 7
  • 19
4
votes
0 answers

Is there a bug fix for sporadic SIGSEGV crashes of the BlueZ bluetoothd (version 5.50) in Debian 10?

I am developing software for a commercial product that runs on a Moxa MPC-2070 panel computer (Intel Atom based) under Debian 10 (Buster) with BlueZ (5.50) bluetooth support. The application has been developed using Qt Creator. I have been…
4
votes
1 answer

update local gatt characteristic value using bluetoothctl

I have set up a gatt Server on an raspberry pi using bluetoothctl and BlueZ 5.50 (according to this thread: BlueZ: How to set up a GATT server from the command line) I can connect to the gatt server from an other machine and also read the given…
4
votes
3 answers

Disable "Filter duplicates" setting for LE Set Scan Enable command

I would like to disable the 'Filter duplicates' setting on bluetooth controller level with the HCI Command 'LE Set Scan Enable' using the D-Bus Interface of bluetoothd. I already tried to set the 'DuplicateData' parameter from…
Risto
  • 983
  • 7
  • 14
4
votes
0 answers

Bluez: how to enble hci encryption

Hi I'm writing about the hcitool enc behavior. As described in the thread, I'm dealing with the Bluetooth stuff. I'm using the Bluez 5.4x C API. At the moment, I'm able to scan and open a connection with a BLE device either using the…
AV28
  • 67
  • 1
  • 9
4
votes
1 answer

How to programmatically remove /var/lib/bluetooth/[adapter]/cache files?

The peripheral I'm connecting to has the Service Changed characteristic, and my understanding is that on connect, if the Service Changed characteristic is present, the client may not cache attributes if it is not bonded. There's a nice explainer on…
Robert B
  • 3,195
  • 2
  • 16
  • 13
4
votes
1 answer

BlueZ AutoReconnect as device to PC

I'm working on a HID bluetooth device with the code on the device in Python; at the moment it can connect to a PC by running: os.system("hciconfig hcio class 0x002560") os.system("hciconfig hcio name DataPaqWalk") Then we can use pybluez to connect…
Neil Benn
  • 904
  • 1
  • 12
  • 31
4
votes
1 answer

BlueZ D-Bus C , application BLE

I am trying to write an application which searches Bluetooth devices nearby and communicates with them. My application is going to be written in C, and intended to work under Linux. Are there any tutorial or sample for working with BlueZ via D-Bus…
H.atyq
  • 41
  • 1
  • 4
4
votes
0 answers

How to scan Bluetooth "classic" and LE devices at the same time in C++?

How to scan Bluetooth "classic" and LE devices at the same time in C++? I'm using library BlueZ in C++ on Linux (OpenWrt, Ubuntu) and I know how to scan classic device and low-energy device separately, but I need all devices in one shot. The same…
Martin Special
  • 141
  • 1
  • 7
4
votes
2 answers

pybluez not detecting any devices

I have the following Python code: import bluetooth print(bluetooth.discover_devices()) This always waits a few seconds and prints out an empty list. My bluetooth adapter appears to be working, as I can discover devices with bluetoothctl easily by…
888
  • 291
  • 3
  • 11