This section contains some of the common defines and structures used for LE advertising, scanning, and link connection management.
Data Structures | |
struct | wiced_bt_adv_ctx_t |
Advertisement report context for the call to get offset and length of the searched adv type wiced_bt_ble_advert_type_t. More... | |
struct | wiced_bt_ble_advert_elem_t |
Advertisement element. More... | |
Macros | |
#define | BTM_BLE_DEFAULT_ADVERT_CHNL_MAP (BTM_BLE_ADVERT_CHNL_37 | BTM_BLE_ADVERT_CHNL_38 | BTM_BLE_ADVERT_CHNL_39) |
default advertising channel map | |
#define | BTM_BLE_ADVERT_FILTER_DEFAULT BTM_BLE_ADV_POLICY_ACCEPT_CONN_AND_SCAN |
default advertising filter policy | |
#define | BTM_BLE_ADVERT_INTERVAL_MIN 0x0020 |
adv parameter Min value | |
#define | BTM_BLE_ADVERT_INTERVAL_MAX 0x4000 |
adv parameter Max value | |
#define | BTM_BLE_SCAN_INTERVAL_MIN 0x0004 |
Scan interval minimum value. | |
#define | BTM_BLE_SCAN_INTERVAL_MAX 0x4000 |
Scan interval miximum value. | |
#define | BTM_BLE_SCAN_WINDOW_MIN 0x0004 |
Scan window minimum value. | |
#define | BTM_BLE_SCAN_WINDOW_MAX 0x4000 |
Scan window maximum value. | |
#define | BTM_BLE_CONN_INTERVAL_MIN 0x0006 |
Connection interval minimum value. | |
#define | BTM_BLE_CONN_INTERVAL_MAX 0x0C80 |
Connection interval maximum value. | |
#define | BTM_BLE_CONN_LATENCY_MAX 500 |
Maximum Connection Latency. | |
#define | BTM_BLE_CONN_SUP_TOUT_MIN 0x000A |
Minimum Supervision Timeout. | |
#define | BTM_BLE_CONN_SUP_TOUT_MAX 0x0C80 |
Maximum Supervision Timeout. | |
#define | BTM_BLE_CONN_PARAM_UNDEF 0xffff |
use this value when a specific value not to be overwritten | |
#define | BTM_BLE_CONN_SUP_TOUT_DEF 700 |
Default Supervision Timeout. | |
#define | BTM_BLE_SCAN_FAST_INTERVAL 96 |
default scan interval 30 ~ 60 ms (use 60) = 96 *0.625 | |
#define | BTM_BLE_SCAN_FAST_WINDOW 48 |
default scan window (in .625ms slots) for background auto connections 30 ms = 48 *0.625 | |
#define | BTM_BLE_SCAN_SLOW_INTERVAL_1 2048 |
default scan interval used in reduced power cycle (background scanning) 1.28 s = 2048 *0.625 | |
#define | BTM_BLE_SCAN_SLOW_WINDOW_1 18 |
default scan window used in reduced power cycle (background scanning) 11.25 ms = 18 *0.625 | |
#define | BTM_BLE_SCAN_SLOW_INTERVAL_2 4096 |
default scan interval used in reduced power cycle (background scanning) 2.56 s = 4096 *0.625 | |
#define | BTM_BLE_SCAN_SLOW_WINDOW_2 36 |
default scan window used in reduced power cycle (background scanning) 22.5 ms = 36 *0.625 | |
#define | BTM_BLE_POLICY_REJECT_ALL 0x00 |
relevant to both | |
#define | BTM_BLE_POLICY_ALLOW_SCAN 0x01 |
relevant to advertiser | |
#define | BTM_BLE_POLICY_ALLOW_CONN 0x02 |
relevant to advertiser | |
#define | BTM_BLE_POLICY_ALLOW_ALL 0x03 |
relevant to both | |
#define | BTM_BLE_LIMITED_DISCOVERABLE_FLAG (0x01 << 0) |
Limited Discoverable. | |
#define | BTM_BLE_GENERAL_DISCOVERABLE_FLAG (0x01 << 1) |
General Discoverable. | |
#define | BTM_BLE_BREDR_NOT_SUPPORTED (0x01 << 2) |
BR/EDR Not Supported. | |
#define | BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_CONTROLLER_SUPPORTED (0x01 << 3) |
Simultaneous LE and BR/EDR to Same Device Capable (Controller). More... | |
#define | BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_HOST_SUPPORTED (0x01 << 4) |
Simultaneous LE and BR/EDR to Same Device Capable (Host). More... | |
#define | BTM_BLE_NON_LIMITED_DISCOVERABLE_FLAG (0x00) |
Non Discoverable. | |
#define | BTM_BLE_ADVERT_FLAG_MASK |
LE adverisement mask. More... | |
#define | BTM_BLE_LIMITED_DISCOVERABLE_MASK (BTM_BLE_LIMITED_DISCOVERABLE_FLAG) |
LE Limited discovery mask. | |
Typedefs | |
typedef uint8_t | wiced_bt_ble_advert_filter_policy_t |
Advertising filter policy (see wiced_bt_ble_advert_filter_policy_e) | |
typedef uint8_t | wiced_bt_ble_advert_type_t |
LE advertisement data type (see wiced_bt_ble_advert_type_e) | |
typedef uint8_t | wiced_ble_ext_adv_handle_t |
Handle value of the advertisement set. | |
typedef uint8_t | wiced_ble_ext_adv_sid_t |
SID value. | |
typedef uint8_t | wiced_ble_ext_adv_phy_t |
LE Phy type for extended advertisement. | |
typedef uint8_t | wiced_ble_isoc_phy_t |
ISOC LE PHY (see wiced_ble_isoc_phy_e) | |
typedef uint8_t | wiced_ble_isoc_framing_t |
ISOC Framing types (see wiced_ble_isoc_framing_e) | |
typedef uint8_t | wiced_ble_isoc_encryption_t |
ISOC Encryption (see wiced_ble_isoc_encryption_e) | |
Functions | |
uint8_t * | wiced_ble_adv_data_search (wiced_bt_adv_ctx_t *p_ctx, wiced_bt_ble_advert_type_t type, uint16_t *p_length) |
Parse advertising data (returned from scan results callback wiced_bt_ble_scan_result_cback_t or wiced_ble_ext_scan_result_cback_t ). More... | |
uint16_t | wiced_ble_adv_data_build (wiced_bt_adv_ctx_t *p_ctxt, wiced_bt_ble_advert_elem_t *p_elem) |
Build an advertisement or scan data packet. More... | |
#define BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_CONTROLLER_SUPPORTED (0x01 << 3) |
Simultaneous LE and BR/EDR to Same Device Capable (Controller).
#define BTM_BLE_SIMULTANEOUS_DUAL_MODE_TO_SAME_DEVICE_HOST_SUPPORTED (0x01 << 4) |
Simultaneous LE and BR/EDR to Same Device Capable (Host).
#define BTM_BLE_ADVERT_FLAG_MASK |
LE adverisement mask.
Advertising filter policy.
Advertisement data types.
anonymous enum |
anonymous enum |
LE Phy to be used for extended advertisement.
enum wiced_ble_isoc_phy_e |
uint8_t* wiced_ble_adv_data_search | ( | wiced_bt_adv_ctx_t * | p_ctx, |
wiced_bt_ble_advert_type_t | type, | ||
uint16_t * | p_length | ||
) |
Parse advertising data (returned from scan results callback wiced_bt_ble_scan_result_cback_t or wiced_ble_ext_scan_result_cback_t ).
Look for specified advertisement data type.
[in] | p_ctx | : context data for the advertisement data, len, offset read and type. p_ctx->read_offset is incremented by this API on invocation of the API |
[in] | type | : advertisement data type to search for |
[out] | p_length | : length of advertisement data (if found) |
uint16_t wiced_ble_adv_data_build | ( | wiced_bt_adv_ctx_t * | p_ctxt, |
wiced_bt_ble_advert_elem_t * | p_elem | ||
) |
Build an advertisement or scan data packet.
[in] | p_ctxt | : advertisement context, contains the pointer and length of buffer to be filled The p_ctx->offset variable is updated by this call by the length of adv data written out to p_ctx->p_adv |
[in] | p_elem | : advertisement element of type, length, value |
p_ctxt
, else (p_elem->len + 2)