[D-Link DBT-122] Bluetooth doesn't work (hci_cmd_task: hci0 command tx timeout)

Bug #377225 reported by Sami Mäkinen
38
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

This is a copy of the below bug report, specific to D-Link DBT-122 USB dongle, which still is not working.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/268502

Revision history for this message
Dominique Meeùs (dominiquem) wrote :
Download full text (4.3 KiB)

The D-Link DBT-122 USB dongle does not work with btusb and Bluez 4.xx.
lsusb
Bus 003 Device 002: ID 2001:f111 D-Link Corp. [hex] DBT-122 Bluetooth adapter
uname -a
Linux library 2.6.28-12-generic #43-Ubuntu SMP Fri May 1 19:27:06 UTC 2009 i686 GNU/Linux
dpkg -l | grep bluez
ii bluez 4.35-0ubuntu1

Abstract:
Section A. In the normal situation (bluetooth running) inserting the dongle gives messages like
> hci_cmd_task: hci0 command tx timeout
and
> Connection timed out (110)
Commands like hciconfig -a, hcitool scan and l2ping end with similar messages and there is no bluetooth functionality like pairing to a phone.

Section B. With bluetooth stopped, there is of course no more real bluetooth functionality (no pairing) but it may be interesting to note that hciconfig -a, hcitool scan and l2ping DO give normal results. There is some low level functionality provided by btusb, but (section A) this is broken by the daemon.

I'll gladly provide more information if instructed to do so and how (and if it is not above my level of competence :-).

***************
Section A:
=====
syslog (inserting the dongle)
May 17 03:49:06 library kernel: [ 2024.384017] usb 3-1: new full speed USB device using uhci_hcd and address 2
May 17 03:49:06 library kernel: [ 2024.570047] usb 3-1: configuration #1 chosen from 1 choice
May 17 03:49:06 library bluetoothd[2991]: HCI dev 0 registered
May 17 03:49:06 library kernel: [ 2024.630733] Bluetooth: Generic Bluetooth USB driver ver 0.3
May 17 03:49:06 library kernel: [ 2024.630862] usbcore: registered new interface driver btusb
May 17 03:49:06 library bluetoothd[2991]: HCI dev 0 up
May 17 03:49:06 library bluetoothd[2991]: Starting security manager 0
May 17 03:49:11 library kernel: [ 2029.773914] hci_cmd_task: hci0 command tx timeout
May 17 03:49:16 library bluetoothd[2991]: Can't write class of device: Connection timed out (110)
May 17 03:49:16 library bluetoothd[2991]: Adapter /org/bluez/2991/hci0 has been enabled
May 17 03:49:16 library kernel: [ 2034.795178] hci_cmd_task: hci0 command tx timeout
May 17 03:49:21 library bluetoothd[2991]: Sending getting name command failed: Connection timed out (110)
May 17 03:49:21 library kernel: [ 2039.800343] hci_cmd_task: hci0 command tx timeout
May 17 03:49:26 library bluetoothd[2991]: Can't read class of device on hci0: Connection timed out (110)
May 17 03:49:26 library kernel: [ 2044.805647] hci_cmd_task: hci0 command tx timeout

hciconfig -a
hci0: Type: USB
 BD Address: 00:13:46:00:55:A0 ACL MTU: 377:10 SCO MTU: 16:0
 UP RUNNING
 RX bytes:667 acl:0 sco:0 events:19 errors:0
 TX bytes:591 acl:0 sco:0 commands:24 errors:0
 Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 0x00 0x00
 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
 Link policy:
 Link mode: SLAVE ACCEPT
Can't read local name on hci0: Connection timed out (110)

hcitool scan
[sudo] password for mic:
Scanning ...
Inquiry failed: Connection timed out

***************
Section B:
=====
Searching in Google about this issue, I came across a conversation in a forum where Marcel Holtman suggested to somebody to test btusb alone, by stopping bluetooth. The other person did not provide the ...

Read more...

Revision history for this message
Baptiste Mille-Mathias (bmillemathias) wrote :

Hello gentlemen,

as you have the appropriate dongle I think it would be useful to contact upstream developpers on the bluez stack mailing-list and explaining your problem; so you'll be able to provide information to fix that and possibly have the fix backported.

