Archive for March 20th, 2008

Bluetooth dramas continue

Thursday, March 20th, 2008

On my recent experiments with Bluetooth on my father’s laptop, I decided I’d go and get a dongle to experiment with it on my own laptop. So today I popped into Jaycar and picked up a $30 Bluetooth dongle.

The unit is based on the Broadcom BCM2035 chipset. On the train heading home, I plugged it in, and noticed that after compiling the required drivers into the kernel, hci-usb popped up, and created a hci0 device. So I guessed that meant everything was working. Of course, I knew I’d still need the BlueZ stack installed, so I waited until I got home before doing further experiments.

Well… I’m home now, got BlueZ installed (v3.28, and firmware v1.1) along with KDEBluetooth (1.0 beta8). Then I dug out the headset, switched it on, and tried to associate the pair. Nothing. Tried again, and again… unplugging and replugging in the dongle, restarting the daemons… Nada… Zilch.

Hmmm… So I look around, there was mention of the hciconfig command, in particular using it to enable the device. Either my device is in a coma, or something is wrong with the software. I haven’t got Windows installed on this laptop to experiment (I managed to hose it the other day when I accidentally typed sudo mkdosfs /dev/sda whilst formatting a floppy on sdb… Ooops!). Anyway…

This is how the device identifies itself…

wander ~ # cat /proc/bus/usb/devices
[...]
T: Bus=01 Lev=01 Prnt=01 Port=01 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=0a5c ProdID=2035 Rev= 1.00
S: Manufacturer=Broadcom Corp
S: Product=BCM2035B
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
[...]

On plugging the device in, the dmesg prints:
wander ~ # dmesg
[ 7039.423795] usb 1-1: new full speed USB device using uhci_hcd and address 7
[ 7039.635328] usb 1-1: configuration #1 chosen from 1 choice
[ 7039.952188] Bluetooth: HCI USB driver ver 2.9
[ 7039.954436] usbcore: registered new interface driver hci_usb

hciconfig shows:
wander ~ # hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 16:0
UP RUNNING PSCAN
RX bytes:4630 acl:0 sco:0 events:107 errors:0
TX bytes:2409 acl:0 sco:0 commands:106 errors:0

If I try the trick of bringing the device down, then back up again, I get the following:
wander ~ # hciconfig hci0 down
wander ~ # hciconfig hci0 up
wander ~ # hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 377:10 SCO MTU: 16:0
UP RUNNING PSCAN
RX bytes:5582 acl:0 sco:0 events:131 errors:0
TX bytes:3001 acl:0 sco:0 commands:130 errors:0
wander ~ # dmesg
wander ~ # tail /var/log/everything/current
Mar 20 22:24:46 [hcid] HCI dev 0 down
Mar 20 22:24:46 [hcid] Stopping security manager 0
Mar 20 22:24:46 [hcid] Device hci0 has been disabled
Mar 20 22:24:48 [hcid] HCI dev 0 up
Mar 20 22:24:48 [hcid] Device hci0 has been added
Mar 20 22:24:48 [hcid] Starting security manager 0
Mar 20 22:24:48 [hcid] Device hci0 has been activated

This doesn’t fix the issue, and I’m left exactly where I started.  I’m not sure what’s going on… at the moment I don’t have the time to debug the situation, but if anyone has any suggestions (no, I’m not buying another Bluetooth dongle) — I’d happily give them a try.


Bad Behavior has blocked 266 access attempts in the last 7 days.