You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Edward Rosten e2d65fcc7c
Merge pull request #70 from evotodi/rm-using-std
1 year ago
blepp make the buffer size configurable; needed more buffer for Xsens dot 1 year ago
cmake/modules Create a basic CMake build 7 years ago
examples Catch polymorphic errors by reference 1 year ago
m4 Update build system. 7 years ago
packaging Modified CMakeLists.txt to build and install the package with the option to build the examples. 1 year ago
pstreams updating pstream.h to release v1.0.1 5 years ago
src Merge pull request #70 from evotodi/rm-using-std 1 year ago
tests Refactored code to remove 'using namespace std' 1 year ago
.gitignore Improve .gitignore 6 years ago
ATT.txt some fixes 10 years ago
CMakeLists.txt Modified CMakeLists.txt to build and install the package with the option to build the examples. 1 year ago
COPYING Fix broken license 9 years ago
Makefile.in Fix and improve Makefile.in 6 years ago
Notes.txt Fix docs 9 years ago
README.md Modified CMakeLists.txt to build and install the package with the option to build the examples. 1 year ago
att_gatt.h Fix broken license 9 years ago
configure Spelling fix 7 years ago
configure.ac Spelling fix 7 years ago
cxxgplot.h Fix compile errors reported by IRC user pez2001 7 years ago
get_attrs.sh Add scraping file 10 years ago
hex2ascii.awk aaa 10 years ago
libblepp.pc.in Fix issue #25 6 years ago

README.md

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