Regards

Revision history for this message
Dominique Meeùs (dominiquem) wrote :

I subscribed to the <email address hidden> and posted essentially the above information on 17-4-2009. There was absolutely no reaction.
I found that a user had opened 525220: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525220 in the Debian Bug Tracking System. I placed essentially the above information there too on 29-4-2009. Only this user answered and the discussion stopped with this. This user had "hci_cmd_task: hci0 command tx timeout" with a ID 1131:1004 Integrated System Solution Corp. Bluetooth Device. Maybe the bug has been fixed for this Integrated System Solution device in the meanwhile.

I cannot force Bluez or Debian developers to listen. If some known developer of the Ubuntu community or of Canonical could persuade upstream developers that there is indeed a bug, I would gladly help by providing all the information I can. @Baptiste: Do you know the Bluez people?

The D-Link DBT-122 is manufactured by Broadcom and it seems from posts under #268502 that other Broadcom devices do not work either.

Artur Rona (ari-tczew)
summary: - Bluetooth doesn't work (hci_cmd_task: hci0 command tx timeout)
+ [D-Link DBT-122] Bluetooth doesn't work (hci_cmd_task: hci0 command tx
+ timeout)
Revision history for this message
maximi89 (maximi89) wrote :
Download full text (5.4 KiB)

Dominique, the error still there, i have opened a new bug, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529880

i try that you say, stopped still scanning but still not connecting, i get hci0 timeout on both cases,

if i disconnect and reconnect with hcid stopped this show me nothing...

maximi89@Maximiliano:~$ sudo /etc/init.d/bluetooth start
Starting bluetooth: hcid.
maximi89@Maximiliano:~$ sudo l2ping 00:1A:1B:96:93:22
^C0 sent, 0 received, 0% loss
maximi89@Maximiliano:~$ sudo hcitool cc 00:1A:1B:96:93:22
maximi89@Maximiliano:~$ sudo /etc/init.d/bluetooth stop
Stopping bluetooth: hcid.
maximi89@Maximiliano:~$ sudo hcitool cc 00:1A:1B:96:93:22
maximi89@Maximiliano:~$ sudo hcitool scan
Scanning ...
        00:1A:1B:96:93:22 Archer's L6
maximi89@Maximiliano:~$ sudo hcitool inq
Inquiring ...
        00:1A:1B:96:93:22 clock offset: 0x18a2 class: 0x522204
maximi89@Maximiliano:~$ sudo /etc/init.d/bluetooth stop
Stopping bluetooth: hcid.
maximi89@Maximiliano:~$ sudo hciconfig -a
hci0: Type: USB
        BD Address: 00:11:67:CB:5D:87 ACL MTU: 1021:4 SCO MTU: 48:10
        UP RUNNING PSCAN ISCAN
        RX bytes:2899 acl:0 sco:0 events:80 errors:0
        TX bytes:1085 acl:0 sco:0 commands:64 errors:0
        Features: 0xff 0xfe 0xff 0x7e 0x98 0x19 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: SLAVE ACCEPT
        Name: 'Maximiliano-0'
        Class: 0x080100
        Service Classes: Capturing
        Device Class: Computer, Uncategorized
        HCI Ver: 2.0 (0x3) HCI Rev: 0x302 LMP Ver: 2.0 (0x3) LMP Subver: 0x302
        Manufacturer: Integrated System Solution Corp. (57)

maximi89@Maximiliano:~$ sudo hciconfig -a
hci0: Type: USB
        BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
        DOWN
        RX bytes:0 acl:0 sco:0 events:0 errors:0
        TX bytes:0 acl:0 sco:0 commands:0 errors:0

But if i umount /proc/bus/usb

i can use some times for a while....

