AIROC™ BTSDK v4.9 - Documentation | ||||
This section describes the API's to use LE functionality such as advertisement, scanning LE Connection, Data transfer, LE Security etc. More...
Data Structures | |
struct | wiced_bt_ble_advert_elem_t |
Advertisement element. More... | |
struct | wiced_bt_ble_scan_results_t |
LE inquiry result type. More... | |
struct | wiced_bt_ble_phy_preferences_t |
Host PHY preferences. More... | |
struct | wiced_bt_ble_conn_params_t |
LE connection parameteres. More... | |
struct | wiced_bt_ble_pref_conn_params_t |
LE preferred connection parameters. More... | |
struct | wiced_bt_ble_multi_adv_params_t |
LE Multi advertising parameter. More... | |
struct | wiced_bt_ble_ext_adv_duration_config_t |
Advertisement duration configuration for specified adv handle. More... | |
struct | wiced_bt_ble_ext_conn_cfg_t |
Extended ADV connection configuration structure. More... | |
struct | wiced_bt_ble_ext_adv_report_t |
Extended advertisement report data format. More... | |
struct | wiced_bt_ble_periodic_adv_sync_established_event_data_t |
Sync extablished to periodic advertiser event data format. More... | |
struct | wiced_bt_ble_periodic_adv_report_event_data_t |
Periodic advertising report data format. More... | |
struct | wiced_bt_ble_ext_adv_set_terminated_event_data_t |
extended adv set terminated event data format. More... | |
struct | wiced_bt_ble_scan_req_received_event_data_t |
scan request received event data format More... | |
struct | wiced_bt_ble_channel_sel_algo_event_data_t |
Channel selection algorithm event data format. More... | |
union | wiced_bt_ble_adv_ext_event_data_t |
union of events data More... | |
struct | wiced_bt_ble_ext_scan_config_t |
Configuration for extended scanning. More... | |
Modules | |
Advertisement & Scan | |
This section provides functions for LE advertisement and LE scan operations. | |
Connection and Filter Accept List | |
This section provides functions for LE connection related and Filter Accept List operations. | |
LE Security | |
Bluetooth LE security API (authorisation, authentication and encryption) | |
MultiAdv | |
This section describes Multiple Advertisement API, using this interface application can enable more than one advertisement train. | |
Phy | |
This section provides functionality to read and update PHY. | |
Macros | |
#define | BTM_AFH_CHNL_MAP_SIZE HCI_AFH_CHANNEL_MAP_LEN |
AFH channel map size. | |
#define | BLE_CHANNEL_MAP_LEN 5 |
AFH Channel Map len. | |
#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_ADV_POLICY_ACCEPT_CONN_AND_SCAN BTM_BLE_ADV_POLICY_ACCEPT_CONN_AND_SCAN |
#define | BTM_BLE_ADV_POLICY_ACCEPT_CONN_FILTER_SCAN BTM_BLE_ADV_POLICY_ACCEPT_CONN_FILTER_SCAN |
#define | BTM_BLE_ADV_POLICY_FILTER_CONN_ACCEPT_SCAN BTM_BLE_ADV_POLICY_FILTER_CONN_ACCEPT_SCAN |
#define | BTM_BLE_ADV_POLICY_FILTER_CONN_FILTER_SCAN BTM_BLE_ADV_POLICY_FILTER_CONN_FILTER_SCAN |
#define | BTM_BLE_ADV_POLICY_MAX BTM_BLE_ADV_POLICY_MAX |
#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 for background connection, applicable for auto connection or selective conenction 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_CONN_INTERVAL_MIN_DEF 24 |
default connection interval min recommended min: 30ms = 24 * 1.25 | |
#define | BTM_BLE_CONN_INTERVAL_MAX_DEF 40 |
default connection interval max recommended max: 50 ms = 56 * 1.25 | |
#define | BTM_BLE_CONN_PERIPHERAL_LATENCY_DEF 0 |
default Peripheral latency | |
#define | BTM_BLE_CONN_TIMEOUT_DEF 2000 |
default supervision timeout | |
#define | BTM_BLE_AUTH_SIGNATURE_SIZE 12 |
LE Signature LE data signature length 8 Bytes + 4 bytes counter. | |
#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 (BTM_BLE_LIMITED_DISCOVERABLE_FLAG | BTM_BLE_BREDR_NOT_SUPPORTED | BTM_BLE_GENERAL_DISCOVERABLE_FLAG) |
LE adverisement mask. | |
#define | BTM_BLE_LIMITED_DISCOVERABLE_MASK (BTM_BLE_LIMITED_DISCOVERABLE_FLAG ) |
LE Limited discovery mask. | |
#define | BTM_BLE_PREFER_1M_PHY 0x01 |
LE 1M PHY preference. | |
#define | BTM_BLE_PREFER_2M_PHY 0x02 |
LE 2M PHY preference. | |
#define | BTM_BLE_PREFER_LELR_PHY 0x04 |
LE LELR PHY preference. | |
#define | BTM_BLE_PREFER_NO_LELR 0x0000 |
No preferred coding. | |
#define | BTM_BLE_PREFER_LELR_125K 0x0001 |
Preferred coding is S=2. | |
#define | BTM_BLE_PREFER_LELR_512K 0x0002 |
Preferred coding is S=8. | |
#define | MULTI_ADV_TX_POWER_MIN_INDEX 0 |
Multi adv tx min power index. | |
#define | MULTI_ADV_TX_POWER_MAX_INDEX 4 |
Multi adv tx max power index. | |
#define | WICED_BT_BLE_MAX_EXT_ADV_DATA_LEN 251 |
ADV extension structures. | |
#define | IS_CONNECTABLE_ADV_REPORT(x) (x & (1 << 0)) |
adv is connectable | |
#define | IS_SCANNABLE_ADV_REPORT(x) (x & (1 << 1)) |
adv is scannable | |
#define | IS_DIRECTED_ADV_REPORT(x) (x & (1 << 2)) |
directed adv | |
#define | IS_SCAN_RSP_ADV_REPORT(x) (x & (1 << 3)) |
scan response | |
#define | IS_LEGACY_ADV_REPORT(x) (x & (1 << 4)) |
legacy adv | |
#define | IS_ADV_REPORT_DATA_STATUS_INCOMPLETE(x) (x & (1 << 5)) |
adv data incomplete, more data to come | |
#define | IS_ADV_REPORT_DATA_STATUS_TRUNCATED(x) (x & (2 << 5)) |
Incomplete, data truncated, no more to come. | |
Typedefs | |
typedef uint8_t | wiced_bt_ble_chnl_map_t [BLE_CHANNEL_MAP_LEN] |
LE Channel Map. | |
typedef uint8_t | wiced_bt_ble_scanner_filter_policy_t |
LE Scanner filter policy. More... | |
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_dev_ble_signature_t [BTM_BLE_AUTH_SIGNATURE_SIZE] |
Device address (see BTM_BLE_AUTH_SIGNATURE_SIZE) | |
typedef uint8_t | wiced_bt_ble_advert_type_t |
LE advertisement data type (see wiced_bt_ble_advert_type_e) | |
typedef uint8_t | wiced_bt_dev_ble_evt_type_t |
Scan result event value (see wiced_bt_dev_ble_evt_type_e) | |
typedef uint8_t | wiced_bt_ble_conn_type_t |
Connection type (see wiced_bt_ble_conn_type_e) | |
typedef uint8_t | wiced_bt_ble_sec_action_type_t |
LE security type. More... | |
typedef uint8_t | wiced_bt_ble_host_phy_preferences_t |
Host preferences on PHY. More... | |
typedef uint16_t | wiced_bt_ble_lelr_phy_preferences_t |
The PHY_options parameter is a bit field that allows the Host to specify options for LE long range PHY. More... | |
typedef int8_t | wiced_bt_ble_adv_tx_power_t |
Transmit Power in dBm ( MULTI_ADV_TX_POWER_MIN_INDEX to MULTI_ADV_TX_POWER_MAX_INDEX ) | |
typedef uint8_t | wiced_bt_ble_multi_advert_type_t |
LE advertisement type (see wiced_bt_ble_multi_advert_type_e) | |
typedef uint8_t | wiced_bt_ble_privacy_mode_t |
LE Privacy mode. More... | |
typedef uint8_t | wiced_bt_ble_multi_advert_filtering_policy_t |
LE advertisement filtering policy (see wiced_bt_ble_multi_advert_filtering_policy_e) | |
typedef wiced_bool_t( | wiced_bt_ble_selective_conn_cback_t )(wiced_bt_device_address_t remote_bda, uint8_t *p_remote_name) |
Callback wiced_bt_ble_selective_conn_cback_t. More... | |
typedef void( | wiced_bt_ble_scan_result_cback_t )(wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data) |
Callback wiced_bt_ble_scan_result_cback_t. More... | |
typedef void( | wiced_bt_ble_read_phy_complete_callback_t )(wiced_bt_ble_phy_update_t *p_phy_result) |
Callback wiced_bt_ble_read_phy_complete_callback_t. More... | |
typedef uint8_t | wiced_bt_ble_ext_adv_phy_t |
LE phy to be used for extended advertisement. | |
typedef uint8_t | wiced_bt_ble_ext_adv_phy_mask_t |
LE phy mask to be used for extended advertisement. | |
typedef uint16_t | wiced_bt_ble_ext_adv_event_property_t |
LE extended advertisement event property. | |
typedef uint8_t | wiced_bt_ble_ext_adv_handle_t |
advertisement set handle value | |
typedef uint8_t | wiced_bt_ble_ext_adv_sid_t |
SID value. | |
typedef uint8_t | wiced_bt_ble_ext_adv_scan_req_notification_setting_t |
Enable or disable notification value (see wiced_bt_ble_ext_adv_scan_req_notification_setting_e) | |
typedef uint16_t | wiced_bt_ble_periodic_adv_prop_t |
Periodic adv property (see wiced_bt_ble_periodic_adv_prop_e) | |
typedef uint8_t | wiced_bt_ble_ext_scan_filter_duplicate_t |
Extended scan duplicate filter policy (see wiced_bt_ble_ext_scan_filter_duplicate_e) | |
typedef uint8_t | wiced_bt_ble_ext_filter_policy_t |
Filter policy used. More... | |
typedef uint8_t | wiced_bt_ble_adv_sync_options_t |
Options used in create periodic sync to periodic adv command (see wiced_bt_ble_adv_sync_options_e) | |
typedef uint16_t | wiced_bt_ble_periodic_adv_sync_handle_t |
Sync_Handle to be used to identify the periodic advertiser. More... | |
typedef uint16_t | wiced_bt_ble_adv_report_event_mask_t |
Bit mask to identify the type of the adv received in extended adv report. More... | |
typedef uint8_t | wiced_bt_ble_ext_adv_report_count_t |
Min and Max reports (see wiced_bt_ble_ext_adv_report_count_e) | |
typedef uint8_t | wiced_bt_ble_advertiser_clock_accuracy_t |
Advertiser clock accuracy (see wiced_bt_ble_advertiser_clock_accuracy_e) | |
typedef wiced_bt_ble_periodic_adv_sync_handle_t | wiced_bt_ble_connection_handle_t |
sync handle and connection handle are same range | |
typedef uint8_t | wiced_bt_ble_channel_sel_algo_t |
LE channel algorithm selection (see wiced_bt_ble_channel_sel_algo_e) | |
typedef void(* | wiced_bt_ble_adv_ext_event_cb_fp_t )(wiced_bt_ble_adv_ext_event_t event, wiced_bt_ble_adv_ext_event_data_t *p_data) |
Callback wiced_bt_ble_adv_ext_event_cb_fp_t. More... | |
This section describes the API's to use LE functionality such as advertisement, scanning LE Connection, Data transfer, LE Security etc.
#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).
typedef void(* wiced_bt_ble_adv_ext_event_cb_fp_t)(wiced_bt_ble_adv_ext_event_t event, wiced_bt_ble_adv_ext_event_data_t *p_data) |
Callback wiced_bt_ble_adv_ext_event_cb_fp_t.
Adv extension command status, command complete event and LE adv extension meta event callback
event | : Event type (see wiced_bt_ble_adv_ext_event_t) |
p_data | : Event data (see wiced_bt_ble_adv_ext_event_data_t) |
typedef uint16_t wiced_bt_ble_adv_report_event_mask_t |
Bit mask to identify the type of the adv received in extended adv report.
(see wiced_bt_ble_ext_adv_report_t) event_type filed
typedef uint8_t wiced_bt_ble_ext_filter_policy_t |
Filter policy used.
typedef uint8_t wiced_bt_ble_host_phy_preferences_t |
Host preferences on PHY.
bit field that indicates the transmitter PHYs that the Host prefers the Controller to use.Bit number 3 -7 reserved for future.
typedef uint16_t wiced_bt_ble_lelr_phy_preferences_t |
The PHY_options parameter is a bit field that allows the Host to specify options for LE long range PHY.
Default connection is with no LE coded PHY.The Controller may override any preferred coding (S2 coded phy for 512k speed and s8 coded phy for 128K) for transmitting on the LE Coded PHY. The Host may specify a preferred coding even if it prefers not to use the LE Coded transmitter PHY since the Controller may override the PHY preference. Bit 2-15 reserved for future use.
typedef uint16_t wiced_bt_ble_periodic_adv_sync_handle_t |
Sync_Handle to be used to identify the periodic advertiser.
Range: 0x0000-0x0EFF
typedef uint8_t wiced_bt_ble_privacy_mode_t |
LE Privacy mode.
Refer wiced_bt_ble_privacy_e
typedef void( wiced_bt_ble_read_phy_complete_callback_t)(wiced_bt_ble_phy_update_t *p_phy_result) |
Callback wiced_bt_ble_read_phy_complete_callback_t.
read phy complete callback (from calling wiced_bt_ble_read_phy)
p_phy_result | : read phys result |
typedef void( wiced_bt_ble_scan_result_cback_t)(wiced_bt_ble_scan_results_t *p_scan_result, uint8_t *p_adv_data) |
Callback wiced_bt_ble_scan_result_cback_t.
Scan result callback (from calling wiced_bt_ble_scan)
p_scan_result | : scan result data (NULL indicates end of scanning) |
p_adv_data | : Advertisement data (parse using wiced_bt_ble_check_advertising_data) |
typedef uint8_t wiced_bt_ble_scanner_filter_policy_t |
LE Scanner filter policy.
Scanner filter policy (see wiced_bt_ble_scanner_filter_policy_e)
typedef uint8_t wiced_bt_ble_sec_action_type_t |
LE security type.
typedef wiced_bool_t( wiced_bt_ble_selective_conn_cback_t)(wiced_bt_device_address_t remote_bda, uint8_t *p_remote_name) |
Callback wiced_bt_ble_selective_conn_cback_t.
Selective connection callback (registered with wiced_bt_ble_set_background_connection_type)
remote_bda | : remote device |
p_remote_name | : remote device name |
anonymous enum |
anonymous enum |
anonymous enum |
Advertising event properties: Describes the type of advertising event that is being configured and its basic properties.
anonymous enum |
anonymous enum |
ADV extension events to the application.
Enumerator | |
---|---|
WICED_BT_BLE_PERIODIC_ADV_SYNC_ESTABLISHED_EVENT |
Sync established to periodic advertiser's periodic advertisement. Event Data : wiced_bt_ble_periodic_adv_sync_established_event_data_t |
WICED_BT_BLE_PERIODIC_ADV_REPORT_EVENT |
Periodic adv report. Event Data: wiced_bt_ble_periodic_adv_report_event_data_t |
WICED_BT_BLE_PERIODIC_ADV_SYNC_LOST_EVENT |
Periodic sync lost event. Event Data: wiced_bt_ble_periodic_adv_sync_handle_t |
WICED_BT_BLE_ADV_SET_TERMINATED_EVENT |
Advertising set terminated becaue either connection being created or adv timeout. Event data: wiced_bt_ble_ext_adv_set_terminated_event_data_t |
WICED_BT_BLE_SCAN_REQUEST_RECEIVED_EVENT |
scan request received event. Event data: wiced_bt_ble_scan_req_received_event_data_t |
WICED_BT_BLE_CHANNEL_SEL_ALGO_EVENT |
LE Channel selected algorithm event. Event Data: wiced_bt_ble_channel_sel_algo_event_data_t |
Options used in create periodic sync to periodic adv command.
Advertising filter policy.
Advertisement data types.
Filter policy used in extended create connection command.
Extended scan duplicate filter policy.
Multi-advertisement Filtering policy.
Multi-advertisement type.
Scanner filter policy.
Scan result event type.