From owner-freebsd-bluetooth@FreeBSD.ORG Thu Jul 28 09:43:24 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D157E16A41F for ; Thu, 28 Jul 2005 09:43:24 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: from smtp018.mail.yahoo.com (smtp018.mail.yahoo.com [216.136.174.115]) by mx1.FreeBSD.org (Postfix) with SMTP id 9288B43D46 for ; Thu, 28 Jul 2005 09:43:24 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: (qmail 37245 invoked from network); 28 Jul 2005 09:43:24 -0000 Received: from unknown (HELO @vodafone.es) (urnen81@84.173.174.209 with login) by smtp018.mail.yahoo.com with SMTP; 28 Jul 2005 09:43:22 -0000 Date: Thu, 28 Jul 2005 11:37:13 +0000 From: Oliver Message-Id: <20050728113713.2925.5@@vodafone.es> Mime-Version: 1.0 To: freebsd-bluetooth@freebsd.org User-Agent: Beam yT Release Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: SCO / eSCO 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, 28 Jul 2005 09:43:24 -0000 Hi to the list. I am taking a deep look to the FreBSD bt stack, net_graph etc to understand it completely and being able to help somehow(if needed). A first question is (if we do)where do we implement the SCO protocol/link_type If not how should it be done? As upper protocols of the HCI layer? keeping 3 upper protocols for the HCI: L2CAP SCO eSCO ? Are those 3 different from each other? L2CAP<->SCO I guess radically yes, but is planned/designed to implement eSCO together with SCO in the same ng_node? Thanks a lot in advance! ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es From owner-freebsd-bluetooth@FreeBSD.ORG Thu Jul 28 16:53:04 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 434D216A41F for ; Thu, 28 Jul 2005 16:53:04 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id A44A243D45 for ; Thu, 28 Jul 2005 16:53:03 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id DE25C3BE47; Thu, 28 Jul 2005 11:53:02 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24453-01; Thu, 28 Jul 2005 11:53:02 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id 6F41E3BED2; Thu, 28 Jul 2005 11:53:02 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 28 Jul 2005 11:52:59 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 28 Jul 2005 11:52:47 -0500 Message-ID: <42E90D5E.3030404@savvis.net> Date: Thu, 28 Jul 2005 09:52:46 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver References: <20050728113713.2925.5@@vodafone.es> In-Reply-To: <20050728113713.2925.5@@vodafone.es> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Jul 2005 16:52:47.0514 (UTC) FILETIME=[C85147A0:01C59394] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org Subject: Re: SCO / eSCO 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, 28 Jul 2005 16:53:04 -0000 Oliver, > I am taking a deep look to the FreBSD bt stack, net_graph etc to understand > it completely and being able to help somehow(if needed). > > A first question is (if we do)where do we implement the SCO > protocol/link_type i have some code already sitting in my local cvs. i will clean it up and commit it soon (within a month or so). what are you planning to do with SCO? > If not how should it be done? > As upper protocols of the HCI layer? > keeping 3 upper protocols for the HCI: L2CAP SCO eSCO ? well, its not that complicated really :) ng_hci(4) always had support for SCO links. what was missing was 1) support for isochronous (SCO) transfers in ng_ubt(4) 2) socket(2) interface to SCO links like i said, i have code in my local cvs for both (1) and (2). > Are those 3 different from each other? L2CAP<->SCO I guess radically yes, > but is planned/designed to implement eSCO together with SCO in the same > ng_node? SCO (just like ACL) is just a link type. its not really a protocol. HCI - Host Controller Interface - is just a way to access bluetooth device, you might call it a protocol. there is set of HCI commands that will make device create a ACL and SCO link using the same baseband radio link. eSCO is a bluetooth v1.2 thing and i have not looked at bluetooth v1.2 yet. you are the second person on the list who wanted to start working on the SCO support. if you are serious about this i will commit my code to -current, but then someone has to help me with maintaining it (i.e. fixing bugs, adding features etc.), because i'm not comfortable with committing untested code. if you are not prepared to actively work on the code then please wait until i have chance to finish it. thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Thu Jul 28 18:06:30 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E976A16A41F for ; Thu, 28 Jul 2005 18:06:29 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FF5C43D45 for ; Thu, 28 Jul 2005 18:06:29 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id BD2413C07F; Thu, 28 Jul 2005 13:06:28 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29641-01-97; Thu, 28 Jul 2005 13:06:28 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id 88ED33BEF4; Thu, 28 Jul 2005 13:06:28 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 28 Jul 2005 13:06:26 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 28 Jul 2005 13:06:13 -0500 Message-ID: <42E91E90.4010703@savvis.net> Date: Thu, 28 Jul 2005 11:06:08 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver References: <20050728113713.2925.5@@vodafone.es> <42E90D5E.3030404@savvis.net> <20050728193504.14880.1@@vodafone.es> In-Reply-To: <20050728193504.14880.1@@vodafone.es> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Jul 2005 18:06:13.0681 (UTC) FILETIME=[0A990210:01C5939F] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org Subject: Re: SCO / eSCO 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, 28 Jul 2005 18:06:30 -0000 Oliver, >>i have some code already sitting in my local cvs. i will clean it up and >>commit it soon (within a month or so). > > Sorry, now i remember, this question was already commented in the list ok >>what are you planning to do with SCO? > > Actually at the moment, I just wanted to understand the Stack, as it is the > first FreeBSD code i am looking at. Concretely know how HCI looks at, and > talks with the upper layers (L2CAP & SCO). SCO is *not* upper layer protocol. the picture goes something like this: | OBEX | IrMC | etc| --------------------------------- | SDP | RFCOMM | etc. | --------------------------------- | L2CAP | -------------------------------------------- | HCI | -------------------------------------------- | Link Manager (device firmware) | -------------------------------------------- | SCO link | ACL link | -------------------------------------------- | baseband radio | -------------------------------------------- so both ACL (data) and SCO (voice/video) links are at the same level. ACL (data) link is used for *reliable* data transfer. it supports packet segmentation etc. SCO link is unreliable, no packet segmentation, etc. think of it as two pipes over the same radio link. L2CAP is a upper layer protocol that supports multiple logical channels, reliable data transfer, packet segmentation etc. it runs over ACL link because it assumes that underlaying data link is *reliable*. the protocols that run over L2CAP, i.e SDP, RFCOMM, etc. essentially use different logical L2CAP channels (similar to well known ports in UDP/TCP protocols). so, SCO is really a side channel for *unreliable* data transfer. it is well suited for streaming audio/video where it does not matter if you loose one or few packets. L2CAP does not run over SCO. in fact, i do not think any upper layer protocol uses SCO as transport layer. for example headset profile: there are two channels: one is RFCOMM connection, i.e. reliable control channel, and other is SCO link to send/receive voice. >>SCO (just like ACL) is just a link type. its not really a protocol. HCI >>- Host Controller Interface - is just a way to access bluetooth device, >>you might call it a protocol. there is set of HCI commands that will >>make device create a ACL and SCO link using the same baseband radio >>link. eSCO is a bluetooth v1.2 thing and i have not looked at bluetooth >>v1.2 yet. > > So this confirms me that L2CAP absotulelly doesnt make any handling in the > SCO data, am i wrong? you are correct. L2CAP does not have anything to do with SCO. > But as I understood in your explanation there will not be a ""paralel > layer"" to the L2CAP (being HCI below them) am i wrong again? just the > socket interface and support in the driver... ACL and SCO links are parallel. HCI is on top of them. L2CAP asks HCI to create a ACL (data) link and then uses it as transport. >>you are the second person on the list who wanted to start working on the >>SCO support. if you are serious about this i will commit my code to >>-current, but then someone has to help me with maintaining it (i.e. >>fixing bugs, adding features etc.), because i'm not comfortable with >>committing untested code. if you are not prepared to actively work on >>the code then please wait until i have chance to finish it. > > Sure, no hurries at all for commiting, as I told I was just trying to > understand. ok thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 09:27:04 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A89C016A41F for ; Fri, 29 Jul 2005 09:27:04 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id CDEB243D53 for ; Fri, 29 Jul 2005 09:27:03 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j6T9Qvum010307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Jul 2005 02:26:57 -0700 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.8/Submit) id j6T9QvAx010305; Fri, 29 Jul 2005 02:26:57 -0700 Date: Fri, 29 Jul 2005 02:26:55 -0700 From: "Loren M. Lang" To: Maksim Yevmenkin Message-ID: <20050729092655.GA9887@alzatex.com> References: <20050719031223.GA20371@alzatex.com> <42DC75F3.2000802@savvis.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <42DC75F3.2000802@savvis.net> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth Headset or Handsfree profile 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, 29 Jul 2005 09:27:04 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sorry for the delayed reply, this email was temporarily lost in the shuffle. On Mon, Jul 18, 2005 at 08:39:31PM -0700, Maksim Yevmenkin wrote: > Loren, >=20 > >Has any work been done yet on implementing the Bluetooth Headset or > >Handsfree profiles in FreeBSD? I'd be quite interesting in helping to > >develop it. If I don't get any responces for a week, I might just start > >working on it from scratch. I believe the Headset profile is simplier, > >though it supports less features so I might start with that one. >=20 > i have the sco support code in my local cvs. so far i managed to receive= =20 > audio data from my plantronics m2500 headset with 3com usb bluetooth=20 > dongle. i will give it a little bit more polishing and testing and then= =20 > commit it to -current. it probably would not make it to the 6.0 release. I purchased a motorola hs805 bt headset for use with my nokia 6230 bt cellphone. I also have a linksys bt adapter for my fbsd box. >=20 > what exactly are you planning to implement and how exactly would you use= =20 > headset and handsfree profiles on freebsd? The most interesting application I can think of it speech reconizition for a bt headset, similar to what my cellphone already does. I'd like to hook sphinz up to it so I can control various external devices though my computer with my voice. Listening to mp3's or using it for voice/video conferencing could be interesting too, though my headset has limited quality for audio. Both my cellphone and bt headset support both handsfree and headset so I have a lot of combinations I can play with. My understanding of these protocols is that headset/handsfree are a high-level protocol that work on top of l2cap/sdp/rfcomm/sco and therefore can be developed in userspace to start with. The one part that needs to be developed in the kernel is the sco transport upon which various audio and video bt protocols like handsfree are built upon. Once that is finished, the handsfree protocol can then be developed as a daemon running in userspace. Without sco, I should still be able to implement part of the headset/handfree profiles that deal with the various controls they use like the redial button. I'm thinking I might start with this to just get a better understanding of the api neccessary for using bt in fbsd. Also, I would be interested in helping with the sco transport layer as well, though I think that means I'll need to be running -current, correct? Is the cvs repository visible on the internet anywhere? >=20 > >Also, I saw a mention that one reason FreeBSD doesn't support bluetooth > >audio yet is because the USB subsystem can't do isosynchronous transfers > >yet. Is this true? >=20 > i never said freebsd can not do it. what i said is that i did not know=20 > how to do it. fortunately, i figured it all out. it is not very obvious,= =20 > but after playing with it for awhile i managed to teach ng_ubt(4) to=20 > receive sco frames via isochronous transfers. Sorry, I mis-read it. >=20 > thanks, > max >=20 --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC6fZfbTXoRwEYo9IRAsc1AJwPyOKq9S1AStRUcCCcMzWeL5xD6ACfaE0j 2iduVrmk7CpnD1q8TQVGZ7g= =lIJy -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 09:52:17 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF25F16A41F for ; Fri, 29 Jul 2005 09:52:17 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: from smtp107.mail.sc5.yahoo.com (smtp107.mail.sc5.yahoo.com [66.163.169.227]) by mx1.FreeBSD.org (Postfix) with SMTP id A473043D46 for ; Fri, 29 Jul 2005 09:52:17 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: (qmail 41165 invoked from network); 29 Jul 2005 09:52:17 -0000 Received: from unknown (HELO @vodafone.es) (urnen81@84.173.155.9 with login) by smtp107.mail.sc5.yahoo.com with SMTP; 29 Jul 2005 09:52:16 -0000 Date: Fri, 29 Jul 2005 11:46:09 +0000 From: Oliver In-Reply-To: <20050729092655.GA9887@alzatex.com> Message-Id: <20050729114609.9528.6@@vodafone.es> Mime-Version: 1.0 References: <20050719031223.GA20371@alzatex.com> <42DC75F3.2000802@savvis.net> <20050729092655.GA9887@alzatex.com> To: freebsd-bluetooth@freebsd.org User-Agent: Beam yT Release Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: Bluetooth Headset or Handsfree profile 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, 29 Jul 2005 09:52:18 -0000 Loren, > Is the cvs repository visible on the internet anywhere? http://svn.clkao.org/svnweb/freebsd/ ftp://ftp.freebsd.org/pub/FreeBSD/development/FreeBSD-CVS And i retrieved some days ago with...... $ export CVSROOT=":pserver:anoncvs@anoncvs.at.FreeBSD.org:/home/ncvs" $ cvs login cvs (black password) $ cvs co src/sys/netgraph and i set this variable before... export CVS_RSH=ssh ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 12:58:01 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1A9816A41F for ; Fri, 29 Jul 2005 12:58:01 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: from smtp108.mail.sc5.yahoo.com (smtp108.mail.sc5.yahoo.com [66.163.170.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 9B06343D46 for ; Fri, 29 Jul 2005 12:58:01 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: (qmail 69463 invoked from network); 29 Jul 2005 12:58:01 -0000 Received: from unknown (HELO @vodafone.es) (urnen81@84.173.155.9 with login) by smtp108.mail.sc5.yahoo.com with SMTP; 29 Jul 2005 12:58:00 -0000 Date: Fri, 29 Jul 2005 14:51:52 +0000 From: Oliver In-Reply-To: <42E920D9.7050907@savvis.net> Message-Id: <20050729145152.6600.1@@vodafone.es> Mime-Version: 1.0 References: <20050728113713.2925.5@@vodafone.es> <42E90D5E.3030404@savvis.net> <20050728193757.15889.2@@vodafone.es> <42E920D9.7050907@savvis.net> To: freebsd-bluetooth@freebsd.org User-Agent: Beam yT Release Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Could check this? 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, 29 Jul 2005 12:58:02 -0000 Hi, In file ng_l2cap_llpi.c func ng_l2cap_lp_con_ind(...) concretely line:251: /* Create and send LP_ConnectRsp event */ NG_MKMESSAGE(rsp, NGM_HCI_COOKIE, NGM_HCI_LP_CON_RSP, sizeof(*rp), M_NOWAIT); if (msg == NULL) { ng_l2cap_free_con(con); error = ENOMEM; goto out; } NG_MKMESSAGE function creates a NG_MESSAGE called rsp? for being send with NG_SEND_MSG_HOOK afterwards, am I right? if it is, shouldnt we be cheking the rsp pointer instead of msg ? ...the msg pointer is used much before in this func...so if it was NULL it should have crashed much before... Am I missing something? thanks, ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 14:47:42 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF1D416A41F for ; Fri, 29 Jul 2005 14:47:42 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta9.adelphia.net (mta9.adelphia.net [68.168.78.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4782843D45 for ; Fri, 29 Jul 2005 14:47:42 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.222.48]) by mta9.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050729144738.CJLR29002.mta9.adelphia.net@[192.168.1.254]>; Fri, 29 Jul 2005 10:47:38 -0400 Message-ID: <42EA4193.8090401@savvis.net> Date: Fri, 29 Jul 2005 07:47:47 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver References: <20050728113713.2925.5@@vodafone.es> <42E90D5E.3030404@savvis.net> <20050728193757.15889.2@@vodafone.es> <42E920D9.7050907@savvis.net> <20050729145152.6600.1@@vodafone.es> In-Reply-To: <20050729145152.6600.1@@vodafone.es> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Could check this? 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, 29 Jul 2005 14:47:42 -0000 Oliver, > In file ng_l2cap_llpi.c func ng_l2cap_lp_con_ind(...) > concretely line:251: > > /* Create and send LP_ConnectRsp event */ > NG_MKMESSAGE(rsp, NGM_HCI_COOKIE, NGM_HCI_LP_CON_RSP, > sizeof(*rp), M_NOWAIT); > if (msg == NULL) { > ng_l2cap_free_con(con); > error = ENOMEM; > goto out; > } > > NG_MKMESSAGE function creates a NG_MESSAGE called rsp? for being send with > NG_SEND_MSG_HOOK afterwards, am I right? yes, you are right > if it is, shouldnt we be cheking the rsp pointer instead of msg ? > ...the msg pointer is used much before in this func...so if it was NULL it > should have crashed much before... yes, its a bug/typo. thank you for finding and submitting it. > Am I missing something? no, fix committed to -current. === emax 2005-07-29 14:44:17 UTC FreeBSD src repository Modified files: sys/netgraph/bluetooth/l2cap ng_l2cap_llpi.c Log: Fix typo and check correct (rsp) pointer against the NULL value. Submitted by: Oliver < urnenfel at tiscali dot es > MFC after: 1 day Revision Changes Path 1.9 +1 -1 src/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 15:21:22 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F287816A41F for ; Fri, 29 Jul 2005 15:21:21 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7CC9743D45 for ; Fri, 29 Jul 2005 15:21:20 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [192.168.1.254] (really [70.32.222.48]) by mta11.adelphia.net (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050729152120.HTZZ24042.mta11.adelphia.net@[192.168.1.254]>; Fri, 29 Jul 2005 11:21:20 -0400 Message-ID: <42EA4979.1000507@savvis.net> Date: Fri, 29 Jul 2005 08:21:29 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Loren M. Lang" References: <20050719031223.GA20371@alzatex.com> <42DC75F3.2000802@savvis.net> <20050729092655.GA9887@alzatex.com> In-Reply-To: <20050729092655.GA9887@alzatex.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth Headset or Handsfree profile 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, 29 Jul 2005 15:21:22 -0000 Loren, >>>Has any work been done yet on implementing the Bluetooth Headset or >>>Handsfree profiles in FreeBSD? I'd be quite interesting in helping to >>>develop it. If I don't get any responces for a week, I might just start >>>working on it from scratch. I believe the Headset profile is simplier, >>>though it supports less features so I might start with that one. >> >>i have the sco support code in my local cvs. so far i managed to receive >>audio data from my plantronics m2500 headset with 3com usb bluetooth >>dongle. i will give it a little bit more polishing and testing and then >> commit it to -current. it probably would not make it to the 6.0 release. > > I purchased a motorola hs805 bt headset for use with my nokia 6230 bt > cellphone. I also have a linksys bt adapter for my fbsd box. ok >>what exactly are you planning to implement and how exactly would you use >>headset and handsfree profiles on freebsd? > > The most interesting application I can think of it speech reconizition > for a bt headset, similar to what my cellphone already does. I'd like > to hook sphinz up to it so I can control various external devices though > my computer with my voice. Listening to mp3's or using it for > voice/video conferencing could be interesting too, though my headset has > limited quality for audio. sounds interesting > Both my cellphone and bt headset support both handsfree and headset so I > have a lot of combinations I can play with. well, are you aware that most bluetooth headsets are "dumb"? i.e. the headset can only be paired with one host and, after paired, will only accept connections from the paired host. what it means is that once paired with the cellphone, the headset can only be used with the cellphone. it is only possible to, say, transfer the call between the headset and the cellphone only. it is *not* possible to transfer the call to another audio gateway. it would have been so nice if cellphones could also use bluetooth to connect to audio gateways. this way - as soon as i walk in the room with bluetooth audio gateway (such as asterix/skype/etc.) i could switch my phone to use it instead of gsm. now all my calls go via voip and not coming out of my minutes. i also wish headsets could "remember" more then one paired host. > My understanding of these protocols is that headset/handsfree are a > high-level protocol that work on top of l2cap/sdp/rfcomm/sco and > therefore can be developed in userspace to start with. The one part > that needs to be developed in the kernel is the sco transport upon which > various audio and video bt protocols like handsfree are built upon. > Once that is finished, the handsfree protocol can then be developed as a > daemon running in userspace. Without sco, I should still be able to > implement part of the headset/handfree profiles that deal with the > various controls they use like the redial button. I'm thinking I might > start with this to just get a better understanding of the api neccessary > for using bt in fbsd. actually, headset profile is quite simple. all you need to do is to open two connections: 1) RFCOMM control connection (looks like serial port) to send control AT commands 2) SCO channel to transfer the voice data. (1) is already supported. support for (2) is coming. > Also, I would be interested in helping with the sco transport layer as > well, though I think that means I'll need to be running -current, > correct? you could run either RELENG_5,6 or -current. if you choose RELENG branch then you will need to merge patches by hand. other then this it should work. > Is the cvs repository visible on the internet anywhere? no, my local cvs is not visible. FreeBSD cvs is - http://www.freebsd.org/cgi/cvsweb.cgi/ thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 16:56:38 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB8BC16A41F for ; Fri, 29 Jul 2005 16:56:38 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: from smtp107.mail.sc5.yahoo.com (smtp107.mail.sc5.yahoo.com [66.163.169.227]) by mx1.FreeBSD.org (Postfix) with SMTP id 65FAF43D48 for ; Fri, 29 Jul 2005 16:56:38 +0000 (GMT) (envelope-from urnenfel@tiscali.es) Received: (qmail 98088 invoked from network); 29 Jul 2005 16:56:38 -0000 Received: from unknown (HELO @vodafone.es) (urnen81@84.173.155.9 with login) by smtp107.mail.sc5.yahoo.com with SMTP; 29 Jul 2005 16:56:37 -0000 Date: Fri, 29 Jul 2005 18:50:29 +0000 From: Oliver In-Reply-To: <42EA4979.1000507@savvis.net> Message-Id: <20050729185029.15220.3@@vodafone.es> Mime-Version: 1.0 References: <20050719031223.GA20371@alzatex.com> <42DC75F3.2000802@savvis.net> <20050729092655.GA9887@alzatex.com> <42EA4979.1000507@savvis.net> To: freebsd-bluetooth@freebsd.org User-Agent: Beam yT Release Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: segmented ACLs.. X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: oliver.ruiz-dorantes@yellowtab.com List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2005 16:56:38 -0000 Well i hope to help as much as I am asking but in same file, func: ng_l2cap_lp_send() As i see is done the creation of the L2CAP packet and its segmentation in ACL packets. Afterwards they are linked in the connection tx_pkt chain. So, Somewhere, a kernel_thread or some entity should check the whole chain and send it down to the HCI one by one... Where can I find this? thanks in advance... Oliver ______________________________________________ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://correo.yahoo.es From owner-freebsd-bluetooth@FreeBSD.ORG Fri Jul 29 20:12:11 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8F7A16A41F for ; Fri, 29 Jul 2005 20:12:11 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8213B43D46 for ; Fri, 29 Jul 2005 20:12:11 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id E10223C0A5; Fri, 29 Jul 2005 15:12:10 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10508-01-38; Fri, 29 Jul 2005 15:12:10 -0500 (CDT) Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (Postfix) with ESMTP id B76243BE45; Fri, 29 Jul 2005 15:12:10 -0500 (CDT) Received: from s228130hz1ew171.apptix-01.savvis.net ([10.146.4.29]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Jul 2005 15:12:06 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew171.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Jul 2005 15:11:58 -0500 Message-ID: <42EA8D8D.40407@savvis.net> Date: Fri, 29 Jul 2005 13:11:57 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: oliver.ruiz-dorantes@yellowtab.com References: <20050719031223.GA20371@alzatex.com> <42DC75F3.2000802@savvis.net> <20050729092655.GA9887@alzatex.com> <42EA4979.1000507@savvis.net> <20050729185029.15220.3@@vodafone.es> In-Reply-To: <20050729185029.15220.3@@vodafone.es> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jul 2005 20:11:59.0151 (UTC) FILETIME=[C6761BF0:01C59479] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org Subject: Re: segmented ACLs.. 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, 29 Jul 2005 20:12:12 -0000 Oliver, > Well i hope to help as much as I am asking but in same file, func: > > ng_l2cap_lp_send() > > As i see is done the creation of the L2CAP packet and its segmentation in ACL > packets. Afterwards they are linked in the connection tx_pkt chain. correct. you are not allowed to mix segments from other packets in bluetooth. basically, once you start sending the segmented acl data packet you must send it all in order. tx_pkt chain is the current l2cap packet that will be sent as segmented acl packet (per ACL connection). > So, Somewhere, a kernel_thread or some entity should check the whole chain > and send it down to the HCI one by one... Where can I find this? you are probably looking for ng_l2cap_lp_deliver(). if tx_pkt is not NULL then we are not allowed to start new transfer and must continue to send ACL packet segments (but only up to max. number of ACL packets device can hold in its buffers). if tx_pkt is NULL then we should get next l2cap command from the queue (per ACL connection), chop it into segments and send it down to hci layer thanks, max From owner-freebsd-bluetooth@FreeBSD.ORG Sat Jul 30 15:35:53 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1D7116A444 for ; Sat, 30 Jul 2005 15:35:53 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id BACAD43D92 for ; Sat, 30 Jul 2005 15:35:26 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j6UFYUum007063 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Jul 2005 08:34:30 -0700 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.8/Submit) id j6UFYU0m007061; Sat, 30 Jul 2005 08:34:30 -0700 Date: Sat, 30 Jul 2005 08:34:29 -0700 From: "Loren M. Lang" To: Maksim Yevmenkin Message-ID: <20050730153429.GA10629@alzatex.com> References: <20050719031223.GA20371@alzatex.com> <42DC75F3.2000802@savvis.net> <20050729092655.GA9887@alzatex.com> <42EA4979.1000507@savvis.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline In-Reply-To: <42EA4979.1000507@savvis.net> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C Cc: freebsd-bluetooth@freebsd.org Subject: Re: Bluetooth Headset or Handsfree profile 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: Sat, 30 Jul 2005 15:35:53 -0000 --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 29, 2005 at 08:21:29AM -0700, Maksim Yevmenkin wrote: > Loren, >=20 > >>>Has any work been done yet on implementing the Bluetooth Headset or > >>>Handsfree profiles in FreeBSD? I'd be quite interesting in helping to > >>>develop it. If I don't get any responces for a week, I might just sta= rt > >>>working on it from scratch. I believe the Headset profile is simplier, > >>>though it supports less features so I might start with that one. > >> > >>i have the sco support code in my local cvs. so far i managed to receiv= e=20 > >>audio data from my plantronics m2500 headset with 3com usb bluetooth=20 > >>dongle. i will give it a little bit more polishing and testing and then= =20 > >>commit it to -current. it probably would not make it to the 6.0 release. > > > >I purchased a motorola hs805 bt headset for use with my nokia 6230 bt > >cellphone. I also have a linksys bt adapter for my fbsd box. >=20 > ok >=20 > >>what exactly are you planning to implement and how exactly would you us= e=20 > >>headset and handsfree profiles on freebsd? > > > >The most interesting application I can think of it speech reconizition > >for a bt headset, similar to what my cellphone already does. I'd like > >to hook sphinz up to it so I can control various external devices though > >my computer with my voice. Listening to mp3's or using it for > >voice/video conferencing could be interesting too, though my headset has > >limited quality for audio. >=20 > sounds interesting >=20 > >Both my cellphone and bt headset support both handsfree and headset so I > >have a lot of combinations I can play with. >=20 > well, are you aware that most bluetooth headsets are "dumb"? i.e. the=20 > headset can only be paired with one host and, after paired, will only=20 > accept connections from the paired host. what it means is that once=20 > paired with the cellphone, the headset can only be used with the=20 > cellphone. it is only possible to, say, transfer the call between the=20 > headset and the cellphone only. it is *not* possible to transfer the=20 > call to another audio gateway. Actually my motorola headset can remember up to eight paired devices, but it will only try to connect to the most recently paired device, the other 7 devices much start the connection themselves. I have sucessfully paired my headset with my computer and cellphone both, with the cellphone paired last so my headset will connect to it by default. But, with my cellphone bt turned off, I was able to make linux access the headset profile and play audio through it. >=20 > it would have been so nice if cellphones could also use bluetooth to=20 > connect to audio gateways. this way - as soon as i walk in the room with= =20 > bluetooth audio gateway (such as asterix/skype/etc.) i could switch my=20 > phone to use it instead of gsm. now all my calls go via voip and not=20 > coming out of my minutes. i also wish headsets could "remember" more=20 > then one paired host. Actually, on windows I have successfully connected to the audio gateway on my computer and heard the call through my speakers, though I had no microphone to talk back with. I can connect to the headset/handfree profile on my phone with either the computer or the motorola headset in the middle of a call and get the audio routed automatically to my computer/headset. Now as far as using voip, I don't know if my cellphone could do that. >=20 > >My understanding of these protocols is that headset/handsfree are a > >high-level protocol that work on top of l2cap/sdp/rfcomm/sco and > >therefore can be developed in userspace to start with. The one part > >that needs to be developed in the kernel is the sco transport upon which > >various audio and video bt protocols like handsfree are built upon. > >Once that is finished, the handsfree protocol can then be developed as a > >daemon running in userspace. Without sco, I should still be able to > >implement part of the headset/handfree profiles that deal with the > >various controls they use like the redial button. I'm thinking I might > >start with this to just get a better understanding of the api neccessary > >for using bt in fbsd. >=20 > actually, headset profile is quite simple. all you need to do is to open= =20 > two connections: >=20 > 1) RFCOMM control connection (looks like serial port) to send control AT= =20 > commands >=20 > 2) SCO channel to transfer the voice data. >=20 > (1) is already supported. support for (2) is coming. >=20 > >Also, I would be interested in helping with the sco transport layer as > >well, though I think that means I'll need to be running -current, > >correct? >=20 > you could run either RELENG_5,6 or -current. if you choose RELENG branch= =20 > then you will need to merge patches by hand. other then this it should wo= rk. I just downloaded 6.0 BETA1 last night and I'll try and install that today or tomorrow. >=20 > >Is the cvs repository visible on the internet anywhere? >=20 > no, my local cvs is not visible. FreeBSD cvs is -=20 > http://www.freebsd.org/cgi/cvsweb.cgi/ >=20 > thanks, > max >=20 --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --MGYHOYXEY6WxJCY8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD4DBQFC654FbTXoRwEYo9IRAv1dAJ92cNmg1JpkhYR8g8ed/G5pMey5uQCXXncO z80Igp7JEvt5PUhC25tU/g== =nMQI -----END PGP SIGNATURE----- --MGYHOYXEY6WxJCY8--