maximi89@Maximiliano:~$ sudo umount /proc/bus/usb
maximi89@Maximiliano:~$ sudo /etc/init.d/bluetooth start
Starting bluetooth: hcid.
maximi89@Maximiliano:~$ sudo hcitool cc 00:1A:1B:96:93:22
maximi89@Maximiliano:~$ sudo l2ping 00:1A:1B:96:93:22
^C0 sent, 0 received, 0% loss
maximi89@Maximiliano:~$ sudo /etc/init.d/bluetooth start
Starting bluetooth: hcid.
maximi89@Maximiliano:~$ sudo /etc/init.d/bluetooth stop
Stopping bluetooth: hcid.
maximi89@Maximiliano:~$ sudo l2ping 00:1A:1B:96:93:22
^C0 sent, 0 received, 0% loss
maximi89@Maximiliano:~$ sudo hciconfig -a
hci0: Type: USB
        BD Address: 00:11:67:CB:5D:87 ACL MTU: 1021:4 SCO MTU: 48:10
        UP RUNNING PSCAN ISCAN
        RX bytes:421 acl:0 sco:0 events:19 errors:0
        TX bytes:336 acl:0 sco:0 commands:19 errors:0
        Features: 0xff 0xfe 0xff 0x7e 0x98 0x19 0x00 0x80
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:...

Read more...

Revision history for this message
maximi89 (maximi89) wrote :

Sorry,
GNU/Linux Debian
Linux Maximiliano 2.6.29-2-686 #1 SMP Sun May 17 17:56:29 UTC 2009 i686 GNU/Linux
bluez-utils 3.36-3

Debian Unstable

Revision history for this message
maximi89 (maximi89) wrote :

Here you can find something about the chip, and ISSC IS1612N
http://www.issc.com.tw/bt_dongle.htm

Revision history for this message
maximi89 (maximi89) wrote :
Download full text (6.8 KiB)

maximi89@Maximiliano:~$ sudo hcid --help
hcid: invalid option -- '-'
hcid - HCI daemon ver 3.36
Usage:
        hcid [-n] [-d] [-m mtu] [-f config file]

maximi89@Maximiliano:~$ sudo hcid -dn
hcid[11766]: Bluetooth HCI daemon
hcid[11766]: Enabling debug information
hcid[11766]: Parsing /etc/bluetooth/main.conf failed: No such file or directory
hcid[11766]: Unable to get on D-Bus

maximi89@Maximiliano:~$ lsmod |grep hci
ohci_hcd 20164 0
ehci_hcd 29936 0
usbcore 124912 8 ohci_hcd,ehci_hcd,usblp,btusb,gspca_sunplus,gspca_main,usbhid

May 21 20:31:03 Maximiliano hcid[9286]: Starting SDP server
May 21 20:31:03 Maximiliano hcid[9286]: Unix socket created: 11
May 21 20:31:03 Maximiliano hcid[9286]: Registered manager path:/org/bluez/audio
May 21 20:31:03 Maximiliano hcid[9286]: HCI dev 0 registered
May 21 20:31:03 Maximiliano hcid[9286]: HCI dev 0 up
May 21 20:31:03 Maximiliano hcid[9286]: Device hci0 has been added
May 21 20:31:03 Maximiliano hcid[9286]: Starting security manager 0
May 21 20:31:04 Maximiliano hcid[9286]: Can't read version info for hci0: Connection timed out (110)
May 21 20:31:05 Maximiliano hcid[9295]: Can't set link policy on hci0: No such device (19)
May 21 20:31:05 Maximiliano hcid[9286]: HCI dev 0 down
May 21 20:31:05 Maximiliano hcid[9286]: Stopping security manager 0
May 21 20:31:05 Maximiliano hcid[9286]: Device hci0 has been disabled
May 21 20:31:06 Maximiliano hcid[9286]: HCI dev 0 unregistered
May 21 20:31:06 Maximiliano hcid[9286]: Unregister path: /org/bluez/hci0
May 21 20:31:06 Maximiliano hcid[9286]: Device hci0 has been removed
May 21 20:31:07 Maximiliano hcid[9286]: HCI dev 0 registered
May 21 20:31:07 Maximiliano hcid[9286]: HCI dev 0 up
May 21 20:31:07 Maximiliano hcid[9286]: Device hci0 has been added
May 21 20:31:07 Maximiliano hcid[9286]: Starting security manager 0
May 21 20:31:08 Maximiliano hcid[9286]: Can't read version info for hci0: Connection timed out (110)
May 21 20:31:17 Maximiliano hcid[9327]: Can't set link policy on hci0: Connection timed out (110)
May 21 20:33:37 Maximiliano hcid[9286]: Unregister path: /org/bluez/hci0
May 21 20:33:37 Maximiliano hcid[9286]: Unregistered manager path
May 21 20:33:37 Maximiliano hcid[9286]: Stopping SDP server
May 21 20:33:37 Maximiliano hcid[9286]: Exit
May 21 20:53:11 Maximiliano hcid[10123]: Bluetooth HCI daemon
May 21 2...

