Debian Bug report logs - #810487
bluez: should not use hciconfig up to power bluetooth adapters

version graph

Package: bluez; Maintainer for bluez is Debian Bluetooth Maintainers <[email protected]>; Source for bluez is src:bluez (PTS, buildd, popcon).

Reported by: Aurelien Jarno <[email protected]>

Date: Fri, 8 Jan 2016 23:27:02 UTC

Severity: normal

Found in version bluez/5.23-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian Bluetooth Maintainers <[email protected]>:
Bug#810487; Package bluez. (Fri, 08 Jan 2016 23:27:05 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian Bluetooth Maintainers <[email protected]>. (Fri, 08 Jan 2016 23:27:06 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Aurelien Jarno <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: bluez: should not use hciconfig up to power bluetooth adapters
Date: Sat, 09 Jan 2016 00:25:31 +0100
Package: bluez
Version: 5.23-2+b1
Severity: normal

Dear Maintainer,

I got difficulties to get bluetooth devices with SMP enabled (Security
Manager Protocol) with recent kernels. I haven't fully try to find the
exact version, but looking on the internet it seems the issue started
with version 4.1.6. It seems it was working by chance before, and that
the commit 25ba2653 (Bluetooth: Fix NULL pointer dereference in
smp_conn_security) make it always fail.

According to one of the bluetooth maintainer [1], the problem is that
the bluetooth adapter is started with the legacy command hciconfig,
which doesn't initialize the security context. Indeed I have found a
call to such command in the 50-bluetooth-hci-auto-poweron.rules udev
rule. I have tried to replace it with a more modern command using dbus,
but it seems to fail as the bluetooth daemon is not working at that
time. I have been able to workaround that with a ugly sleep command. I
ended up with the following rules file, which allow my bluetooth mouse
to work correctly:

# Set bluetooth power up
ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/bin/sh -c 'sleep .5 ; /usr/bin/dbus-send --system --type=method_call --dest=org.bluez /org/bluez/%k org.freedesktop.DBus.Properties.Set string:org.bluez.Adapter1 string:Powered variant:boolean:true'"

There is probably a better way to do that, but I don't know the bluez
stack enough to avoid the sleep command.

Regards,
Aurelien

PS: the problem is reported from a jessie system as I don't have a sid
system around with bluetooth available for now, but I have reasons to
believe the problem is still the same in sid.

[1] http://www.spinics.net/lists/linux-bluetooth/msg64021.html

-- System Information:
Debian Release: 8.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-0.bpo.1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bluez depends on:
ii  dbus                 1.8.20-0+deb8u1
ii  init-system-helpers  1.22
ii  kmod                 18-3
ii  libc6                2.19-18+deb8u1
ii  libdbus-1-3          1.8.20-0+deb8u1
ii  libglib2.0-0         2.42.1-1
ii  libreadline6         6.3-8+b3
ii  libudev1             215-17+deb8u2
ii  lsb-base             4.1+Debian13+nmu1
ii  udev                 215-17+deb8u2

bluez recommends no packages.

bluez suggests no packages.

-- no debconf information

-- debsums errors found:
debsums: changed file /lib/udev/rules.d/50-bluetooth-hci-auto-poweron.rules (from bluez package)



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 05:10:50 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.