BlueToe
an alternative GATT/BLE implementation
Loading...
Searching...
No Matches
bluetoe::requires_encryption Struct Reference

defines that access to characteristic(s) require an encrypted link without MITM Protection. More...

#include <bluetoe/encryption.hpp>

Detailed Description

defines that access to characteristic(s) require an encrypted link without MITM Protection.

Can be used on server, service or characteristic level to define that the access to a characteristic value or CCCD, requires an encrypted link. If the link is not encrypted, when accessing the characteristic, Bluetoe replies with an ATT Insufficient Authorization error, if the requesting device is not paired and ATT Insufficient Encryption, if the device is paired, but the link is not encrypted. (see table 10.2 Vol 3, Part C, 10.3.1)

If applied to a server or service definition, this definition applies to all containing characteristics, where it can be overridden.

Example

char simple_value = 0;
constexpr char name[] = "This is the name of the characteristic";
// By default, require encryption for all characteristics of
// all services.
// Service A
// But for this service, no encryption is required
service_uuid_a,
...
>,
// Service B
service_uuid_b,
char_uuid,
// For all characteristics of this service, but this characteristic,
// encryption is required
>,
...
>,
// Service C
>;
A characteristic is a typed value that is accessable by a GATT client hosted by a GATT server.
Definition: characteristic.hpp:160
Root of the declaration of a GATT server.
Definition: server.hpp:85
a service with zero or more characteristics
Definition: service.hpp:150
defines that access to characteristic(s) does not require an encrypted link.
Definition: encryption.hpp:97
defines that access to characteristic(s) require an encrypted link without MITM Protection.
Definition: encryption.hpp:75
See also
characteristic
service
server
no_encryption_required
may_require_encryption

The documentation for this struct was generated from the following file: