Modern clean C++ Bluetooth Low Energy on Linux without the Bluez DBUS API
C++ M4 Makefile Other
Latest commit 839c65f Feb 3, 2017 Edward Rosten Full scan reinitialise.
The scan on/off code worked before, but provided nothing interfered
with the HCI state. The thing is using the HCI for anything other than
scanning (e.g. connecting to a device) interferes with the state. That
made the stop/start code functionally useless.

Oddly enough the symptom was that it could receive scan events but
only from the device just connected to (at least on the RPi). I've not
investigated further yet, but there seem to be filters in several differnt
locations which filter events by address. That might have something to do
with it.

README

libble++
---------

Implementation of Bluetooth Low Energy functions in modern C++, without
the BlueZ DBUS API.

Includes:
* Scanning for bluetooth packets

* Implmentation of the GATT profile and ATT protocol

* Lots of comments, complete with references to to the specific part og
  the Bluetooth 4.0 standard.

* Example programs

Design:

Clean, modern C++ with callbacks. Feed it lambdas (or whatever you like)
to perform an event happens. Access provided to the raw socket FD, so 
you can select(), poll() or use blocking IO.



The example programs are:

* lescan_simple: Simplest possible program for scanning for devices. Only 2 non boilerplate lines.

* lescan: A "proper" scanning program that cleans up properly. It's got the same 2 lines of BLE related code and a bit of pretty standard unix for dealing with non blocking I/O and signals.

* temperature: A program for logging temperature values from a device providing a standard temperature characteristic. Very short to indicate the usave, but not much error checking.