Bluetooth changes for 2.6.38

2.6.38 was a quiet release cycle for the Bluetooth subsystem, the biggest changes came from Johan Hedberg for the HCI management Interface, a under development code. Besides that we added support for two Atheros devices (AR9285 and AR5BBU12). Fixed a regression with the USB autosuspend and lot of other fixes and clean ups.

On the other hand 2.6.39 is being a very busy release cycle, stay tuned to see all the new stuff we will add to the Linux Bluetooth stack.

Talk at Linux Plumbers Conference

I just did my talk at the Linux Plumbers Conference at Cambridge, MA. I had many problems with English which made it no so good, but that’s ok. I have to improve it for the next talk. ;-)  You can get the slides at here.

L2CAP Extended Features on 2.6.36

On October 20th, Linus released the 2.6.36 kernel and one of the new features released with it was the support in the Linux Bluetooth stack for the L2CAP Extended Features. Also called eL2CAP, the L2CAP Extended Features add some new features to the L2CAP layer, like the Enhanced Retransmission Mode(ERTM), a reliable protocol with error and flow control; the Streaming Mode, an unreliable protocol for streaming purpouses; the Frame Check Sequence, a checksum for each received packet; and Segmentation and Reassembly of L2CAP packets which make retransmission easier. The L2CAP Extended Features were in the kernel before, but in an experimental mode and disabled by default.

Other Bluetooth changes in 2.6.36: In-kernel blacklist for incoming connections, that allow dropping selected incoming connections in kernel space without having to wake up bluetoothd. Support for the Atheros AR300x chip. A new hci_recv_stream_fragment() function which is part of a refactory in the HCI recv path to make the life of some drivers easier.

Embedded Linux Conference Europe

I’m right now at the Embedded Linux Conference in Cambridge, UK, where I’m going to talk tomorrow about the Linux Bluetooth stack. The talk will explain how the Linux Bluetooth stack works and show the upcoming features to the stack. I’ll post the slides sometime in the future on this blog. Next week I’ll be at Linux Plumbers, in Cambridge, MA. (Yeah, I’ll visit to two different Cambridges :) to also talk about the Linux Bluetooth Stack.

Bluetooth Subsystem maintainership change

Since the beginning of October I’m the new Linux Kernel maintainer of the Bluetooth Subsystem. Marcel Holtmann, who was maintaining the trees before will be around as before, but only on patch review now. Only Marcel knows the whole stack, so his help and ack is needed for sure. All rest, like apply patches, check if everything builds correctly and send pull request, is my job. That is not a big change in the Bluetooth subsystem, things should work the same way as before in linux-bluetooth.

You can find my bluetooth-2.6, intended only for bug fixes for the current linux release cycle, here:

http://git.kernel.org/?p=linux/kernel/git/padovan/bluetooth-2.6.git

and my bluetooth-next-2.6 tree, where the hot fresh stuff goes, here:

http://git.kernel.org/?p=linux/kernel/git/padovan/bluetooth-next-2.6.git

ProFUSION on the kernel development statistics for 2.6.35

A recent article from lwn.net shows ProFUSION in the most active employers for networking stuff in the 2.6.35 release cycle.  That was due to the work we did in the Bluetooth stack implementing the L2CAP Extended Features (see older post in this blog to learn about L2CAP Extended Features).  Nice!

L2CAP Enhanced Retransmission Mode getting stable

After more than 4 months working daily at ERTM, here at ProFUSION, we have now a functional and much more stable implementation. Several potential crashes have been fixed, and missing features were added. Also the code was checked against the Profile Tuning Suite(PTS) test software. That software is the official test software from Bluetooth SIG to qualify Bluetooth stacks and the result is that right now we are also passing all PTS tests.

On the bug fixes front, beside the kernel crash fixes, a lot of ERTM behavior bugs have been found and fixed. Some of them made ERTM flow crazy, but we have been able to discover and fix them all. Obviously there might be other bugs in the code, but I haven’t found them yet. ;)

New code added: All missing events and actions from the ERTM spec were implemented, they should be working properly now. Among them we have the Local Busy handling, Invalid Frame detection, etc.

The PTS software helped a lot with the ERTM development, I’m sure that we are much more compatible with others stacks now after fixing L2CAP to pass all tests for Enhanced Retransmission Mode, Streaming Mode and FCS.

Now I’m aiming at make the code base even more stable looking on the mainlining of this new part of the L2CAP code inside the Linux stack.  All the code should be available and enabled by default on the 2.6.36 release. If you wanna help testing use the for-next branch of my git tree:

http://git.kernel.org/?p=linux/kernel/git/padovan/bluetooth-testing.git

Now git tree hosted at kernel.org

Some days ago I requested  a account to the kernel.org admins, today I finished to setup my kernel git tree there.  If you were following my git tree at git.profusion.mobi please change your remote to the kernel.org one.

git clone git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-testing.git

You can also browse on the gitweb view here. =)

L2CAP Extended Features

Here at ProFUSION I’m working to finish the L2CAP Extended Features introduced in the Core Specification Addendum 1 of the Bluetooth Specification. As you can see in older posts in this blog I have started that implementation by myself during the last year’s Google Summer of Code. The project was too big and I wasn’t able to finish it in 3 months.

The L2CAP Extended Features comprehends the Enhanced Retransmission Mode (ERTM), Streaming Mode, Segmentation and Reassembly, and Frame Check Sequence(FCS).

During the last month I worked to complete the ERTM state machine. All the events and its respective actions were coded. Unfortunately that doesn’t mean that it has no bugs.  Now it is time to run a lots of tests on the code to check  if it is working as specified and fix all the issues we found.

If you want to help testing just clone my git tree and enable the Kconfig option for the L2CAP Extended Features and if you have any suggestion, bug report or patch don’t hesitate in contact me. :)

The git tree is hosted here and you can clone it directly with this line:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-testing.git

I expect that soon this work will be merged into the bluetooth-testing tree and then it will be available on the 2.6.35 kernel as an experimental work.

UPDATE:  changed the git tree url.

BlueZ module for Enlightenment

In the last month I’ve been working on the Bluetooth Manager module for the Enlightenment Window Manager using the BlueZ infraestructure. The module is still pretty simple. The supported features now are Scan of Devices, Pairing and set/get of some adapter’s properties (Name, Powered, DiscoverableTimeout and Discoverable and Address).
To Build the module I’ve created an e_dbus implementation for bluez  (e_dbus is a EFL library to abstract DBus API to a nice C interface). This module were based on the ConnMan module and e_dbus implementation for Enlightenment, which has a very similar API.
The nexts steps are to add Agent properties to it, like receive requests for pairing or authorization. In the long term we plan to add support to send files over OBEX.


Gustavo Barbieri did a post about the module. There are some more info there.