Bluetooth
Zephyr comes integrated with a feature-rich and higly configurable Bluetooth stack:
- Bluetooth 4.2 compliant
- Generic Access Profile (GAP) with all possible roles
- Peripheral & Central
- Observer & Broadcaster
- GATT (Generic Attribute Profile)
- Server (to be a sensor)
- Client (to connect to sensors)
- Pairing support, including the Secure Connections feature from Bluetooth 4.2
- IPSP/6LoWPAN for IPv6 connectivity over Bluetooth LE
- IPSP node sample application in
samples/bluetooth/ipsp
- IPSP node sample application in
- Clean HCI driver abstraction
- 3-Wire (H:5) & 5-Wire (H:4) drivers available
- Verified with multiple popular controllers
- Supporting both nano- & micro-kernels
- Highly configurable
- Features, buffer sizes/counts, stack sizes, etc.
Source tree layout
The stack is split up as follows in the source tree:
net/bluetooth/
- The core stack itself. This is where the HCI command & event handling as well as connection tracking happens. The implementation of the core protocols such as L2CAP, ATT & SMP is also here.
include/bluetooth/
- Public API header files. These are the header files applications need to include in order to use Bluetooth functionality.
drivers/bluetooth/
- HCI transport drivers. Every HCI transport needs its own driver. E.g. the two common types of UART transport protocols (3-Wire & 5-Wire) have their own drivers.
samples/bluetooth/
- Sample Bluetooth code. This is a good reference to get started with Bluetooth application development.
tests/bluetooth/
- Test applications. These applications are used to verify the
functionality of the Bluetooth stack, but are not necessary the best
source for sample code (see
samples/bluetooth
instead). doc/bluetooth/
- Extra documentation, such as PICS documents.
Further reading
More information on the stack and its usage can be found in the wiki and the following subsections: