Provides socket interface to have l2cap channels. L2CAP offers connection oriented and connectionless sockets. But bluetooth stack as this point has no interchangeability with TCP/IP, A Higher level Bluetooth profile must be implemented
Here we have 2 modules, one for handling global bluetooth data structures such as connection handles and L2cap channels, and frames
The USB driver, implementing the H2 transport Bluetooth kit under src/kit/bluetooth C++ implementation based on JSR82 api
Bluetooth Server under
Basically handling opened devices (local connected fisically in our system) and forwaring kit calls to them
Bluetooth Preferences under
Configuration using the kit
Test applications under
There is a small prototype component which is not here documented below src/add-ons/bluetooth/ResetLocalDevice. Its intention was to be an add-on of bluetooth preferences, So that new HCI commands could be customized by users or external developers. I did not like at the end the idea, I did not find the flexibility I wanted.
Haiku Bluetooth blog
Bluetooth on wikipedia
Bluetooth is wireless low-power network stack. The target is implement Bluetooth 2.0, although the major differences between 2.0 and 1.1 are in the HW specs. The Project has been divided in 3 phases. The specifications document for Bluetooth, depending its version, very between 1200 and 1500 pages which covers phase 1 and 2 plus hardware device specifications.
The development of the stack will be done keeping an eye to another operating systems, such as Linux and FreeBSD bluetooth kernel land implementations. And MacOS for the user land integration, and SymbianOS or JSR-82 for the possible bluetooth kit.
The reading specs process can be mostly skipped, although is being using as well as other OS source code as consulting material. All non started parts are still to be designed before implementation
- Strong dependency with Haiku network stack, which is making hard to keep the development in R5. With the self compiling problem that it implies.
- Hardware availability(2 dongle(1damaged), 1 telephone, 2 PCMCIA)
As many of you know from my blog, the project started from scratch with some success.
Phase 1: Base Stack:
In this phase the intention would be give a a base for further development, user feedback of the technology and real communication.
In an overview provide:
- Physical layer of the architecture
- User interaction for managing with devices local & remote(discovery, pairing, properties)
- Connection oriented / Connectionless services through L2CAP
H2: USB Transport driver (Commands/Events/ACL) 90%
- Core layer 80%
- Userland interface(ioctls/rawsocket) 70%
- Managing tools(bluetoot_server, bluetooth kit) 70%
- (core protocol/sockets) 65%
- Real comunication with the driver (27/09/07)
- Stack allowing devices to discover the Haiku node (17/03/08)
- Stack allowing discover remote devices through an inquiry process (19/04/08)
- Stack handling correctily a pairing process between 2 devices (23/07/08)
- L2CAP connection-oriented channels (23/11/08)
- L2CAP connection-less channels (23/11/08) (no device available for testing)
Phase 2: Basic Stack:
The intention of this phase would be complete the stack, and let all prepared for the 3rd phase.
H2: USB Transport driver (SCO)
- SCO interface
- Managing tools(SDP server & client)
RFCOMM: (core protocol/sockets)
Phase 3: Upper Protocols, Profiles and Applications:
Bluetooth profiles define how the bluetooth technology functionality is used, while the protocols is the implementation of the technology. An overview of all these functionalities: http://bluetooth.com/Bluetooth/Technology/Works/Profiles_Overview.htm
Approximately, the specifications for each of these profiles do not go beyond the 100 pages. So Individuals could implement easily one of those functionalities.
Bluetooth Identified tasks:
Haiku Bluetooth Stack implements basic functionality on lower and middle layers, this functionality needs to be completed and all Bluetooth 2.X possibilities explored.
Requirement: Bluetooth enabled Haiku system
Skill set: C++ kernel development, userland development, overview bluetooth stack knowledge(optional)
- New Tasks:
- RemoteDevices Database
- Implement RemoteDevice Archivability (Code-In)
- Manage server existence depending of LocalDevices (Code-In)
- RemoteDevices Database
- Fix monitoring of incoming LocalDevices(USB)
- LocalDevices allocation/leaking LocalDevice::GetLocalDevice
- Wrong Create Connection parameters(paging) for Bluetooth 2.X
- Improve Deskbar Addon
- Improve PinCode Window, move to kit? (Code-In)
- Improve Incomming connection Window, move to kit? (Code-In)
- Add Remaining Features in DeviceView
- Put non relevant information under a ToolTip (Code-In)
- UserLand tools(Preferences)
- Retrieve Discovery and DevClass (other settings?) in Startup (Code-In)
- Store information
- Window position
- Default LocalDevice
- Settings (Inquiry time, Policy)
- WriteLocal name to devices
- Pairing/Auth/Encryption use cases ...
Bluetooth UI Requirements
Deskbar Applet (implemented)
LocalDeviceView: View that shows a LocalDevice (implemented)
- Icon with the type of device (from device class)
- HCIDelegate Control Flow
- l2cap make sched connection to use portListener
- addtoExpected → protect
InquiryPanel: Window to perform a discovery of devices
- Connections & Channels List
Table Of Devices (Archived RemoteDevices classes) (to be reviewed):
- Known devices
- Trusted devices
- Blocked devices
- Connected Devices
- Set LocalName
- View LinkKeys
General settings (implemented):
- Connections acceptation policy
- Identify current host as... (set localDeviceClass)
- Start/Stop server
- Show debug window
- Enable/disable device
- Enable/disable services
AFAIR in the software layers point of view there were not important changes from 1.2 until 4.0. Most of them were focused in the physical layers.
Currently on the Kernel area there is the L2CAP and HCI implementations and there is the HCI transport protocol H2 (hardware support for usb dongles).
In the userland area we have the bluetooth_server which interfaces with the kernel. Then there is a kit which provides an API for applications development.
Currently the best example of an application using this API would be the bluetooth preferences.
http://dev.haiku-os.org/browser/haiku/trunk/src/add-ons/kernel/network/protocols/l2cap[[BR]] http://dev.haiku-os.org/browser/haiku/trunk/src/add-ons/kernel/drivers/bluetooth/h2/h2generic[[BR]] http://dev.haiku-os.org/browser/haiku/trunk/src/servers/bluetooth[[BR]] http://dev.haiku-os.org/browser/haiku/trunk/src/kits/bluetooth[[BR]] http://dev.haiku-os.org/browser/haiku/trunk/src/add-ons/kernel/bluetooth[[BR]] http://dev.haiku-os.org/browser/haiku/trunk/src/preferences/bluetooth[[BR]]
) - added by 11 years ago.
The Haiku implementation of Bluetooth
Download all attachments as: .zip