22 #include "blecommon.h" 24 #include "ble/GattServer.h" 25 #include "ble/GattClient.h" 26 #include "ble/SecurityManager.h" 30 #ifdef YOTTA_CFG_MBED_OS 31 #include "mbed-drivers/mbed_error.h" 34 #include "platform/mbed_error.h" 38 #include "platform/mbed_toolchain.h" 151 #ifndef YOTTA_CFG_BLE_INSTANCES_COUNT 160 static const InstanceID_t NUM_INSTANCES = YOTTA_CFG_BLE_INSTANCES_COUNT;
177 static BLE &
Instance(InstanceID_t
id = DEFAULT_INSTANCE);
293 return initImplementation(callback);
310 return initImplementation(callback);
360 #if BLE_FEATURE_GATT_SERVER 376 #endif // BLE_FEATURE_GATT_SERVER 378 #if BLE_FEATURE_GATT_CLIENT 394 #endif // BLE_FEATURE_GATT_CLIENT 396 #if BLE_FEATURE_SECURITY 413 #endif // BLE_FEATURE_SECURITY 444 MBED_DEPRECATED(
"Use BLE::Instance() instead of BLE constructor.")
445 BLE(InstanceID_t instanceID = DEFAULT_INSTANCE);
458 MBED_DEPRECATED(
"Use BLE::processEvents() and BLE::onEventsToProcess().")
474 MBED_DEPRECATED(
"Use ble.gap().setAddress(...)")
492 MBED_DEPRECATED(
"Use ble.gap().getAddress(...)")
500 #if BLE_ROLE_BROADCASTER 511 MBED_DEPRECATED(
"Use ble.gap().setAdvertisingType(...)")
542 MBED_DEPRECATED(
"Use ble.gap().setAdvertisingInterval(...)")
556 MBED_DEPRECATED(
"Use ble.gap().getMinAdvertisingInterval(...)")
573 MBED_DEPRECATED(
"Use ble.gap().getMinNonConnectableAdvertisingInterval(...)")
589 MBED_DEPRECATED(
"Use ble.gap().getMaxAdvertisingInterval(...)")
609 MBED_DEPRECATED(
"Use ble.gap().setAdvertisingTimeout(...)")
625 MBED_DEPRECATED(
"Use ble.gap().setAdvertisingParams(...)")
639 MBED_DEPRECATED(
"Use ble.gap().getAdvertisingParams(...)")
661 MBED_DEPRECATED(
"Use ble.gap().accumulateAdvertisingPayload(flags)")
682 MBED_DEPRECATED(
"Use ble.gap().accumulateAdvertisingPayload(appearance)")
703 MBED_DEPRECATED(
"Use ble.gap().accumulateAdvertisingPayloadTxPower(...)")
724 MBED_DEPRECATED(
"Use ble.gap().accumulateAdvertisingPayload(...)")
741 MBED_DEPRECATED(
"Use ble.gap().setAdvertisingData(...)")
755 MBED_DEPRECATED(
"Use ble.gap().getAdvertisingData(...)")
768 MBED_DEPRECATED(
"Use ble.gap().clearAdvertisingPayload(...)")
785 MBED_DEPRECATED(
"Use ble.gap().setAdvertisingPayload(...)")
804 MBED_DEPRECATED(
"Use ble.gap().accumulateScanResponse(...)")
816 MBED_DEPRECATED(
"Use ble.gap().clearScanResponse(...)")
830 MBED_DEPRECATED(
"Use ble.gap().startAdvertising(...)")
844 MBED_DEPRECATED(
"Use ble.gap().stopAdvertising(...)")
846 #endif // BLE_ROLE_BROADCASTER 848 #if BLE_ROLE_OBSERVER 881 MBED_DEPRECATED(
"Use ble.gap().setScanParams(...)")
885 uint16_t timeout = 0,
886 bool activeScanning =
false 912 MBED_DEPRECATED(
"Use ble.gap().setScanInterval(...)")
938 MBED_DEPRECATED(
"Use ble.gap().setScanWindow(...)")
966 MBED_DEPRECATED(
"Use ble.gap().setScanTimeout(...)")
984 MBED_DEPRECATED(
"Use ble.gap().setActiveScan(...)")
1004 MBED_DEPRECATED(
"Use ble.gap().startScan(callback)")
1027 template<
typename T>
1028 MBED_DEPRECATED(
"Use ble.gap().startScan(object, callback)")
1041 MBED_DEPRECATED(
"Use ble.gap().stopScan()")
1046 #endif // BLE_ROLE_OBSERVER 1048 #if BLE_ROLE_CENTRAL 1070 MBED_DEPRECATED(
"Use ble.gap().connect(...)")
1077 #endif // BLE_ROLE_CENTRAL 1079 #if BLE_FEATURE_CONNECTABLE 1097 MBED_DEPRECATED(
"Use ble.gap().disconnect(...)")
1120 MBED_DEPRECATED(
"Use ble.gap().disconnect(...)")
1122 #endif // BLE_FEATURE_CONNECTABLE 1135 MBED_DEPRECATED(
"Use ble.gap().getState()")
1138 #if BLE_FEATURE_CONNECTABLE 1139 #if BLE_FEATURE_GATT_SERVER 1157 MBED_DEPRECATED(
"Use ble.gap().getPreferredConnectionParams(...)")
1179 MBED_DEPRECATED(
"Use ble.gap().setPreferredConnectionParams(...)")
1184 #endif // BLE_FEATURE_GATT_SERVER 1205 MBED_DEPRECATED(
"Use ble.gap().updateConnectionParams(...)")
1207 #endif // BLE_FEATURE_CONNECTABLE 1209 #if BLE_FEATURE_GATT_SERVER 1223 MBED_DEPRECATED(
"Use ble.gap().setDeviceName(...)")
1256 MBED_DEPRECATED(
"Use ble.gap().getDeviceName(...)")
1275 MBED_DEPRECATED(
"Use ble.gap().setAppearance(...)")
1295 MBED_DEPRECATED(
"Use ble.gap().getAppearance(...)")
1300 #endif // BLE_FEATURE_GATT_SERVER 1315 MBED_DEPRECATED(
"Use ble.gap().setTxPower(...)")
1331 MBED_DEPRECATED(
"Use ble.gap().getPermittedTxPowerValues(...)")
1334 #if BLE_FEATURE_GATT_SERVER 1350 MBED_DEPRECATED(
"Use ble.gattServer().addService(...)")
1377 MBED_DEPRECATED(
"Use ble.gattServer().read(...)")
1410 MBED_DEPRECATED(
"Use ble.gattServer().read(...)")
1412 Gap::Handle_t connectionHandle,
1418 return gattServer().
read(connectionHandle, attributeHandle, buffer, lengthP);
1444 MBED_DEPRECATED(
"Use ble.gattServer().write(...)")
1447 const uint8_t *value,
1449 bool localOnly = false
1482 MBED_DEPRECATED(
"Use ble.gattServer().write(...)")
1484 Gap::Handle_t connectionHandle,
1486 const uint8_t *value,
1488 bool localOnly = false
1491 return gattServer().
write(connectionHandle, attributeHandle, value, size, localOnly);
1493 #endif // BLE_FEATURE_GATT_SERVER 1495 #if BLE_FEATURE_SECURITY 1516 MBED_DEPRECATED(
"Use ble.securityManager().init(...)")
1518 bool enableBonding = true,
1519 bool requireMITM = true,
1540 MBED_DEPRECATED(
"ble.securityManager().getLinkSecurity(...)")
1559 MBED_DEPRECATED(
"ble.securityManager().purgeAllBondingState(...)")
1564 #endif // BLE_FEATURE_SECURITY 1577 MBED_DEPRECATED(
"ble.gap().onTimeout(callback)")
1580 #if BLE_FEATURE_CONNECTABLE 1591 MBED_DEPRECATED(
"ble.gap().onConnection(callback)")
1604 MBED_DEPRECATED(
"ble.gap().onDisconnectionComplete(callback)")
1619 template<
typename T>
1620 MBED_DEPRECATED(
"ble.gap().onDisconnectionComplete(callback)")
1625 #endif // BLE_FEATURE_CONNECTABLE 1648 MBED_DEPRECATED(
"ble.gap().onRadioNotification(...)")
1651 #if BLE_FEATURE_GATT_SERVER 1670 MBED_DEPRECATED(
"ble.gattServer().onDataSent(...)")
1690 template<
typename T>
1691 MBED_DEPRECATED(
"ble.gattServer().onDataSent(...)")
1719 MBED_DEPRECATED(
"ble.gattServer().onDataWritten(...)")
1740 template<
typename T>
1741 MBED_DEPRECATED(
"ble.gattServer().onDataWritten(...)")
1773 MBED_DEPRECATED(
"ble.gattServer().onDataRead(...)")
1796 template<
typename T>
1797 MBED_DEPRECATED(
"ble.gattServer().onDataRead(...)")
1814 MBED_DEPRECATED(
"ble.gattServer().onUpdatesEnabled(...)")
1831 MBED_DEPRECATED(
"ble.gattServer().onUpdatesDisabled(...)")
1848 MBED_DEPRECATED(
"ble.gattServer().onConfirmationReceived(...)")
1853 #endif // BLE_FEATURE_GATT_SERVER 1855 #if BLE_FEATURE_SECURITY 1870 MBED_DEPRECATED(
"ble.securityManager().onSecuritySetupInitiated(callback)")
1889 MBED_DEPRECATED(
"ble.securityManager().onSecuritySetupCompleted(callback)")
1910 MBED_DEPRECATED(
"ble.securityManager().onLinkSecured(callback)")
1927 MBED_DEPRECATED(
"ble.securityManager().onSecurityContextStored(callback)")
1947 MBED_DEPRECATED(
"ble.securityManager().onPasskeyDisplay(callback)")
1952 #endif // BLE_FEATURE_SECURITY 1980 BLE &operator=(
const BLE &);
1986 bool event_signaled;
ble_error_t setScanInterval(uint16_t interval)
Set up the scanInterval parameter for GAP scanning (observer mode).
ble_error_t stopAdvertising(void)
Stop advertising.
ble_error_t accumulateScanResponse(GapAdvertisingData::DataType type, const uint8_t *data, uint8_t len)
Accumulate a variable length byte-stream as an AD structure in the scanResponse payload.
void setAdvertisingType(GapAdvertisingParams::AdvertisingType advType)
Set the GAP advertising mode to use for this device.
ble_error_t setAddress(BLEProtocol::AddressType_t type, const BLEProtocol::AddressBytes_t address)
Set the BTLE MAC address and type.
Private interface used to implement the BLE class.
Common namespace for types and constants used everywhere in BLE API.
void clearAdvertisingPayload(void)
Reset any advertising payload prepared from prior calls to accumulateAdvertisingPayload().
ble_error_t setAdvertisingData(const GapAdvertisingData &advData)
Set up a particular, user-constructed advertisement payload for the underlying stack.
void onDisconnection(Gap::DisconnectionEventCallback_t disconnectionCallback)
Append to a chain of callbacks to be invoked upon GAP disconnection.
const char * getVersion(void)
This call allows the application to get the BLE stack version information.
uint16_t getMinNonConnectableAdvertisingInterval(void) const
Get the minimum advertising interval in milliseconds, which can be used for nonconnectable advertisin...
uint16_t getMaxAdvertisingInterval(void) const
Get the maximum advertising interval in milliseconds.
Abstract away BLE-capable radio transceivers or SOCs.
ble_error_t getAddress(BLEProtocol::AddressType_t *typeP, BLEProtocol::AddressBytes_t address)
Fetch the Bluetooth Low Energy MAC address and type.
ble_error_t stopScan(void)
Stop scanning.
ble_error_t getPreferredConnectionParams(Gap::ConnectionParams_t *params)
Get the GAP peripheral's preferred connection parameters.
ble_error_t purgeAllBondingState(void)
Delete all peer device context and all related bonding information from the database within the secur...
ble_error_t setScanParams(uint16_t interval=GapScanningParams::SCAN_INTERVAL_MAX, uint16_t window=GapScanningParams::SCAN_WINDOW_MAX, uint16_t timeout=0, bool activeScanning=false)
Set up parameters for GAP scanning (observer mode).
void setAdvertisingTimeout(uint16_t timeout)
Set the advertising duration.
ble_error_t setScanWindow(uint16_t window)
Set up the scanWindow parameter for GAP scanning (observer mode).
ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params)
Set the value of the preferred connection parameters exposed in the GATT Generic Access Service...
ble::connection_handle_t Handle_t
Opaque value type representing a connection handle.
Parameters defining the advertising process.
void onTimeout(Gap::TimeoutEventCallback_t timeoutCallback)
Set up a callback for timeout events.
ble_error_t write(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly=false)
Update the value of an attribute present in the local GATT server.
ble_error_t onDataRead(const DataReadCallback_t &callback)
Set an event handler that monitors attribute reads from connected clients.
Random static device address.
static const InstanceID_t DEFAULT_INSTANCE
The value of the BLE::InstanceID_t for the default BLE instance.
ble_error_t shutdown(void)
Shut down the underlying stack, and reset state of this BLE instance.
Parameters defining the scan process.
void onEventsToProcess(const OnEventsToProcessCallback_t &on_event_cb)
Register a callback called when the BLE stack has pending work.
ble_error_t readCharacteristicValue(GattAttribute::Handle_t attributeHandle, uint8_t *buffer, uint16_t *lengthP)
Read the value of a characteristic from the local GattServer.
void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP)
Query the underlying stack for permitted arguments for setTxPower().
uint16_t getMinAdvertisingInterval(void) const
Get the minimum advertising interval in milliseconds, which can be used for connectable advertising t...
GattServer & gattServer()
Accessor to GattServer.
void onDisconnection(DisconnectionEventCallback_t callback)
Register a callback handling disconnection events.
ble_error_t getPreferredConnectionParams(ConnectionParams_t *params)
Returned the preferred connection parameters exposed in the GATT Generic Access Service.
Initialization complete event.
ble_error_t error
Error status of the initialization.
ble_error_t getAppearance(GapAdvertisingData::Appearance *appearanceP)
Get the appearance characteristic in the Gap service.
FunctionPointerWithContext< OnEventsToProcessCallbackContext * > OnEventsToProcessCallback_t
Events to process event handler.
ble_error_t accumulateAdvertisingPayloadTxPower(int8_t power)
Accumulate an AD structure in the advertising payload.
ble_error_t getLinkSecurity(ble::connection_handle_t connectionHandle, LinkSecurityStatus_t *securityStatus)
uint16_t getMinAdvertisingInterval(void) const
Get the minimum advertising interval in milliseconds, which can be used for connectable advertising t...
GAP advertising data builder.
ble_error_t setScanTimeout(uint16_t timeout)
Set up parameters for GAP scanning (observer mode).
FunctionPointerWithContext< const DisconnectionCallbackParams_t * > DisconnectionEventCallback_t
Disconnection event handler.
void onDataSent(const DataSentCallback_t &callback)
Add an event handler that monitors emission of characteristic value updates.
ble_error_t connect(const BLEProtocol::AddressBytes_t peerAddr, BLEProtocol::AddressType_t peerAddrType=BLEProtocol::AddressType::RANDOM_STATIC, const Gap::ConnectionParams_t *connectionParams=NULL, const GapScanningParams *scanParams=NULL)
Create a connection (GAP Link Establishment).
Define device discovery, connection and link management procedures.
void onLinkSecured(LinkSecuredCallback_t callback)
ble_error_t init(InitializationCompleteCallback_t completion_cb=NULL)
Initialize the BLE controller/stack.
unsigned InstanceID_t
Opaque type used to store the ID of a BLE instance.
Representation of a GattServer attribute.
Description of the states of the device.
Define procedures required for interacting with a distant GATT server.
void onConfirmationReceived(GattServer::EventCallback_t callback)
Set up a callback for when the GATT server receives a response for an indication event sent previousl...
bool hasInitialized(void) const
Indicate if the BLE instance has been initialized.
ble_error_t startAdvertising(void)
Start advertising.
BLE & ble
Reference to the BLE object that has been initialized.
ble_error_t onDataRead(void(*callback)(const GattReadCallbackParams *eventDataP))
Set up a callback to be invoked on the peripheral when an attribute is being read by a remote client...
void(* InitializationCompleteCallback_t)(InitializationCompleteCallbackContext *context)
Initialization complete event handler.
ble_error_t setAppearance(GapAdvertisingData::Appearance appearance)
Set the appearance characteristic in the Gap service.
ble_error_t purgeAllBondingState(void)
Delete all peer device context and all related bonding information from the database within the secur...
Representation of a scanned advertising packet.
Construct and operates a GATT server.
ble_error_t startScan(void(*callback)(const Gap::AdvertisementCallbackParams_t *params))
Start scanning (Observer Procedure) based on the parameters currently in effect.
GATT Write event definition.
Parameters of a BLE connection.
void onPasskeyDisplay(SecurityManager::PasskeyDisplayCallback_t callback)
Set up a callback for when the passkey needs to be displayed on a peripheral with DISPLAY capability...
void onLinkSecured(SecurityManager::LinkSecuredCallback_t callback)
Set up a callback for when a link with the peer is secured.
void onSecuritySetupInitiated(SecuritySetupInitiatedCallback_t callback)
SecurityManager & securityManager()
Accessors to SecurityManager.
static const char * errorToString(ble_error_t error)
Translate error code into a printable string.
ble_error_t updateCharacteristicValue(GattAttribute::Handle_t attributeHandle, const uint8_t *value, uint16_t size, bool localOnly=false)
Update the value of a characteristic on the local GattServer.
static const unsigned SCAN_WINDOW_MAX
Maximum Scan window in 625us units - 10.24s.
GATT Read event definition.
uint16_t getMaxAdvertisingInterval(void) const
Get the maximum advertising interval in milliseconds.
void onDataSent(void(*callback)(unsigned count))
Add a callback for the GATT event DATA_SENT (which is triggered when updates are sent out by GATT in ...
ble_error_t init(T *object, void(T::*completion_cb)(InitializationCompleteCallbackContext *context))
Initialize the BLE controller/stack.
ble_error_t addService(GattService &service)
Add a service declaration to the local server ATT table.
ble_error_t stopScan()
Stop the ongoing scanning procedure.
void onSecurityContextStored(SecurityManager::HandleSpecificEvent_t callback)
Set up a callback for successful bonding, meaning that link-specific security context is stored persi...
ble_error_t getDeviceName(uint8_t *deviceName, unsigned *lengthP)
Get the value of the device name characteristic in the Gap service.
ble_error_t read(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP)
Read the value of an attribute present in the local GATT server.
static const InstanceID_t NUM_INSTANCES
The number of permitted BLE instances for the application.
DisconnectionReason_t
Enumeration of disconnection reasons.
void waitForEvent(void)
Yield control to the BLE stack or to other tasks waiting for events.
void onUpdatesDisabled(GattServer::EventCallback_t callback)
Set up a callback for when notifications or indications are disabled for a characteristic on the loca...
enum Appearance_t Appearance
Alias for GapAdvertisingData::Appearance_t.
void clearScanResponse(void)
Reset any scan response prepared from prior calls to accumulateScanResponse().
ble_error_t getLinkSecurity(Gap::Handle_t connectionHandle, SecurityManager::LinkSecurityStatus_t *securityStatusP)
Get the security status of a connection.
void setAdvertisingInterval(uint16_t interval)
Set the advertising interval.
ble_error_t init(bool enableBonding=true, bool requireMITM=true, SecurityIOCapabilities_t iocaps=IO_CAPS_NONE, const Passkey_t passkey=NULL, bool signing=true, const char *dbFilepath=NULL)
Enable the BLE stack's Security Manager.
Gap::GapState_t getGapState(void) const
Returns the current Gap state of the device using a bitmask that describes whether the device is adve...
const GapAdvertisingData & getAdvertisingData(void) const
Get a reference to the current advertising payload.
void onConnection(Gap::ConnectionEventCallback_t connectionCallback)
Set up a callback for connection events.
FunctionPointerWithContext< const ConnectionCallbackParams_t * > ConnectionEventCallback_t
Connection event handler.
enum DataType_t DataType
Alias for GapAdvertisingData::DataType_t.
void onSecuritySetupCompleted(SecurityManager::SecuritySetupCompletedCallback_t callback)
Set up a callback for when the security setup procedure (key generation and exchange) for a link has ...
const GapAdvertisingParams & getAdvertisingParams(void) const
Get the current advertising parameters.
void onSecuritySetupCompleted(SecuritySetupCompletedCallback_t callback)
InstanceID_t getInstanceID(void) const
Fetch the ID of a BLE instance.
void onDataWritten(void(*callback)(const GattWriteCallbackParams *eventDataP))
Set up a callback for when an attribute has its value updated by or at the connected peer...
FunctionPointerWithContext< TimeoutSource_t > TimeoutEventCallback_t
Timeout event handler.
void onPasskeyDisplay(PasskeyDisplayCallback_t callback)
void onConfirmationReceived(EventCallback_t callback)
Set up an event handler that monitors notification acknowledgment.
Gap & gap()
Accessor to Gap.
void onUpdatesEnabled(GattServer::EventCallback_t callback)
Set up a callback for when notifications or indications are enabled for a characteristic on the local...
GattClient & gattClient()
Accessors to GattClient.
ble_error_t addService(GattService &service)
Add a service declaration to the local attribute server table.
ble_error_t getAddress(BLEProtocol::AddressType_t *typeP, BLEProtocol::AddressBytes_t address)
Fetch the current address and its type.
ble_error_t updateConnectionParams(Gap::Handle_t handle, const Gap::ConnectionParams_t *params)
Update connection parameters while in the peripheral role.
void setActiveScan(bool activeScanning)
Set up parameters for GAP scanning (observer mode).
Representation of a GattServer service.
ble_error_t setPreferredConnectionParams(const Gap::ConnectionParams_t *params)
Set the GAP peripheral's preferred connection parameters.
ble_error_t setAppearance(GapAdvertisingData::Appearance appearance)
Set the value of the appearance characteristic in the GAP service.
void setAdvertisingParams(const GapAdvertisingParams &advParams)
Set up a particular, user-constructed set of advertisement parameters for the underlying stack...
void onSecurityContextStored(HandleSpecificEvent_t callback)
static const unsigned SCAN_INTERVAL_MAX
Maximum Scan interval in 625us units - 10.24s.
void onUpdatesEnabled(EventCallback_t callback)
Set up an event handler that monitors subscription to characteristic updates.
void onRadioNotification(void(*callback)(bool))
Radio Notification is a feature that enables ACTIVE and INACTIVE (nACTIVE) signals from the stack...
void onSecuritySetupInitiated(SecurityManager::SecuritySetupInitiatedCallback_t callback)
Set up a callback for when the security setup procedure (key generation and exchange) for a link has ...
static BLE & Instance(InstanceID_t id=DEFAULT_INSTANCE)
Get a reference to the BLE singleton corresponding to a given interface.
uint8_t AddressBytes_t[ADDR_LEN]
48-bit address, in LSB format.
ble_error_t initializeSecurity(bool enableBonding=true, bool requireMITM=true, SecurityManager::SecurityIOCapabilities_t iocaps=SecurityManager::IO_CAPS_NONE, const SecurityManager::Passkey_t passkey=NULL)
Enable the BLE stack's Security Manager.
void onUpdatesDisabled(EventCallback_t callback)
Set up an event handler that monitors unsubscription from characteristic updates. ...
void onDataWritten(const DataWrittenCallback_t &callback)
Set an event handler that is called after a connected peer has written an attribute.
ble_error_t disconnect(Gap::Handle_t connectionHandle, Gap::DisconnectionReason_t reason)
This call initiates the disconnection procedure, and its completion is communicated to the applicatio...
ble_error_t getAppearance(GapAdvertisingData::Appearance *appearanceP)
Get the value of the appearance characteristic in the GAP service.
BLE(InstanceID_t instanceID=DEFAULT_INSTANCE)
Constructor for a handle to a BLE instance (the BLE stack).
ble_error_t getDeviceName(uint8_t *deviceName, unsigned *lengthP)
Get the value of the device name characteristic in the Generic Access Service.
ble_error_t accumulateAdvertisingPayload(uint8_t flags)
Accumulate an AD structure in the advertising payload.
Type
Address-types for Protocol addresses.
ble_error_t setDeviceName(const uint8_t *deviceName)
Set the device name characteristic in the Gap service.
ble_error_t setDeviceName(const uint8_t *deviceName)
Set the value of the device name characteristic in the Generic Access Service.
void processEvents()
Process ALL pending events living in the BLE stack and return once all events have been consumed...
ble_error_t setAdvertisingPayload(void)
Dynamically reset the accumulated advertising payload and scanResponse.
uint16_t getMinNonConnectableAdvertisingInterval(void) const
Get the minimum advertising interval in milliseconds, which can be used for nonconnectable advertisin...
enum AdvertisingType_t AdvertisingType
Alias for GapAdvertisingParams::AdvertisingType_t.
void signalEventsToProcess(BLE::InstanceID_t id)
Signal to BLE that events needing processing are available.
BLE & ble
The ble instance which have events to process.
ble_error_t
Error codes for the BLE API.
ble_error_t setTxPower(int8_t txPower)
Set the radio's transmit power.