From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 3 12:17:34 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69B361065686 for ; Fri, 3 Oct 2008 12:17:34 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id E15CF8FC13 for ; Fri, 3 Oct 2008 12:17:33 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([10.30.1.111]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id m93BmXSs023710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 3 Oct 2008 15:48:34 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Klj97-000FWZ-7a; Fri, 03 Oct 2008 15:48:33 +0400 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 03 Oct 2008 15:48:32 +0400 Message-Id: <1223034512.1842.111.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth audio (once again) X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 12:17:34 -0000 On Fri, 2008-09-26 at 15:04 -0700, Maksim Yevmenkin wrote: > the code _is_ in src. Nice > isoc transfer support was added to ng_ubt(4). there are some known > problems, at least in some cases system crashes when usb dongle is > simply disconnected (without shutting down the stack first). the stack > trace ends up deep in the usb guts and i had no time to look at it. Have you point me on something like test application to try/reproduce issue ? > sco sockets support was also added, however 1) sco sockets hook is > *not* connected by default and 2) there are some known problems with > the code. more specifically problems are related to "broken" bluetooth > devices and the way they report sco buffer size/packet count. i happen > to have few of those devices. we need to have a way to handle those > kind of devices nicely. I have Platronics P590 headset with advanced audio and Nokia headset. I may to check them against our bluetooth stack. > before doing anything else, we need to fix existing code. Let's move forward > thanks, > max > _______________________________________________ > freebsd-bluetooth@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth > To unsubscribe, send any mail to "freebsd-bluetooth-unsubscribe@freebsd.org" -- Vladimir B. Grebenschikov vova@fbsd.ru From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 3 16:45:07 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 098A61065687 for ; Fri, 3 Oct 2008 16:45:07 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.188]) by mx1.freebsd.org (Postfix) with ESMTP id 885B68FC12 for ; Fri, 3 Oct 2008 16:45:06 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so267507gve.39 for ; Fri, 03 Oct 2008 09:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=eIah9TfXzi//uuQCE1tW8uqDW45W8pbktKNBai2IqZc=; b=N3+PbWLhw/e048V+PTARsVNOKGmEUdhC9fQh6lt6Ke3BZcrU6NDvslGD9PEqX7iMf9 95W4eNncW+wMCr2EdzZtfplYtZNo3emJNqR41htrmDvjPInxK8PrHQF3Rtknk8OIFq4i w2NJK2RTeGfBFZiq7f8Gc+RArgqHPLFPPBwQs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=jB93GpTDzIHup1PgUMtmyi5UfjqJVnwnG7+5b4/JBmLhHKtQ34ZoTTshAcZZTERqHL FjRfMSSmGSctRKToLGcZ6Ow3QxStL/OfrL+MZ7dCtGbn7iWnZogxbcdL+05jRyAz/D6R TIp+m6DbnnxFdF/HLqSQe09+aVU4rx6ORDBaU= Received: by 10.86.95.8 with SMTP id s8mr1474076fgb.6.1223052304873; Fri, 03 Oct 2008 09:45:04 -0700 (PDT) Received: by 10.86.62.1 with HTTP; Fri, 3 Oct 2008 09:45:04 -0700 (PDT) Message-ID: Date: Fri, 3 Oct 2008 09:45:04 -0700 From: "Maksim Yevmenkin" To: "Vladimir Grebenschikov" In-Reply-To: <1223034512.1842.111.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> <1223034512.1842.111.camel@localhost> Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth audio (once again) X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 16:45:07 -0000 > > isoc transfer support was added to ng_ubt(4). there are some known > > problems, at least in some cases system crashes when usb dongle is > > simply disconnected (without shutting down the stack first). the stack > > trace ends up deep in the usb guts and i had no time to look at it. > > Have you point me on something like test application to try/reproduce > issue ? sure. first, you need to run -current. ng_ubt(4) isoc support has not been mfc'ed yet. then you might want to connect sco hook to the sockets layer, i.e. apply something like beetle% diff -u /usr/src/etc/rc.d/bluetooth bluetooth --- /usr/src/etc/rc.d/bluetooth 2008-07-23 10:50:01.000000000 -0700 +++ bluetooth 2008-07-28 11:13:28.000000000 -0700 @@ -126,6 +126,8 @@ ngctl connect ${dev}l2cap: btsock_l2c: l2c ${dev}l2c \ > /dev/null 2>&1 || return 1 +ngctl connect ${dev}hci: btsock_sco: sco ${dev}sco > /dev/null 2>&1 + # Initilalize HCI node ${hccontrol} -n ${dev}hci reset \ > /dev/null 2>&1 || return 1 to your /etc/rc.d/bluetooth script. now you can connect your bluetooth device. kick tires and make sure you can do inquiry etc. then simply pull the device out _without_ stopping the stack first. at least on my system it often leads to panic after a few seconds. > > sco sockets support was also added, however 1) sco sockets hook is > > *not* connected by default and 2) there are some known problems with > > the code. more specifically problems are related to "broken" bluetooth > > devices and the way they report sco buffer size/packet count. i happen > > to have few of those devices. we need to have a way to handle those > > kind of devices nicely. > > I have Platronics P590 headset with advanced audio and Nokia headset. I > may to check them against our bluetooth stack. ok.be warned, you will need to write some code for that. its relatively simple. basically open an rfcomm socket and then open a sco socket. i can provide examples if you want me to. also, receive path (i.e. from headset to pc) kinda works. send path (from pc to headset) needs more work. > > before doing anything else, we need to fix existing code. > > Let's move forward sure :) lets. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 3 20:54:23 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7136E1065691 for ; Fri, 3 Oct 2008 20:54:23 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id E13F38FC15 for ; Fri, 3 Oct 2008 20:54:22 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([77.232.23.6]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id m93KsItk016675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Oct 2008 00:54:20 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KlrfG-0000jG-AN; Sat, 04 Oct 2008 00:54:18 +0400 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> <1223034512.1842.111.camel@localhost> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: SWsoft Date: Sat, 04 Oct 2008 00:54:17 +0400 Message-Id: <1223067257.2362.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-bluetooth@freebsd.org, usb@freebsd.org Subject: Re: Bluetooth audio - crash on USB bluetooth dongle disconnect X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 20:54:23 -0000 On Fri, 2008-10-03 at 09:45 -0700, Maksim Yevmenkin wrote: > now you can connect your bluetooth device. kick tires and make sure > you can do inquiry etc. then simply pull the device out _without_ > stopping the stack first. at least on my system it often leads to > panic after a few seconds. First of all it crashes on disconnect with big probability even without btsock_sco. For me it crashes in uhci interrupt handler on NULL de-reference trace shows something like: usb_transfer_complete uhci_transfer_complete ... digging a bit shows that it crashes in uhci.c:2575 usbd_status uhci_device_isoc_start(usbd_xfer_handle xfer) { struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->pipe; uhci_softc_t *sc = (uhci_softc_t *)upipe->pipe.device->bus; with upipe = NULL on interrupt Looks like it is result of locking changes in usb stack or like. Usb folks, can anybody give a hint what is the reason of such crash ? PS: I have SMP system. > thanks, > max -- Vladimir B. Grebenschikov vova@fbsd.ru From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 3 21:18:28 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A1C1065689 for ; Fri, 3 Oct 2008 21:18:28 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by mx1.freebsd.org (Postfix) with ESMTP id 620AE8FC2A for ; Fri, 3 Oct 2008 21:18:28 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so1313893uge.39 for ; Fri, 03 Oct 2008 14:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/6x2r+sCwqZPvBzccd/CqFJck+ZtF/7FwupKS60LBvI=; b=MWVUIjvFea3TaasNCshvI9irFjEDLse/6ItC8gm8e9JfcJYQQdmZmybFKjcZirp+cX l2P1JtqTGckFZTX/p4YAKJGTmIiQMiSsteuM9D5GeHQFUArLBoeCPzna/cc6CYUvGBmN KyuRfnb8hBbIdA5lwN3Ac1eKLfrL93Chf1J9o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Nh004ieSDEuS7XKylM/Scv1OwgNXIxR1+Sr4TGuxDh53Loo+0OvD5CD6AFBPrgo+Zw EXgy7qE1aO5otmqXWexTcFqtiTcuCHOMD7vIAQq+PC9V3qCI3dsoeerhkO33bG3pijMf w+dXuq5XWnHoJMwE0JJ1rhb8+Bhur5zMUeJF4= Received: by 10.86.62.3 with SMTP id k3mr1739424fga.1.1223068706237; Fri, 03 Oct 2008 14:18:26 -0700 (PDT) Received: by 10.86.62.1 with HTTP; Fri, 3 Oct 2008 14:18:26 -0700 (PDT) Message-ID: Date: Fri, 3 Oct 2008 14:18:26 -0700 From: "Maksim Yevmenkin" To: vova@fbsd.ru In-Reply-To: <1223067257.2362.6.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> <1223034512.1842.111.camel@localhost> <1223067257.2362.6.camel@localhost> Cc: freebsd-bluetooth@freebsd.org, usb@freebsd.org Subject: Re: Bluetooth audio - crash on USB bluetooth dongle disconnect X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 21:18:28 -0000 On 10/3/08, Vladimir Grebenschikov wrote: > On Fri, 2008-10-03 at 09:45 -0700, Maksim Yevmenkin wrote: > > > now you can connect your bluetooth device. kick tires and make sure > > you can do inquiry etc. then simply pull the device out _without_ > > stopping the stack first. at least on my system it often leads to > > panic after a few seconds. > > First of all it crashes on disconnect with big probability even without > btsock_sco. yes, i know. isoc transfers seems to be triggering it > For me it crashes in uhci interrupt handler on NULL de-reference > > trace shows something like: > usb_transfer_complete > uhci_transfer_complete > ... > > digging a bit shows that it crashes in uhci.c:2575 > > usbd_status > uhci_device_isoc_start(usbd_xfer_handle xfer) > { > struct uhci_pipe *upipe = (struct uhci_pipe *)xfer->pipe; > uhci_softc_t *sc = (uhci_softc_t *)upipe->pipe.device->bus; > > with upipe = NULL on interrupt > > Looks like it is result of locking changes in usb stack or like. > > Usb folks, can anybody give a hint what is the reason of such crash ? > > PS: I have SMP system. one thing that is different from interrupt and bulk transfers is that ng_ubt(4) always has multiple outstanding incoming isoc transfers. when device is simply pulled out, there is not much driver can do. if i enable debugging i can see my transfer completion routine called with ioerror status or something like that. so, i suspect this is a cleanup issue. i'm not sure who supposed to do the cleanup in this case driver or stack. in any case, can you verify that ubt_reset() is called when device is pulled out? (it should be called as part of hook disconnect). if not - then please try to call ubt_reset() from ubt_detach() just before closing all the pipes. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 3 22:21:09 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BB9D106568A; Fri, 3 Oct 2008 22:21:09 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id 696458FC1A; Fri, 3 Oct 2008 22:21:08 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([77.232.23.6]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id m93ML5xM015743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Oct 2008 02:21:06 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Klt1E-0001N2-BI; Sat, 04 Oct 2008 02:21:04 +0400 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> <1223034512.1842.111.camel@localhost> <1223067257.2362.6.camel@localhost> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Sat, 04 Oct 2008 02:21:04 +0400 Message-Id: <1223072464.4832.2.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-bluetooth@freebsd.org, usb@freebsd.org Subject: Re: Bluetooth audio - crash on USB bluetooth dongle disconnect - solved X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 22:21:09 -0000 =F7 Fri, 03/10/2008 =D7 14:18 -0700, Maksim Yevmenkin =D0=C9=DB=C5=D4: > one thing that is different from interrupt and bulk transfers is that > ng_ubt(4) always has multiple outstanding incoming isoc transfers. > when device is simply pulled out, there is not much driver can do. if > i enable debugging i can see my transfer completion routine called > with ioerror status or something like that. so, i suspect this is a > cleanup issue. i'm not sure who supposed to do the cleanup in this > case driver or stack. >=20 > in any case, can you verify that ubt_reset() is called when device is > pulled out? (it should be called as part of hook disconnect).=20 Right guess, it does not called. > if not - then please try to call ubt_reset() from ubt_detach() just befor= e > closing all the pipes. Yes, it fixes crash, patch below. Index: netgraph/bluetooth/drivers/ubt/ng_ubt.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/ncvs/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c,v retrieving revision 1.35 diff -u -r1.35 ng_ubt.c --- netgraph/bluetooth/drivers/ubt/ng_ubt.c 29 Jul 2008 00:17:53 -0000 1.35 +++ netgraph/bluetooth/drivers/ubt/ng_ubt.c 3 Oct 2008 22:13:46 -0000 @@ -803,6 +803,9 @@ struct ubt_softc *sc =3D device_get_softc(self); int i; =20 + /* Reset queues and pipes */ + ubt_reset(sc); +=09 /* Destroy Netgraph node */ if (sc->sc_node !=3D NULL) { NG_NODE_SET_PRIVATE(sc->sc_node, NULL); > thanks, > max --=20 Vladimir B. Grebenschikov vova@fbsd.ru From owner-freebsd-bluetooth@FreeBSD.ORG Fri Oct 3 22:42:30 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81E341065688 for ; Fri, 3 Oct 2008 22:42:30 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id 0D3CC8FC08 for ; Fri, 3 Oct 2008 22:42:29 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1159006fgb.35 for ; Fri, 03 Oct 2008 15:42:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=dqalAnqmRjae5jxe2VMtI3huJefnLQXFtP2FkWTVukQ=; b=iOVZ3O4NpzjqoTh7IIHu3P4CT5w1BDpmm5ZB2x2cHXtee/s5bnI2ac/a8iaEZCT/94 tiD23U+iitK0WL1UPJBKcXvJyx8bxIbdXfLl9NZloUo4t4EWtmEYLEHL04YTYW1tDDai ytssOvyHcqk3TGewch+Cbr6yasYgn364bDa/Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=NGbIjvHlqo3Mr4usRpjvAemQnVSmmRU35SiBTEfmrDeYUmA4sedIk4qNQCR7bPrG9p Rd2x9JWFPf/GFf2eFHDHosn6E6TOSj6dbj1a5su+L8sjfDkeSRzoL+le5dji6f7XzWrd NBq1SbD6lQhwNEmCuQdeLRJoLMc1yB3Y0RdFI= Received: by 10.86.97.7 with SMTP id u7mr1733524fgb.51.1223073748437; Fri, 03 Oct 2008 15:42:28 -0700 (PDT) Received: by 10.86.62.1 with HTTP; Fri, 3 Oct 2008 15:42:28 -0700 (PDT) Message-ID: Date: Fri, 3 Oct 2008 15:42:28 -0700 From: "Maksim Yevmenkin" To: vova@fbsd.ru In-Reply-To: <1223072464.4832.2.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: base64 Content-Disposition: inline References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> <1223034512.1842.111.camel@localhost> <1223067257.2362.6.camel@localhost> <1223072464.4832.2.camel@localhost> Cc: freebsd-bluetooth@freebsd.org, usb@freebsd.org Subject: Re: Bluetooth audio - crash on USB bluetooth dongle disconnect - solved X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 22:42:30 -0000 MjAwOC8xMC8zIFZsYWRpbWlyIEdyZWJlbnNjaGlrb3YgPHZvdmFAZmJzZC5ydT46Cj4g9yBGcmks IDAzLzEwLzIwMDgg1yAxNDoxOCAtMDcwMCwgTWFrc2ltIFlldm1lbmtpbiDQydvF1DoKPgo+PiBv bmUgdGhpbmcgdGhhdCBpcyBkaWZmZXJlbnQgZnJvbSBpbnRlcnJ1cHQgYW5kIGJ1bGsgdHJhbnNm ZXJzIGlzIHRoYXQKPj4gbmdfdWJ0KDQpIGFsd2F5cyBoYXMgbXVsdGlwbGUgb3V0c3RhbmRpbmcg aW5jb21pbmcgaXNvYyB0cmFuc2ZlcnMuCj4+IHdoZW4gZGV2aWNlIGlzIHNpbXBseSBwdWxsZWQg b3V0LCB0aGVyZSBpcyBub3QgbXVjaCBkcml2ZXIgY2FuIGRvLiBpZgo+PiBpIGVuYWJsZSBkZWJ1 Z2dpbmcgaSBjYW4gc2VlIG15IHRyYW5zZmVyIGNvbXBsZXRpb24gcm91dGluZSBjYWxsZWQKPj4g d2l0aCBpb2Vycm9yIHN0YXR1cyBvciBzb21ldGhpbmcgbGlrZSB0aGF0LiBzbywgaSBzdXNwZWN0 IHRoaXMgaXMgYQo+PiBjbGVhbnVwIGlzc3VlLiBpJ20gbm90IHN1cmUgd2hvIHN1cHBvc2VkIHRv IGRvIHRoZSBjbGVhbnVwIGluIHRoaXMKPj4gY2FzZSBkcml2ZXIgb3Igc3RhY2suCj4+Cj4+IGlu IGFueSBjYXNlLCAgY2FuIHlvdSB2ZXJpZnkgdGhhdCB1YnRfcmVzZXQoKSBpcyBjYWxsZWQgd2hl biBkZXZpY2UgaXMKPj4gcHVsbGVkIG91dD8gKGl0IHNob3VsZCBiZSBjYWxsZWQgYXMgcGFydCBv ZiBob29rIGRpc2Nvbm5lY3QpLgo+Cj4gUmlnaHQgZ3Vlc3MsIGl0IGRvZXMgbm90IGNhbGxlZC4K Pgo+PiBpZiBub3QgLSB0aGVuIHBsZWFzZSB0cnkgdG8gY2FsbCB1YnRfcmVzZXQoKSBmcm9tIHVi dF9kZXRhY2goKSBqdXN0IGJlZm9yZQo+PiBjbG9zaW5nIGFsbCB0aGUgcGlwZXMuCj4KPiBZZXMs IGl0IGZpeGVzIGNyYXNoLCBwYXRjaCBiZWxvdy4KCnRoYW5rcyBmb3IgdGVzdGluZyBpdCEgaSBo YXZlIGNvbW1pdHRlZCBzbGlnaHRseSBkaWZmZXJlbnQgZml4IHRvIGhlYWQKCj09PQoKQXV0aG9y OiBlbWF4CkRhdGU6IEZyaSBPY3QgIDMgMjI6NDA6NDIgMjAwOApOZXcgUmV2aXNpb246IDE4MzU3 NgpVUkw6IGh0dHA6Ly9zdm4uZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMTgzNTc2CgpMb2c6 CiBBYm9ydCB0cmFuc2ZlcnMgb24gYWxsIHBpcGVzIGJlZm9yZSBjbG9zaW5nIHRoZW0uIFRoaXMg Zml4ZXMgdGhlIGNyYXNoCiB3aGVuIEJsdWV0b290aCBVU0IgZGV2aWNlIGlzIHB1bGxlZCBvdXQg d2l0aG91dCBzdG9wcGluZyB0aGUgc3RhY2sgZmlyc3QuCgogU3VibWl0dGVkIGJ5OiBWbGFkaW1p ciBHcmViZW5zY2hpa292IHZvdmEgYXQgZmJzZCBkb3QgcnUKIE1GQyBhZnRlcjogICAgMSB3ZWVr CgpNb2RpZmllZDoKIGhlYWQvc3lzL25ldGdyYXBoL2JsdWV0b290aC9kcml2ZXJzL3VidC9uZ191 YnQuYwoKPT09Cgp0aGFua3MsCm1heAo= From owner-freebsd-bluetooth@FreeBSD.ORG Sat Oct 4 07:53:13 2008 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C505D1065688 for ; Sat, 4 Oct 2008 07:53:13 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id 195FE8FC12 for ; Sat, 4 Oct 2008 07:53:12 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([77.232.23.6]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id m947r9dH005591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 4 Oct 2008 11:53:10 +0400 (MSD) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Km1wq-0009hD-Sa; Sat, 04 Oct 2008 11:53:08 +0400 From: Vladimir Grebenschikov To: Maksim Yevmenkin In-Reply-To: References: <3a386af20809261420j535680e8pf44453dbf6f84b20@mail.gmail.com> <1223034512.1842.111.camel@localhost> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Sat, 04 Oct 2008 11:53:08 +0400 Message-Id: <1223106788.4832.25.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth audio (once again) X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vova@fbsd.ru List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Oct 2008 07:53:13 -0000 =F7 Fri, 03/10/2008 =D7 09:45 -0700, Maksim Yevmenkin =D0=C9=DB=C5=D4: > > > sco sockets support was also added, however 1) sco sockets hook is > > > *not* connected by default and 2) there are some known problems with > > > the code. more specifically problems are related to "broken" bluetoo= th > > > devices and the way they report sco buffer size/packet count. i happ= en > > > to have few of those devices. we need to have a way to handle those > > > kind of devices nicely. > > > > I have Platronics P590 headset with advanced audio and Nokia headset. I > > may to check them against our bluetooth stack. I bit strange that I can inquiry and l2ping device, but can't list services: # l2ping -a p590 0 bytes from p590 seq_no=3D0 time=3D1794.348 ms result=3D0x6=20 0 bytes from p590 seq_no=3D1 time=3D2023.401 ms result=3D0x6=20 0 bytes from p590 seq_no=3D2 time=3D1761.475 ms result=3D0x6=20 ^C # l2control -a p590 Read_Channel_List l2control: Could not bind socket, bdaddr=3D00:19:7f:1b:de:77: Network is down # Should I do "pairing" somehow ? > ok.be warned, you will need to write some code for that. its > relatively simple. basically open an rfcomm socket and then open a sco > socket. i can provide examples if you want me to. Please, send me an example if you have. --=20 Vladimir B. Grebenschikov vova@fbsd.ru