Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
0
answers
17
views
Why doesn't org.bluez.MediaPlayer1 appear when my Raspberry Pi connects to my iPhone via Bluetooth?
I'm using a Raspberry Pi with BlueZ 5.66 and Linux 6.6. I want to use the Pi as a Bluetooth audio sink (A2DP) and AVRCP controller so I can stream audio from an iPhone and control playback (play/pause/next/etc) via D-Bus using the `org.bluez.MediaPlayer1` interface. This works correctly when the iPh...
I'm using a Raspberry Pi with BlueZ 5.66 and Linux 6.6. I want to use the Pi as a Bluetooth audio sink (A2DP) and AVRCP controller so I can stream audio from an iPhone and control playback (play/pause/next/etc) via D-Bus using the
org.bluez.MediaPlayer1
interface.
This works correctly when the iPhone initiates the Bluetooth connection to the Pi. I can see the MediaPlayer1
interface under the device path on D-Bus, and playback control works.
However, if I initiate the connection from the Pi using:
bluetoothctl connect XX:XX:XX:XX:XX:XX
…the connection succeeds, but org.bluez.MediaPlayer1
never appears. Even if I start playback on the iPhone afterward, the interface is still missing.
I'm using BlueZ as the Bluetooth stack and BlueALSA for audio. I'm not using PulseAudio and would prefer to avoid it due to its complexity. From what I understand, MediaPlayer1
is exposed by BlueZ when acting as an AVRCP controller and detecting a remote media player. Is there a way to force or trigger org.bluez.MediaPlayer1
to appear when the Pi initiates the Bluetooth connection to the iPhone? Are there any known limitations, timing issues, or configuration-based workarounds that would allow this to work more reliably (ideally without switching to PulseAudio)?
**Steps to reproduce:**
1. Pair and trust the iPhone:
bluetoothctl
power on
agent on
default-agent
pair XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
2. Start music playback on the iPhone.
3. Check D-Bus for /player0
:
busctl tree org.bluez
**Expected:**
A /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/player0
path should appear, with org.bluez.MediaPlayer1
exposed.
**Actual:**
That path and interface only appear if the iPhone initiates the Bluetooth connection to the Pi. They never appear if the Pi initiates the connection.
joeyvanlierop
(1 rep)
Jul 28, 2025, 07:05 PM
2
votes
1
answers
2861
views
hcitool lescan (Bluetooth LE or any bluetooth scan) in docker under Non-Privileged & Non-host Network mode is possible?
For a specific task, **I am failing to scan BLE / BlueZ (`hcitool`, `gatttool`, `btdevice-l`) in Docker under non-privileged and Non-Host network mode.** These are my results (in Debian-Jessie-8.8.0 Host and `debian:jessie docker image`): root1@73ab53a9268e:/# hciconfig -a Can't open HCI socket.: Op...
For a specific task, **I am failing to scan BLE / BlueZ (
hcitool
, gatttool
, btdevice-l
) in Docker under non-privileged and Non-Host network mode.**
These are my results (in Debian-Jessie-8.8.0 Host and debian:jessie docker image
):
root1@73ab53a9268e:/# hciconfig -a
Can't open HCI socket.: Operation not permitted
root1@73ab53a9268e:/# bt-device -l
Couldn't connect to DBus system bus: Could not connect: Connection refused
On another image:
root2@0d208802d44a:/# hciconfig -a
Can't open HCI socket.: Address family not supported by protocol
I even gave ALL-CAP permissions for Docker on Host but still could not make it.
docker run --name container-ID --cap-add=ALL -d -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro Image-ID
So, is it possible by any chance to scan BLE / BlueZ in docker under Non-Privileged & Non-Host network mode?
Edwin K
(21 rep)
Nov 14, 2017, 09:26 AM
• Last activity: Jul 25, 2025, 06:08 PM
3
votes
1
answers
4500
views
USB Bluetooth dongle not working
I am struggling to get my **bluetooth adapter** work on my Linux desktop. **I see it when I plug it in, but basically, nothing else works correctly**: $ lsusb Bus 002 Device 006: ID 0a12:0002 Cambridge Silicon Radio, Ltd Fontline Test Equipment Bluetooth Device I can't put it up: $ sudo hciconfig hc...
I am struggling to get my **bluetooth adapter** work on my Linux desktop.
**I see it when I plug it in, but basically, nothing else works correctly**:
$ lsusb
Bus 002 Device 006: ID 0a12:0002 Cambridge Silicon Radio, Ltd Fontline
Test Equipment Bluetooth Device
I can't put it up:
$ sudo hciconfig hci0 up
Can't init device hci0: Cannot assign requested address (99)
Bluetooth service is not working properly and can't be started:
$ sudo service bluetooth status
bluetooth stop/waiting
$ sudo service bluetooth start
start: Job failed to start
The logs say : "init: Failed to spawn bluetooth main process: unable to execute: No such file or directory". There are also plenty of :
[ 5485.753603] init: bluetooth main process ended, respawning
[ 5485.776272] init: bluetooth main process (24531) terminated with status 1
I tried to re-install bluetooth, blueman etc. They depends on the bluez package, and one of the issues(?) seems to be that **I fail to install bluez**.
$ sudo apt-get install blueman
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
bluez
Suggested packages:
bluez-hcidump
The following NEW packages will be installed:
blueman bluez
...
Setting up bluez (4.101-0ubuntu13.1) ...
reload: Job is not running: dbus
invoke-rc.d: initscript dbus, action "force-reload" failed.
start: Job failed to start
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing package bluez (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of blueman:
blueman depends on bluez (>= 4.61); however:
Package bluez is not configured yet.
dpkg: error processing package blueman (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
bluez
blueman
Bluetooth is not blocked:
$ sudo rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
Bluetooth kernel modules are present:
$ lsmod | grep -E "blue|bt|rfco"
rfcomm 69160 0
btusb 32412 0
bluetooth 391136 4 btusb,rfcomm
Those are the packages I have related to bluetooth:
$ dpkg -l | grep -i blue
iU blueman 1.23-git201403102151-1ubuntu1 amd64 Graphical bluetooth manager
iF bluez 4.101-0ubuntu13.1 amd64 Bluetooth tools and daemons
ii bluez-compat 4.101-0ubuntu13.1 amd64 BlueZ 3.x compatibility binaries
ii gir1.2-gnomebluetooth-1.0 3.8.2.1-0ubuntu4.2 amd64 Introspection data for GnomeBluetooth
rc gnome-bluetooth 3.8.2.1-0ubuntu4.1 amd64 GNOME Bluetooth tools
rc indicator-bluetooth 0.0.6+14.04.20140207-0ubuntu2 amd64 System bluetooth indicator.
ii libbluetooth-dev 4.101-0ubuntu13.1 amd64 Development files for using the BlueZ Linux Bluetooth library
ii libbluetooth3:amd64 4.101-0ubuntu13.1 amd64 Library to use the BlueZ Linux Bluetooth stack
ii libgnome-bluetooth11 3.8.2.1-0ubuntu4.2 amd64 GNOME Bluetooth tools - support library
ii libgnome-bluetooth8 3.2.2-0ubuntu5.1 amd64 GNOME Bluetooth tools - support library
ii libmatebluetooth 1.2.1-2+precise amd64 MATE Bluetooth tools (library)
rc mate-bluetooth 1.2.1-2+precise amd64 MATE Bluetooth tools
In this question , I saw mention of bluez-firmware, but couldn't find that yet.
$ sudo apt-get install bluez-firmware
...
E: Unable to locate package bluez-firmware
In attempts to solve the issue, I upgraded my system to the latest **Linux Mate 17.3 Rosa + upgraded the kernel to 4.4**, however this does not solve the issue.
I have been reading tons of more or less similar issue, but could not find the answer :(
Thanks for your help!
user369353
(31 rep)
Jan 19, 2016, 10:23 AM
• Last activity: Jun 29, 2025, 05:05 AM
0
votes
1
answers
3852
views
Cannot pair/connect to my headphones : Failure: Module initialization failed
I'm using linux kernel v4.4.0-148 and bluez v5.36. I cannot pair nor connect to my bluetooth headphones Muse "M-260 BT" with `bluetoothctl` : $ bluetoothctl [NEW] Controller 34:E6:AD:A1:9B:8A seb-C70D-B-311 [default] [bluetooth]# power on [CHG] Controller 34:E6:AD:A1:9B:8A Class: 0x00010c Changing p...
I'm using linux kernel v4.4.0-148 and bluez v5.36.
I cannot pair nor connect to my bluetooth headphones Muse "M-260 BT" with
bluetoothctl
:
$ bluetoothctl
[NEW] Controller 34:E6:AD:A1:9B:8A seb-C70D-B-311 [default]
[bluetooth]# power on
[CHG] Controller 34:E6:AD:A1:9B:8A Class: 0x00010c
Changing power on succeeded
[CHG] Controller 34:E6:AD:A1:9B:8A Powered: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 34:E6:AD:A1:9B:8A Discovering: yes
[NEW] Device 00:13:09:01:19:61 M-260 BT
[bluetooth]# scan off
[CHG] Device 00:13:09:01:19:61 RSSI is nil
[CHG] Controller 34:E6:AD:A1:9B:8A Discovering: no
Discovery stopped
[bluetooth]# pair 00:13:09:01:19:61
Attempting to pair with 00:13:09:01:19:61
[CHG] Device 00:13:09:01:19:61 Connected: yes
[CHG] Device 00:13:09:01:19:61 Connected: no
[CHG] Device 00:13:09:01:19:61 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device 00:13:09:01:19:61 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 00:13:09:01:19:61 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device 00:13:09:01:19:61 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:13:09:01:19:61 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device 00:13:09:01:19:61 Paired: yes
Pairing successful
[CHG] Device 00:13:09:01:19:61 Connected: no
[bluetooth]# paired-devices
Device 00:13:09:01:19:61 M-260 BT
[bluetooth]# connect 00:13:09:01:19:61
Attempting to connect to 00:13:09:01:19:61
Failed to connect: org.bluez.Error.Failed
[bluetooth]# quit
[DEL] Controller 34:E6:AD:A1:9B:8A seb-C70D-B-311 [default]
The bluetooth service is running :
$ sudo initctl status bluetooth
bluetooth start/spawned, process 1628
But the syslog says bluetoothd: a2dp-sink profile connect failed for 00:13:09:01:19:61: Protocol not available
although the pulseaudio-module-bluetooth
package is already installed :
$ grep bluetoothd /var/log/syslog | tail -5
Jun 30 17:25:31 seb-C70D-B-311 bluetoothd: Failed to obtain handles for "Service Changed" characteristic
Jun 30 17:53:44 seb-C70D-B-311 bluetoothd: a2dp-sink profile connect failed for 00:13:09:01:19:61: Protocol not available
Jun 30 17:53:52 seb-C70D-B-311 bluetoothd: a2dp-sink profile connect failed for 00:13:09:01:19:61: Protocol not available
Jun 30 18:01:57 seb-C70D-B-311 bluetoothd: Failed to confirm name for hci0: Failed (0x03)
Jun 30 18:08:20 seb-C70D-B-311 bluetoothd: a2dp-sink profile connect failed for 00:13:09:01:19:61: Protocol not available
$ dpkg -l pulseaudio-module-bluetooth
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-====================-====================-===================================================================
ii pulseaudio-module-bluetooth 1:4.0-0ubuntu11 amd64 Bluetooth module for PulseAudio sound server
EDIT0 : Noticed the module-bluetooth-discover
was not loaded, so I tried to load it but it fails :
$ pactl list modules short | grep module-bluetooth-discover
$ pactl load-module module-bluetooth-discover
Failure: Module initialization failed
Can you help me ?
SebMa
(2433 rep)
Jun 30, 2020, 11:31 AM
• Last activity: Jun 21, 2025, 02:06 AM
3
votes
1
answers
4786
views
Trying to connect bose quietcomfort 35 headset over bluetooth on arch linux
There is another question [here](https://unix.stackexchange.com/questions/292189/pairing-bose-qc-35-over-bluetooth-on-fedora), but i followed those instructions and it still didn't work. Here is the systemctl status Oct 06 10:02:38 TRAYUSH bluetoothd[376]: Bluetooth daemon 5.42 Oct 06 10:02:38 TRAYU...
There is another question [here](https://unix.stackexchange.com/questions/292189/pairing-bose-qc-35-over-bluetooth-on-fedora) , but i followed those instructions and it still didn't work.
Here is the systemctl status
Oct 06 10:02:38 TRAYUSH bluetoothd: Bluetooth daemon 5.42
Oct 06 10:02:38 TRAYUSH systemd: Started Bluetooth service.
Oct 06 10:02:38 TRAYUSH bluetoothd: Starting SDP server
Oct 06 10:02:38 TRAYUSH bluetoothd: Bluetooth management interface 1.12 initialized
Oct 06 10:02:38 TRAYUSH bluetoothd: Failed to obtain handles for "Service Changed" characteristic
Oct 06 10:02:38 TRAYUSH bluetoothd: Sap driver initialization failed.
Oct 06 10:02:38 TRAYUSH bluetoothd: sap-server: Operation not permitted (1)
Oct 06 10:02:38 TRAYUSH bluetoothd: Failed to set mode: Not Supported (0x0c)
Oct 06 10:03:00 TRAYUSH bluetoothd: a2dp-sink profile connect failed for 04:52:C7:0E:7F:12: Protocol not available
Oct 06 10:06:20 TRAYUSH bluetoothd: a2dp-sink profile connect failed for 04:52:C7:0E:7F:12: Protocol not available
Here are the contents of /etc/bluetooth/main.conf
[General]
ControllerMode=bredr
And the contents of /etc/bluetooth/audio.conf
[General]
Enable=Source,Sink,Headset,Gateway,Control,Socket,Media
Here is what happens when I try to connect via bluetoothctl
[trash@TRAYUSH ~]$ bluetoothctl
[NEW] Controller 98:58:8A:07:14:FC TRAYUSH [default]
[NEW] Device 04:52:C7:0E:7F:12 QC35
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# connect 04:52:C7:0E:7F:12
Here is the relevant information from /etc/pulse/default.pa
### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
Any help is appreciated, thanks.
Ninja Edit: Pulseaudio-bluetooth IS installed.
Alex
(131 rep)
Oct 7, 2016, 03:26 AM
• Last activity: Jun 20, 2025, 01:03 PM
0
votes
0
answers
21
views
Issue in l2cap test - Bluez
I'm currently testing the bluez tools like l2ping & l2test, So my intention was to interface between two devices through l2cap layer. I have cloned the bluez repository on two raspberry pi devices, and made necessary configuration to execute those tools, but I didn't get the expected output instead...
I'm currently testing the bluez tools like l2ping & l2test, So my intention was to interface between two devices through l2cap layer.
I have cloned the bluez repository on two raspberry pi devices, and made necessary configuration to execute those tools, but I didn't get the expected output instead the program stuck at socket level during connect stage on sender due to which the receiver waits on accept stage, this result in either Host is down or Connection Refused Error, also I tried this sample tools on two different systems(PC) got the similar results, can someone guide me on what I'm missing here.
$ sudo ./tools/l2test -p C5:86:1A:53:D7:3B
Can't connect socket: Host is down
Server
Advertisment start success
*** Booting Zephyr OS build v4.1.0-1545-gfa45bebccfb1 ***
[00:00:00.255,462] bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.255,493] bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.255,523] bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 4.1 Build 99
[00:00:00.256,561] bt_hci_core: Identity: C5:86:1A:53:D7:3B (random)
[00:00:00.256,591] bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1
[00:00:00.256,622] bt_hci_core: LMP: version 5.4 (0x0d) subver 0xffff
Here, I made a NRF device as peripheral which is discoverable & connectable, it advertises its info, using which it can be connected, this device can be connected using bluetoothctl but couldn't be connected using l2test
Two Raspberry Pis running BlueZ. My goal is to establish an L2CAP channel using tools like l2test and l2ping. The peripheral device (nRF52) successfully advertises and can be connected via bluetoothctl, but any attempt to connect using l2test fails with errors like Host is down or Connection refused. I've also replicated the test between two Raspberry Pi devices with the same result: the server waits on a PSM, but the client fails to connect. I'm trying to understand if this is a configuration issue, a limitation of the tools, or if additional setup (e.g., registering a PSM for LE CoC) is needed. I'd appreciate guidance on what's missing or how to properly use L2CAP over BLE with BlueZ and Zephyr.
2nd Approach using two PI devices
pi@raspberrypi:~/bluez $ sudo ./tools/l2test -V le_public -r
l2test: Waiting for connection on psm 128 ...
pi@raspberrypiclient:~/bluez $ sudo ./tools/l2test -V le_public -s DC:A6:32:76:10:DA
l2test: Can't connect: Connection refused (111)
Sandy
(1 rep)
Jun 16, 2025, 01:35 PM
2
votes
0
answers
124
views
Galaxy Buds 3 Pro: Boot Bluetooth Sync Issue (Fedora 42 / Windows 11)
I want to sync Bluetooth 5.4 keys for **Galaxy Buds 3 Pro** between Win 11 and Linux (Fedora 42). I paired them under Linux and they worked. It created two devices: ```text $/var/lib/bluetooth/AD:AP:TE:R0:00:00# grep Name= */info ... BU:D1:11:11:11:11/info:Name=NAME's Buds3 Pro # BUD111111111 BU:D2:...
I want to sync Bluetooth 5.4 keys for **Galaxy Buds 3 Pro** between Win 11 and Linux (Fedora 42).
I paired them under Linux and they worked. It created two devices:
$/var/lib/bluetooth/AD:AP:TE:R0:00:00# grep Name= */info
...
BU:D1:11:11:11:11/info:Name=NAME's Buds3 Pro # BUD111111111
BU:D2:22:22:22:22/info:Name=NAME's Buds3 Pro # BUD222222222
...
Then I rebooted to windows and paired. Device manager showed three Buds 3 Pro devices:
BTHLE\Dev_BUD111111111 # Low Energy interface
BTHENUM\Dev_BUD222222222 # Classic (BR/EDR) interface
BTHLE\Dev_BUD333333333 # Low Energy interface
Then I used these commands to extract relevant info:
sudo chntpw -e '/run/media/username/*/Windows/System32/config/system'
> cd ControlSet001\Services\BTHPORT\Parameters\Keys\adapter00000
> ls
Node has 9 subkeys and 5 values
key name
...
size type value name [value if type DWORD]
16 3 REG_BINARY
...
16 3 REG_BINARY
> hex CentralIRK # not required, right?
# Bud1
> cd bud111111111
> ls
Node has 0 subkeys and 9 values
size type value name [value if type DWORD]
16 3 REG_BINARY
4 4 REG_DWORD 16 [0x10]
8 b REG_QWORD
4 4 REG_DWORD 0 [0x0]
16 3 REG_BINARY
8 b REG_QWORD
4 4 REG_DWORD 0 [0x0]
4 4 REG_DWORD 1 [0x1]
4 4 REG_DWORD 45 [0x2d]
> hex LTK # bud1.ltk
> hex IRK # bud1.irk
# Bud2:
> hex bud222222222 # bud2.linkkey
# Bud3:
> cd ../bud333333333
> hex Address # return little endian representation of this: 0000BUD222222222
> hex IRK # bud3.irk
> hex LTK # bud3.ltk
I replaced the values as follows:
**/var/lib/bluetooth/AD:AP:TE:R0:00:00/BU:D1:11:11:11:11/info**
[General]
Name=NAME's Buds3 Pro
Appearance=0x0941
AddressType=public
SupportedTechnologies=LE;
Trusted=true
Blocked=false
Services=00001800-0000-1000-8000-00805f9b34fb;00001801-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001844-0000-1000-8000-00805f9b34fb;00001846-0000-1000-8000-00805f9b34fb;0000184d-0000-1000-8000-00805f9b34fb;0000184e-0000-1000-8000-00805f9b34fb;0000184f-0000-1000-8000-00805f9b34fb;00001850-0000-1000-8000-00805f9b34fb;00001853-0000-1000-8000-00805f9b34fb;00001855-0000-1000-8000-00805f9b34fb;00002b51-0000-1000-8000-00805f9b34fb;00008fe1-0000-1000-8000-00805f9b34fb;a7a473e9-19c6-491b-aea6-7ea92b8f043a;
[IdentityResolvingKey]
Key={bud1.irk}
[PeripheralLongTermKey]
Key={bud1.ltk}
Authenticated=2
EncSize=16
EDiv=0
Rand=0
[SlaveLongTermKey]
Key={bud1.ltk}
Authenticated=2
EncSize=16
EDiv=0
Rand=0
[ConnectionParameters]
MinInterval=24
MaxInterval=24
Latency=0
Timeout=600
[DeviceID]
Source=1
Vendor=117
Product=40979
Version=256
**/var/lib/bluetooth/AD:AP:TE:R0:00:00/BU:D2:22:22:22:22/info**
[General]
Name=NAME's Buds3 Pro
Class=0x244404
Appearance=0x0941
AddressType=public
SupportedTechnologies=BR/EDR;LE;
PreferredBearer=last-seen
Trusted=true
Blocked=false
Services=00001101-0000-1000-8000-00805f9b34fb;0000110b-0000-1000-8000-00805f9b34fb;0000110c-0000-1000-8000-00805f9b34fb;0000110e-0000-1000-8000-00805f9b34fb;0000111e-0000-1000-8000-00805f9b34fb;00001200-0000-1000-8000-00805f9b34fb;00001844-0000-1000-8000-00805f9b34fb;0000184d-0000-1000-8000-00805f9b34fb;0000184e-0000-1000-8000-00805f9b34fb;0000184f-0000-1000-8000-00805f9b34fb;00001850-0000-1000-8000-00805f9b34fb;00001853-0000-1000-8000-00805f9b34fb;00002b51-0000-1000-8000-00805f9b34fb;2e73a4ad-332d-41fc-90e2-16bef06523f2;a23d00bc-217c-123b-9c00-fc44577136ee;a7a473e9-19c6-491b-aea6-7ea92b8f043a;b4a9d6a0-b2e3-4e40-976d-a69f167ea895;d908aab5-7a90-4cbe-8641-86a553db0154;e74beac1-ab40-423f-b746-fb9869a982dd;e7ab2241-ca64-4a69-ac02-05f5c6fe2d62;f8620674-a1ed-41ab-a8b9-de9ad655729d;
[LinkKey]
Key={bud2.linkkey}
Type=7
PINLength=0
[IdentityResolvingKey]
Key={bud3.irk}
[PeripheralLongTermKey]
Key={bud3.ltk}
Authenticated=2
EncSize=16
EDiv=0
Rand=0
[SlaveLongTermKey]
Key={bud3.ltk}
Authenticated=2
EncSize=16
EDiv=0
Rand=0
[DeviceID]
Source=1
Vendor=117
Product=40979
Version=1
However, it does not work: When I try to enable the connection in BT settings, the wheel turns for a while and no connection is established. No logs in journalctl -u bluetooth -f
.
If anyone can help, I'd be very grateful.
MrTomRod
(121 rep)
Apr 26, 2025, 04:21 PM
• Last activity: Jun 16, 2025, 05:57 AM
2
votes
1
answers
8613
views
How to access bluetooth services
Oddly, I can't seem to find anything about this. I am trying to access/read/write bluetooth services on my device. I am using `bluetoothctl` command. There are a set of services, which shows up with info command and another set, which shows up in `menu gatt`/`list-attributes`. info: Device (public)...
Oddly, I can't seem to find anything about this.
I am trying to access/read/write bluetooth services on my device. I am using
bluetoothctl
command. There are a set of services, which shows up with info command and another set, which shows up in menu gatt
/list-attributes
.
info:
Device (public)
Name:
Alias:
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (3dda0001-957f-7d4a-34a6-74696673696d)
ManufacturerData Key: 0x
ManufacturerData Value:
I can access the gatt services but I can't find a way to access the first set of services displayed above. I was wondering, if there is any way? It appears to be that these services are not GATT but all my searches about reading values lead to GATT.
For instance, when I connect the device to Android, hcisnoop log shows HID handle 1812 is being used when I press the button on the BLE device. It also appears as /dev/hidraw2.
I was wondering, if I can specifically listen to 1812 handle or uuid for the raw input? or another handle such as 180a or 1801 etc...?
Saren Tasciyan
(243 rep)
Mar 9, 2019, 12:58 AM
• Last activity: May 23, 2025, 02:04 AM
0
votes
1
answers
22
views
Is it possible to connect a serial port visible from userspace back into the kernel's BlueZ stack?
I have a linux kernel and device tree that presents the userspace with a serial port /dev/ttymxc0. The serial port is connected to a Bluetooth device which is used by a user-space Bluetooth stack. If the kernel has BlueZ compiled in, is it possible (e.g. by sysfs magic) to connect the serial port tt...
I have a linux kernel and device tree that presents the userspace with a serial port /dev/ttymxc0.
The serial port is connected to a Bluetooth device which is used by a user-space Bluetooth stack.
If the kernel has BlueZ compiled in, is it possible (e.g. by sysfs magic) to connect the serial port ttymxc0 to BlueZ such that it appears as an hci device?
I know that I can do this by changing the device tree but wanted to know whether this was possible without rebooting with a different device tree?
srl100
(13 rep)
May 20, 2025, 03:16 PM
• Last activity: May 20, 2025, 03:19 PM
-1
votes
1
answers
94
views
Connect two (2) BT speakers
I'm running a Debian `bookworm` "headless" system (no X/Wayland/GUI is installed). I've been using this system to provide audio for some time with a single Bluetooth speaker, and it has worked very reliably. I use `mpd` and `mpc` as the "music player" software. I've got the 'backports' version of `p...
I'm running a Debian
bookworm
"headless" system (no X/Wayland/GUI is installed). I've been using this system to provide audio for some time with a single Bluetooth speaker, and it has worked very reliably. I use mpd
and mpc
as the "music player" software. I've got the 'backports' version of pipewire
(ver 1.2.7) installed, and after that there was very little to do beyond "connect" using bluetoothctl
- the system "just worked".
Now I'm trying to "upgrade" my system. I got a pair of "Bose Flex" BT speakers. I can connect either one of the speakers using bluetoothctl
- but cannot connect the second one. I have wondered if this was because I needed to set my system to use the 'A2DP profile'. But after an extensive search, I cannot find a source that explains how to do this.
Can someone explain how to get both speakers connected in "stereo" mode? *BTW, I have read and tried the solution described in the [Bose documentation](https://support.bose.com/s/article/slflxse-speakerwireless-enabling-or-disabling-party-or-stereo-mode---ka08c000000hh1waau?language=en_US) , but **it does not work reliably***.
By ***does not work reliably***, I mean this:
>After **an interruption** (re-boot, extended pause in playback), the speakers **revert** to a disconnected state, requiring the "button pushing procedure" be repeated. Maybe this is "as good as it gets" - but I find that hard to believe.
1. **Following is some system information:**
$ inxi -Fxxxrz # applicable portions
...
Audio:
Device-1: bcm2835-hdmi driver: vc4_hdmi bus-ID: N/A chip-ID: brcm:3f902000 class-ID: hdmi
API: ALSA v: k6.12.20+rpt-rpi-v8 status: kernel-api
Server-1: PipeWire v: 1.2.7 status: active with: 1: pipewire-pulse status: active
2: wireplumber status: active
...
Bluetooth:
Device-1: pl011 driver: uart_pl011 bus-ID: N/A chip-ID: arm:3f201000 class-ID: serial
Report: hciconfig ID: hci0 rfk-id: 0 state: up address: bt-v: 3.0 lmp-v: 5.0
sub-v: 6119 hci-v: 5.0 rev: 17e
2. Using bluetoothctl
:
After a reboot
I see that **both** speakers are connected, but if I start playback, no sound comes from the ...D9:1F
speaker:
$ bluetoothctl
...
[Bose Flex SE SoundLink]# devices Connected
Device E4:58:BC:16:87:70 Bose Flex SE SoundLink
Device E4:58:BC:16:D9:1F Bose Flex SE SoundLink
[Bose Flex SE SoundLink]#
The speaker that is **not connected** (...D9:1F
) periodically announces it is "ready to connect". After a short time, these announcements stop, and I see that this speaker is no longer listed as connected:
$ bluetoothctl
...
[Bose Flex SE SoundLink]# devices Connected
Device E4:58:BC:16:87:70 Bose Flex SE SoundLink
[Bose Flex SE SoundLink]#
I've no idea why the speaker that is **not connected** has decided to disconnect???
3. **WirePlumberControl
(wpctl
) provides the following status which shows mpd
is *trying* to send output to two channels of my Bose speakers**:
Also note that wpctl
lists two audio sinks: 69. Built-in Audio Stereo
("bcm2835 Headphones"), and * 72. Bose Flex SE SoundLink
(my speaker(s))
This is quite confusing to me. The output of wpctl
below ***may*** indicate that the issue is **not** with bluetoothctl
, but rather with the need for additional ***"configuration"*** in wireplumber
or pipewire
? ...puzzling!
$ wpctl status
PipeWire 'pipewire-0' [1.2.7, pi@rpi3b1, cookie:3579530487]
└─ Clients:
33. pipewire [1.2.7, pi@rpi3b1, pid:705]
35. WirePlumber [1.2.7, pi@rpi3b1, pid:704]
36. WirePlumber [export] [1.2.7, pi@rpi3b1, pid:704]
75. Music Player Daemon [1.2.7, pi@rpi3b1, pid:700]
81. wpctl [1.2.7, pi@rpi3b1, pid:1012]
Audio
├─ Devices:
│ 55. Built-in Audio [alsa]
│ 56. Built-in Audio [alsa]
│ 74. Bose Flex SE SoundLink [bluez5]
│
├─ Sinks:
│ 69. Built-in Audio Stereo [vol: 0.40]
│ * 72. Bose Flex SE SoundLink [vol: 0.47]
│
├─ Sink endpoints:
│
├─ Sources:
│
├─ Source endpoints:
│
└─ Streams:
76. Music Player Daemon
79. output_FR > Bose Flex SE SoundLink:playback_FR [active]
80. output_FL > Bose Flex SE SoundLink:playback_FL [active]
Seamus
(3772 rep)
May 5, 2025, 06:29 PM
• Last activity: May 7, 2025, 08:13 PM
4
votes
1
answers
1952
views
Very low volume audio through Bluetooth since networking restart
I'm running Debian 8, and I've been successfully using Pulseaudio/BlueZ to play audio through a Bluetooth speaker. Today I restarted my networking stack in order to try and fix a WiFi problem, and since then the audio has been very, very quiet. I usually have the speaker on very low volume, but now...
I'm running Debian 8, and I've been successfully using Pulseaudio/BlueZ to play audio through a Bluetooth speaker.
Today I restarted my networking stack in order to try and fix a WiFi problem, and since then the audio has been very, very quiet. I usually have the speaker on very low volume, but now I can't hear anything unless it's on full - and even then it's quiet.
The speaker is fine with other inputs.
Any help greatly appreciated!
Here is the sink from pacmd list-sinks:
index: 2
name:
driver:
flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME
state: RUNNING
suspend cause:
priority: 9030
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 32.82 ms
max request: 3 KiB
max rewind: 0 KiB
monitor source: 3
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 1
fixed latency: 45.32 ms
card: 2
module: 27
properties:
bluetooth.protocol = "a2dp_sink"
device.description = "AXiS X3"
device.string = "40:EF:4C:87:A6:85"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_40_EF_4C_87_A6_85"
bluez.class = "0x240404"
bluez.alias = "AXiS X3"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
ports:
headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
properties:
active port:
And here is the only sink input:
1 sink input(s) available.
index: 1
driver:
flags: START_CORKED
state: RUNNING
sink: 2
volume: front-left: 65535 / 100% / -0.00 dB, front-right: 65535 / 100% / -0.00 dB
balance 0.00
muted: no
current latency: 982.00 ms
requested latency: 45.32 ms
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
resample method: (null)
module: 11
client: 16
properties:
media.role = "music"
media.name = "Spotify"
application.name = "Spotify"
native-protocol.peer = "UNIX socket client"
native-protocol.version = "29"
application.process.id = "1555"
application.process.user = "richard"
application.process.host = "debian"
application.process.binary = "spotify"
window.x11.display = ":0.0"
application.language = "en_GB.utf8"
application.process.machine_id = "1b66e5d6e5fc45b981704645611058d0"
application.process.session_id = "1"
application.icon_name = "spotify-client"
module-stream-restore.id = "sink-input-by-media-role:music"
Richard John
(141 rep)
Oct 19, 2016, 06:39 PM
• Last activity: May 3, 2025, 10:08 PM
0
votes
1
answers
2045
views
Fail to connect Bluetooth LE keyboard with bluetoothctl
I am running Ubuntu 20.04 on a Lenovo Thinkpad X1 Tablet gen 2. I recently bought a Lenovo Trackpoint Keyboard II which uses Bluetooth LE. Using a [Stack Exchange post](https://unix.stackexchange.com/questions/678573/how-to-pair-a-ble-device-in-linux-without-using-gatttool), I was able to get the Bl...
I am running Ubuntu 20.04 on a Lenovo Thinkpad X1 Tablet gen 2. I recently bought a Lenovo Trackpoint Keyboard II which uses Bluetooth LE. Using a [Stack Exchange post](https://unix.stackexchange.com/questions/678573/how-to-pair-a-ble-device-in-linux-without-using-gatttool) , I was able to get the Bluetooth LE keyboard working once with
sudo -i
btmgmt power off
btmgmt discov on
btmgmt connectable on
btmgmt pairable on
btmgmt power on
bluetoothctl --agent KeyboardDisplay
and then
connect 00:11:22:33:44:55
But after it working once I am getting the error
Attempting to connect to 00:11:22:33:44:55
Failed to connect: org.bluez.Error.Failed le-connection-abort-by-local
The output of 00:11:22:33:44:55
is
Device 00:11:22:33:44:55 (random)
Name: TrackPoint Keyboard II
Alias: TrackPoint Keyboard II
Appearance: 0x03c1
Icon: input-keyboard
Paired: yes
Trusted: yes
Blocked: no
Connected: no
WakeAllowed: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
Modalias: usb:v17EFp60E1d0047
status bluetooth
gives
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2023-09-19 15:38:20 EDT; 21h ago
Docs: man:bluetoothd(8)
Main PID: 108246 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 9096)
Memory: 2.2M
CPU: 1min 11.582s
CGroup: /system.slice/bluetooth.service
└─108246 /usr/lib/bluetooth/bluetoothd
Sep 19 15:38:20 hamm bluetoothd: Endpoint registered: sender=:1.3360 path=/MediaEndpoint/A2DPSource/sbc_xq_>
Sep 19 15:38:20 hamm bluetoothd: Endpoint registered: sender=:1.3360 path=/MediaEndpoint/A2DPSink/sbc_xq_552
Sep 19 15:38:20 hamm bluetoothd: Endpoint registered: sender=:1.3360 path=/MediaEndpoint/A2DPSource/sbc_xq_>
Sep 19 18:59:26 hamm bluetoothd: /org/bluez/hci0/dev_C8_7B_23_56_84_6A/fd0: fd(33) ready
Sep 19 20:20:03 hamm bluetoothd: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free V>
Sep 20 04:06:53 hamm bluetoothd: /org/bluez/hci0/dev_C8_7B_23_56_84_6A/sep1/fd1: fd(33) ready
Sep 20 11:21:06 hamm bluetoothd: /org/bluez/hci0/dev_C8_7B_23_56_84_6A/sep1/fd2: fd(33) ready
Sep 20 11:48:31 hamm bluetoothd: profiles/audio/avdtp.c:avdtp_parse_rej() SET_CONFIGURATION request rejecte>
Sep 20 11:48:31 hamm bluetoothd: src/profile.c:ext_io_disconnected() Unable to get io data for Hands-Free V>
Sep 20 11:48:32 hamm bluetoothd: src/service.c:btd_service_connect() a2dp-sink profile connect failed for C>
What can I do to diagnose and correct this problem?
brett stevens
(101 rep)
Sep 20, 2023, 04:51 PM
• Last activity: Apr 27, 2025, 09:00 PM
6
votes
1
answers
2807
views
Is there a way to emulate HCI (Bluetooth) device on linux?
I'm working with a Bluetooth LE device in my project and I want to test bluetooth-related host code without having an actual Bluetooth device. Currently, I have a Linux machine with BT dongle as a host and BTLE sensor. On Linux machine I'm running a Python code which communicates with BTLE sensor us...
I'm working with a Bluetooth LE device in my project and I want to test bluetooth-related host code without having an actual Bluetooth device.
Currently, I have a Linux machine with BT dongle as a host and BTLE sensor. On Linux machine I'm running a Python code which communicates with BTLE sensor using library called bluepy .
And the question is: Is it possible to create a simulated HCI interface in Linux, so that bluepy will think it communicates with a real BT module on my laptop, but in reality - that module will be fully virtual and it will allow Python code to communicate with virtual BTLE sensor that I written.
I already did something similar with simulating RS232 device. Back then I created pseudo TTY to represent RS232 device and my simulation code listened to commands from main code and responded exactly in the same way as real device responded.
So I want to have similar solution with Bluetooth sensor. How this could be achieved?
**Update:**
Seems like bluez gives you a tool called "btvirt". With it you can create a pair (or more) of virtual hci interfaces. And also seems like this tool isn't quite popular as I can't find any documentation on it other than source code itself in github repo .
Ruslan
(81 rep)
Jul 7, 2020, 12:34 PM
• Last activity: Apr 24, 2025, 05:03 PM
1
votes
1
answers
2680
views
Kali Linux bluetooth bluez shows only device's MAC address but not name?
I am using `Kali Linux 2020.2`, `bluez` installed for Bluetooth. When I search devices I only see the MAC address, but not the name of the devices. I found this GitHub issue, but it was closed without a solution: https://github.com/blueman-project/blueman/issues/944 Here is the image[
Yilmaz
(417 rep)
Dec 22, 2020, 10:51 AM
• Last activity: Apr 11, 2025, 02:03 AM
0
votes
0
answers
2549
views
Use bluetoothctl connect XX:XX:XX:XX:XX:XX to auto connect on start up
I am trying to work with a third-party device that is not really intended to be modified by someone like me. I have tried using `bluetoothctl` to pair with the device, but I get the following error: Failed to pair: org.bluez.Error.AuthenticationCanceled Fun note: The error contains a misspelling. Wh...
I am trying to work with a third-party device that is not really intended to be modified by someone like me.
I have tried using
bluetoothctl
to pair with the device, but I get the following error:
Failed to pair: org.bluez.Error.AuthenticationCanceled
Fun note: The error contains a misspelling.
While pairing doesn't seem to be an option due to an authentication issue, I can connect using:
connect XX:XX:XX:XX:XX:XX
However, this can result in the following error:
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
Which can sometimes be resolved by retrying.
I think the easiest solution is to create a Bash script that runs the manual commands on startup, but I can't figure out how to do this for the life of me.
When I try to pipe the command into bluetoothctl
using echo
and read the response like this:
response=$(echo "connect ${Device I am targeting}" | bluetoothctl)
I only receive a partial response:
Agent registered
[Device I am targeting]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
I’m new to Bash, so if anyone could point me to resources for achieving what I want or suggest a better alternative, I would be very grateful.
KasparLee
(1 rep)
Aug 19, 2024, 04:45 AM
• Last activity: Mar 25, 2025, 11:01 AM
0
votes
0
answers
193
views
Error "Connection Failed: br-connection-create-socket" when try to connect bluetooth headphones
I’m trying to connect my Bluetooth headphones, but I keep getting the following error: `Connection Failed: br-connection-create-socket` Steps I’ve tried (without - Restarted both the device and headphones. - Removed and re-paired the headphones in Bluetooth settings.
I’m trying to connect my Bluetooth headphones, but I keep getting the following error:
Connection Failed: br-connection-create-socket
Steps I’ve tried (without
- Restarted both the device and headphones.
- Removed and re-paired the headphones in Bluetooth settings.
AslanPAPA
(109 rep)
Mar 24, 2025, 07:47 PM
0
votes
1
answers
8394
views
ArchLinux "Failed to pair: org.bluez.Error.AlreadyExists"
I attempted to connect to a device doing: ``` bluetoothctl power on agent on default-agent scan on trust [device id] pair [device id] ``` Which gave me the error: ```Failed to pair: org.bluez.Error.AlreadyExists``` I wasn't able to find any other issues online with this error. I then tried doing: ``...
I attempted to connect to a device doing:
bluetoothctl
power on
agent on
default-agent
scan on
trust [device id]
pair [device id]
Which gave me the error:
to pair: org.bluez.Error.AlreadyExists
I wasn't able to find any other issues online with this error.
I then tried doing:
pulseaudio -k
pulseaudio --start
which failed, and I got the same error. I also tried rebooting. If you need anything else specified, please ask.
RvveSplit
(1 rep)
Sep 13, 2020, 02:11 AM
• Last activity: Mar 14, 2025, 01:18 PM
2
votes
0
answers
161
views
Bluetooth error trying to use Pixel Pro 2 ear buds
I've tried to get this working first on Ubuntu 22.04 and now on Mint 22.1. On both platforms I'm using the xfce desktop. I've encountered the issue using pulse audio and under pipewire. I've used both bluetoothctl and blueman to try to admin the device with mixed results. Symptoms: I'm able to pair...
I've tried to get this working first on Ubuntu 22.04 and now on Mint 22.1. On both platforms I'm using the xfce desktop. I've encountered the issue using pulse audio and under pipewire. I've used both bluetoothctl and blueman to try to admin the device with mixed results.
Symptoms: I'm able to pair the device to either platform using both bluetoothctl and blueman. The problem is as soon as I reboot the device can no longer connect. I still see the device in the tools but the connect fails with this error "Failed to connect: org.bluez.Error.Failed br-connection-create-socket.". If I try to list the device using "pactl list" the card isn't there. If I remove the device bluetoothctl and repeat the pair process then it works again and I can see the device as a card in the output of "pactl list". Note that I'm able to pair, connect, trust and list the device in both bluetoothctl and blueman but once I reboot the only way to recover is to remove the device and repeat the pair process.
I've experimented with adding and removing pipewire, pipewire-pulse, wireplumber and pulseaudio. The one common thing in all of this is the version of bluez. Running "dpkg -l | grep bluez" shows I'm using version 5.7.2. Some of the searches I've done indicate a change somewhere post 5.6.1 for a CVE remediation that may be part of the problem. I also suspect it may be related to using xfce and the timing of the X server loading in relation to when the bluez modules are loaded.
Any help or suggestions to remediate this issue would be appreciate. There seem to be a fair number of threads on various forums related to this issue so I kind of suspect this is a bug in the bluez library that will need some kind of correction. I would actually be happy to find a way to downgrade to a previous version of bluez but that doesn't seem to be an option. I loaded up the symantic package manager under Mint and it only shows the 5.7.2 version of bluez available for the Mint platform.
For now the only solution I've been able to come up with is to remove the device and repeat the pair process anytime I need to reboot. Note that even after I pair I still have some issue with keeping the device tied to the correct profile and I ended up adding a rules file in /etc/udev/rules.d to call a script to assign the correct card profile in pactl anytime I see a device add event.
rules file:
ACTION=="add", SUBSYSTEM=="input", ATTR{id/vendor}=="00e0", ATTR{id/product}=="3005", RUN+="/home//bin/setearbudprofile.sh"
Update command in setearbudprofile.sh
sudo -u '#1000' XDG_RUNTIME_DIR=/run/user/1000 \
pactl set-card-profile bluez_card.5C_33_7B_6C_E9_49 handsfree_head_unit
Output from pactl list (just the bluetooth card)
Card #4
Name: bluez_card.5C_33_7B_6C_E9_49
Driver: module-bluez5-device.c
Owner Module: 25
Properties:
device.description = "Pixel Buds Pro 2"
device.string = "5C:33:7B:6C:E9:49"
device.api = "bluez"
device.class = "sound"
device.bus = "bluetooth"
device.form_factor = "headset"
bluez.path = "/org/bluez/hci0/dev_5C_33_7B_6C_E9_49"
bluez.class = "0x244404"
bluez.alias = "Pixel Buds Pro 2"
bluetooth.battery = "100%"
device.icon_name = "audio-headset-bluetooth"
device.intended_roles = "phone"
bluetooth.codec = "mSBC"
Profiles:
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: handsfree_head_unit
Ports:
headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
Part of profile(s): a2dp_sink, handsfree_head_unit
headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, available)
Part of profile(s): handsfree_head_unit
Nosugrof
(21 rep)
Feb 22, 2025, 11:51 PM
2
votes
1
answers
3661
views
How to configure bluez/kernel for Bluetooth keyboard peripheral
I am trying to bring up a custom ARM machine (similar to Raspberry Pi) to connect to a Bluetooth keyboard using a UART HCI interface (as opposed to a USB Bluetooth dongle). The device appears to pair correctly but no HID device is created (or at least input is not passed to Xorg -- I looked for devi...
I am trying to bring up a custom ARM machine (similar to Raspberry Pi) to connect to a Bluetooth keyboard using a UART HCI interface (as opposed to a USB Bluetooth dongle).
The device appears to pair correctly but no HID device is created (or at least input is not passed to Xorg -- I looked for device in /dev/input also but did not see anything. Is BT HID device created somewhere else?).
* Debian Jessie distribution
* Linux kernel 3.14
* bluez 5.43 (built natively)
I **do** have the same Bluetooth host controller connecting to peripheral keyboard with a Ubuntu 16.04 host (bluez 5.37), also over HCI UART 3-wire, so believe it should be limited to some kernel/bluez configuration on this new ARM device. Keyboard works immediately after pairing on the Ubuntu 16.04 host.
Note that the controller and peripheral are about Bluetooth LE only (not dual).
Here in problem device
bluetoothctl
you can see the controller sees a HID service on the BT peripheral when asking info [MAC ADDRESS]
, however it does not appear to register the HID service or am I missing something? (Only registers Battery Service, Device Information, and Generic Attribute Profile)
(already paired previously)
root@df666c9893549d4:~# bluetoothctl
[NEW] Controller D5:C0:BF:19:C4:AD BlueZ 5.43 [default]
[NEW] Device FA:D8:12:DD:86:72 AST61-Keyboard
[NEW] Primary Service
/org/bluez/hci0/dev_FA_D8_12_DD_86_72/service000e
0000180f-0000-1000-8000-00805f9b34fb
Battery Service
[NEW] Primary Service
/org/bluez/hci0/dev_FA_D8_12_DD_86_72/service0009
0000180a-0000-1000-8000-00805f9b34fb
Device Information
[NEW] Primary Service
/org/bluez/hci0/dev_FA_D8_12_DD_86_72/service0008
00001801-0000-1000-8000-00805f9b34fb
Generic Attribute Profile
[AST61-Keyboard]# info FA:D8:12:DD:86:72
Device FA:D8:12:DD:86:72
Name: AST61-Keyboard
Alias: AST61-Keyboard
Appearance: 0x03c1
Icon: input-keyboard
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1915pEEEEd0001
RSSI: 84
[CHG] Device FA:D8:12:DD:86:72 ServicesResolved: no
[CHG] Device FA:D8:12:DD:86:72 Connected: no
[CHG] Device FA:D8:12:DD:86:72 Connected: yes
[CHG] Device FA:D8:12:DD:86:72 ServicesResolved: yes
The device/kernel normally connects with a USB keyboard peripheral. I have added these Bluetooth-related defconfigs to add Bluetooth support:
# Bluetooth
CONFIG_BT=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
# Bluetooth userspace HID
CONFIG_UHID=y
# Bluetooth extra (may not be necessary)
CONFIG_BT_L2CAP=y
CONFIG_BT_SCI=y
CONFIG_BT_HCIUSB=y
CONFIG_BT_HCIUSB_SCI=y
CONFIG_BT_BNEP=y
# Bluetooth drivers
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_3WIRE=y
CONFIG_BT_HCIVHCI=y
CONFIG_BT_HCIUART_BCM=y
CONFIG_BT_HCIUART_INTEL=y
CONFIG_BT_HCIUART_BCSP=y
CONFIG_BT_HCIUART_LL=y
Are there other HID related configs needed to drive the BT keyboard?
Finally, here is a the verbose bluetoothd -n -d
output which suggests HoG (HID over GATT) is trying to load the HID keyboard (I can't tell if output suggests successful or error honestly):
[https://paste.debian.net/hidden/1d4b3c7e/](https://paste.debian.net/hidden/1d4b3c7e/)
pztrick
(121 rep)
Feb 16, 2017, 02:45 AM
• Last activity: Feb 11, 2025, 12:41 PM
4
votes
2
answers
2329
views
Logitech MX Master won't stay Connected to Debian Stretch
To preface this, I owned this mouse for over a year now and have used it with no problems on this same hardware with different Linux distros (Fedora, Arch, Manjaro). It was not until I installed Debian 9 that I started having issues. Firstly, the only way I am able to get the mouse to pair is direct...
To preface this, I owned this mouse for over a year now and have used it with no problems on this same hardware with different Linux distros (Fedora, Arch, Manjaro). It was not until I installed Debian 9 that I started having issues.
Firstly, the only way I am able to get the mouse to pair is directly after a reboot, otherwise pairing fails altogether. Then, after pairing or turning the mouse on for the first time, the mouse will connect and the light turns solid for about three seconds then the light on the mouse begins slow blink as if nothing is connected to the mouse. At no point during this process does moving the mouse cause the cursor to move on the screen. Additionally, after connecting the mouse initially, running the
info
command in the bluetoothctl
terminal prints the following output.
Device D3:08:24:D5:FE:3F
Name: MX Master
Alias: MX Master
Appearance: 0x03c2
Icon: input-mouse
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (00010000-0000-1000-8000-011f2000046d)
Modalias: usb:v046DpB017d0017
The mouse continues to show as Connected: yes
even after the mouse disconnects or is powered off entirely. I have tried unpairing and pairing the mouse numerous times under different conditions. I've tried the advice from the following posts:
* [Bluetooth connection fails by connecting to the Logitech MX Master S2 mouse](https://unix.stackexchange.com/questions/430196/bluetooth-connection-fails-by-connecting-to-the-logitech-mx-master-s2-mouse)
* [Pairing a Logitech MX Master Mouse with Ubuntu 16.04 Using Bluetooth](https://ericasberry.com/blog/2016/09/30/pairing-a-logitech-mx-master-mouse-with-ubuntu-16-04-using-bluetooth/)
* [Logitech MX Master Mouse pairs, but won't work](https://askubuntu.com/questions/621860/logitech-mx-master-mouse-pairs-but-wont-work)
I am running BlueZ version 5.43-2+deb9u1 on Linux kernel 4.9.0-8-amd64 on a Thinkpad T480. What can I do to solve this?
Will Carroll
(41 rep)
Jan 12, 2019, 02:18 AM
• Last activity: Jan 17, 2025, 06:23 AM
Showing page 1 of 20 total questions