Re: Bluetooth on IBM T30 (USB device problem)

From: Maksim Yevmenkin <myevmenk_at_exodus.net>
Date: Wed, 26 Mar 2003 16:44:50 -0800
Lee,

> Kernel recompiled and now no more "_mtx_assert undefined" errors. 
> Continuing with the directions at 
> <http://www.oook.cz/bsd/bluetooth.html>:
>
> When I press the T30's bluetooth button I get the known USB problem, 
> but never see the ubt0 device defined.  Instead of getting
>
> ubt0: vendor 0x0a12 product 0x0001, rev 1.10/5.25, addr 2
> ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
> ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3;
>       wMaxPacketSize=49; nframes=6, buffer size=294
>
> I get dead silence.  Grep'ing for it in dmesg renders:
>
> : || tylendel.castle.org [8] ; dmesg | grep ubt
> Preloaded elf module "/boot/kernel/ng_ubt.ko" at 0xc06e60a8.


Of course. Because ng_ubt(4) driver *does not* know about Bluetooth
device inside your T30. That is why you need to find out VendorID and
Product ID for the Bluetooth device inside your T30. You can use
ugen(4) for that. ugen(4) driver *must* be loaded *before* you press
the Bluetooth button. Once you press the Bluetooth button ugen(4)
driver *must* attach to it, because it is the default driver for
the USB devices. That is *if* USB will attach the device and you
do not get "device problem, disabling port 1" error.

Once you have ugen(4) attached to the device run

# usbdevs -v -d

This will give you VendorID/ProductID pair. Now you are ready to
patch ng_ubt(4) driver. Just add VendorID/ProductID to the list
of supported devices inside USB_MATCH function (in ng_ubt.c file).

Now

1) Recompile ng_ubt(4) module
2) Turn off your Bluetooth device
3) unload ng_ubt(4) (and ugen(4) if you loaded it by hand)
4) load *new* ng_ubt(4) driver
5) Press the Bluetooth button to activate device

If everything is working then you should get the messages from the
ng_ubt(4) driver.

> I am presuming pressing the bluetooth button is like adding a bluetooth
> USB device but I am lacking in actual real knowledge here.  Their

right, i think it more like plugging a new USB device.

> documentation has things like "Power on the BDC by pressing Bluetooth 
> power switch if the Bluetooth LED is off." (BDC = Bluetooth Daughter 
> Card).
> When I press the button the LED does not come on.  If I press and
> hold the button the LED will eventually flash once and then I get the
> "uhub2: device problem, disabling port 1" message on the console yet 
> again.

Well, it seem like when LED is on then the device is plugged, but you
still getting the "device problem, disabling port 1" message and that
means USB stack/hub *did not* attach/activate the device and hence no
driver was attached to it.

You *must* get the device to attach, otherwise you can not use the
driver. For now just try to make ugen(4) attach to the device. Once
you get the ugen(4) to recognize the device then you should move to
ng_ubt(4).

> In searching IBM's documentation I found that they have updated 
> firmware for the BDC, but you have to be running windows to install 
> it. :/ 
> Kernel source was sup'd Monday evening, US Pacific time.  Bluetooth
> bundle is ngbt-fbsd-20030305.tar.gz.

It all does not matter at this point. Again USB *did not* attach (and
activate) the device. The firmware inside the card and other stuff does
not event come into play.  The simple fact that you have plugged device
into hub does not indicate that device is working.

> I went ahead and tried to run rc.bluetooth start ubt0 in debug mode
> and got pretty much what you'd expect when the device isn't there:

[...]

> + setup_stack ubt0 hook
> + dev=ubt0
> + shift
> + hook=hook
> + shift
> + /usr/sbin/ngctl mkpeer ubt0: hci hook drv
> ngctl: send msg: No such file or directory
> + exit 1

No device - no driver - no "ubt0" Netgraph node - no Bluetooth :( Sorry

In fact, just activate the Bluetooth device (LED on) and run

# usbdevs -v -d

If device *was* activated you *must* see it, otherwise you will only
see USB hubs (and possibly other devices that have been attached).

thanks,
max
Received on Wed Mar 26 2003 - 15:48:21 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:01 UTC