Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PBM: KBluetoothD hangs at startup
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Wed Jun 27, 2007 5:23 pm    Post subject: PBM: KBluetoothD hangs at startup Reply with quote

Hi.

I wanted to try getting a Blue Tooth-enabled mobile phone and my laptop to communicate with bluetooth but I first got a message saying "You may replace bluez's pin helper program with kbluepin; it is located in /usr/lib64/kdebluetooth now" and KBluetoothD hung. In fact KBluetoothD always hangs upon startup.

My laptop is an Intel Core2 Duo (Centrino Duo) and I'm running KDE 3.5.5. I also have net-wireless/bluez-utils-2.25 and net-wireless/bluez-libs-2.25-r1 installed. Bluetooth service (/etc/init.d/bluetooth) starts when the machine boots.Is there something I can do to get bluetooth to work properly?

EDIT: on the command line kbluetoothd issues that error message:

kbluetoothd:
bluetoothd: WARNING: No usable bluetooth device found.

Also, here are messages I can see with dmesg:

/var/log/messages:
Jun 27 20:16:18 solo hcid[7171]: Bluetooth HCI daemon
Jun 27 20:16:18 solo hci_usb_intr_rx_submit: hci0 intr rx submit failed urb ffff81005f291c28 err -28
Jun 27 20:16:18 solo hcid[7172]: Can't init device hci0: Input/output error (5)
Jun 27 20:16:18 solo hci_cmd_task: hci0 command tx timeout
Jun 27 20:16:18 solo sdpd[7181]: Bluetooth SDP daemon
Jun 27 20:16:19 solo hcid[7171]: Sending read scan enable command failed: Connection timed out (110)

Thanks for any hint/suggestion
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Sat Dec 01, 2007 6:33 am; edited 1 time in total
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2074
Location: San Jose, CA

PostPosted: Wed Jun 27, 2007 11:43 pm    Post subject: Reply with quote

Is your bluetooth driver loaded? I have a BCM203x bluetooth controller and UDEV does not automatically load the module.

Do an lspci and find out what device you have, then make sure you have the module for it compiled into the kernel and then add it to /etc/modules.autoload.d/kernel-2.6 to make sure it loads.

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Thu Jun 28, 2007 5:30 pm    Post subject: Reply with quote

In fact I don't know what's my Bluetooth hardware. Judging by the blue... tooth LED that's lit just beside my WiFi LED I know I have BlueTooth hardware. Here's lspci listing:

lspci:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express PCI Express Root Port (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X1400
03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd Unknown device 0832
03:01.1 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
03:01.2 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01)
03:01.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)
03:01.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)
0c:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

I've followed somehow Gentoo Bluetooth Howto but it already differs when running hciconfig:

hciconfig:
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

However grepping /proc for (bluetooth) USB devices seems to give some consistent results:

cat /proc/bus/usb/devices | grep -e^[TPD] | grep -e Cls=e0 -B1 -A1:
T:  Bus=05 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=413c ProdID=8126 Rev= 1.00


Posts I've read here and there seem to turn the problem back at USB because of the following error message:

Code:
Jun 27 20:16:18 solo hci_usb_intr_rx_submit: hci0 intr rx submit failed urb ffff81005f291c28 err -28
Jun 27 20:16:18 solo hcid[7172]: Can't init device hci0: Input/output error (5)

Any idea?
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2074
Location: San Jose, CA

PostPosted: Thu Jun 28, 2007 10:57 pm    Post subject: Reply with quote

Your device is not running, I get this from hciconfig:


Code:
hciconfig
hci0:   Type: USB
        BD Address: 00:1A:6B:3F:17:58 ACL MTU: 1017:8 SCO MTU: 64:8
        UP RUNNING PSCAN ISCAN
        RX bytes:4535 acl:0 sco:0 events:928 errors:0
        TX bytes:3947 acl:0 sco:0 commands:473 errors:0


Oh I just realized. I goofed. Bluetooth devices are USB.

do this:

Code:
lsusb -v


And post the results.

You are looking for something like this:

Code:
Bus 002 Device 002: ID 03f0:171d Hewlett-Packard
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x03f0 Hewlett-Packard
  idProduct          0x171d
  bcdDevice            1.00
  iManufacturer           1 Broadcom Corp
  iProduct                2 HP Integrated Module
  iSerial                 0
  bNumConfigurations      1


That's the broadcom one I have known simply as: bcm203x

If you do just a plain lsusb it looks like this:

Code:
Bus 002 Device 002: ID 03f0:171d Hewlett-Packard


So you can't tell its a broadcom until you do verbose lsusb.

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Fri Jun 29, 2007 3:58 pm    Post subject: Reply with quote

Thanks for the tip.