Read more...

Revision history for this message
Dominique Meeùs (dominiquem) wrote :

No improvement with 2.6.29.

I read somewhere that the bug was fixed upstream with kernel 2.6.29. I installed this kernel following www.ramoonus.nl/2009/03/24/linux-kernel-2629-installation-guide-for-ubuntu-and-debian-linux/

I see no improvement:
uname -srvmo
Linux 2.6.29-020629-generic #020629 SMP Tue Mar 24 12:03:21 UTC 2009 i686 GNU/Linux

syslog:
Jun 9 22:49:27 library kernel: [ 95.580018] usb 3-1: new full speed USB device using uhci_hcd and address 2
Jun 9 22:49:28 library kernel: [ 95.766036] usb 3-1: configuration #1 chosen from 1 choice
Jun 9 22:49:28 library bluetoothd[3047]: HCI dev 0 registered
Jun 9 22:49:28 library kernel: [ 95.836219] Bluetooth: Generic Bluetooth USB driver ver 0.4
Jun 9 22:49:28 library kernel: [ 95.836375] usbcore: registered new interface driver btusb
Jun 9 22:49:28 library bluetoothd[3047]: HCI dev 0 up
Jun 9 22:49:28 library bluetoothd[3047]: Starting security manager 0
Jun 9 22:49:33 library kernel: [ 101.053371] hci_cmd_task: hci0 command tx timeout
Jun 9 22:49:38 library bluetoothd[3047]: Can't write class of device: Connection timed out (110)
Jun 9 22:49:38 library bluetoothd[3047]: Adapter /org/bluez/3047/hci0 has been enabled
Jun 9 22:49:38 library kernel: [ 106.065902] hci_cmd_task: hci0 command tx timeout
Jun 9 22:49:43 library bluetoothd[3047]: Sending getting name command failed: Connection timed out (110)
Jun 9 22:49:43 library kernel: [ 111.068192] hci_cmd_task: hci0 command tx timeout
Jun 9 22:49:48 library bluetoothd[3047]: Can't read class of device on hci0: Connection timed out (110)
Jun 9 22:49:48 library kernel: [ 116.072410] hci_cmd_task: hci0 command tx timeout

hciconfig -a
hci0: Type: USB
 BD Address: 00:13:46:00:55:A0 ACL MTU: 377:10 SCO MTU: 16:0
 UP RUNNING
 RX bytes:673 acl:0 sco:0 events:20 errors:0
 TX bytes:594 acl:0 sco:0 commands:25 errors:0
 Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 0x00 0x00
 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
 Link policy:
 Link mode: SLAVE ACCEPT
Can't read local name on hci0: Connection timed out (110)

As before, no timeout if bluetooth is stopped

sudo /etc/init.d/bluetooth stop
 * Stopping bluetooth [ OK ]
mic@library:~$ sudo hciconfig hci0 up
mic@library:~$ hciconfig -a
hci0: Type: USB
 BD Address: 00:13:46:00:55:A0 ACL MTU: 377:10 SCO MTU: 16:0
 UP RUNNING
 RX bytes:1027 acl:0 sco:0 events:32 errors:0
 TX bytes:638 acl:0 sco:0 commands:38 errors:0
 Features: 0xff 0xfe 0x0d 0x38 0x08 0x08 0x00 0x00
 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
 Link policy:
 Link mode: SLAVE ACCEPT
 Name: 'Broadcom BCM2035'
 Class: 0x000000
 Service Classes: Unspecified
 Device Class: Miscellaneous,
 HCI Ver: 1.2 (0x2) HCI Rev: 0x0 LMP Ver: 1.2 (0x2) LMP Subver: 0x309
 Manufacturer: Broadcom Corporation (15)

Revision history for this message
Dominique Meeùs (dominiquem) wrote :

