Bluetooth Low Energy on BlueZ

Posted October 15, 2010 by Claudio Takahasi
Categories: ATT, Bluetooth, Bluetooth 4.0, BlueZ, GATT, Low Energy

If you are searching for technology details of Bluetooth 4.0 or if you need the answer for “why Low Energy”: wrong post! The SPEC is public, anyone can open an account in the Bluetooth SIG and download the adopted specs.

My objective is to provide an initial directions of how Bluetooth Low Energy(BLE) will work on BlueZ. The implementation is still under development, but we already have a clear picture of how we will support BLE and GATT/ATT.

In a couple of years it will be common to find dual mode Bluetooth capable devices: supporting Basic Rate and Low Energy. BlueZ will run on dual mode devices: devices that doesn’t have strict power consumption constraints. The most common cases for BlueZ devices will be the BLE Central role: managing and collecting data from Peripherals(coin cell devices).

For this project, there are two major pieces: BLE controller abstraction and the attribute protocol.

Our goal is to hide BLE technology details from the applications. BlueZ will expose the same interface for device discovery operations, meaning that the applications doesn’t need to know the hardware capabilities/features. BlueZ will use the same abstraction(D-Bus signals/messages) to report found devices and services. Internally, BlueZ will manage the interleaved scanning/inquiry and the characteristics discovery.

ATT(Attribute Protocol) will be the core of the future profiles over BLE, ATT is a very simple protocol to exchange characteristics. It can be considered transport agnostic. We decided to implement GATT/ATT first over BR/EDR due the BLE hardware availability, extend to BLE is just a minor surgery in the BlueZ code.

For more information access BlueZ source tree: doc/attribute-api.txt

First step towards BlueZ out of band pairing

Posted November 3, 2009 by Claudio Takahasi
Categories: Bluetooth, NFC

Tags: , , , ,

Does Bluetooth pairing sucks?

If you don’t have a simple pairing enabled adapter it will require more patience… It is not my objective explain Bluetooth “legacy” pairing and secure simple pairing.

When both adapters supports secure simple pairing and the  system provides services to reply the host controller events you can use one of four available association methods:

  • numeric comparison
  • just works
  • out of band
  • passkey entry

Read the Bluetooth Specification for further details about association models. This is the initial attempt to provide an out of band API to BlueZ, it is out of scope to implement the application used to exchange the OOB data. The classic example is NFC (Near Field Communication), users can simply touch two devices together and start the pairing procedure. Another useful scenario is when you have a device with limited input/output, where users can’t type or confirm passcode. The source code and a command line example can be found on my branch oob at infradead.

OOB association method is primarily designed for scenarios where an out band mechanism is used to trigger the device discovery and exchange the cryptographic data used in the pairing procedure.

The current code is not in the mainline, the API still puzzling, it will take time until we write it in stone. This project was part of a BlueZ 2009 SoC project assigned to Faruque Saker, the testbed used to exchange the OOB data was 2D data matrix symbols. Of course, it is not the most suitable OOB mechanism, but it fit into our purpose.

Feedback and examples are welcome!

Open source Bluetooth proximity marketing

Posted October 16, 2009 by Claudio Takahasi
Categories: Bluetooth

Tags: , , , , , , , , ,

Time to share knowledge and ideas…
This is my first post, I hope it can be useful to people  interested  in Bluetooth “spam”.

The first release of opushd is out, feedbacks and patches are welcome. Basically it works as a proxy between BlueZ and obex-client. More important than this daemon is select good hardware and set up the Bluetooth adapters properly. In order to improve the efficiency, don’t forget to disable name resolution and reduce the page timeout.

Major features:

  • multiple adapters support;
  • filter based on MAC address for testing purpose;
  • filter based on device major classes;
  • black listing;
  • white listing (testing purpose);
  • configurable simultaneous connections per adapter.