lsusb -v:
Bus 005 Device 006: ID 413c:8126 Dell Computer Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x413c Dell Computer Corp.
  idProduct          0x8126
  bcdDevice            1.00
  iManufacturer           1 Broadcom Corp
  iProduct                2 BCM2045
  iSerial                 0
  bNumConfigurations      1
...

Now I've added the module to /etc/modules.autoload.d/kernel-2.6:

lsmod | grep bcm:
bcm203x                 5764  0

I've also restarted /etc/init.d/bluetooth. I still get

tail /var/log/messages:
Jun 29 17:53:14 solo hcid[10552]: Bluetooth HCI daemon
Jun 29 17:53:14 solo hcid[10552]: HCI dev 0 registered
Jun 29 17:53:14 solo hci_usb_intr_rx_submit: hci0 intr rx submit failed urb ffff8100728a7da8 err -28
Jun 29 17:53:14 solo hcid[10553]: Can't init device hci0: Input/output error (5)
Jun 29 17:53:14 solo hcid[10552]: Starting SDP server
Jun 29 17:53:14 solo input[10554]: Bluetooth Input daemon
Jun 29 17:53:14 solo hcid[10552]: Default passkey agent (:1.6, /org/kde/kbluetooth_1234) registered
Jun 29 17:53:14 solo hcid[10552]: Default authorization agent (:1.6, /org/kde/kbluetooth_auth_1234) registered
Jun 29 17:53:14 solo input[10554]: Registered input manager path:/org/bluez/input

hciconfig:
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

