MT2523 API Reference  LinkIt SDK v4
bt_gap_le.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2017 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __BT_GAP_LE_H__
36 #define __BT_GAP_LE_H__
37 
198 #include "bt_type.h"
199 #include "bt_system.h"
200 #include "bt_hci.h"
201 
202 BT_EXTERN_C_BEGIN
203 
209 #define BT_GAP_LE_SMP_DISPLAY_ONLY 0x00
211 #define BT_GAP_LE_SMP_DISPLAY_YES_NO 0x01
214 #define BT_GAP_LE_SMP_KEYBOARD_ONLY 0x02
216 #define BT_GAP_LE_SMP_NO_INPUT_NO_OUTPUT 0x03
218 #define BT_GAP_LE_SMP_KEYBOARD_DISPLAY 0x04
220 #define BT_GAP_LE_SMP_IO_CAPABILITY_NUM 0x05
221 typedef uint8_t bt_gap_le_smp_io_capability_t;
223 #define BT_GAP_LE_SMP_OOB_DATA_NOT_PRESENTED 0x00
224 #define BT_GAP_LE_SMP_OOB_DATA_PRESENTED 0x01
225 typedef uint8_t bt_gap_le_smp_oob_data_flag_t;
227 #define BT_GAP_LE_SMP_AUTH_REQ_NO_BONDING 0x00
228 #define BT_GAP_LE_SMP_AUTH_REQ_BONDING (0x01 << 0)
229 #define BT_GAP_LE_SMP_AUTH_REQ_MITM (0x01 << 2)
230 #define BT_GAP_LE_SMP_AUTH_REQ_SECURE_CONNECTION (0x01 << 3)
231 typedef uint8_t bt_gap_le_smp_auth_req_t;
233 #define BT_GAP_LE_SMP_KEY_DISTRIBUTE_ENCKEY (0x01 << 0)
234 #define BT_GAP_LE_SMP_KEY_DISTRIBUTE_IDKEY (0x01 << 1)
235 #define BT_GAP_LE_SMP_KEY_DISTRIBUTE_SIGN (0x01 << 2)
236 typedef uint8_t bt_gap_le_smp_key_distribute_t;
238 #define BT_GAP_LE_SMP_JUST_WORKS_MASK (0x1 << 0)
239 #define BT_GAP_LE_SMP_AUTHENTICATION_MASK BT_GAP_LE_SECURITY_AUTHENTICATION_MASK
240 #define BT_GAP_LE_SMP_PASSKEY_INPUT_MASK (0x1 << 2)
241 #define BT_GAP_LE_SMP_PASSKEY_DISPLAY_MASK (0x1 << 3)
242 #define BT_GAP_LE_SMP_LESC_MASK BT_GAP_LE_SECURITY_LESC_MASK
243 #define BT_GAP_LE_SMP_PASSKEY_MASK (0x1 << 5)
244 #define BT_GAP_LE_SMP_OOB_MASK (0x1 << 6)
245 #define BT_GAP_LE_SMP_NUMERIC_COMPARISON_MASK (0x1 << 7)
247 #define BT_GAP_LE_SMP_JUST_WORKS BT_GAP_LE_SMP_JUST_WORKS_MASK
248 #define BT_GAP_LE_SMP_PASSKEY_INPUT (BT_GAP_LE_SMP_PASSKEY_MASK | BT_GAP_LE_SMP_PASSKEY_INPUT_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK)
249 #define BT_GAP_LE_SMP_PASSKEY_DISPLAY (BT_GAP_LE_SMP_PASSKEY_MASK | BT_GAP_LE_SMP_PASSKEY_DISPLAY_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK)
250 #define BT_GAP_LE_SMP_OOB (BT_GAP_LE_SMP_OOB_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK)
252 #define BT_GAP_LE_SMP_LESC_JUST_WORKS (BT_GAP_LE_SMP_JUST_WORKS_MASK | BT_GAP_LE_SMP_LESC_MASK)
253 #define BT_GAP_LE_SMP_LESC_PASSKEY_INPUT (BT_GAP_LE_SMP_PASSKEY_MASK | BT_GAP_LE_SMP_PASSKEY_INPUT_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK | BT_GAP_LE_SMP_LESC_MASK)
254 #define BT_GAP_LE_SMP_LESC_PASSKEY_DISPLAY (BT_GAP_LE_SMP_PASSKEY_MASK | BT_GAP_LE_SMP_PASSKEY_DISPLAY_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK | BT_GAP_LE_SMP_LESC_MASK)
255 #define BT_GAP_LE_SMP_LESC_OOB (BT_GAP_LE_SMP_OOB_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK | BT_GAP_LE_SMP_LESC_MASK)
256 #define BT_GAP_LE_SMP_LESC_NUMERIC_COMPARISON (BT_GAP_LE_SMP_NUMERIC_COMPARISON_MASK | BT_GAP_LE_SMP_AUTHENTICATION_MASK | BT_GAP_LE_SMP_LESC_MASK)
257 typedef uint8_t bt_gap_le_smp_pairing_method_t;
260 #define BT_GAP_LE_SET_RANDOM_ADDRESS_CNF (BT_MODULE_GAP | 0x0003)
261 #define BT_GAP_LE_SET_WHITE_LIST_CNF (BT_MODULE_GAP | 0x0004)
262 #define BT_GAP_LE_SET_ADVERTISING_IND (BT_MODULE_GAP | 0x0005)
263 #define BT_GAP_LE_SET_ADVERTISING_CNF (BT_MODULE_GAP | 0x0006)
264 #define BT_GAP_LE_SET_SCAN_CNF (BT_MODULE_GAP | 0x0007)
265 #define BT_GAP_LE_ADVERTISING_REPORT_IND (BT_MODULE_GAP | 0x0008)
266 #define BT_GAP_LE_CONNECT_CNF (BT_MODULE_GAP | 0x0009)
267 #define BT_GAP_LE_CONNECT_IND (BT_MODULE_GAP | 0x000a)
268 #define BT_GAP_LE_CONNECT_CANCEL_CNF (BT_MODULE_GAP | 0x000b)
269 #define BT_GAP_LE_DISCONNECT_CNF (BT_MODULE_GAP | 0x000c)
270 #define BT_GAP_LE_DISCONNECT_IND (BT_MODULE_GAP | 0x000d)
271 #define BT_GAP_LE_CONNECTION_UPDATE_CNF (BT_MODULE_GAP | 0x000e)
272 #define BT_GAP_LE_CONNECTION_UPDATE_IND (BT_MODULE_GAP | 0x000f)
273 #define BT_GAP_LE_READ_RSSI_CNF (BT_MODULE_GAP | 0x0011)
274 #define BT_GAP_LE_UPDATE_DATA_LENGTH_CNF (BT_MODULE_GAP | 0x0012)
275 #define BT_GAP_LE_BONDING_REPLY_REQ_IND (BT_MODULE_GAP | 0x0015)
276 #define BT_GAP_LE_BONDING_COMPLETE_IND (BT_MODULE_GAP | 0x0016)
277 #define BT_GAP_LE_SET_RESOLVING_LIST_CNF (BT_MODULE_GAP | 0x0017)
278 #define BT_GAP_LE_SET_ADDRESS_RESOLUTION_ENABLE_CNF (BT_MODULE_GAP | 0x0018)
279 #define BT_GAP_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT_CNF (BT_MODULE_GAP | 0x0019)
280 #define BT_GAP_LE_SET_TX_POWER_CNF (BT_MODULE_GAP | 0x0020)
281 #ifdef __BT_MULTI_ADV__
282 #define BT_GAP_LE_START_MULTIPLE_ADVERTISING_CNF (BT_MODULE_GAP | 0x0021)
283 #define BT_GAP_LE_STOP_MULTIPLE_ADVERTISING_CNF (BT_MODULE_GAP | 0x0022)
284 #endif
285 #ifdef BT_BQB
286 #define BT_GAP_LE_BQB_DISCONNECT_REQ_IND (BT_MODULE_GAP | 0xFFFF)
287 #endif
288 
292 #define BT_GAP_LE_ADV_REPORT_EVT_TYPE_ADV_IND 0x00
293 #define BT_GAP_LE_ADV_REPORT_EVT_TYPE_ADV_DIRECT_IND 0x01
294 #define BT_GAP_LE_ADV_REPORT_EVT_TYPE_ADV_SCAN_IND 0x02
295 #define BT_GAP_LE_ADV_REPORT_EVT_TYPE_ADV_NONCONN_IND 0x03
296 #define BT_GAP_LE_ADV_REPORT_EVT_TYPE_ADV_SCAN_RSP 0x04
297 typedef uint8_t bt_gap_le_adv_report_evt_type_t;
302 #define BT_GAP_LE_AD_TYPE_FLAG 0x01
303 #define BT_GAP_LE_AD_TYPE_16_BIT_UUID_PART 0x02
304 #define BT_GAP_LE_AD_TYPE_16_BIT_UUID_COMPLETE 0x03
305 #define BT_GAP_LE_AD_TYPE_32_BIT_UUID_PART 0x04
306 #define BT_GAP_LE_AD_TYPE_32_BIT_UUID_COMPLETE 0x05
307 #define BT_GAP_LE_AD_TYPE_128_BIT_UUID_PART 0x06
308 #define BT_GAP_LE_AD_TYPE_128_BIT_UUID_COMPLETE 0x07
309 #define BT_GAP_LE_AD_TYPE_NAME_SHORT 0x08
310 #define BT_GAP_LE_AD_TYPE_NAME_COMPLETE 0x09
311 #define BT_GAP_LE_AD_TYPE_TX_POWER 0x0A
312 #define BT_GAP_LE_AD_TYPE_COD 0x0D
313 #define BT_GAP_LE_AD_TYPE_SM_TK 0x10
314 #define BT_GAP_LE_AD_TYPE_SM_OOB_FLAG 0x11
315 #define BT_GAP_LE_AD_TYPE_SLAVE_CONNECTION_INTERVAL_RANGE 0x12
316 #define BT_GAP_LE_AD_TYPE_16_BIT_SOLICITATION_UUID 0x14
317 #define BT_GAP_LE_AD_TYPE_128_BIT_SOLICITATION_UUID 0x15
318 #define BT_GAP_LE_AD_TYPE_SERVICE_DATA 0x16
319 #define BT_GAP_LE_AD_TYPE_16_BIT_UUID_DATA 0x16
320 #define BT_GAP_LE_AD_TYPE_PUBLIC_TARGET_ADDRESS 0x17
321 #define BT_GAP_LE_AD_TYPE_RANDOM_TARGET_ADDRESS 0x18
322 #define BT_GAP_LE_AD_TYPE_APPEARANCE 0x19
323 #define BT_GAP_LE_AD_TYPE_ADV_INTERVAL 0x1A
324 #define BT_GAP_LE_AD_TYPE_LE_BT_DEVICE_ADDRESS 0x1B
325 #define BT_GAP_LE_AD_TYPE_LE_ROLE 0x1C
326 #define BT_GAP_LE_AD_TYPE_32_BIT_SOLICITATION_UUID 0x1F
327 #define BT_GAP_LE_AD_TYPE_32_BIT_UUID_DATA 0x20
328 #define BT_GAP_LE_AD_TYPE_128_BIT_UUID_DATA 0x21
329 #define BT_GAP_LE_AD_TYPE_MANUFACTURER_SPECIFIC 0xFF
331 #define BT_GAP_LE_AD_FLAG_LIMITED_DISCOVERABLE (0x01 << 0)
332 #define BT_GAP_LE_AD_FLAG_GENERAL_DISCOVERABLE (0x01 << 1)
333 #define BT_GAP_LE_AD_FLAG_BR_EDR_NOT_SUPPORTED (0x01 << 2)
335 #define BT_GAP_LE_DIRECT_ADDR_TYPE_INVALID 0
337 #define BT_GAP_LE_SECURITY_UNAUTH_MASK 0x0
338 #define BT_GAP_LE_SECURITY_AUTHORIZATION_MASK (0x1 << 0)
339 #define BT_GAP_LE_SECURITY_AUTHENTICATION_MASK (0x1 << 1)
340 #define BT_GAP_LE_SECURITY_ENCRYPTION_MASK (0x1 << 2)
341 #define BT_GAP_LE_SECURITY_SIGN_MASK (0x1 << 3)
342 #define BT_GAP_LE_SECURITY_LESC_MASK (0x1 << 4)
343 #define BT_GAP_LE_SECURITY_BONDED_MASK (0x1 << 5)
344 typedef uint8_t bt_gap_le_security_mode_t;
346 #define BT_GAP_LE_CLEAR_WHITE_LIST 0x2010
347 #define BT_GAP_LE_ADD_TO_WHITE_LIST 0x2011
348 #define BT_GAP_LE_REMOVE_FROM_WHITE_LIST 0x2012
349 typedef uint32_t bt_gap_le_set_white_list_op_t;
354 #define BT_GAP_LE_SECURITY_MODE1_1 (BT_GAP_LE_SECURITY_UNAUTH_MASK)
355 #define BT_GAP_LE_SECURITY_MODE1_2 (BT_GAP_LE_SECURITY_UNAUTH_MASK | BT_GAP_LE_SECURITY_ENCRYPTION_MASK)
356 #define BT_GAP_LE_SECURITY_MODE1_3 (BT_GAP_LE_SECURITY_AUTHENTICATION_MASK | BT_GAP_LE_SECURITY_ENCRYPTION_MASK)
357 #define BT_GAP_LE_SECURITY_MODE1_4 (BT_GAP_LE_SECURITY_LESC_MASK | BT_GAP_LE_SECURITY_AUTHENTICATION_MASK | BT_GAP_LE_SECURITY_ENCRYPTION_MASK)
358 #define BT_GAP_LE_SECURITY_MODE2_1 (BT_GAP_LE_SECURITY_UNAUTH_MASK | BT_GAP_LE_SECURITY_SIGN_MASK)
359 #define BT_GAP_LE_SECURITY_MODE2_2 (BT_GAP_LE_SECURITY_AUTHENTICATION_MASK | BT_GAP_LE_SECURITY_SIGN_MASK)
373 BT_PACKED (
374 typedef struct {
375  bt_gap_le_smp_io_capability_t io_capability;
376  bt_gap_le_smp_oob_data_flag_t oob_data_flag;
377  bt_gap_le_smp_auth_req_t auth_req;
378  uint8_t maximum_encryption_key_size;
379  bt_gap_le_smp_key_distribute_t initiator_key_distribution;
380  bt_gap_le_smp_key_distribute_t responder_key_distribution;
382 
386 BT_PACKED (
387 typedef struct {
388  bt_key_t ltk;
390 
394 BT_PACKED (
395 typedef struct {
396  uint16_t ediv;
397  uint8_t rand[8];
399 
403 BT_PACKED (
404 typedef struct {
405  bt_key_t irk;
407 
411 BT_PACKED (
412 typedef struct {
413  bt_addr_t address;
415 
419 BT_PACKED (
420 typedef struct {
421  bt_key_t csrk;
423 
427 BT_PACKED (
428 typedef struct {
429  bt_gap_le_encryption_info_t encryption_info;
431  bt_gap_le_identity_info_t identity_info;
432  bt_gap_le_signing_info_t signing_info;
434 
438 BT_PACKED (
439 typedef struct {
440  bt_gap_le_local_key_t local_key;
441  bt_gap_le_encryption_info_t encryption_info;
443  bt_gap_le_identity_info_t identity_info;
444  bt_gap_le_identity_address_info_t identity_addr;
445  bt_gap_le_signing_info_t signing_info;
446  uint32_t sign_counter;
447  uint32_t gattc_sign_counter;
448  bt_gap_le_security_mode_t key_security_mode;
449  uint8_t key_size;
451 
452 typedef void bt_gap_le_set_advertising_cnf_t;
458 typedef struct {
459  bt_gap_le_local_key_t *local_key_req;
460  bool sc_only_mode_req;
462 
466 typedef struct {
467  const bt_addr_t remote_addr;
468  bt_gap_le_bonding_info_t *bonding_info_req;
470 
476 BT_PACKED(
477 typedef struct {
478  bt_handle_t connection_handle;
479  bt_role_t role;
480  bt_addr_t peer_addr;
481  bt_bd_addr_t local_resolvable_private_address;
483  bt_bd_addr_t peer_resolvable_private_address;
485  uint16_t conn_interval;
486  uint16_t conn_latency;
487  uint16_t supervision_timeout;
488  uint8_t master_clock_accuracy;
489  bt_addr_t local_addr;
491 
495 typedef struct {
496  uint16_t interval_min;
497  uint16_t interval_max;
498  uint16_t slave_latency;
499  uint16_t timeout_multiplier;
508 typedef struct {
509  bt_handle_t conn_handle;
510  uint16_t conn_interval;
511  uint16_t conn_latency;
512  uint16_t supervision_timeout;
520 typedef struct {
521  const bt_handle_t handle;
522  const uint16_t is_previously_bonded;
523  bt_gap_le_smp_pairing_config_t pairing_config_req;
525 
529 typedef struct {
530  bt_handle_t handle;
532 
533 #ifdef __BT_MULTI_ADV__
534 
537 typedef struct {
538  uint8_t instance;
539 } bt_gap_le_start_multiple_advertising_cnf_t;
540 
541 typedef bt_gap_le_start_multiple_advertising_cnf_t bt_gap_le_stop_multiple_advertising_cnf_t;
542 #endif
543 
547 typedef struct {
548  bt_handle_t handle;
550  uint32_t passkey_display: 20;
552 
556 typedef struct {
557  union {
558  bt_key_t oob_data;
559  uint32_t passkey: 20;
560  bool nc_value_matched;
561  };
563 
571 BT_PACKED (
572 typedef struct {
574  bt_addr_t address;
575  bt_addr_t direct_address;
576  int8_t rssi;
577  uint8_t data_length;
578  uint8_t data[0x1F];
580 
584 typedef struct {
585  bt_handle_t connection_handle;
586  bt_role_t role;
587  bt_addr_t peer_addr;
588  bt_addr_t local_resolvable_private_address;
590  bt_addr_t peer_resolvable_private_address;
592  bt_addr_t local_addr;
606 
612 
620 
631 
644 
651 
658 
676 
687 
695 
702 
711 
721 
737 bt_status_t bt_gap_le_bond(uint32_t handle, bt_gap_le_smp_pairing_config_t const *const pairing_config);
738 
747 bt_status_t bt_gap_le_bonding_reply(uint32_t handle, bt_gap_le_bonding_reply_t const *const rsp);
748 
755 
762 
769 
775 
781 
788 
796 
804 
805 #ifdef __BT_MULTI_ADV__
806 
815 bt_status_t bt_gap_le_stop_multiple_advertising(uint8_t instance);
816 
833 bt_status_t bt_gap_le_start_multiple_advertising(
834  uint8_t instance,
835  int8_t tx_power,
836  bt_bd_addr_ptr_t address,
840 
846 uint8_t bt_gap_le_get_max_multiple_advertising_instances(void);
847 #endif
848 BT_EXTERN_C_END
849 
856 #endif
857 
bt_status_t bt_gap_le_set_address_resolution_enable(bool enable)
This function enables or disables the address resolution.
bt_status_t bt_gap_le_read_rssi(const bt_hci_cmd_read_rssi_t *handle)
This function reads the RSSI value of the specific connection.
uint32_t bt_gap_le_set_resolving_list_op_t
Operation type of the set resolving list.
Definition: bt_hci.h:224
For more information about the pairing configuration, please refer to the Bluetooth core specificatio...
Definition: bt_gap_le.h:387
LE set transmit power command.
Definition: bt_hci.h:398
LE set scan enable command.
Definition: bt_hci.h:329
Indication to request bonding information.
Definition: bt_gap_le.h:472
LE set scan response data command.
Definition: bt_hci.h:300
void bt_gap_le_set_advertising_cnf_t
Advertising confirmation.
Definition: bt_gap_le.h:458
LE set advertising parameters command.
Definition: bt_hci.h:282
bt_status_t bt_gap_le_set_tx_power(const bt_hci_cmd_le_set_tx_power_t *param)
This function sets the radio transmission power for a given connection.
Bond reply.
Definition: bt_gap_le.h:562
bt_status_t bt_gap_le_update_data_length(const bt_hci_cmd_le_set_data_length_t *param)
This function updates the data length used for a given connection.
LE local key information.
Definition: bt_gap_le.h:439
Disconnect command.
Definition: bt_hci.h:243
uint16_t bt_handle_t
Define the connection handle type.
Definition: bt_type.h:85
This structure defines the associated parameter type in the callback for BT_GAP_LE_CONNECT_IND event...
Definition: bt_gap_le.h:496
bt_gap_le_local_config_req_ind_t * bt_gap_le_get_local_config(void)
This is a user-defined API that returns the local configuration.
Bonding information.
Definition: bt_gap_le.h:395
Received connection update parameters from the remote device.
Definition: bt_gap_le.h:501
Disconnect complete event information.
Definition: bt_hci.h:461
uint8_t const * bt_bd_addr_ptr_t
A pointer to the bt_bd_addr_t.
Definition: bt_type.h:181
bt_status_t bt_gap_le_bonding_reply(uint32_t handle, bt_gap_le_bonding_reply_t const *const rsp)
This function replies to the BT_GAP_LE_BONDING_REPLY_REQ_IND message.
bt_status_t bt_gap_le_set_advertising(const bt_hci_cmd_le_set_advertising_enable_t *enable, const bt_hci_cmd_le_set_advertising_parameters_t *param, const bt_hci_cmd_le_set_advertising_data_t *data, const bt_hci_cmd_le_set_scan_response_data_t *scan_rsp)
This function sets the advertising.
uint8_t bt_role_t
Define the role type.
Definition: bt_type.h:98
This structure defines the associated parameter type in the callback for BT_GAP_LE_BONDING_REPLY_REQ_...
Definition: bt_gap_le.h:553
uint8_t bt_gap_le_smp_oob_data_flag_t
Indicates if the Out-of-Band data is received or not.
Definition: bt_gap_le.h:231
LE set advertising enable command.
Definition: bt_hci.h:308
bt_status_t bt_gap_le_get_connection_information(bt_handle_t conn_handle, bt_gap_le_connection_information_t *conn_info)
This function gets the connection information according to the connection handle. ...
Indication to request the local configuration.
Definition: bt_gap_le.h:464
bt_status_t bt_gap_le_connect(const bt_hci_cmd_le_create_connection_t *param)
This function creates the link layer connection.
This structure defines the detail information about le connection.
Definition: bt_gap_le.h:590
bool bt_gap_le_is_connection_update_request_accepted(bt_handle_t handle, bt_gap_le_connection_update_param_t *connection_parameter)
This is a user-defined API that returns whether to accept connection parameter update request...
uint8_t bt_gap_le_smp_pairing_method_t
The final pairing method.
Definition: bt_gap_le.h:263
bt_status_t bt_gap_le_set_resolving_list(bt_gap_le_set_resolving_list_op_t op, const void *device)
This function adds, removes or clears a device from the resolving list.
bt_gap_le_local_key_t * bt_gap_le_get_local_key(void)
This is a user-defined API that returns the special and new local keys.
uint8_t bt_gap_le_adv_report_evt_type_t
The type of advertising report event.
Definition: bt_gap_le.h:303
bt_status_t bt_gap_le_cancel_connection(void)
This function cancels the link layer connection.
This structure defines the associated parameter type in the callback for BT_GAP_LE_CONNECTION_UPDATE_...
Definition: bt_gap_le.h:514
Signing information.
Definition: bt_gap_le.h:428
uint8_t bt_gap_le_smp_io_capability_t
Device I/O capability.
Definition: bt_gap_le.h:227
bt_status_t bt_gap_le_set_scan(const bt_hci_cmd_le_set_scan_enable_t *enable, const bt_hci_cmd_le_set_scan_parameters_t *param)
This function sets the scan.
LE set scan parameters command.
Definition: bt_hci.h:320
bt_gap_le_bonding_info_t * bt_gap_le_get_bonding_info(const bt_addr_t remote_addr)
This is a user-defined API that returns the bonding information.
Identity address information.
Definition: bt_gap_le.h:420
LE create connection command.
Definition: bt_hci.h:347
bt_status_t bt_gap_le_disconnect(const bt_hci_cmd_disconnect_t *param)
This function disconnects the link layer connection.
uint32_t bt_gap_le_set_white_list_op_t
The operation type to the white list.
Definition: bt_gap_le.h:355
bt_status_t bt_gap_le_get_pairing_config(bt_gap_le_bonding_start_ind_t *ind)
This is a user-defined API that gets the pairing configuration.
This structure defines the associated parameter type in the callback for BT_GAP_LE_ADVERTISING_REPORT...
Definition: bt_gap_le.h:585
Bonding start indication.
Definition: bt_gap_le.h:526
uint8_t bt_gap_le_smp_key_distribute_t
The key to distribute.
Definition: bt_gap_le.h:242
uint8_t bt_bd_addr_t[6]
Address type, defined in Bluetooth core specification version 4.2.
Definition: bt_type.h:180
Identity information.
Definition: bt_gap_le.h:412
bt_status_t bt_gap_le_bond(uint32_t handle, bt_gap_le_smp_pairing_config_t const *const pairing_config)
This function starts the pairing procedure.
int32_t bt_status_t
Define the status type, returned from the APIs, and defined as BT_STATUS_XXX.
Definition: bt_type.h:173
uint8_t bt_gap_le_smp_auth_req_t
Authentication requirement.
Definition: bt_gap_le.h:237
bt_status_t bt_gap_le_set_resolvable_private_address_timeout(uint32_t timeout)
This function sets the resolvable private address timeout value.
bt_hci_evt_disconnect_complete_t bt_gap_le_disconnect_ind_t
This structure defines the associated parameter type in the callback for BT_GAP_LE_DISCONNECT_IND eve...
Definition: bt_gap_le.h:521
LE bonding information structure.
Definition: bt_gap_le.h:456
This structure defines the Bluetooth address.
Definition: bt_type.h:215
This structure defines the associated parameter type in the callback for BT_GAP_LE_BONDING_COMPLETE_I...
Definition: bt_gap_le.h:535
bt_status_t bt_gap_le_set_white_list(bt_gap_le_set_white_list_op_t op, const bt_addr_t *address)
This function adds, removes or clears a device from the white list.
Master identification.
Definition: bt_gap_le.h:404
uint8_t bt_gap_le_security_mode_t
The security mode of the device.
Definition: bt_gap_le.h:350
uint8_t bt_key_t[16]
Define the SM key type.
Definition: bt_type.h:91
bt_status_t bt_gap_le_set_random_address(bt_bd_addr_ptr_t random_addr)
This function sets a random address.
bt_bd_addr_ptr_t bt_gap_le_get_random_address(void)
This function gets the random address.
bt_status_t bt_gap_le_update_connection_parameter(const bt_hci_cmd_le_connection_update_t *param)
This function updates the connection parameter.
LE set data length command.
Definition: bt_hci.h:389
For more information on the status parameters, please refer to Bluetooth core specification version 4...
Definition: bt_hci.h:268
LE connection update command.
Definition: bt_hci.h:374
LE set advertising data command.
Definition: bt_hci.h:291