Data Structures | |
struct | le_connection_parameter_range |
Typedefs | |
typedef struct le_connection_parameter_range | le_connection_parameter_range_t |
Functions | |
void | gap_advertisements_enable (int enabled) |
Enable/Disable Advertisements. More... | |
void | gap_advertisements_set_data (uint8_t advertising_data_length, uint8_t *advertising_data) |
Set Advertisement Data. More... | |
void | gap_advertisements_set_params (uint16_t adv_int_min, uint16_t adv_int_max, uint8_t adv_type, uint8_t direct_address_typ, bd_addr_t direct_address, uint8_t channel_map, uint8_t filter_policy) |
Set Advertisement Paramters. More... | |
int | gap_auto_connection_start (bd_addr_type_t address_typ, bd_addr_t address) |
Auto Connection Establishment - Start Connecting to device. More... | |
int | gap_auto_connection_stop (bd_addr_type_t address_typ, bd_addr_t address) |
Auto Connection Establishment - Stop Connecting to device. More... | |
void | gap_auto_connection_stop_all (void) |
Auto Connection Establishment - Stop everything. More... | |
uint8_t | gap_connect (bd_addr_t addr, bd_addr_type_t addr_type) |
Connect to remote LE device. More... | |
uint8_t | gap_connect_cancel (void) |
Cancel connection process initiated by gap_connect. More... | |
void | gap_connectable_control (uint8_t enable) |
Override page scan mode. More... | |
int | gap_dedicated_bonding (bd_addr_t device, int mitm_protection_required) |
Start dedicated bonding with device. More... | |
uint8_t | gap_disconnect (hci_con_handle_t handle) |
Disconnect connection with handle. More... | |
void | gap_discoverable_control (uint8_t enable) |
Allows to control if device is discoverable. More... | |
void | gap_drop_link_key_for_bd_addr (bd_addr_t addr) |
Deletes link key for remote device with baseband address. More... | |
int | gap_get_bondable_mode (void) |
Get bondable mode. More... | |
void | gap_get_connection_parameter_range (le_connection_parameter_range_t *range) |
Set accepted connection parameter range. More... | |
gap_connection_type_t | gap_get_connection_type (hci_con_handle_t connection_handle) |
Get connection type. More... | |
int | gap_inquiry_start (uint8_t duration_in_1280ms_units) |
Start GAP Classic Inquiry. More... | |
int | gap_inquiry_stop (void) |
Stop GAP Classic Inquiry. More... | |
void | gap_le_get_own_address (uint8_t *addr_type, bd_addr_t addr) |
Get own addr type and address used for LE. More... | |
void | gap_local_bd_addr (bd_addr_t address_buffer) |
Gets local address. More... | |
int | gap_mitm_protection_required_for_security_level (gap_security_level_t level) |
int | gap_pin_code_negative (bd_addr_t addr) |
Abort Legacy Pairing. More... | |
int | gap_pin_code_response (bd_addr_t addr, const char *pin) |
Legacy Pairing Pin Code Response. More... | |
gap_random_address_type_t | gap_random_address_get_mode (void) |
Get privacy mode. More... | |
void | gap_random_address_set (bd_addr_t addr) |
Sets a fixed random address for advertising. More... | |
void | gap_random_address_set_mode (gap_random_address_type_t random_address_type) |
Enable privacy by using random addresses. More... | |
void | gap_random_address_set_update_period (int period_ms) |
Sets update period for random address. More... | |
int | gap_remote_name_request (bd_addr_t addr, uint8_t page_scan_repetition_mode, uint16_t clock_offset) |
Remote Name Request. More... | |
int | gap_request_connection_parameter_update (hci_con_handle_t con_handle, uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout) |
Request an update of the connection parameter for a given LE connection. More... | |
void | gap_request_security_level (hci_con_handle_t con_handle, gap_security_level_t level) |
void | gap_scan_response_set_data (uint8_t scan_response_data_length, uint8_t *scan_response_data) |
Set Scan Response Data. More... | |
gap_security_level_t | gap_security_level (hci_con_handle_t con_handle) |
gap_security_level_t | gap_security_level_for_link_key_type (link_key_type_t link_key_type) |
void | gap_set_bondable_mode (int enabled) |
Enable/disable bonding. More... | |
void | gap_set_class_of_device (uint32_t class_of_device) |
Set class of device that will be set during Bluetooth init. More... | |
void | gap_set_connection_parameter_range (le_connection_parameter_range_t *range) |
Get accepted connection parameter range. More... | |
void | gap_set_connection_parameters (uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout, uint16_t min_ce_length, uint16_t max_ce_length) |
Set connection parameters for outgoing connections. More... | |
void | gap_set_extended_inquiry_response (const uint8_t *data) |
Set Extended Inquiry Response data. More... | |
void | gap_set_local_name (const char *local_name) |
Sets local name. More... | |
void | gap_set_scan_parameters (uint8_t scan_type, uint16_t scan_interval, uint16_t scan_window) |
Set parameters for LE Scan. More... | |
int | gap_ssp_confirmation_negative (bd_addr_t addr) |
Abort SSP Numeric Comparison/Pairing. More... | |
int | gap_ssp_confirmation_response (bd_addr_t addr) |
Accept SSP Numeric Comparison. More... | |
int | gap_ssp_passkey_negative (bd_addr_t addr) |
Abort SSP Passkey Entry/Pairing. More... | |
int | gap_ssp_passkey_response (bd_addr_t addr, uint32_t passkey) |
SSP Passkey Response. More... | |
void | gap_ssp_set_authentication_requirement (int authentication_requirement) |
Set Authentication Requirements using during SSP. More... | |
void | gap_ssp_set_auto_accept (int auto_accept) |
If set, BTstack will confirm a numeric comparison and enter '000000' if requested. More... | |
void | gap_ssp_set_enable (int enable) |
Enable will enable SSP during init. More... | |
void | gap_ssp_set_io_capability (int ssp_io_capability) |
Set IO Capability. More... | |
void | gap_start_scan (void) |
Start LE Scan. More... | |
void | gap_stop_scan (void) |
Stop LE Scan. More... | |
void | gap_store_link_key_for_bd_addr (bd_addr_t addr, link_key_t link_key, link_key_type_t type) |
Store link key for remote device with baseband address. More... | |
int | gap_update_connection_parameters (hci_con_handle_t con_handle, uint16_t conn_interval_min, uint16_t conn_interval_max, uint16_t conn_latency, uint16_t supervision_timeout) |
Updates the connection parameters for a given LE connection. More... | |
typedef struct le_connection_parameter_range le_connection_parameter_range_t |
enum gap_security_level_t |
enum gap_security_state |
void gap_advertisements_enable | ( | int | enabled | ) |
Enable/Disable Advertisements.
OFF by default.
enabled |
Referenced by le_counter_setup(), le_prov_adv_start(), and tss_start_advertising().
void gap_advertisements_set_data | ( | uint8_t | advertising_data_length, |
uint8_t * | advertising_data | ||
) |
Set Advertisement Data.
advertising_data_length | |
advertising_data | (max 31 octets) |
Referenced by le_counter_setup(), le_prov_adv_start(), and tss_start_advertising().
void gap_advertisements_set_params | ( | uint16_t | adv_int_min, |
uint16_t | adv_int_max, | ||
uint8_t | adv_type, | ||
uint8_t | direct_address_typ, | ||
bd_addr_t | direct_address, | ||
uint8_t | channel_map, | ||
uint8_t | filter_policy | ||
) |
Set Advertisement Paramters.
adv_int_min | |
adv_int_max | |
adv_type | |
direct_address_type | |
direct_address | |
channel_map | |
filter_policy |
Referenced by le_counter_setup(), le_prov_adv_start(), and tss_start_advertising().
int gap_auto_connection_start | ( | bd_addr_type_t | address_typ, |
bd_addr_t | address | ||
) |
Auto Connection Establishment - Start Connecting to device.
address_typ | |
address |
int gap_auto_connection_stop | ( | bd_addr_type_t | address_typ, |
bd_addr_t | address | ||
) |
Auto Connection Establishment - Stop Connecting to device.
address_typ | |
address |
void gap_auto_connection_stop_all | ( | void | ) |
Auto Connection Establishment - Stop everything.
uint8_t gap_connect | ( | bd_addr_t | addr, |
bd_addr_type_t | addr_type | ||
) |
Connect to remote LE device.
uint8_t gap_connect_cancel | ( | void | ) |
Cancel connection process initiated by gap_connect.
void gap_connectable_control | ( | uint8_t | enable | ) |
Override page scan mode.
Page scan mode enabled by l2cap when services are registered
Referenced by l2cap_init().
int gap_dedicated_bonding | ( | bd_addr_t | device, |
int | mitm_protection_required | ||
) |
Start dedicated bonding with device.
Disconnect after bonding.
device | |
request | MITM protection |
uint8_t gap_disconnect | ( | hci_con_handle_t | handle | ) |
Disconnect connection with handle.
handle |
References hci_connection_for_handle(), hci_emit_disconnection_complete(), hci_run(), SEND_DISCONNECT, and hci_connection_t::state.
void gap_discoverable_control | ( | uint8_t | enable | ) |
Allows to control if device is discoverable.
OFF by default.
void gap_drop_link_key_for_bd_addr | ( | bd_addr_t | addr | ) |
Deletes link key for remote device with baseband address.
addr |
Referenced by event_handler().
int gap_get_bondable_mode | ( | void | ) |
Get bondable mode.
void gap_get_connection_parameter_range | ( | le_connection_parameter_range_t * | range | ) |
Set accepted connection parameter range.
range | Set accepted connection parameter range. |
References hci_stack_t::le_connection_parameter_range.
gap_connection_type_t gap_get_connection_type | ( | hci_con_handle_t | connection_handle | ) |
Get connection type.
con_handle |
References hci_connection_t::address_type, BD_ADDR_TYPE_CLASSIC, BD_ADDR_TYPE_LE_PUBLIC, BD_ADDR_TYPE_LE_RANDOM, BD_ADDR_TYPE_SCO, GAP_CONNECTION_ACL, GAP_CONNECTION_INVALID, GAP_CONNECTION_LE, GAP_CONNECTION_SCO, and hci_connection_for_handle().
Referenced by l2cap_hci_event_handler().
int gap_inquiry_start | ( | uint8_t | duration_in_1280ms_units | ) |
Start GAP Classic Inquiry.
duration | in 1.28s units |
int gap_inquiry_stop | ( | void | ) |
Stop GAP Classic Inquiry.
Stop GAP Classic Inquiry
void gap_le_get_own_address | ( | uint8_t * | addr_type, |
bd_addr_t | addr | ||
) |
Get own addr type and address used for LE.
Referenced by sm_init_setup(), and sm_run().
void gap_local_bd_addr | ( | bd_addr_t | address_buffer | ) |
int gap_mitm_protection_required_for_security_level | ( | gap_security_level_t | level | ) |
Referenced by hci_run().
int gap_pin_code_negative | ( | bd_addr_t | addr | ) |
Abort Legacy Pairing.
addr | |
pin |
int gap_pin_code_response | ( | bd_addr_t | addr, |
const char * | pin | ||
) |
Legacy Pairing Pin Code Response.
addr | |
pin |
gap_random_address_type_t gap_random_address_get_mode | ( | void | ) |
void gap_random_address_set | ( | bd_addr_t | addr | ) |
Sets a fixed random address for advertising.
addr |
References gap_random_address_set_mode(), GAP_RANDOM_ADDRESS_TYPE_STATIC, RAU_SET_ADDRESS, rau_state, RAU_W4_WORKING, sm_random_address, and sm_run().
void gap_random_address_set_mode | ( | gap_random_address_type_t | random_address_type | ) |
Enable privacy by using random addresses.
random_address_type | to use (incl. OFF) |
References gap_random_address_trigger(), gap_random_address_type_requires_updates(), gap_random_address_update_start(), gap_random_address_update_stop(), gap_random_adress_type, hci_le_set_own_address_type(), and own_address_type().
Referenced by gap_random_address_set().
void gap_random_address_set_update_period | ( | int | period_ms | ) |
Sets update period for random address.
period_ms | in ms |
References gap_random_address_type_requires_updates(), gap_random_address_update_start(), gap_random_address_update_stop(), and gap_random_adress_update_period.
int gap_remote_name_request | ( | bd_addr_t | addr, |
uint8_t | page_scan_repetition_mode, | ||
uint16_t | clock_offset | ||
) |
Remote Name Request.
addr | |
page_scan_repetition_mode | |
clock_offset | only used when bit 15 is set - pass 0 if not known : HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE |
int gap_request_connection_parameter_update | ( | hci_con_handle_t | con_handle, |
uint16_t | conn_interval_min, | ||
uint16_t | conn_interval_max, | ||
uint16_t | conn_latency, | ||
uint16_t | supervision_timeout | ||
) |
Request an update of the connection parameter for a given LE connection.
handle | |
conn_interval_min | (unit: 1.25ms) |
conn_interval_max | (unit: 1.25ms) |
conn_latency | |
supervision_timeout | (unit: 10ms) |
void gap_request_security_level | ( | hci_con_handle_t | con_handle, |
gap_security_level_t | level | ||
) |
void gap_scan_response_set_data | ( | uint8_t | scan_response_data_length, |
uint8_t * | scan_response_data | ||
) |
Set Scan Response Data.
advertising_data_length | |
advertising_data | (max 31 octets) |
Referenced by le_prov_adv_start().
gap_security_level_t gap_security_level | ( | hci_con_handle_t | con_handle | ) |
gap_security_level_t gap_security_level_for_link_key_type | ( | link_key_type_t | link_key_type | ) |
Referenced by event_handler(), and hci_run().
void gap_set_bondable_mode | ( | int | enabled | ) |
Enable/disable bonding.
Default is enabled.
enabled |
void gap_set_class_of_device | ( | uint32_t | class_of_device | ) |
Set class of device that will be set during Bluetooth init.
void gap_set_connection_parameter_range | ( | le_connection_parameter_range_t * | range | ) |
Get accepted connection parameter range.
range | Get accepted connection parameter range. |
References hci_stack_t::le_connection_parameter_range.
void gap_set_connection_parameters | ( | uint16_t | conn_interval_min, |
uint16_t | conn_interval_max, | ||
uint16_t | conn_latency, | ||
uint16_t | supervision_timeout, | ||
uint16_t | min_ce_length, | ||
uint16_t | max_ce_length | ||
) |
Set connection parameters for outgoing connections.
conn_interval_min | (unit: 1.25ms), default: 10 ms |
conn_interval_max | (unit: 1.25ms), default: 30 ms |
conn_latency,default,: | 4 |
supervision_timeout | (unit: 10ms), default: 720 ms |
min_ce_length | (unit: 0.625ms), default: 10 ms |
max_ce_length | (unit: 0.625ms), default: 30 ms |
void gap_set_extended_inquiry_response | ( | const uint8_t * | data | ) |
Set Extended Inquiry Response data.
eir_data | size 240 bytes, is not copied make sure memory is accessible during stack startup |
void gap_set_local_name | ( | const char * | local_name | ) |
Sets local name.
name | is not copied, make sure memory is accessible during stack startup |
References hci_stack_t::local_name.
void gap_set_scan_parameters | ( | uint8_t | scan_type, |
uint16_t | scan_interval, | ||
uint16_t | scan_window | ||
) |
Set parameters for LE Scan.
int gap_ssp_confirmation_negative | ( | bd_addr_t | addr | ) |
Abort SSP Numeric Comparison/Pairing.
addr | |
pin |
int gap_ssp_confirmation_response | ( | bd_addr_t | addr | ) |
Accept SSP Numeric Comparison.
addr | |
passkey |
int gap_ssp_passkey_negative | ( | bd_addr_t | addr | ) |
Abort SSP Passkey Entry/Pairing.
addr | |
pin |
int gap_ssp_passkey_response | ( | bd_addr_t | addr, |
uint32_t | passkey | ||
) |
SSP Passkey Response.
addr | |
passkey | [0..999999] |
void gap_ssp_set_authentication_requirement | ( | int | authentication_requirement | ) |
Set Authentication Requirements using during SSP.
void gap_ssp_set_auto_accept | ( | int | auto_accept | ) |
If set, BTstack will confirm a numeric comparison and enter '000000' if requested.
void gap_ssp_set_enable | ( | int | enable | ) |
Enable will enable SSP during init.
void gap_ssp_set_io_capability | ( | int | ssp_io_capability | ) |
Set IO Capability.
BTstack will return capability to SSP requests
void gap_start_scan | ( | void | ) |
Start LE Scan.
void gap_stop_scan | ( | void | ) |
Stop LE Scan.
void gap_store_link_key_for_bd_addr | ( | bd_addr_t | addr, |
link_key_t | link_key, | ||
link_key_type_t | type | ||
) |
Store link key for remote device with baseband address.
addr | |
link_key | |
link_key_type |
Referenced by event_handler().
int gap_update_connection_parameters | ( | hci_con_handle_t | con_handle, |
uint16_t | conn_interval_min, | ||
uint16_t | conn_interval_max, | ||
uint16_t | conn_latency, | ||
uint16_t | supervision_timeout | ||
) |
Updates the connection parameters for a given LE connection.
handle | |
conn_interval_min | (unit: 1.25ms) |
conn_interval_max | (unit: 1.25ms) |
conn_latency | |
supervision_timeout | (unit: 10ms) |