:(
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2074
Location: San Jose, CA

PostPosted: Fri Jun 29, 2007 5:44 pm    Post subject: Reply with quote

Dude. That's the wrong driver.

I've done a google on the 2045 and it appears to just use the HCI USB driver.

But to be sure, in the bluetooth driver section just switch everything to [M] and enable all features on all drivers, like this:

Code:
<M> HCI USB driver
[*]   SCO (voice) support
<M> HCI UART driver
[*]   UART (H4) protocol support
[*]   BCSP protocol support
<M> HCI BCM203x USB driver
<M> HCI BPA10x USB driver
<M> HCI BlueFRITZ! USB driver
<M> HCI VHCI (Virtual HCI device) driver


Once you build this kernel, install it and reboot the bluetooth device should come up. You can check to see which driver loaded by doing lsmod, then if you like you can disable the other drivers.

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Jun 30, 2007 7:16 pm    Post subject: Reply with quote

Man, my configuration is exactly as you described. No way, I still get the error "Can't init /dev/hci0". I've tried with and without loadig module bcm230x - note I hadn't compiled bcm203x at the time I created this thread.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!


Last edited by VinzC on Sun Jul 01, 2007 10:06 am; edited 1 time in total
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2074
Location: San Jose, CA

PostPosted: Sat Jun 30, 2007 8:13 pm    Post subject: Reply with quote

Boot 2007.1 CD and see if it recognizes the blue tooth device.

I couldn't find anything on google about your device under linux specifically, other than that it implied it was working.

Maybe you need to load the module by hand:

do this:

Code:
modprobe -l

You'll get a list of drivers, including these:

Code:
/lib/modules/2.6.21-suspend2-r6/kernel/drivers/bluetooth/hci_uart.ko
/lib/modules/2.6.21-suspend2-r6/kernel/drivers/bluetooth/bcm203x.ko
/lib/modules/2.6.21-suspend2-r6/kernel/drivers/bluetooth/hci_usb.ko


As shown you should see the 'hci_usb' bluetooth driver.

That makes sure you have it compiled as a module.

Then type:

Code:
modprobe hci_usb


If it loads, type

Code:
hciconfig


And see if its there.

Then type:
Code:
dmesg | tail


To see what messages you get when you modprobed

If you still don't have it, try loading all the other drivers one at a time to see if any of them recognize the device...

Good luck,

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sun Jul 01, 2007 2:57 pm    Post subject: Reply with quote

I've just rebooted from Gentoo 2007.0 LiveCD and there's no hciconfig (it looks like package bluez-utils is not installed on the LiveCD) so I couldn't make any test. However - and I don't know if it's logical in that case - there is no /dev/hci0 either. Loaded modules are also the same as those you mentioned. When I have some time I'm goint to make a deeper test with, say, Ubuntu or whatsoever LiveCD.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Jul 14, 2007 11:51 am    Post subject: Reply with quote

K, I've taken the opportunity of a new kernel release (2.6.21-gentoo-r4) to set all bluetooth drivers built-in instead as modules: exactly the same problem! :evil:
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Jul 14, 2007 12:15 pm    Post subject: Reply with quote

I start to wonder if the reason is the chip is not supported. Currently only Broadcom BCM2033 is supported :( .

http://www.holtmann.org/linux/bluetooth/features.html:
Vendor       Model       Type     Features                HCI Version       LMP Version      Manufacturer
Broadcom     BCM2033     USB      0xff 0xfb 0x05 0x00     1.1  (0x0002)     1.1  (0x0c07)    Broadcom

_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2074
Location: San Jose, CA

PostPosted: Sat Jul 14, 2007 8:13 pm    Post subject: Reply with quote

VinzC wrote:
I start to wonder if the reason is the chip is not supported. Currently only Broadcom BCM2033 is supported :( .

http://www.holtmann.org/linux/bluetooth/features.html:
Vendor       Model       Type     Features                HCI Version       LMP Version      Manufacturer
Broadcom     BCM2033     USB      0xff 0xfb 0x05 0x00     1.1  (0x0002)     1.1  (0x0c07)    Broadcom


That's what I was thinking too.

You could ask the developers on the mailing list or forums if they are planning on supporting the 2045. My guess is its brand new...

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sun Jul 15, 2007 7:43 am    Post subject: Reply with quote

I've searched quickly over the Web yesterday and I think I've read 2.6.22 now supports that chip. I'll check as soon as I have a gentoo-sources-2.6.22 available for x86_64...

I've also applied a patch to hci-usb.c but it doesn't work either:

~/patches/bluetooth/hci-usb.c.patch:
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 406af57..7e04dd6 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -114,25 +114,31 @@ static struct usb_device_id blacklist_ids[] = {
        { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
        { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 },

+       /* Broadcom BCM2045 */
+       { USB_DEVICE(0x0a5c, 0x2101), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+
        /* IBM/Lenovo ThinkPad with Broadcom chip */
-       { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_WRONG_SCO_MTU },
-       { USB_DEVICE(0x0a5c, 0x2110), .driver_info = HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x0a5c, 0x201e), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x0a5c, 0x2110), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+
+       /* Targus ACB10US */
+       { USB_DEVICE(0x0a5c, 0x2100), .driver_info = HCI_RESET },

        /* ANYCOM Bluetooth USB-200 and USB-250 */
        { USB_DEVICE(0x0a5c, 0x2111), .driver_info = HCI_RESET },

        /* HP laptop with Broadcom chip */
-       { USB_DEVICE(0x03f0, 0x171d), .driver_info = HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x03f0, 0x171d), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },

        /* Dell laptop with Broadcom chip */
-       { USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },

        /* Microsoft Wireless Transceiver for Bluetooth 2.0 */
        { USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET },

        /* Kensington Bluetooth USB adapter */
        { USB_DEVICE(0x047d, 0x105d), .driver_info = HCI_RESET },
-       { USB_DEVICE(0x047d, 0x105e), .driver_info = HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x047d, 0x105e), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },

        /* ISSC Bluetooth Adapter v3.1 */
        { USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET },
@@ -142,8 +148,8 @@ static struct usb_device_id blacklist_ids[] = {
        { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC },

        /* Belkin F8T012 and F8T013 devices */
-       { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_WRONG_SCO_MTU },
-       { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+       { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },

        /* Digianswer devices */
        { USB_DEVICE(0x08fd, 0x0001), .driver_info = HCI_DIGIANSWER },

_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2074
Location: San Jose, CA

PostPosted: Sun Jul 15, 2007 11:37 pm    Post subject: Reply with quote

VinzC wrote:
I've searched quickly over the Web yesterday and I think I've read 2.6.22 now supports that chip. I'll check as soon as I have a gentoo-sources-2.6.22 available for x86_64...


2.6.22-gentoo is in portage, I'm running it on my laptop now.

Just make sure to use SLAB, not SLUB.

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Mon Jul 16, 2007 7:56 am    Post subject: Reply with quote

RayDude wrote:
...
Just make sure to use SLAB, not SLUB.

SLOB, SLAB, SLUB... :roll: :lol: Remind me what these are?... More seriously, I know about RTC and HPET/RTC emulation, what's the right one?

EDIT: Oops... SLUB is the allocator, nothing to deal with realtime clock... I told you I needed to be reminded! :-D
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Tue Nov 27, 2007 8:17 am    Post subject: Reply with quote

Just a follow-up: I'm now running Gentoo Sources 2.6.23-r2, still the same... :(
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Dec 01, 2007 6:41 am    Post subject: Reply with quote

Bug filed.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Wed Jan 02, 2008 10:58 pm    Post subject: Reply with quote

Problem solved: some kernel modules were probably missing. I've tested my Bluetooth hardware using a Ubuntu LiveCD and it worked so I concluded it was a problem with my kernel configuration, which certainly missed a couple of modules. So I copied the kernel configuration and *Bingo* !

I don't know exactly what drivers were missing - probably some serial drivers. Now I have a working configuration and I can now use my Bluetooth hardware :-) .

I've closed the bug. I'll probably update the Wiki if it turns out some important information about depending modules is missing.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum