This interface is required to support GATT proxy and PB-GATT. More...
Macros | |
#define | MESH_SOFTDEVICE_CONN_CFG_TAG (1) |
Tag used to set up Mesh GATT parameters. More... | |
#define | MESH_ADV_INTERVAL_DEFAULT (MSEC_TO_UNITS(200, UNIT_0_625_MS)) |
Default advertisement interval used by the mesh stack. | |
#define | MESH_ADV_TIMEOUT_INFINITE (BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED) |
Advertise indefinitely. More... | |
Functions | |
void | mesh_adv_data_set (uint16_t service_uuid, const uint8_t *p_service_data, uint8_t length) |
Sets the given service UUID and data in the advertisement data. More... | |
void | mesh_adv_params_set (uint32_t timeout_ms, uint32_t interval_units) |
Sets the advertisement parameters (timeout and interval). More... | |
void | mesh_adv_start (void) |
Starts advertising connectable advertisements. More... | |
void | mesh_adv_stop (void) |
Stops the connectable advertisements. | |
This interface is required to support GATT proxy and PB-GATT.
The implementation of the interface is left to the user in order to give the application as much flexibility as possible. The mesh stack handles starting and stopping of the advertisements and the required UUIDs and service data as defined by the Mesh Profile specification v1.0.
examples/common/src/mesh_adv.c
. No changes are needed unless additional UUIDs or service data is desired. #define MESH_SOFTDEVICE_CONN_CFG_TAG (1) |
Tag used to set up Mesh GATT parameters.
Definition at line 62 of file mesh_adv.h.
#define MESH_ADV_TIMEOUT_INFINITE (BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED) |
Advertise indefinitely.
Definition at line 69 of file mesh_adv.h.
void mesh_adv_data_set | ( | uint16_t | service_uuid, |
const uint8_t * | p_service_data, | ||
uint8_t | length | ||
) |
Sets the given service UUID and data in the advertisement data.
[in] | service_uuid | A 16-bit Bluetooth SIG assigned UUID. |
[in] | p_service_data | Pointer to variable length service data associated with the UUID. |
[in] | length | Length of the service data. |
void mesh_adv_params_set | ( | uint32_t | timeout_ms, |
uint32_t | interval_units | ||
) |
Sets the advertisement parameters (timeout and interval).
[in] | timeout_ms | Advertisement timeout (in milliseconds). |
[in] | interval_units | Advertisement interval (in 0.625 ms units). |
void mesh_adv_start | ( | void | ) |
Starts advertising connectable advertisements.