USB bluetooth dongles

Niki Denev niki at totalterror.net
Mon Jul 17 18:08:03 UTC 2006


Hello,

i've installed the ubt driver from the subversion repo at turbocat.com,
and now my BT dongle seems to work, but with some strange side effects.

For example i can connect to my GPS receiver properly, and get output (rfcomm_spp -a gps -c 1)
but when i'm trying to issue a inquiry command with discoverable devices nearby i get :

  vaio# hccontrol -n ubt0hci Inquiry
  ubt0:ubt_intr_read_complete:883: Invalid HCI event frame size, length=15, pktlen=17

and nothing is discovered.
Also when exiting from rfcomm_spp with ctrl-c i get this :

  ng_btsocket_rfcomm_receive_uih: Got UIH for dlci=2 in invalid state=5, flags=0x3

This is FreeBSD 6.1-STABLE running on Sony VAIO PCG-U3.

P.S.: I have also working ural(4) device with the new usb stack.
It seems more reliable, because before often after a few insers/removals
i was getting instant reboots. The only thing is the many "ural_newstate: cannot call usb_rem_task...."
messages.

P.S.2: Also i seem to get strange output from usbdevs with the new usb stack.
I get "I/O Error" message for every possible USB address. I think the problem
is that the usb subsystem returns EINVAL where it can return ENXIO to inform
the caller that there is no such device.
I tried this patch that seems to work ok for me, but i'm not sure if it is
completely correct.

The patch :

--- sys/dev/usb2/_usb.c	Wed Jun 21 18:06:23 2006
+++ /usr/src/sys/dev/usb2/_usb.c	Mon Jul 17 20:17:11 2006
@@ -858,11 +858,15 @@
 			struct usb_device_info *di = (void *)data;
 			int addr = di->udi_addr;

-			if((addr < 1) ||
-			   (addr >= USB_MAX_DEVICES) ||
-			   (bus->devices[addr] == 0))
+			if((addr < 1) || (addr >= USB_MAX_DEVICES))
 			{
 				error = EINVAL;
+				goto done;
+			}
+
+			if(bus->devices[addr] == 0)
+			{
+				error = ENXIO;
 				goto done;
 			}


or : http://bg.freebsd.org/~ndenev/usb2patch.txt



Regards,
Niki Denev


More information about the freebsd-usb mailing list