User's Manual

User Manual
3
1. Introduction
BLE is a protocol developed by Bluetooth SIG, the BLE stack contains two categories
the Generic Access Profile (GAP) and the Generic Attribute Profile (GATT).
1.1 Generic Access Profile (GAP)
The GAP controls connections and advertising in Bluetooth and it makes the device visible and
determines how two devices can interact with each other.
A device can join a BLE network by adopting these roles specified in GAP:
Broadcasting: These roles don't have to explicitly connect to one another to transfer data.
Broadcaster: A device that broadcasts public advertising data packets, such as how long a
button has been pressed.
Observer: A devices that listens to the data in the advertising packets sent by the
broadcaster. No connection happens between the broadcaster and observer.
Connecting: These roles must explicitly connect and handshake to transfer data. These roles
are more commonly used than the broadcasting roles.
Peripheral: A device that advertises its presence so central devices can establish a
connection. After connecting, peripherals no longer broadcast data to other central devices
and stay connected to the device that accepted connection request.
Peripherals are low-power because they only have to send beacons periodically. Central
devices are responsible for starting communication with peripherals.
Bean is an example of a BLE peripheral.
Central: A device that initiates a connection with a peripheral device by first listening to the
advertising packets. A central device can connect to many other peripheral devices.
When the central device wants to connect, it sends a request connection data packet to the
peripheral device. If the peripheral device accepts the request from the central device, a
connection is established.
Your computer is an example of a BLE Central device when it connects to Bean.
1.2 Generic Attribute Profile (GATT)
Similar to GAP, there are certain roles that interacting devices can adopt:
Client: Typically sends a request to the GATT server. The client can read and/or write
attributes found in the server.
Server: One of the main roles of the server is to store attributes. Once the client makes a
request, the server must make the attributes available.
1.3 Hardware context
The BLE chip is the NRF52840 developed by Nordic Semiconductor. In our case, the NRF52 is
only used as Bluetooth low energy component and it's driven by an STM32L4.