Date: Fri, 13 Sep 2002 09:58:40 -0700 From: Maksim Yevmenkin To: Niklas Saers Subject: Re: Bluetooth stack Hello Niklas Saers, > My name is Niklas Saers and I'm doing a master by research on the > development process of BSD, FreeBSD and Darwin. I saw your mail to > freebsd-current on the release of your bluetooth-stack for FreeBSD. I > was wondering if you could tell me how you started to work on that one day i just thought that it would be nice thing to do, and since i had spare time i started to work on it :) > project, how many people have been involved in the development, and how so far, i the only person how develop this. > you are developing it before committing it to -CURRENT? Have you been it is not commited yet, i just called for testers. i've been producing snapshots for about six months now. i cannot tell actual development time, because i use my spare time. > working on other projects within the FreeBSD project? If so, how does > this one compare? i've been doing some little things for FreeBSD for quite some time. i did not sumbit all of them to FreeBSD. another small project for FreeBSD kernel is "tap" driver. it has been commited to both -stable and -current about a year (or two) ago. thanks max --- Hi Max, I'm sorry for my late reply but I've been ill with the flu. > > My name is Niklas Saers and I'm doing a master by research on the > > development process of BSD, FreeBSD and Darwin. I saw your mail to > > freebsd-current on the release of your bluetooth-stack for FreeBSD. I > > was wondering if you could tell me how you started to work on that > one day i just thought that it would be nice thing to do, and > since i had spare time i started to work on it :) How would you describe your work process? How would you say you interface the FreeBSD project in such an undertaking? Has your work process or interfacing to the FreeBSD project changed since you worked on the tap driver? Cheers Nik --- Hi Max, one more question: have you received much feedback on your actual code for the bluetooth implementation? Cheers Nik PS, thanks for implementing this :) --- Date: Mon, 30 Sep 2002 10:16:12 -0700 From: Maksim Yevmenkin To: Niklas J. Saers Subject: Re: Bluetooth stack Niklas, NOTE: All the opinions and answers below are solely mine and does not necessary represent the FreeBSD and/or other open source project way of doing things. > > > How would you describe your work process? > > i'm using my free time to work on the project. basically i have a > > TODO list. TODO list gets updated every time i find a bug or think > > of new feature. also i'm trying to answer all e-mail and help people > > to resolve problems. > > Right, but how did you do your overall design? When you started, did you > retrieve any standards that led to your initial todo-list and design? Has > your design changed since then? Well, there is a Bluetooth Specification Book v1.1. It describes various parts of the Bluetooth in details. It give you an idea of what it required and what is optional. It also gives some recommendation on how to build the stack. Some parts of the Bluetooth stack are pretty much defined and there is not much design choice. Transport drivers, for example, MUST follow the spec, otherwise the stack would not be able to talk to hardware. The next step is actually try to make sense of the spec and try to create a "big picture", i.e. how do i provide interface to hardware and protocols, how the other parts of the system will interact together, define interfaces etc. Then i go into every part and try to finalize it. Initial design did change. As it probably will in any complex project. It is often not possible to think of every little detail before you actually started the implementation. Sometimes these design changes are pretty minor and sometimes not. > Would you say your todo-list is both a requirements-list and a > change/modify wish-list? probably. > How do you prioritize the items on your todo-list? Bugs come first. The missing functionality. Then features. > Would you say your verification process is mainly testing trying > out the hardware you have and getting email feedback and helping > out, or do you have a set of tests that you run regularly? If so, > what kind of testing do you have? That is one thing. I also perform interoperability tests on all layers, i.e. L2CAP, SDP and RFCOMM with both Linux and Windows. Sometimes i do some crazy things like pulling out the PC-CARD while stack is active, connecting both devices to the same laptop and have them ping each other for 24 hours etc. to see what will happen :) > > i test my code with all devices/software i have and as soon as it > > becomes stable i will cut a snapshot and send announcement to the > > FreeBSD mailing lists. > > How do you decide it is stable? It runs on your computer without kernel > panics? see my answer above. > > > have you received much feedback on your actual code for the > > > bluetooth implementation? > > i have received several successful reports. there was a couple > > problems though. it is not much, but something :) > > Right, but this is on the actual running of the system, right? Have you > received feedback from people reading your code and commenting on it on > that basis? Have you submitted any design documents for review? If so, > have you had any feedback on these? Yes. These are reports from the people who actually tried to use it. I did not get much feed back on the code itself. I only got a couple of e-mails from Julian Elischer . People usually will not look into the code, unless they are interested in it. As far as i can tell, right now there is not much interest in Bluetooth among FreeBSD users. May be because hardware is still expensive and new, or may be Bluetooth will never be popular as say 802.11b. I have never released any design documents nor asked for feedback on them. thanks, max --- Date: Mon, 21 Oct 2002 10:19:10 -0700 From: Maksim Yevmenkin To: Niklas J. Saers Subject: Re: Late mail Hi Niklas, [...] > > The next step is actually try to make sense of the spec and try to > > create a "big picture", i.e. how do i provide interface to hardware > > and protocols, how the other parts of the system will interact > > together, define interfaces etc. Then i go into every part and try > > to finalize it. > > How do you work during this phase? Read it and think hard, write a map, > write code, make a design document, write empty headers and the structure > between your files? Other things? First i had to figure out what parts i need. I will give you an example. The Bluetooth spec. says that HCI (Host Controller Interface) is a way to talk to any Bluetooth device in the system. So i need HCI layer. Also Bluetooth spec. defines several transport layers, i.e. how data gets transferred between HCI layer and the device. So i need transport layer drivers (USB, UART/H4). Then spec. defines L2CAP (Link Layer Control and Adaptation Protocol) that runs over HCI. So i need L2CAP layer. The big picture (at this point) is L2CAP - L2CAP layer | HCI - HCI layer / \ USB UART/H4 - transport drivers | | Bluetooth hardware This is basically a foundation of any Bluetooth stack. Now you go into each box and finalize it. For example, how would user space application initialize Bluetooth device? The answer is - user space application must send HCI commands to the device. How would user space application send a HCI command to the device? Probably via Bluetooth socket. So i need a Bluetooth socket layer. The same is true for L2CAP layer. The big picture (at this point) is L2CAP sockets HCI sockets | | L2CAP | - L2CAP layer | | HCI-----------+ - HCI layer / \ USB UART/H4 - transport drivers | | Bluetooth hardware Now i need to answer the following questions: how would user space application address the specific device? How would user space application send/receive data? What other operations user application might do on the device? Wow other protocols (that run over L2CAP) would interact with the rest of the system? The answers to these questions gave me some clue about internal data structures, interfaces and algorithms i should use on each layer. > > Initial design did change. As it probably will in any complex project. > > What did this design consist of? Code, models, other things? A little bit of everything: pictures and description (similar to above), a little bit of code (proof of concept), i also had to write very simple Bluetooth device simulator before i got a real hardware, etc. thanks, max