From owner-freebsd-arch Thu Nov 7 14:42:34 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BF9D37B401; Thu, 7 Nov 2002 14:42:30 -0800 (PST) Received: from scl8owa02.int.exodus.net (scl8out02.exodus.net [66.35.230.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id E974D43E4A; Thu, 7 Nov 2002 14:42:29 -0800 (PST) (envelope-from Maksim.Yevmenkin@exodus.net) Received: from scl8owa01.int.exodus.net ([66.35.230.241]) by scl8owa02.int.exodus.net with Microsoft SMTPSVC(5.0.2195.5329); Thu, 7 Nov 2002 14:42:29 -0800 Received: from exodus.net ([206.220.227.147]) by scl8owa01.int.exodus.net over TLS secured channel with Microsoft SMTPSVC(5.0.2195.5329); Thu, 7 Nov 2002 14:42:29 -0800 Message-ID: <3DCAEC54.8DA9179A@exodus.net> Date: Thu, 07 Nov 2002 14:42:28 -0800 From: Maksim Yevmenkin X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: Sam Leffler , arch@FreeBSD.ORG, "Long, Scott" , re@FreeBSD.ORG, Murray Stokely Subject: Re: Bluetooth code References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Nov 2002 22:42:29.0515 (UTC) FILETIME=[F3F50DB0:01C286AE] Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello, Julian Elischer wrote: > > On Thu, 7 Nov 2002, Sam Leffler wrote: > > > I made a quick pass over this code. It's not clear to me why this stuff is > > or should be dependent on netgraph. The code looks to support a new > > protocol domain and sockets within that domain so it would seem possible for > > it to stand apart from netgraph. > > Yes, though bluetooth includes other dimensions that don't fit into that > mold so easily. right. new protocol domain and sockets is just the one part of the code (optional). the code also includes support for low level Bluetooth procotols such as 1) HCI (Host Controller Interface) transport layers: H4 and UBT 2) HCI (Host Controller Interface) - not a network protocol, but a generic framework to talk to any Bluetooth device 3) L2CAP (Link Layer Control and Apaptation Protocol) - connection oriented procotol that runs over Bluetooth ACL (asynhronuous) data link. > The author decided that he'd develop it under netgraph as it made his > job easier. (as it was designed to do). When the code is fully > functional, it would be a relatively simple matter > to 'un-netgraph it should that be required. (personally I see no > reason to do so). It's designed to allow that (should that be seen as a > good idea (I don't think it matters). right. this code is a proof of concept that Netgraph can be used to do more then just a link layer protocol. it gives you advantage to use all flexiblity of Netgraph. it gives you a choice which modules you want to use. in fact one can throw away L2CAP and sockets and work directly on HCI layer (if so required). > Netgraph is designed for rapid prototyping and development, but it still > uses the standard mbufs etc. so that code developed under netgraph > conforms to standard networking rules. With the new TAG > code this is more true than ever. The bluetooth code however is not > at that stage yet. hmm... not sure what is "new TAG code", but i will look into it. > > A bluetooth implementation that was not > > tied to netgraph would be preferrable as freebsd users would get the > > benefits of additional (non-freebsd users) working with the code. > > > > NetBSD have their own bluetooth code that goes in /sys/dev/bluetooth. > You are free to port that when (if) it's ready, in fact > we are using netgraph/bluetooth specifically to not collide with that. right. i'm not sure what is the status of Bluetooth code in NetBSD, but CVSweb does not have much. i always wanted to keep my code under netgraph/ for two reasons 1) to indicate the fact that this is a Netgraph code 2) to make sure this code will not collide with any future Bluetooth stack in FreeBSD > It is much easier to develop under netgraph than not, > as you have all the tools to independently test modules, unload them, > change them, reload tehm, and pass captured packets through them. > Netgraph supplies all the framework that allows protocol code to be > developed easily It is designed for link-level packet manipulation and > the socket code is particularly lousy at that, having been developed for > network and transport level protocols. The two are actually a good fit. > (for example whiel one COULD make a TCP stack in Netgraph (and in fact > someone is trying to do that just for fun), it doesn;t gain you > anything, but it DOES gain you a lot to do lower level manipulations > through netgraph, as you can do various link-level tricks using common > components at that level and the multiplexing requirements are > different. > > > > Specific stuff: > > > > 1. Why isn't btsockstat integrated into netstat? > > So that no standard programs need be altered.. > when the dust settles it can be done. the project was advertised as separate from FreeBSD. i do not want to alter existing FreeBSD code in any way (well, perhast just a little bit to add new TTY line discipline and socket family). another reason is that btsockstat tied to btsocket module. i'm not sure that btsocket will be one and only Bluetooth socket implementation. this code is an optional. > > 2. l2test, hcdump, and hcinfo are missing (cited in man pages). > > their functionality has been absorbed into other programs.. > the man page should be updated. right. i should fix the man pages. > > 3. A bluetooth(4) man page would be useful. > > true. agree. i will write it. > > It's unclear to me how this support is used. There are no user-level > > applications that make use of it and I don't recognize existing applications > > that could use it. I suggest that w/o a "real user" adding this stuff to > > the system is premature. > > There is no point in user apps until there is kernel support. > it's a chicken and egg thing and I'd like to break the cycle > by adding this code now. i'm not sure what do you mean by user-level application. if you are talking about setup/control utility (a-la ifconfig) then hccontrol is everything you need. also Bluetooth has something called RFCOMM with is serial port over Bluetooth. user-space application localy works with /dev/tty just like it always did, but internally all communication is done via Bluetooth wireless link. Note: RFCOMM currentlly done in user-space, but it will be moved to kernel. another thing is a BNEP (Bluetooth Network Encapsulation Protocol) (not implemented yet). it is sort of Ethernet over Bluetooth. for each Bluetooth device there is a virtual Ethernet interface + Ethernet bridge. nodes can talk as soon as they in RF proximity. right now you can 1) run PPP over Bluetooth (LAN profile). 2) use Bluetooth to talk to your cell phone and use cell phone as wireless modem. DUN (Dial-UP networking) profile. 3) the OBEX server support is coming soon, so one can sync cell phone (or PDA) over Bluetooth. get pictures from digital camera, etc. most of these stuff was ported from Linux BlueZ stack and will be incuded (hopefully) into FreeBSD ports/ tree. thanks, max To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message