From owner-freebsd-bluetooth@FreeBSD.ORG Thu Apr 10 18:17:50 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 D417B106564A for ; Thu, 10 Apr 2008 18:17:50 +0000 (UTC) (envelope-from jonmoldenhauer@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.234]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1DD8FC15 for ; Thu, 10 Apr 2008 18:17:50 +0000 (UTC) (envelope-from jonmoldenhauer@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so114598wra.13 for ; Thu, 10 Apr 2008 11:17:49 -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=Y5DT52msSjzwCFbmnEb9rIyuDamJ4zmwerE+2hRfe+4=; b=vUlc1NXs0A09yZW5CZ6AwCAC28WgyqmIKlWCtqnUJuS42LagXzMBVCMpzPxxORq6ptM7OZhSq20YTOjXMM+YUdqIoPY1XroeH1NpWQJ8Uil7GlcM7vwZ1+mXGK5OIheZtyfp6QllFxL3QDZANTEH3SUAarvtzwtKV9Ae7QFNz+k= 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=gmJh76vsSkBk8cmJzv6FtSp2JdIBI3bDdD3EsKt0bNL4u7N2thtDS5hO8GIM+4HERFt7QVPhEHhmkgJtAM33bEfMz28nxtOpE0ygOCyAHlkQqvJoalpJGiMMPiKegP//SW6/S4990dmLSnUN9+r/DxfIT+g05gyCkgtRXiqsTu8= Received: by 10.140.139.3 with SMTP id m3mr960829rvd.165.1207851468825; Thu, 10 Apr 2008 11:17:48 -0700 (PDT) Received: by 10.141.71.5 with HTTP; Thu, 10 Apr 2008 11:17:48 -0700 (PDT) Message-ID: <92abd3ae0804101117r3f98ec37r67dcdc0398346cdc@mail.gmail.com> Date: Thu, 10 Apr 2008 11:17:48 -0700 From: "Jonathon Moldenhauer" To: "Maksim Yevmenkin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <92abd3ae0804101010m1535c06bm89ba9002a662f26@mail.gmail.com> Cc: freebsd-bluetooth@freebsd.org Subject: Re: headset support 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: Thu, 10 Apr 2008 18:17:51 -0000 On Thu, Apr 10, 2008 at 10:49 AM, Maksim Yevmenkin wrote: > Jon, > > > I have searched back through the archives here and there is discussion about > > FreeBSD and headset/handsfree profile support. I have seen several comments > > that "the code is about the be committed" so I am wondering what the status > > really is. If any help is needed I would be willing to test and/or work on > > code so that this feature can be brought to the FreeBSD platform. > > first of all what exactly do you need to support? do you have any > specific usage scenario in mind? i have had code to support isoc > transfers in ng_ubt(4) (a must to support bluetooth audio) and > bluetooth sco sockets for quite a while. i was planning to commit it, > but then i changed my mind. with the code i have, i can transfer raw > audio data, but what to do with the raw data is the next big question. > do we need to somehow plug into sound subsystem? something else? I have a couple different scenarios in mind but the primary one I want is compatibility with asterisk's chan_mobile. Asterisk's chan_mobile talks directly to the SCO channel without using any audio resources. It uses the socket api to create a socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO) and then bind's and connect's to the src/dst bluetooth addresses. All communication is then done simply with read/write calls. Asterisk's chan_mobile also uses rfcomm to talk to the headset/handsfree profile of the device that it wants to transfer audio with and I have been able to confirm manually that I can connect using rfcomm_sppd on FreeBSD to the headset and handsfree profiles of my phone and issue AT commands and get responses back. Having the bluetooth capability in the audio system might be nice but I think just getting the data to userland would enable applications to be developed that accomplish this. It would also enable other usage scenarios, such as chan_mobile. If you already have code that does the SCO part in both the driver and the socket API, what do I need to do to test it out and see if it accomplishes compatibility with Asterisk? Thanks, Jonathon > > thanks, > max >