[Bug 1039476] New: bluetooth dongle does not work when automatically enabled
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@forge.provo.novell.com Reporter: msuchanek@suse.com QA Contact: qa-bugs@suse.de 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.
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c1
--- Comment #1 from Michal Suchanek
http://bugzilla.suse.com/show_bug.cgi?id=1039476
Marcus Meissner
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c5
Sebastian Krahmer
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c6
Stefan Seyfried
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c7
Sebastian Krahmer
Hi Sebastian,
not everyone wants/likes blueman :-) And e.g. for console users it can be pretty cumbersome, because you can turn devices on with bluetoothctl, but the setting is forgotten after replugging / reboot.
would an (optional) additional package, e.g. "bluez-autoenable-devices" with appropriate description and not installed by default be acceptable?
That would contain the config file which switches on auto-enable. The package would not be in the default installation, but users wanting to have bluetooth devices auto-enabled could install it?
Yes, I think that'd be a good solution. Can you point me to the udev scripts that are invoked then? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c8
--- Comment #8 from Stefan Seyfried
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c9
--- Comment #9 from Stefan Seyfried
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c10
--- Comment #10 from Sebastian Krahmer
There is no udev script needed, just a /etc/bluetooth/main.conf containing
[Policy] AutoEnable=true
Even better. Noting more to be done by us. :) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1039476
http://bugzilla.suse.com/show_bug.cgi?id=1039476#c11
Stefan Seyfried
participants (1)
-
bugzilla_noreply@novell.com