It does work with Bluez 4.40-2. So it seems that it was not so much a kernel bug than a bluez bug.

Installed Bluez 4.40-2 from http://http.us.debian.org/debian/pool/main/b/bluez/
dpkg -l | grep blue
ii bluetooth 4.40-2 Bluetooth support
ii bluez 4.40-2 Bluetooth tools and daemons
ii libbluetooth3 4.40-2 Library to use the BlueZ Linux Bluetooth stack
ii bluez-gnome 1.8-0ubuntu5 Bluetooth utilities for GNOME

Started bluetooth again. I could pair easily with bluez-gnome. I could backup my phone with Wammu.

Revision history for this message
Sami Mäkinen (sami-makinen-helsinki) wrote :

Same here, works with Debian BlueZ 4.40

Revision history for this message
kylea (kylea) wrote :

Ubuntu 9.04 64Bit

Linux kylea-E6500 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:58:03 UTC 2009 x86_64 GNU/Linux

Installed the 4.4 packages,

Re-started PC and I get this message

Bluetooth daemon 4.40
Unable to get on D-Bus

Revision history for this message
kylea (kylea) wrote :

Sorry - wrong error - was not using sudo.

Here is the error from syslog

obex-data-server: sdp_send_req_w4_rsp: Error sending data:Broken pipe
obex-data-server: sdp_send_req_w4_rsp: Error sending data:Broken pipe

bluetoothd[31593]: Bluetooth daemon 4.40
bluetoothd[31593]: Starting SDP server
bluetoothd[31593]: Starting experimental netlink support
bluetoothd[31593]: Failed to find Bluetooth netlink family
bluetoothd[31593]: bridge pan0 created

Should I update the kernel?

Revision history for this message
Jeremy Jackson (jerj) wrote :

I had a similar problem after upgrading to a kernel that uses btusb instead of hci_usb.

Symptoms were, BT adapter would go up in syslog, then hci0: timeout tx, then it goes down. stopping bluetoothd and manually setting it "up" things like scan inq work.

In my case the IBM Bluetooth IV module... I suspect that the handling of OCF_READ_DEFAULT_LINK_POLICY is different , hci_usb seemed to be ok if adapter didn't support it, but btusb times out if BT adapter doesn't support it, causing bluetoothd to fail and take down the interface... my BT adapter doesn't support the command. I patched my bluetooth userspace to not send the command, now things work.

In IRC one maintainer was unsure if BT version ( shown in hciconfig -a), supported commands, or supported features would be the most reliable way to detect support of this command. If several people have success, and report the following info, then there should be a basis for how to fix things in bluez upstream.

Can you check your adapter's support of this command:

# lsusb
... (so we know what device you have)
Bus 002 Device 003: ID 0a5c:2101 Broadcom Corp. A-Link BlueUsbA2 Bluetooth

# hciconfig -a
hci0: Type: USB
...
 Features: 0xff 0xff 0x8d 0xfe 0x9b 0xf9 0x00 0x80
....
 HCI Ver: 2.0 (0x3) HCI Rev: 0x200a LMP Ver: 2.0 (0x3) LMP Subver: 0x4127
 Manufacturer: Broadcom Corporation (15)

# hciconfig hci0 commands
hci0: Type: USB
 BD Address: 00:02:72:CE:3A:F5 ACL MTU: 1017:8 SCO MTU: 64:8
 Commands: Octet 0 = 0xff (Bit 0 1 2 3 4 5 6 7)
...etc...
 'Write Link Policy Settings' ---> 'Read Default Link Policy Settings' <---
  ---> 'Write Default Link Policy Settings' <--- 'Flow Specification'

if your adapter is missing those (likely due to older spec), try this patch and things should improve.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Sami,

Please be sure to confirm this issue exists with the latest development release of Ubuntu. ISO CD images are available from http://cdimage.ubuntu.com/releases/lucid . If the issue remains, please run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 377225

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

marking invalid per this having been untouched for a year.

~JFo

Changed in linux (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
neo (csae2608) wrote :

Hello , i am also having this bluetooth adapter.

in kubuntu 15.04 the adapter shows up and it is possible to register devices, but it fails to connect them. what can i do?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.