From owner-freebsd-usb@FreeBSD.ORG Mon Jul 17 19:07:14 2006 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FD6916A4E0 for ; Mon, 17 Jul 2006 19:07:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.swip.net [212.247.155.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 742B643D46 for ; Mon, 17 Jul 2006 19:07:13 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: gvlK0tOCzrqh9CPROFOFPw== X-Cloudmark-Score: 0.000000 [] Received: from [193.216.121.190] (HELO [10.0.0.249]) by mailfe09.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTP id 67494764; Mon, 17 Jul 2006 21:07:10 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Mon, 17 Jul 2006 21:07:14 +0200 User-Agent: KMail/1.7 References: <44BBD1F9.5000804@totalterror.net> In-Reply-To: <44BBD1F9.5000804@totalterror.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607172107.18141.hselasky@c2i.net> Cc: Subject: Re: USB bluetooth dongles X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2006 19:07:14 -0000 Hi Niki, On Monday 17 July 2006 20:07, Niki Denev wrote: > 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 Looks like there is one byte missing in the packet. Could you try the following: Edit "/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c" and change ".bufsize = 0," to ".bufsize = 256 + 16,", in the following piece of code: [2] = { .type = UE_INTERRUPT, .endpoint = -1, /* any */ .direction = UE_DIR_IN, .flags = USBD_SHORT_XFER_OK, .bufsize = 0, /* use wMaxPacketSize */ .callback = &ubt_intr_read_callback, }, > > 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. > I haven't got to the point of rewriting the ural driver yet. You can expect some improvements coming. > 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. I have commited your patch to SVN and p4. --HPS