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