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)
843 questions
76
votes
9 answers

Check battery level of connected bluetooth device on linux

How can I check the battery level of a connected bluetooth device? The device shows the battery level on Android so I'm assuming the device supports the GATT-based Battery Service. However, by entering "menu gatt" in bluetoothctl and then listing…
Ricardo
  • 915
  • 1
  • 6
  • 11
53
votes
2 answers

Use BlueZ Stack As A Peripheral (Advertiser)

Goal: Use BlueZ and an Bluetooth 4LE dongle to create a peripheral that advertises the bluetooth equivalent of "Hello World". Where I'm At: I've currently got the BlueZ stack setup and downloaded, I can use the hci tool to recognize and see the…
Ceryni
  • 694
  • 1
  • 7
  • 14
50
votes
3 answers

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

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…
Yiding
  • 2,834
  • 3
  • 18
  • 16
47
votes
10 answers

hcitool lescan shows I/O error

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.…
arpwal
  • 825
  • 1
  • 9
  • 17
43
votes
4 answers

Bluetooth Low Energy: listening for notifications/indications in linux

I'm trying to communicate with a BLE module through a Linux machine (the module is running a heart rate profile). So far, I've been able to do everything I need except listening for Notifications and indications (e.g. listening for the Heart Rate…
Youssif Saeed
  • 8,246
  • 4
  • 39
  • 62
37
votes
7 answers

Linux command line howto accept pairing for bluetooth device without pin

Is there a way to pair a device in linux without requiring a pin(for testing purposes so I need it to be done w/out human interaction, assuming you have root access)? bluez-simple-agent seems to require a pin except with some simple devices such as…
Roman A. Taycher
  • 16,401
  • 19
  • 81
  • 129
30
votes
2 answers

Setting up Bluetooth automatic pairing on Linux

I want to use any mobile phone to connect to a IoT device via Bluetooth Classic with the serial port protocol (SPP). The IoT device has no screen and no keyboard, and it's supposed to accept connections automatically as long as the connecting phone…
Jon Smark
  • 2,368
  • 20
  • 30
28
votes
6 answers

bluetoothctl No default controller available

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…
user3534541
  • 291
  • 1
  • 3
  • 4
28
votes
2 answers

Bluez: advertise service / gatt server example?

Goal I am developping a simple device running Linux. It is BLE capable, and I am currently using bluez 5.8. I want to trigger an action on this device using an iPhone. What already works: I can make the iPhone "see" the device. The iPhone also…
Gilles Gregoire
  • 1,636
  • 1
  • 12
  • 13
27
votes
2 answers

Using Bluetooth low energy in linux command line

I am working on using the Bluetooth low energy modem with Linux. I am using the command line option for that i.e. hcitool . I am able to the find the devices using the command: $ hcitool scan It is working fine for me, also I am able to broadcast…
V-Xtreme
  • 6,775
  • 6
  • 33
  • 76
25
votes
2 answers

How can I connect to the FitBit Zip over Bluetooth 4.0 LE on Linux with bluez?

I purchased a FitBit zip. This device uses Bluetooth 4.0 LE. I would like to at least connect to it via bluez. If that is successful I want to see how much of the protocol I can figure out. I am using a Lenovo P500 Ideapad which has integrated…
Thomas Dignan
  • 6,842
  • 3
  • 35
  • 48
22
votes
1 answer

Bluez Profile Registration

I'm trying to get a bluetoothe device working in Python on Bluez5. Currently I have the following: #set up a bluez profile to advertise device capabilities from a loaded service record def init_bluez_profile(self): print("Configuring Bluez…
Neil Benn
  • 762
  • 9
  • 26
22
votes
1 answer

Is there a way to increase BLE advertisement frequency in BlueZ?

I have a linux computer broadcasting a BLE advertisement using the following commands: sudo hciconfig hci0 up sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5 df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00 00 00 00 c5 00 00…
jjnebeker
  • 1,218
  • 1
  • 9
  • 12
22
votes
1 answer

Bluetooth connection between Android and Linux (RPi) lost on first write action

So I have been working on a project in which a device running Android (API level = 14) must connect to a server running Linux (to be specific: a Raspberry Pi) via Bluetooth. When a connection is established, the app sends an encrypted XML string to…
Kaj Nelissen
  • 873
  • 7
  • 26
21
votes
3 answers

Creating a Gatt Server?

I have a wider range question here, so if someone could point me to a doc or article that could explain this, that would suffice. Needless to say, a days worth of googling has gotten me nowhere, and I could use a helping hand. I am connecting to a…
Alxjrvs
  • 353
  • 1
  • 2
  • 8
1
2 3
56 57