Skip to content

Modern clean C++ Bluetooth Low Energy on Linux without the Bluez DBUS API

License

Notifications You must be signed in to change notification settings

edrosten/libblepp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e2d65fc · Oct 3, 2022
Sep 29, 2022
Mar 11, 2017
Sep 22, 2022
Sep 7, 2016
Sep 30, 2022
Jun 12, 2018
Oct 3, 2022
Sep 30, 2022
Aug 19, 2017
Oct 2, 2013
Sep 30, 2022
Nov 13, 2014
Aug 19, 2017
Nov 13, 2014
Sep 30, 2022
Nov 13, 2014
Sep 13, 2016
Sep 13, 2016
Jan 7, 2017
Mar 31, 2014
Jun 28, 2013
Feb 19, 2018

Repository files navigation

libble++

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

Includes

  • Scanning for bluetooth packets
  • Implementation of the GATT profile and ATT protocol
  • Lots of comments, complete with references to the specific part of the Bluetooth 4.0 standard.
  • Example programs

Design

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

The example programs

  • 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.

Building the library

There are currently autoconf (./configure) and CMake options. It's not a complex library to build, so either option should work fine.
Autoconf:

./configure  
make

CMake:

mkdir build && cd build
cmake ..
make install

CMake with examples:
Examples will be in build/examples

mkdir build && cd build
cmake -DWITH_EXAMPLES=ON ..
make install

About

Modern clean C++ Bluetooth Low Energy on Linux without the Bluez DBUS API

Resources

License

Stars

Watchers

Forks

Packages

No packages published