Mailinglist Archive: opensuse-bugs (4295 mails)

< Previous Next >
[Bug 1039476] New: bluetooth dongle does not work when automatically enabled
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 17 May 2017 10:51:41 +0000
  • Message-id: <bug-1039476-21960@http.bugzilla.suse.com/>
http://bugzilla.suse.com/show_bug.cgi?id=1039476


Bug ID: 1039476
Summary: bluetooth dongle does not work when automatically
enabled
Classification: openSUSE
Product: openSUSE Distribution
Version: Leap 42.2
Hardware: Other
OS: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Kernel
Assignee: kernel-maintainers@xxxxxxxxxxxxxxxxxxxxxx
Reporter: msuchanek@xxxxxxxx
QA Contact: qa-bugs@xxxxxxx
Found By: ---
Blocker: ---

Bluetooth devices are not enabled making them useless.

I added rule for enabling them:
cat /etc/udev/rules.d/zzz-bt.rules
ACTION=="add" SUBSYSTEM=="bluetooth" RUN+="/usr/bin/hciconfig $(basename
%E{DEVPATH}) up"

and now when I plug in my BT USB dongle it is automatically enabled and does
not work:

bluetoothctl
[NEW] Controller 5C:F3:70:6B:91:7B linux.suse [default]
[NEW] Device 00:1A:7D:81:00:30 P311
[NEW] Device 4C:0B:3A:F5:EC:DC Alcatel One Touch 810
[bluetooth]# connect 00:1A:7D:81:00:30
Attempting to connect to 00:1A:7D:81:00:30
Failed to connect: org.bluez.Error.NotReady
[bluetooth]# connect 00:1A:7D:81:00:30
Attempting to connect to 00:1A:7D:81:00:30
Failed to connect: org.bluez.Error.NotReady

When the device is plugged in it is in state DOWN RUNNING:hciconfig -a
hci0: Type: Primary Bus: USB
BD Address: 5C:F3:70:6B:91:7B ACL MTU: 1021:8 SCO MTU: 64:1
DOWN RUNNING
RX bytes:2156 acl:0 sco:0 events:206 errors:0
TX bytes:35398 acl:0 sco:0 commands:205 errors:0
Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH SNIFF
Link mode: SLAVE ACCEPT
and it leaves this state after a few seconds. Obviously bringing it up in this
state breaks the device.

hciconfig hci0
hci0: Type: Primary Bus: USB
BD Address: 5C:F3:70:6B:91:7B ACL MTU: 1021:8 SCO MTU: 64:1
DOWN
RX bytes:2156 acl:0 sco:0 events:206 errors:0
TX bytes:35398 acl:0 sco:0 commands:205 errors:0

hciconfig hci0 up
hciconfig hci0
hci0: Type: Primary Bus: USB
BD Address: 5C:F3:70:6B:91:7B ACL MTU: 1021:8 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:3618 acl:21 sco:0 events:269 errors:0
TX bytes:36574 acl:22 sco:0 commands:248 errors:0
bluetoothctl
[NEW] Controller 5C:F3:70:6B:91:7B linux.suse [default]
[NEW] Device 00:1A:7D:81:00:30 P311
[NEW] Device 4C:0B:3A:F5:EC:DC Alcatel One Touch 810
[P311]# connect 00:1A:7D:81:00:30
Attempting to connect to 00:1A:7D:81:00:30
Connection successful

Bus 003 Device 021: ID 0b05:17cb ASUSTek Computer, Inc.

[182436.756025] usb 3-3: new full-speed USB device number 18 using xhci_hcd
[182436.890230] usb 3-3: New USB device found, idVendor=0b05, idProduct=17cb
[182436.890233] usb 3-3: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[182436.890234] usb 3-3: Product: BCM20702A0
[182436.890235] usb 3-3: Manufacturer: Broadcom Corp
[182436.890235] usb 3-3: SerialNumber: 5CF3706B917B
[182436.895121] Bluetooth: hci0: BCM: chip id 63
[182436.911115] Bluetooth: hci0: BCM20702A
[182436.912109] Bluetooth: hci0: BCM20702A1 (001.002.014) build 0000
[182437.524159] Bluetooth: hci0: BCM20702A1 (001.002.014) build 1467
[182437.540112] Bluetooth: hci0: Broadcom Bluetooth Device
[182473.032272] input: 00:1A:7D:81:00:30 as /devices/virtual/input/input16

A workaround script confirms that waiting for the controller to go down gives
working controller:
/etc/udev/rules.d/zzz-bt.rules:
ACTION=="add" SUBSYSTEM=="bluetooth" RUN+="hciup %E{DEVPATH}"

/usr/lib/udev/hciup:
#!/bin/sh

dev=$(basename $1)

n=60
while [ $n -gt 0 ] && hciconfig $dev | grep -q RUNNING ; do
sleep 1;
n=$(expr $n - 1)
done

if hciconfig $dev | grep -q RUNNING ; then
exit 1
fi

hciconfig $dev up


However, breaking the controller by bringing it up while it is in state DOWN
RUNNING should not be possible.

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >