Giter Site home page Giter Site logo

bluetoe's Introduction

Bluetoe

Overview

Bluetoe implements a GATT server with a very low memory footprint and a convenience C++ interface. Bluetoe makes easy things easy but gives the opportunity to fiddle with all the low level GATT details if necessary. The main target of Bluetoe is to be implemented on very small microcontrollers. Here is an example of a small GATT server:

#include <bluetoe/server.hpp>
#include <bluetoe/service.hpp>
#include <bluetoe/characteristic.hpp>

std::int32_t temperature;
const char serivce_name[]        = "Temperature / Bathroom";
const char characteristic_name[] = "Temperature in 10th degree celsius";

typedef bluetoe::server<
    bluetoe::server_name< server_name >,
    bluetoe::service<
        bluetoe::service_uuid< 0x8C8B4094, 0x0000, 0x499F, 0xA28A, 0x4EED5BC73CA9 >,
        bluetoe::characteristic<
            bluetoe::characteristic_name< char_name >,
            bluetoe::characteristic_uuid< 0x8C8B4094, 0x0000, 0x499F, 0xA28A, 0x4EED5BC73CAA >,
            bluetoe::bind_characteristic_value< decltype( temperature ), &temperature >
        >
    >
> temperature_service;

int main()
{
    temperature_service                                             server;
    bluetoe::binding::btstack_libusb_device< temperature_service >  device;

    device.run( server );
}

Documentation

http://torstenrobitzki.github.io/bluetoe/

L2CAP

Bluetoe ships with its own link layer. Currently a link layer based on the nrf51422 is under construction. The link layer implementation will be based and tested on an abstract device, called a scheduled radio and should be easily ported to similar hardware. As Bluetoe is a GATT server implementation, only that parts of the link layer are implemented, that are nessary. Bluetoe can easily adapted to any other existing L2CAP implementation (based on HCI for example).

Current State

The following table show the list of GATT procedures and there implementation status and there planned implementation status:

Feature Sub-Procedure Status
Server Configuration Exchange MTU implemented
Primary Service Discovery Discover All Primary Services implemented
Discover Primary Service By Service UUID implemented
Relationship Discovery Find Included Services implemented
Characteristic Discovery Discover All Characteristic of a Service implemented
Discover Characteristic by UUID implemented
Characteristic Descriptor Discovery Discover All Characteristic Descriptors implemented
Characteristic Value Read Read Characteristic Value implemented
Read Using Characteristic UUID implemented
Read Long Characteristic Value implemented
Read Multiple Characteristic Values implemented
Characteristic Value Write Write Without Response implemented
Signed Write Without Response not planned
Write Characteristic Value implemented
Write Long Characteristic Values implemented
Characteristic Value Reliable Writes implemented
Characteristic Value Notification Notifications implemented
Characteristic Value Indication Indications planned
Characteristic Descriptor Value Read Read Characteristic Descriptors implemented
Read Long Characteristic Descriptors implemented
Characteristic Descriptor Value Write Write Characteristic Descriptors implemented
Write Long Characteristic Descriptors implemented
Cryptography Encryption not planned
Authentication not planned

This is the current state of implemented Advertising Data:

Advertising Data Format Status
Service UUID Incomplete List of 16-bit Service UUIDs planned
Complete List of 16-bit Service UUIDs planned
Incomplete List of 32-bit Service UUIDs planned
Complete List of 32-bit Service UUIDs planned
Incomplete List of 128-bit Service UUIDs planned
Complete List of 128-bit Service UUIDs planned
Local Name Shortened Local Name implemented
Complete Local Name implemented
Flags Flags planned
Manufacturer Specific Data Manufacturer Specific Data planned
TX Power Level TX Power Level planned
Secure Simple Pairing Out of Band not planned
Security Manager Out of Band not planned
Security Manager TK Value not planned
Slave Connection Interval Range not planned
Service Solicitation not planned
Service Data not planned
Appearance Appearance planned
LE Role LE Role planned

This is the current state of the Link Layer implementation:

Aspect Feature Status
Roles Slave Role under construction
Master Role not planned
Advertising connectable undirected advertising implemented
connectable directed advertising planned
non-connectable undirected advertising planned
scannable undirected advertising planned
Device Filtering not planned
Connections Single Connection implemented
Multiple Connection not planned
Connection Slave Latency planned
Feature Support LE Encryption not planned
Connection Parameters Request Procedure planned
Extended Reject Indication planned
Slave-initiated Features Exchange planned
LE Ping implemented
LE Data Packet Length Extension planned
LL Privacy not planned
Extended Scanner Filter Policies not planned

Pullrequests are wellcome.

Dependencies

  • boost for Unittests
  • CMake for build
  • a decent C++ compiler supporting C++11
  • btstack for experimental L2CAP support

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.