思澈科技软件开发工具包  2.20
GAP Interface

Generic Access Profile defines the device discovery , link management and related security procedures. More...

Data Structures

struct  ble_gap_addr_t
 BD address structure. More...
 
struct  ble_gap_ral_dev_info_t
 Resolving list device information. More...
 
struct  ble_gap_white_list_t
 White list structure. More...
 
struct  ble_gap_resolving_list_t
 The struture of set resolving list request. More...
 
struct  ble_gap_ral_addr_t
 
struct  ble_gap_sec_key_t
 The struture of security key. More...
 
struct  ble_gap_rand_nb_t
 The struture of random number. More...
 
struct  ble_gap_ltk_t
 Long Term Key information. More...
 
struct  ble_gap_irk_t
 Identity Resolving Key information. More...
 
struct  ble_gap_oob_t
 Out of Band Information. More...
 
struct  ble_gap_nc_t
 The struture of number comparison data. More...
 
struct  ble_gap_dev_name_t
 The struture of set local device name request. More...
 
struct  ble_gap_slave_prf_param_t
 The struture of set slave preference parameter request. More...
 
struct  gapm_adv_prim_cfg_t
 Configuration for advertising on primary channel. More...
 
struct  gapm_adv_second_cfg_t
 Configuration for advertising on secondary channel. More...
 
struct  ble_gap_adv_parameter_t
 The struture of advertising parmeter. More...
 
struct  ble_gap_adv_data_t
 The struture of advertising data and scan response data. More...
 
struct  ble_gap_adv_start_t
 The struture of advertising start parameter. More...
 
struct  ble_gap_adv_stop_t
 The struture of advertising stop parameter. More...
 
struct  ble_gap_adv_delete_t
 The struture of advertising delete parameter. More...
 
struct  ble_gap_scan_param_t
 The struture of scan window parameter. More...
 
struct  ble_gap_scan_start_t
 The struture of scan start parameter. More...
 
struct  ble_gap_scan_stop_t
 The struture of scan stop parameter. More...
 
struct  ble_gap_conn_param_t
 The struture of connection parameter. More...
 
struct  ble_gap_connection_create_param_t
 The struture of create connection parameter. More...
 
struct  ble_gap_connection_response_t
 
struct  ble_gap_disconnect_t
 The structure of disconnect request. More...
 
struct  ble_gap_get_remote_version_t
 The structure of get remote version request. More...
 
struct  bt_gap_get_remote_feature_t
 The structure of get remote feature request. More...
 
struct  ble_gap_get_rssi_t
 The structure of get RSSI request. More...
 
struct  ble_gap_get_phy_t
 The structure of get remote physical request. More...
 
struct  ble_gap_update_conn_param_t
 The structure of update connection parameter request. More...
 
struct  ble_gap_pairing_t
 The structure of pair information. More...
 
struct  ble_gap_bond_t
 The structure of bond request. More...
 
union  ble_gap_bond_cfm_data_t
 
struct  ble_gap_bond_confirm_t
 The structure of bond confirm. More...
 
struct  ble_gap_encrypt_confirm_t
 The structure of bond confirm. More...
 
struct  ble_gap_sec_req_t
 The structure of security request. More...
 
struct  ble_gap_update_phy_t
 
struct  ble_gap_update_data_len_t
 
struct  ble_gap_resolve_address_t
 
struct  ble_gap_local_version_ind_t
 Event. More...
 
struct  ble_gap_dev_bdaddr_ind_t
 Local device BD Address indication event. The structure of BLE_GAP_LOCAL_BD_ADDR_IND. More...
 
struct  ble_gap_dev_adv_tx_power_ind_t
 Advertising channel Tx power level indication event. The structure of BLE_GAP_LOCAL_ADV_TX_POWER_IND. More...
 
struct  ble_gap_max_data_len_ind_t
 Indicates maximum data length. The structure of BLE_GAP_LOCAL_MAX_DATA_LEN_IND. More...
 
struct  ble_gap_nb_adv_sets_ind_t
 Number of available advertising sets indication event. The structure of BLE_GAP_NUMBER_ADV_SETS_IND. More...
 
struct  ble_gap_max_adv_data_len_ind_t
 Maximum advertising data length indication event. The structure of BLE_GAP_LOCAL_MAX_ADV_DATA_LEN_IND. More...
 
struct  ble_gap_update_channel_map_t
 The structure of channel map. More...
 
struct  ble_gap_update_channel_map_ind_t
 The structure of BLE_GAP_UPDATE_CHANNEL_MAP_IND. More...
 
struct  ble_gap_adv_created_ind_t
 The structure of BLE_GAP_ADV_CREATED_IND. More...
 
struct  ble_gap_adv_stopped_ind_t
 The structure of BLE_GAP_ADV_STOPPED_IND. More...
 
struct  ble_gap_scan_stopped_ind_t
 The structure of BLE_GAP_SCAN_STOPPED_IND. More...
 
struct  ble_gap_status_t
 
struct  ble_gap_start_adv_cnf_t
 The struture of BLE_GAP_START_ADV_CNF. More...
 
struct  ble_gap_stop_adv_cnf_t
 The struture of BLE_GAP_STOP_ADV_CNF. More...
 
struct  ble_gap_delete_adv_cnf_t
 The struture of BLE_GAP_DELETE_ADV_CNF. More...
 
struct  ble_gap_update_conn_param_cnf_t
 The struture of BLE_GAP_UPDATE_CONN_PARAM_CNF. More...
 
struct  ble_gap_disconnect_cnf_t
 The struture of BLE_GAP_DISCONNECT_CNF. More...
 
struct  ble_gap_ral_addr_ind_t
 Resolving Address indication event. The structure of BLE_GAP_RAL_ADDR_IND. *‍/. More...
 
struct  ble_gap_connect_configure_t
 Provide link configrations. More...
 
struct  ble_gap_connect_ind_t
 The structure of BLE_GAP_CONNECTED_IND. More...
 
struct  ble_gap_disconnected_ind_t
 The structure of BLE_GAP_DISCONNECTED_IND. More...
 
struct  ble_gap_remote_version_ind_t
 The structure of BLE_GAP_REMOTE_VER_IND. More...
 
struct  ble_gap_remote_features_ind_t
 The structure of BLE_GAP_REMOTE_FEATURE_IND. More...
 
struct  ble_gap_remote_rssi_ind_t
 The structure of BLE_GAP_REMOTE_RSSI_IND. More...
 
struct  ble_gap_remote_phy_ind_t
 The structure of BLE_GAP_REMOTE_PHY_IND. More...
 
struct  ble_gap_update_conn_param_ind_t
 The structure of BLE_GAP_UPDATE_CONN_PARAM_IND. More...
 
union  ble_gap_bond_req_data_t
 Bond procedure requested information data. More...
 
struct  ble_gap_bond_cnf_t
 The struture of BLE_GAP_BOND_CNF. More...
 
struct  ble_gap_bond_req_ind_t
 The structure of BLE_GAP_BOND_REQ_IND. More...
 
struct  ble_gap_bond_auth_t
 
union  ble_gap_bond_data_t
 Bond procedure information data. More...
 
struct  ble_gap_bond_ind_t
 The structure of BLE_GAP_BOND_IND. More...
 
struct  ble_gap_encrypt_req_ind_t
 The structure of BLE_GAP_ENCRYPT_REQ_IND. More...
 
struct  ble_gap_encrypt_ind_t
 The structure of BLE_GAP_ENCRYPT_IND. More...
 
struct  ble_gap_security_request_ind_t
 The structure of BLE_GAP_SECURITY_REQUEST_IND. More...
 
struct  ble_gap_security_request_cnf_t
 The struture of BLE_GAP_SECURITY_REQUEST_CNF. More...
 
struct  ble_gap_update_data_length_cnf_t
 The struture of BLE_GAP_UPDATE_DATA_LENGTH_CNF. More...
 
struct  ble_gap_update_data_length_ind_t
 The structure of BLE_GAP_UPDATE_DATA_LENGTH_IND. More...
 
struct  ble_gap_update_channel_map_cnf_t
 The struture of BLE_GAP_UPDATE_CHANNEL_MAP_CNF. More...
 
struct  ble_gap_sign_counter_update_ind_t
 The structure of BLE_GAP_SIGN_COUNTER_UPDATE_IND. More...
 
struct  ble_gap_ext_adv_report_ind_t
 
struct  bt_dbg_rssi_notify_ind_t
 
struct  ble_gap_solved_addr_ind_t
 
struct  ble_gap_assert_ind_t
 

Macros

#define CO_BIT(pos)   (1UL<<(pos))
 
#define GAP_KEY_LEN   (16)
 
#define GAP_ACTV_INVALID_IDX   (0xFF)
 
#define GAP_LE_FEATS_LEN   (0x08)
 
#define GAP_RAND_NB_LEN   (0x08)
 
#define GAP_ADV_DATA_LEN   (0x1F)
 
#define GAP_SCAN_RSP_DATA_LEN   (0x1F)
 
#define GAP_MIN_OCTETS   (27)
 
#define GAP_MIN_TIME   (328)
 
#define GAP_MAX_OCTETS   (251)
 
#define GAP_MAX_TIME   (17040)
 
#define GAP_LE_CHNL_MAP_LEN   (0x05)
 
#define GAP_MAX_LOCAL_NAME_LEN   (0x12)
 
#define GAP_DEFAULT_LOCAL_NAME   "SIFLI-BLE-DEV"
 

Typedefs

typedef ble_gap_status_t ble_gap_set_white_list_cnf_t
 
typedef ble_gap_status_t ble_gap_set_resolve_list_cnf_t
 
typedef ble_gap_status_t ble_gap_set_irk_cnf_t
 
typedef ble_gap_status_t ble_gap_create_adv_cnf_t
 
typedef ble_gap_status_t ble_gap_set_adv_data_cnf_t
 
typedef ble_gap_status_t ble_gap_set_scan_rsp_data_cnf_t
 
typedef ble_gap_status_t ble_gap_start_scan_cnf_t
 
typedef ble_gap_status_t ble_gap_stop_scan_cnf_t
 
typedef ble_gap_status_t ble_gap_create_connection_cnf_t
 
typedef ble_gap_status_t ble_gap_cancel_create_connection_cnf_t
 
typedef ble_gap_status_t ble_gap_resolve_address_cnf_t
 

Enumerations

enum  gap_rnd_addr_type {
  GAP_STATIC_ADDR = 0xC0,
  GAP_NON_RSLV_ADDR = 0x00,
  GAP_RSLV_ADDR = 0x40
}
 Random Address type. More...
 
enum  ble_gap_event_t {
  BLE_GAP_LOCAL_VER_IND = BLE_GAP_TYPE,
  BLE_GAP_LOCAL_BD_ADDR_IND,
  BLE_GAP_LOCAL_ADV_TX_POWER_IND,
  BLE_GAP_LOCAL_MAX_DATA_LEN_IND,
  BLE_GAP_NUMBER_ADV_SETS_IND,
  BLE_GAP_LOCAL_MAX_ADV_DATA_LEN_IND,
  BLE_GAP_SET_WHITE_LIST_CNF,
  BLE_GAP_SET_RESOLVING_LIST_CNF,
  BLE_GAP_RAL_ADDR_IND,
  BLE_GAP_SET_IRK_CNF,
  BLE_GAP_ADV_CREATED_IND,
  BLE_GAP_CREATE_ADV_CNF,
  BLE_GAP_SET_ADV_DATA_CNF,
  BLE_GAP_SET_SCAN_RSP_DATA_CNF,
  BLE_GAP_START_ADV_CNF,
  BLE_GAP_ADV_STOPPED_IND,
  BLE_GAP_STOP_ADV_CNF,
  BLE_GAP_DELETE_ADV_CNF,
  BLE_GAP_SCAN_START_CNF,
  BLE_GAP_SCAN_STOPPED_IND,
  BLE_GAP_SCAN_STOP_CNF,
  BLE_GAP_CREATE_CONNECTION_CNF,
  BLE_GAP_CANCEL_CREATE_CONNECTION_CNF,
  BLE_GAP_CONNECTED_IND,
  BLE_GAP_DISCONNECT_CNF,
  BLE_GAP_DISCONNECTED_IND,
  BLE_GAP_REMOTE_VER_IND,
  BLE_GAP_REMOTE_FEATURE_IND,
  BLE_GAP_REMOTE_RSSI_IND,
  BLE_GAP_REMOTE_PHY_IND,
  BLE_GAP_UPDATE_CONN_PARAM_IND,
  BLE_GAP_UPDATE_CONN_PARAM_CNF,
  BLE_GAP_BOND_CNF,
  BLE_GAP_BOND_REQ_IND,
  BLE_GAP_BOND_IND,
  BLE_GAP_ENCRYPT_REQ_IND,
  BLE_GAP_ENCRYPT_IND,
  BLE_GAP_SECURITY_REQUEST_CNF,
  BLE_GAP_SECURITY_REQUEST_IND,
  BLE_GAP_PASSKEY_REQ_IND,
  BLE_GAP_PHY_UPDATE_IND,
  BLE_GAP_EXT_ADV_REPORT_IND,
  BLE_GAP_UPDATE_DATA_LENGTH_CNF,
  BLE_GAP_UPDATE_DATA_LENGTH_IND,
  BLE_GAP_UPDATE_CHANNEL_MAP_CNF,
  BLE_GAP_UPDATE_CHANNEL_MAP_IND,
  BLE_GAP_SIGN_COUNTER_UPDATE_IND,
  BLE_GAP_RESOLVE_ADDRESS_CNF,
  BLE_GAP_SOLVED_ADDRESS_IND,
  BLE_GAP_PUBLIC_KEY_GEN_IND,
  BT_DBG_RSSI_NOTIFY_IND,
  BT_DBG_ASSERT_NOTIFY_IND
}
 GAP events that notify user. More...
 
enum  ble_gap_adv_type {
  BLE_GAP_AD_TYPE_FLAGS = 0x01,
  BLE_GAP_AD_TYPE_MORE_16_BIT_UUID = 0x02,
  BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID = 0x03,
  BLE_GAP_AD_TYPE_MORE_32_BIT_UUID = 0x04,
  BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID = 0x05,
  BLE_GAP_AD_TYPE_MORE_128_BIT_UUID = 0x06,
  BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID = 0x07,
  BLE_GAP_AD_TYPE_SHORTENED_NAME = 0x08,
  BLE_GAP_AD_TYPE_COMPLETE_NAME = 0x09,
  BLE_GAP_AD_TYPE_TRANSMIT_POWER = 0x0A,
  BLE_GAP_AD_TYPE_CLASS_OF_DEVICE = 0x0D,
  BLE_GAP_AD_TYPE_SP_HASH_C = 0x0E,
  BLE_GAP_AD_TYPE_SP_RANDOMIZER_R = 0x0F,
  BLE_GAP_AD_TYPE_TK_VALUE = 0x10,
  BLE_GAP_AD_TYPE_OOB_FLAGS = 0x11,
  BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE = 0x12,
  BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID = 0x14,
  BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID = 0x1F,
  BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID = 0x15,
  BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA = 0x16,
  BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA = 0x20,
  BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA = 0x21,
  BLE_GAP_AD_TYPE_PUB_TGT_ADDR = 0x17,
  BLE_GAP_AD_TYPE_RAND_TGT_ADDR = 0x18,
  BLE_GAP_AD_TYPE_APPEARANCE = 0x19,
  BLE_GAP_AD_TYPE_ADV_INTV = 0x1A,
  BLE_GAP_AD_TYPE_LE_BT_ADDR = 0x1B,
  BLE_GAP_AD_TYPE_LE_ROLE = 0x1C,
  BLE_GAP_AD_TYPE_SPAIR_HASH = 0x1D,
  BLE_GAP_AD_TYPE_SPAIR_RAND = 0x1E,
  BLE_GAP_AD_TYPE_3D_INFO = 0x3D,
  BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA = 0xFF
}
 GAP Advertising Flags. More...
 
enum  gapm_adv_type {
  GAPM_ADV_TYPE_LEGACY = 0,
  GAPM_ADV_TYPE_EXTENDED,
  GAPM_ADV_TYPE_PERIODIC
}
 Type of advertising that can be created. More...
 
enum  gapm_adv_disc_mode {
  GAPM_ADV_MODE_NON_DISC = 0,
  GAPM_ADV_MODE_GEN_DISC,
  GAPM_ADV_MODE_LIM_DISC,
  GAPM_ADV_MODE_BEACON,
  GAPM_ADV_MODE_DULMODE,
  GAPM_ADV_MODE_MAX
}
 Advertising discovery mode. More...
 
enum  gapm_adv_prop_pos {
  GAPM_ADV_PROP_CONNECTABLE_POS = 0,
  GAPM_ADV_PROP_SCANNABLE_POS,
  GAPM_ADV_PROP_DIRECTED_POS,
  GAPM_ADV_PROP_HDC_POS,
  GAPM_ADV_PROP_RESERVED_4_POS,
  GAPM_ADV_PROP_ANONYMOUS_POS,
  GAPM_ADV_PROP_TX_PWR_POS,
  GAPM_ADV_PROP_PER_TX_PWR_POS,
  GAPM_ADV_PROP_SCAN_REQ_NTF_EN_POS
}
 Advertising properties bit field bit positions. More...
 
enum  gapm_adv_prop {
  GAPM_ADV_PROP_CONNECTABLE_BIT = (1UL<<( GAPM_ADV_PROP_CONNECTABLE_POS )),
  GAPM_ADV_PROP_SCANNABLE_BIT = (1UL<<( GAPM_ADV_PROP_SCANNABLE_POS )),
  GAPM_ADV_PROP_DIRECTED_BIT = (1UL<<( GAPM_ADV_PROP_DIRECTED_POS )),
  GAPM_ADV_PROP_HDC_BIT = (1UL<<( GAPM_ADV_PROP_HDC_POS )),
  GAPM_ADV_PROP_RESERVED_4_BIT = (1UL<<( GAPM_ADV_PROP_RESERVED_4_POS )),
  GAPM_ADV_PROP_ANONYMOUS_BIT = (1UL<<( GAPM_ADV_PROP_ANONYMOUS_POS )),
  GAPM_ADV_PROP_TX_PWR_BIT = (1UL<<( GAPM_ADV_PROP_TX_PWR_POS )),
  GAPM_ADV_PROP_PER_TX_PWR_BIT = (1UL<<( GAPM_ADV_PROP_PER_TX_PWR_POS )),
  GAPM_ADV_PROP_SCAN_REQ_NTF_EN_BIT = (1UL<<( GAPM_ADV_PROP_SCAN_REQ_NTF_EN_POS ))
}
 Advertising properties bit field bit value. More...
 
enum  gapm_leg_adv_prop {
  GAPM_ADV_PROP_NON_CONN_NON_SCAN_MASK = 0x0000,
  GAPM_ADV_PROP_BROADCAST_NON_SCAN_MASK = GAPM_ADV_PROP_NON_CONN_NON_SCAN_MASK,
  GAPM_ADV_PROP_NON_CONN_SCAN_MASK = GAPM_ADV_PROP_SCANNABLE_BIT,
  GAPM_ADV_PROP_BROADCAST_SCAN_MASK = GAPM_ADV_PROP_NON_CONN_SCAN_MASK,
  GAPM_ADV_PROP_UNDIR_CONN_MASK = GAPM_ADV_PROP_CONNECTABLE_BIT | GAPM_ADV_PROP_SCANNABLE_BIT,
  GAPM_ADV_PROP_DIR_CONN_MASK = GAPM_ADV_PROP_DIRECTED_BIT | GAPM_ADV_PROP_CONNECTABLE_BIT,
  GAPM_ADV_PROP_DIR_CONN_LDC_MASK = GAPM_ADV_PROP_DIR_CONN_MASK,
  GAPM_ADV_PROP_DIR_CONN_HDC_MASK = GAPM_ADV_PROP_DIR_CONN_MASK | GAPM_ADV_PROP_HDC_BIT
}
 Advertising properties configurations for legacy advertising. More...
 
enum  adv_filter_policy {
  ADV_ALLOW_SCAN_ANY_CON_ANY = 0x00,
  ADV_ALLOW_SCAN_WLST_CON_ANY,
  ADV_ALLOW_SCAN_ANY_CON_WLST,
  ADV_ALLOW_SCAN_WLST_CON_WLST
}
 Advertising filter policy. More...
 
enum  adv_channel_map {
  ADV_CHNL_37_EN = 0x01,
  ADV_CHNL_38_EN = 0x02,
  ADV_CHNL_39_EN = 0x04,
  ADV_ALL_CHNLS_EN = 0x07
}
 Advertising channels enables. More...
 
enum  gap_phy_type {
  GAP_PHY_TYPE_LE_1M = 1,
  GAP_PHY_TYPE_LE_2M,
  GAP_PHY_TYPE_LE_CODED
}
 PHY Type. More...
 
enum  gap_sec_req {
  GAP_NO_SEC = 0x00,
  GAP_SEC1_NOAUTH_PAIR_ENC,
  GAP_SEC1_AUTH_PAIR_ENC,
  GAP_SEC2_NOAUTH_DATA_SGN,
  GAP_SEC2_AUTH_DATA_SGN,
  GAP_SEC1_SEC_CON_PAIR_ENC
}
 Security Defines. More...
 
enum  gap_kdist {
  GAP_KDIST_NONE = 0x00,
  GAP_KDIST_ENCKEY = (1 << 0),
  GAP_KDIST_IDKEY = (1 << 1),
  GAP_KDIST_SIGNKEY = (1 << 2),
  GAP_KDIST_LINKKEY = (1 << 3),
  GAP_KDIST_LAST = (1 << 4)
}
 Key Distribution Flags. More...
 
enum  gap_io_cap {
  GAP_IO_CAP_DISPLAY_ONLY = 0x00,
  GAP_IO_CAP_DISPLAY_YES_NO,
  GAP_IO_CAP_KB_ONLY,
  GAP_IO_CAP_NO_INPUT_NO_OUTPUT,
  GAP_IO_CAP_KB_DISPLAY,
  GAP_IO_CAP_LAST
}
 IO Capability Values. More...
 
enum  gap_oob {
  GAP_OOB_AUTH_DATA_NOT_PRESENT = 0x00,
  GAP_OOB_AUTH_DATA_PRESENT,
  GAP_OOB_AUTH_DATA_LAST
}
 OOB Data Present Flag Values. More...
 
enum  gap_auth_mask {
  GAP_AUTH_NONE = 0,
  GAP_AUTH_BOND = (1 << 0),
  GAP_AUTH_MITM = (1 << 2),
  GAP_AUTH_SEC_CON = (1 << 3),
  GAP_AUTH_KEY_NOTIF = (1 << 4)
}
 Authentication mask. More...
 
enum  gap_auth {
  GAP_AUTH_REQ_NO_MITM_NO_BOND = (GAP_AUTH_NONE),
  GAP_AUTH_REQ_NO_MITM_BOND = (GAP_AUTH_BOND),
  GAP_AUTH_REQ_MITM_NO_BOND = (GAP_AUTH_MITM),
  GAP_AUTH_REQ_MITM_BOND = (GAP_AUTH_MITM | GAP_AUTH_BOND),
  GAP_AUTH_REQ_SEC_CON_NO_BOND = (GAP_AUTH_SEC_CON),
  GAP_AUTH_REQ_SEC_CON_BOND = (GAP_AUTH_SEC_CON | GAP_AUTH_BOND),
  GAP_AUTH_REQ_SEC_CON_MITM_BOND = (GAP_AUTH_SEC_CON | GAP_AUTH_BOND | GAP_AUTH_MITM),
  GAP_AUTH_REQ_LAST,
  GAP_AUTH_REQ_MASK = 0x1F
}
 Authentication Requirements. More...
 
enum  gapc_bond {
  GAPC_PAIRING_REQ,
  GAPC_PAIRING_RSP,
  GAPC_PAIRING_SUCCEED,
  GAPC_PAIRING_FAILED,
  GAPC_TK_EXCH,
  GAPC_IRK_EXCH,
  GAPC_CSRK_EXCH,
  GAPC_LTK_EXCH,
  GAPC_REPEATED_ATTEMPT,
  GAPC_OOB_EXCH,
  GAPC_NC_EXCH
}
 Bond event type. More...
 
enum  gap_tk_type {
  GAP_TK_OOB = 0x00,
  GAP_TK_DISPLAY,
  GAP_TK_KEY_ENTRY
}
 TK Type. More...
 
enum  gap_phy {
  GAP_PHY_ANY = 0x00,
  GAP_PHY_LE_1MBPS = (1 << 0),
  GAP_PHY_LE_2MBPS = (1 << 1),
  GAP_PHY_LE_CODED = (1 << 2)
}
 Bit field use to select the preferred TX or RX LE PHY. 0 means no preferences. More...
 
enum  gapc_phy_option {
  GAPC_PHY_OPT_LE_CODED_ALL_RATES = (1 << 0),
  GAPC_PHY_OPT_LE_CODED_500K_RATE = (1 << 1),
  GAPC_PHY_OPT_LE_CODED_125K_RATE = (1 << 2)
}
 Option for PHY configuration. More...
 
enum  gap_pkt_pld_type {
  GAP_PKT_PLD_PRBS9,
  GAP_PKT_PLD_REPEATED_11110000,
  GAP_PKT_PLD_REPEATED_10101010,
  GAP_PKT_PLD_PRBS15,
  GAP_PKT_PLD_REPEATED_11111111,
  GAP_PKT_PLD_REPEATED_00000000,
  GAP_PKT_PLD_REPEATED_00001111,
  GAP_PKT_PLD_REPEATED_01010101
}
 Packet Payload type for test mode. More...
 
enum  gap_test_phy {
  GAP_TEST_PHY_1MBPS = 1,
  GAP_TEST_PHY_2MBPS = 2,
  GAP_TEST_PHY_CODED = 3,
  GAP_TEST_PHY_125KBPS = 3,
  GAP_TEST_PHY_500KBPS = 4
}
 Enumeration of TX/RX PHY used for Test Mode. More...
 
enum  gap_modulation_idx {
  GAP_MODULATION_STANDARD,
  GAP_MODULATION_STABLE
}
 Modulation index. More...
 
enum  gapm_own_addr {
  GAPM_STATIC_ADDR,
  GAPM_GEN_RSLV_ADDR,
  GAPM_GEN_NON_RSLV_ADDR
}
 Own BD address source of the device. More...
 
enum  gapm_init_type {
  GAPM_INIT_TYPE_DIRECT_CONN_EST = 0,
  GAPM_INIT_TYPE_AUTO_CONN_EST,
  GAPM_INIT_TYPE_NAME_DISC
}
 Initiating Types. More...
 
enum  gapm_init_prop {
  GAPM_INIT_PROP_1M_BIT = (1 << 0),
  GAPM_INIT_PROP_2M_BIT = (1 << 1),
  GAPM_INIT_PROP_CODED_BIT = (1 << 2)
}
 Initiating Properties. More...
 
enum  gapm_scan_prop {
  GAPM_SCAN_PROP_PHY_1M_BIT = (1 << 0),
  GAPM_SCAN_PROP_PHY_CODED_BIT = (1 << 1),
  GAPM_SCAN_PROP_ACTIVE_1M_BIT = (1 << 2),
  GAPM_SCAN_PROP_ACTIVE_CODED_BIT = (1 << 3),
  GAPM_SCAN_PROP_ACCEPT_RPA_BIT = (1 << 4),
  GAPM_SCAN_PROP_FILT_TRUNC_BIT = (1 << 5)
}
 Scanning properties bit field bit value. More...
 
enum  gapm_scan_type {
  GAPM_SCAN_TYPE_GEN_DISC = 0,
  GAPM_SCAN_TYPE_LIM_DISC,
  GAPM_SCAN_TYPE_OBSERVER,
  GAPM_SCAN_TYPE_SEL_OBSERVER,
  GAPM_SCAN_TYPE_CONN_DISC,
  GAPM_SCAN_TYPE_SEL_CONN_DISC
}
 Scanning Types. More...
 
enum  gapm_adv_report_type {
  GAPM_REPORT_TYPE_ADV_EXT = 0,
  GAPM_REPORT_TYPE_ADV_LEG,
  GAPM_REPORT_TYPE_SCAN_RSP_EXT,
  GAPM_REPORT_TYPE_SCAN_RSP_LEG,
  GAPM_REPORT_TYPE_PER_ADV
}
 Advertising report type. More...
 
enum  gapm_adv_report_info {
  GAPM_REPORT_INFO_REPORT_TYPE_MASK = 0x07,
  GAPM_REPORT_INFO_COMPLETE_BIT = (1 << 3),
  GAPM_REPORT_INFO_CONN_ADV_BIT = (1 << 4),
  GAPM_REPORT_INFO_SCAN_ADV_BIT = (1 << 5),
  GAPM_REPORT_INFO_DIR_ADV_BIT = (1 << 6)
}
 Advertising report information. More...
 

Functions

uint8_t ble_gap_set_dev_name (ble_gap_dev_name_t *dev)
 Set local device name. The event. More...
 
uint8_t ble_gap_set_appearance (uint16_t appearance)
 Set local appearance for GAP service. More...
 
uint8_t ble_gap_set_slave_prefer_param (ble_gap_slave_prf_param_t *param)
 Set local slave prefer param for GAP service. More...
 
uint8_t ble_gap_configure_public_addr (bd_addr_t *addr)
 Configure local public address. More...
 
uint8_t ble_gap_get_local_version (void)
 Get the local version supported by controller. The event BLE_GAP_LOCAL_VER_IND will indicate the result. More...
 
uint8_t ble_gap_get_local_bdaddr (void)
 Get the local address. The event BLE_GAP_LOCAL_BD_ADDR_IND will indicate the result. More...
 
uint8_t ble_gap_get_local_adv_tx_power (void)
 Get the local advertising channel tx power. The event BLE_GAP_LOCAL_ADV_TX_POWER_IND will indicate the result. More...
 
uint8_t ble_gap_get_local_max_data_len (void)
 Get the local maximum data length support by controller. The event BLE_GAP_LOCAL_MAX_DATA_LEN_IND will indicate the result. More...
 
uint8_t ble_gap_get_number_of_adv_sets (void)
 Get the maximum number of adv sets.The event BLE_GAP_NUMBER_ADV_SETS_IND will indicate the result. More...
 
uint8_t ble_gap_get_local_max_adv_data_len (void)
 Get the maximum adv data len and scan rsp len supported by controller.The event BLE_GAP_LOCAL_MAX_ADV_DATA_LEN_IND will indicate the result. More...
 
uint8_t ble_gap_set_white_list (ble_gap_white_list_t *white_list)
 Set the white list.The event BLE_GAP_SET_WHITE_LIST_CNF will indicate the result. More...
 
uint8_t ble_gap_set_resolving_list (ble_gap_resolving_list_t *rl_list)
 Set the resolving list.The event BLE_GAP_SET_RESOLVING_LIST_CNF will indicate the result. More...
 
uint8_t ble_gap_get_local_ral_addr (ble_gap_addr_t *addr)
 Get local ral address via peer ral address. The event BLE_GAP_RAL_ADDR_IND will indicate the result. More...
 
uint8_t ble_gap_generate_rand_addr (uint8_t rand_type)
 Generate a random address by rand type. The event BLE_GAP_LOCAL_BD_ADDR_IND will indicate the result. More...
 
uint8_t ble_gap_set_irk (ble_gap_sec_key_t *new_irk)
 Set new irk. The event BLE_GAP_SET_IRK_CNF will indicate the result. More...
 
uint8_t ble_gap_create_advertising (ble_gap_adv_parameter_t *para)
 Create a new advertising set. The event BLE_GAP_ADV_CREATED_IND will receive if created successful. BLE_GAP_CREATE_ADV_CNF will indicate the created compelted. More...
 
uint8_t ble_gap_set_adv_data (ble_gap_adv_data_t *data)
 Set advertising data, it should be set before advertising start. The event BLE_GAP_SET_ADV_DATA_CNF will indicate the result. More...
 
uint8_t ble_gap_set_scan_rsp_data (ble_gap_adv_data_t *data)
 Set scan rsp data, it should be set before advertising start. The event BLE_GAP_SET_SCAN_RSP_DATA_CNF will indicate the result. More...
 
uint8_t ble_gap_start_advertising (ble_gap_adv_start_t *adv_start)
 Start advertising. The event BLE_GAP_START_ADV_CNF will indicate the result. More...
 
uint8_t ble_gap_stop_advertising (ble_gap_adv_stop_t *adv_stop)
 Stop advertising. The event BLE_GAP_STOP_ADV_CNF will indicate the result. More...
 
uint8_t ble_gap_delete_advertising (ble_gap_adv_delete_t *del)
 Delete advertising set. The event BLE_GAP_DELETE_ADV_CNF will indicate the result. More...
 
uint8_t ble_gap_scan_start (ble_gap_scan_start_t *scan_param)
 Start scan. The event BLE_GAP_SCAN_START_CNF will indicate the result. More...
 
uint8_t ble_gap_scan_stop (void)
 Stop scan.The event BLE_GAP_SCAN_STOP_CNF will indicate the result. More...
 
uint8_t ble_gap_create_connection (ble_gap_connection_create_param_t *conn_param)
 Start connect peer device. The event BLE_GAP_CREATE_CONNECTION_CNF will indicate connect operation result. BLE_GAP_CONNECTED_IND will indicate peer device connected. More...
 
uint8_t ble_gap_connect_response (ble_gap_connection_response_t *rsp)
 Provide link information for the connected request. More...
 
uint8_t ble_gap_cancel_create_connection (void)
 Start connect peer device. The event BLE_GAP_CANCEL_CREATE_CONNECTION_CNF indicate the result. More...
 
uint8_t ble_gap_disconnect (ble_gap_disconnect_t *conn)
 Disconnect peer device. The event BLE_GAP_DISCONNECT_CNF will indicate disconnect operation result. BLE_GAP_DISCONNECTED_IND will indicate peer device disconnected. More...
 
uint8_t ble_gap_get_remote_version (ble_gap_get_remote_version_t *ver)
 Get the peer device Bluetooth version. The event BLE_GAP_REMOTE_VER_IND will indicate the result. More...
 
uint8_t ble_gap_get_remote_feature (bt_gap_get_remote_feature_t *feature)
 Get the peer device supported features. The event BLE_GAP_REMOTE_FEATURE_IND will indicate the result. More...
 
uint8_t ble_gap_get_remote_rssi (ble_gap_get_rssi_t *rssi)
 Get the peer device RSSI. The event BLE_GAP_REMOTE_RSSI_IND will indicate the result. More...
 
uint8_t ble_gap_get_remote_physical (ble_gap_get_phy_t *phy)
 Get the peer device physical configuration. The event BLE_GAP_REMOTE_PHY_IND will indicate the result. More...
 
uint8_t ble_gap_update_conn_param (ble_gap_update_conn_param_t *conn_para)
 Update the connection parameters with peer device. The event BLE_GAP_UPDATE_CONN_PARAM_IND will indicate the result. More...
 
uint8_t ble_gap_lepsm_register (void)
 
uint8_t ble_gap_resolve_address (ble_gap_resolve_address_t *req)
 Resolve RPA address with IRKs. The event BLE_GAP_RESOLVE_ADDRESS_CNF will indicate the result. BLE_GAP_SOLVED_ADDRESS_IND will indicate address is solved with the correct IRK. More...
 
uint8_t ble_gap_bond (ble_gap_bond_t *bond)
 Bond with peer device. The API could be only called via master device. Slave device can use ble_gap_security_request(). The event BLE_GAP_BOND_CNF indicate the bond command result. The event BLE_GAP_BOND_IND will indicate the bond process result. More...
 
uint8_t ble_gap_bond_confirm (ble_gap_bond_confirm_t *cfm)
 Reponse with bond request from peer device. Should call this API after received BLE_GAP_BOND_REQ_IND. The event BLE_GAP_BOND_IND will indicate the bond result. More...
 
uint8_t ble_gap_encrypt_confirm (ble_gap_encrypt_confirm_t *cfm)
 Reponse with encrypt request from peer device. Should call this API after received BLE_GAP_ENCRYPT_REQ_IND. The event BLE_GAP_ENCRYPT_IND will indicate the result. More...
 
uint8_t ble_gap_security_request (ble_gap_sec_req_t *req)
 Request master initiates a security with associated parameters which only could be called as slave role. Master device can use ble_gap_bond(). The event BLE_GAP_SECURITY_REQUEST_CNF will indicate the result of request. More...
 
uint8_t ble_gap_update_phy (ble_gap_update_phy_t *phy)
 Update phy configuration with peer device. The event BLE_GAP_PHY_UPDATE_IND will indicate the result. More...
 
uint8_t ble_gap_update_data_len (ble_gap_update_data_len_t *req)
 Update data length with peer device. The event BLE_GAP_UPDATE_DATA_LENGTH_IND will indicate the result. More...
 
uint8_t ble_gap_update_channel_map (ble_gap_update_channel_map_t *map)
 Update channel map to avoid air collision. The event BLE_GAP_UPDATE_CHANNEL_MAP_CNF and BLE_GAP_UPDATE_CHANNEL_MAP_IND will indicate the result. More...
 
uint8_t ble_get_local_irk (ble_gap_sec_key_t *local_irk)
 Get local irk. More...
 
ble_common_update_type_t ble_request_local_irk (ble_gap_sec_key_t *local_irk)
 User implementation function. Stack will call this function to get local irk. More...
 
uint8_t ble_gap_aes_h6 (uint8_t *w, uint8_t *key_id, uint32_t cb_request)
 
uint8_t ble_gap_aes_h7 (uint8_t *salt, uint8_t *w, uint32_t metainfo)
 

Detailed Description

Generic Access Profile defines the device discovery , link management and related security procedures.

Macro Definition Documentation

◆ CO_BIT

#define CO_BIT (   pos)    (1UL<<(pos))

return Value with one bit set. There is no return type since this is a macro and this will be resolved by the compiler upon assignment to an l-value.

◆ GAP_ACTV_INVALID_IDX

#define GAP_ACTV_INVALID_IDX   (0xFF)

Invalid activity identifier.

◆ GAP_ADV_DATA_LEN

#define GAP_ADV_DATA_LEN   (0x1F)

The maximum ADV Data length.

◆ GAP_DEFAULT_LOCAL_NAME

#define GAP_DEFAULT_LOCAL_NAME   "SIFLI-BLE-DEV"

Default Local device name.

◆ GAP_KEY_LEN

#define GAP_KEY_LEN   (16)

Key length.

◆ GAP_LE_CHNL_MAP_LEN

#define GAP_LE_CHNL_MAP_LEN   (0x05)

LE Channel map length.

◆ GAP_LE_FEATS_LEN

#define GAP_LE_FEATS_LEN   (0x08)

LE Feature Flags Length.

◆ GAP_MAX_LOCAL_NAME_LEN

#define GAP_MAX_LOCAL_NAME_LEN   (0x12)

Maximum Local device name.

◆ GAP_MAX_OCTETS

#define GAP_MAX_OCTETS   (251)

maximum data size in octets.

◆ GAP_MAX_TIME

#define GAP_MAX_TIME   (17040)

maximum data size in octets.

◆ GAP_MIN_OCTETS

#define GAP_MIN_OCTETS   (27)

minimum data size in octets.

◆ GAP_MIN_TIME

#define GAP_MIN_TIME   (328)

minimum data transfer time in us.

◆ GAP_RAND_NB_LEN

#define GAP_RAND_NB_LEN   (0x08)

Random number length.

◆ GAP_SCAN_RSP_DATA_LEN

#define GAP_SCAN_RSP_DATA_LEN   (0x1F)

The maximum scan response length.

Typedef Documentation

◆ ble_gap_cancel_create_connection_cnf_t

◆ ble_gap_create_adv_cnf_t

◆ ble_gap_create_connection_cnf_t

◆ ble_gap_resolve_address_cnf_t

◆ ble_gap_set_adv_data_cnf_t

◆ ble_gap_set_irk_cnf_t

◆ ble_gap_set_resolve_list_cnf_t

◆ ble_gap_set_scan_rsp_data_cnf_t

◆ ble_gap_set_white_list_cnf_t

◆ ble_gap_start_scan_cnf_t

◆ ble_gap_stop_scan_cnf_t

Enumeration Type Documentation

◆ adv_channel_map

Advertising channels enables.

Enumerator
ADV_CHNL_37_EN 

Byte value for advertising channel map for channel 37 enable.

ADV_CHNL_38_EN 

Byte value for advertising channel map for channel 38 enable.

ADV_CHNL_39_EN 

Byte value for advertising channel map for channel 39 enable.

ADV_ALL_CHNLS_EN 

Byte value for advertising channel map for channel 37, 38 and 39 enable.

◆ adv_filter_policy

Advertising filter policy.

Enumerator
ADV_ALLOW_SCAN_ANY_CON_ANY 

Allow both scan and connection requests from anyone.

ADV_ALLOW_SCAN_WLST_CON_ANY 

Allow both scan req from White List devices only and connection req from anyone.

ADV_ALLOW_SCAN_ANY_CON_WLST 

Allow both scan req from anyone and connection req from White List devices only.

ADV_ALLOW_SCAN_WLST_CON_WLST 

Allow scan and connection requests from White List devices only.

◆ ble_gap_adv_type

GAP Advertising Flags.

Enumerator
BLE_GAP_AD_TYPE_FLAGS 

Flag.

Flag.

BLE_GAP_AD_TYPE_MORE_16_BIT_UUID 

Use of more than 16 bits UUID.

BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID 

Complete list of 16 bit UUID.

BLE_GAP_AD_TYPE_MORE_32_BIT_UUID 

Use of more than 32 bit UUD.

BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID 

Complete list of 32 bit UUID.

BLE_GAP_AD_TYPE_MORE_128_BIT_UUID 

Use of more than 128 bit UUID.

BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID 

Complete list of 128 bit UUID.

BLE_GAP_AD_TYPE_SHORTENED_NAME 

Shortened device name.

BLE_GAP_AD_TYPE_COMPLETE_NAME 

Complete device name.

BLE_GAP_AD_TYPE_TRANSMIT_POWER 

Transmit power.

BLE_GAP_AD_TYPE_CLASS_OF_DEVICE 

Class of device.

BLE_GAP_AD_TYPE_SP_HASH_C 

Simple Pairing Hash C.

BLE_GAP_AD_TYPE_SP_RANDOMIZER_R 

Simple Pairing Randomizer.

BLE_GAP_AD_TYPE_TK_VALUE 

Temporary key value.

BLE_GAP_AD_TYPE_OOB_FLAGS 

Out of Band Flag.

BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE 

Slave connection interval range.

BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID 

Require 16 bit service UUID.

BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID 

Require 32 bit service UUID.

BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID 

Require 128 bit service UUID.

BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA 

Service data 16-bit UUID.

BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA 

Service data 32-bit UUID.

BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA 

Service data 128-bit UUID.

BLE_GAP_AD_TYPE_PUB_TGT_ADDR 

Public Target Address.

BLE_GAP_AD_TYPE_RAND_TGT_ADDR 

Random Target Address.

BLE_GAP_AD_TYPE_APPEARANCE 

Appearance.

BLE_GAP_AD_TYPE_ADV_INTV 

Advertising Interval.

BLE_GAP_AD_TYPE_LE_BT_ADDR 

LE Bluetooth Device Address.

BLE_GAP_AD_TYPE_LE_ROLE 

LE Role.

BLE_GAP_AD_TYPE_SPAIR_HASH 

Simple Pairing Hash C-256.

BLE_GAP_AD_TYPE_SPAIR_RAND 

Simple Pairing Randomizer R-256.

BLE_GAP_AD_TYPE_3D_INFO 

3D Information Data.

BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA 

Manufacturer specific data.

Manufacturer specific data.

◆ ble_gap_event_t

GAP events that notify user.

Enumerator
BLE_GAP_LOCAL_VER_IND 

This event indicates local version.

BLE_GAP_LOCAL_BD_ADDR_IND 

This event indicates local bd address.

BLE_GAP_LOCAL_ADV_TX_POWER_IND 

This event indicates advertising channel TX power

BLE_GAP_LOCAL_MAX_DATA_LEN_IND 

This event indicates mamimum data len that controller supported.

BLE_GAP_NUMBER_ADV_SETS_IND 

This event indicates maximum number of adv sets.

BLE_GAP_LOCAL_MAX_ADV_DATA_LEN_IND 

This event indicates maximum adv data len and scan rsp len that controller supported.

BLE_GAP_SET_WHITE_LIST_CNF 

This event indicates the result of set white list.

BLE_GAP_SET_RESOLVING_LIST_CNF 

This event indicates the result of set resolving list.

BLE_GAP_RAL_ADDR_IND 

This event indicates current resolvable address.

BLE_GAP_SET_IRK_CNF 

This event indicates the result of set IRK.

BLE_GAP_ADV_CREATED_IND 

This event indicates advertising created.

BLE_GAP_CREATE_ADV_CNF 

This event indicates the result of created advertising.

BLE_GAP_SET_ADV_DATA_CNF 

This event indicates the result of set advertising data.

BLE_GAP_SET_SCAN_RSP_DATA_CNF 

This event indicates the result of set scan rsp data.

BLE_GAP_START_ADV_CNF 

This event indicates the result of start advertising.

BLE_GAP_ADV_STOPPED_IND 

This event indicates advertising stopped.

BLE_GAP_STOP_ADV_CNF 

This event indicates the result of stop advertising.

BLE_GAP_DELETE_ADV_CNF 

This event indicates the result of delete advertising.

BLE_GAP_SCAN_START_CNF 

This event indicates the result of scan start.

BLE_GAP_SCAN_STOPPED_IND 

This event indicates scan stopped.

BLE_GAP_SCAN_STOP_CNF 

This event indicates the result of scan stop.

BLE_GAP_CREATE_CONNECTION_CNF 

This event indicates the result of start connection.

BLE_GAP_CANCEL_CREATE_CONNECTION_CNF 

This event indicates the result of cancel connection.

BLE_GAP_CONNECTED_IND 

This event indicates connection setup.

BLE_GAP_DISCONNECT_CNF 

This event indicates the result of disconnect.

BLE_GAP_DISCONNECTED_IND 

This event indicates link disconnected.

BLE_GAP_REMOTE_VER_IND 

This event indicates peer device bluetooth version.

BLE_GAP_REMOTE_FEATURE_IND 

This event indicates peer device supported BLE features.

BLE_GAP_REMOTE_RSSI_IND 

This event indicates on-going link RSSI.

BLE_GAP_REMOTE_PHY_IND 

This event indicates on-goling link PHY configuration.

BLE_GAP_UPDATE_CONN_PARAM_IND 

This event indicates on-going link connection parameter updatad

BLE_GAP_UPDATE_CONN_PARAM_CNF 

This event indicates the result of update connection parameter.

BLE_GAP_BOND_CNF 

This event indicates the result of bond command.

BLE_GAP_BOND_REQ_IND 

This event indicates bond request by peer device.

BLE_GAP_BOND_IND 

This event indicates bond information.

BLE_GAP_ENCRYPT_REQ_IND 

This event indicates encrypt request by peer device.

BLE_GAP_ENCRYPT_IND 

This event indicates encrypt information.

BLE_GAP_SECURITY_REQUEST_CNF 

This event indicates the result of security request.

BLE_GAP_SECURITY_REQUEST_IND 

This event indicates security request by peer deivce in peripherial role.

BLE_GAP_PASSKEY_REQ_IND 

This event indicates passkey request by peer device.

BLE_GAP_PHY_UPDATE_IND 

This event indicates PHY updated.

BLE_GAP_EXT_ADV_REPORT_IND 

This evnet indicates extended advertising report which including either legacy or extended advertising PDUs.

BLE_GAP_UPDATE_DATA_LENGTH_CNF 

This event indicates the result of update data length

BLE_GAP_UPDATE_DATA_LENGTH_IND 

This event indicates the on-going link data length updated

BLE_GAP_UPDATE_CHANNEL_MAP_CNF 

This event indicates the result of channel map updated

BLE_GAP_UPDATE_CHANNEL_MAP_IND 

This event indicates the on-going link channel map updated

BLE_GAP_SIGN_COUNTER_UPDATE_IND 

This event indicates the local or peer sign counter updated

BLE_GAP_RESOLVE_ADDRESS_CNF 

This event indicates the address resolved result

BLE_GAP_SOLVED_ADDRESS_IND 

This event indicates the solved address with dedicated key

BLE_GAP_PUBLIC_KEY_GEN_IND 

This event indicates public key has generated

BT_DBG_RSSI_NOTIFY_IND 

This debug event indicates the link rssi and channel assessment

BT_DBG_ASSERT_NOTIFY_IND 

This debug event indicates the controller is crash

◆ gap_auth

enum gap_auth

Authentication Requirements.

Enumerator
GAP_AUTH_REQ_NO_MITM_NO_BOND 

No MITM No Bonding.

GAP_AUTH_REQ_NO_MITM_BOND 

No MITM Bonding.

GAP_AUTH_REQ_MITM_NO_BOND 

MITM No Bonding.

GAP_AUTH_REQ_MITM_BOND 

MITM and Bonding.

GAP_AUTH_REQ_SEC_CON_NO_BOND 

SEC_CON and No Bonding.

GAP_AUTH_REQ_SEC_CON_BOND 

SEC_CON and Bonding.

GAP_AUTH_REQ_SEC_CON_MITM_BOND 

SEC CON and Bonding and MITM.

GAP_AUTH_REQ_MASK 

Mask of authentication features without reserved flag.

◆ gap_auth_mask

Authentication mask.

Enumerator
GAP_AUTH_NONE 

No Flag set.

GAP_AUTH_BOND 

Bond authentication.

GAP_AUTH_MITM 

Man In the middle protection.

GAP_AUTH_SEC_CON 

Secure Connection.

GAP_AUTH_KEY_NOTIF 

Key Notification.

◆ gap_io_cap

enum gap_io_cap

IO Capability Values.

Enumerator
GAP_IO_CAP_DISPLAY_ONLY 

Display Only.

GAP_IO_CAP_DISPLAY_YES_NO 

Display Yes No.

GAP_IO_CAP_KB_ONLY 

Keyboard Only.

GAP_IO_CAP_NO_INPUT_NO_OUTPUT 

No Input No Output.

GAP_IO_CAP_KB_DISPLAY 

Keyboard Display.

◆ gap_kdist

enum gap_kdist

Key Distribution Flags.

Enumerator
GAP_KDIST_NONE 

No Keys to distribute.

GAP_KDIST_ENCKEY 

Encryption key in distribution.

GAP_KDIST_IDKEY 

IRK (ID key)in distribution.

GAP_KDIST_SIGNKEY 

CSRK(Signature key) in distribution.

GAP_KDIST_LINKKEY 

LTK in distribution.

◆ gap_modulation_idx

Modulation index.

Enumerator
GAP_MODULATION_STANDARD 

Assume transmitter will have a standard modulation index.

GAP_MODULATION_STABLE 

Assume transmitter will have a stable modulation index.

◆ gap_oob

enum gap_oob

OOB Data Present Flag Values.

Enumerator
GAP_OOB_AUTH_DATA_NOT_PRESENT 

OOB Data not present.

GAP_OOB_AUTH_DATA_PRESENT 

OOB data present.

◆ gap_phy

enum gap_phy

Bit field use to select the preferred TX or RX LE PHY. 0 means no preferences.

Enumerator
GAP_PHY_ANY 

No preferred PHY.

GAP_PHY_LE_1MBPS 

LE 1M PHY preferred for an active link.

GAP_PHY_LE_2MBPS 

LE 2M PHY preferred for an active link.

GAP_PHY_LE_CODED 

LE Coded PHY preferred for an active link.

◆ gap_phy_type

PHY Type.

Enumerator
GAP_PHY_TYPE_LE_1M 

LE 1M.

GAP_PHY_TYPE_LE_2M 

LE 2M.

GAP_PHY_TYPE_LE_CODED 

LE Coded.

◆ gap_pkt_pld_type

Packet Payload type for test mode.

Enumerator
GAP_PKT_PLD_PRBS9 

PRBS9 sequence "11111111100000111101..." (in transmission order)

GAP_PKT_PLD_REPEATED_11110000 

Repeated "11110000" (in transmission order)

GAP_PKT_PLD_REPEATED_10101010 

Repeated "10101010" (in transmission order)

GAP_PKT_PLD_PRBS15 

PRBS15 sequence.

GAP_PKT_PLD_REPEATED_11111111 

Repeated "11111111" (in transmission order) sequence.

GAP_PKT_PLD_REPEATED_00000000 

Repeated "00000000" (in transmission order) sequence.

GAP_PKT_PLD_REPEATED_00001111 

Repeated "00001111" (in transmission order) sequence.

GAP_PKT_PLD_REPEATED_01010101 

Repeated "01010101" (in transmission order) sequence.

◆ gap_rnd_addr_type

Random Address type.

Enumerator
GAP_STATIC_ADDR 

Static random address - 11 (MSB->LSB)

GAP_NON_RSLV_ADDR 

Private non resolvable address - 01 (MSB->LSB)

GAP_RSLV_ADDR 

Private resolvable address - 01 (MSB->LSB)

◆ gap_sec_req

Security Defines.

Enumerator
GAP_NO_SEC 

No security (no authentication and encryption)

GAP_SEC1_NOAUTH_PAIR_ENC 

Unauthenticated pairing with encryption.

GAP_SEC1_AUTH_PAIR_ENC 

Authenticated pairing with encryption.

GAP_SEC2_NOAUTH_DATA_SGN 

Unauthenticated pairing with data signing.

GAP_SEC2_AUTH_DATA_SGN 

Authentication pairing with data signing.

GAP_SEC1_SEC_CON_PAIR_ENC 

Secure Connection pairing with encryption.

◆ gap_test_phy

Enumeration of TX/RX PHY used for Test Mode.

Enumerator
GAP_TEST_PHY_1MBPS 

LE 1M PHY (TX or RX)

GAP_TEST_PHY_2MBPS 

LE 2M PHY (TX or RX)

GAP_TEST_PHY_CODED 

LE Coded PHY (RX Only)

GAP_TEST_PHY_125KBPS 

LE Coded PHY with S=8 data coding (TX Only)

GAP_TEST_PHY_500KBPS 

LE Coded PHY with S=2 data coding (TX Only)

◆ gap_tk_type

TK Type.

Enumerator
GAP_TK_OOB 

TK get from out of band method.

GAP_TK_DISPLAY 

TK generated and shall be displayed by local device.

GAP_TK_KEY_ENTRY 

TK shall be entered by user using device keyboard.

◆ gapc_bond

enum gapc_bond

Bond event type.

Enumerator
GAPC_PAIRING_REQ 

Bond Pairing request.

GAPC_PAIRING_RSP 

Respond to Pairing request.

GAPC_PAIRING_SUCCEED 

Pairing Finished information.

GAPC_PAIRING_FAILED 

Pairing Failed information.

GAPC_TK_EXCH 

Used to retrieve pairing Temporary Key.

GAPC_IRK_EXCH 

Used for Identity Resolving Key exchange.

GAPC_CSRK_EXCH 

Used for Connection Signature Resolving Key exchange.

GAPC_LTK_EXCH 

Used for Long Term Key exchange.

GAPC_REPEATED_ATTEMPT 

Bond Pairing request issue, Repeated attempt.

GAPC_OOB_EXCH 

Out of Band - exchange of confirm and rand.

GAPC_NC_EXCH 

Numeric Comparison - Exchange of Numeric Value -.

◆ gapc_phy_option

Option for PHY configuration.

Enumerator
GAPC_PHY_OPT_LE_CODED_ALL_RATES 

No preference for rate used when transmitting on the LE Coded PHY.

GAPC_PHY_OPT_LE_CODED_500K_RATE 

500kbps rate preferred when transmitting on the LE Coded PHY

GAPC_PHY_OPT_LE_CODED_125K_RATE 

125kbps when transmitting on the LE Coded PHY

◆ gapm_adv_disc_mode

Advertising discovery mode.

Enumerator
GAPM_ADV_MODE_NON_DISC 

Mode in non-discoverable.

GAPM_ADV_MODE_GEN_DISC 

Mode in general discoverable.

GAPM_ADV_MODE_LIM_DISC 

Mode in limited discoverable.

GAPM_ADV_MODE_BEACON 

Broadcast mode without presence of AD_TYPE_FLAG in advertising data.

◆ gapm_adv_prop

Advertising properties bit field bit value.

Enumerator
GAPM_ADV_PROP_CONNECTABLE_BIT 

Indicate that advertising is connectable, reception of CONNECT_REQ or AUX_CONNECT_REQ PDUs is accepted. Not applicable for periodic advertising. return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_SCANNABLE_BIT 

Indicate that advertising is scannable, reception of SCAN_REQ or AUX_SCAN_REQ PDUs is accepted return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_DIRECTED_BIT 

Indicate that advertising targets a specific device. Only apply in following cases:

  • Legacy advertising: if connectable
  • Extended advertising: connectable or (non connectable and non discoverable) return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.
GAPM_ADV_PROP_HDC_BIT 

Indicate that High Duty Cycle has to be used for advertising on primary channel Apply only if created advertising is not an extended advertising return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_RESERVED_4_BIT 

Bit 4 is reserved.

return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_ANONYMOUS_BIT 

Enable anonymous mode. Device address won't appear in send PDUs Valid only if created advertising is an extended advertising return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_TX_PWR_BIT 

Include TX Power in the extended header of the advertising PDU. Valid only if created advertising is not a legacy advertising return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_PER_TX_PWR_BIT 

Include TX Power in the periodic advertising PDU. Valid only if created advertising is a periodic advertising return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

GAPM_ADV_PROP_SCAN_REQ_NTF_EN_BIT 

Indicate if application must be informed about received scan requests PDUs.

return Value with one bit set. There is no return type since this is a macro and this ** will be resolved by the compiler upon assignment to an l-value.

◆ gapm_adv_prop_pos

Advertising properties bit field bit positions.

Enumerator
GAPM_ADV_PROP_CONNECTABLE_POS 

Indicate that advertising is connectable, reception of CONNECT_REQ or AUX_CONNECT_REQ PDUs is accepted. Not applicable for periodic advertising.

GAPM_ADV_PROP_SCANNABLE_POS 

Indicate that advertising is scannable, reception of SCAN_REQ or AUX_SCAN_REQ PDUs is accepted

GAPM_ADV_PROP_DIRECTED_POS 

Indicate that advertising targets a specific device. Only apply in following cases:

  • Legacy advertising: if connectable
  • Extended advertising: connectable or (non connectable and non discoverable)
GAPM_ADV_PROP_HDC_POS 

Indicate that High Duty Cycle has to be used for advertising on primary channel Apply only if created advertising is not an extended advertising

GAPM_ADV_PROP_RESERVED_4_POS 

Bit 4 is reserved.

GAPM_ADV_PROP_ANONYMOUS_POS 

Enable anonymous mode. Device address won't appear in send PDUs Valid only if created advertising is an extended advertising

GAPM_ADV_PROP_TX_PWR_POS 

Include TX Power in the extended header of the advertising PDU. Valid only if created advertising is not a legacy advertising

GAPM_ADV_PROP_PER_TX_PWR_POS 

Include TX Power in the periodic advertising PDU. Valid only if created advertising is a periodic advertising

GAPM_ADV_PROP_SCAN_REQ_NTF_EN_POS 

Indicate if application must be informed about received scan requests PDUs.

◆ gapm_adv_report_info

Advertising report information.

Enumerator
GAPM_REPORT_INFO_REPORT_TYPE_MASK 

Report Type.

GAPM_REPORT_INFO_COMPLETE_BIT 

Report is complete.

GAPM_REPORT_INFO_CONN_ADV_BIT 

Connectable advertising.

GAPM_REPORT_INFO_SCAN_ADV_BIT 

Scannable advertising.

GAPM_REPORT_INFO_DIR_ADV_BIT 

Directed advertising.

◆ gapm_adv_report_type

Advertising report type.

Enumerator
GAPM_REPORT_TYPE_ADV_EXT 

Extended advertising report.

GAPM_REPORT_TYPE_ADV_LEG 

Legacy advertising report.

GAPM_REPORT_TYPE_SCAN_RSP_EXT 

Extended scan response report.

GAPM_REPORT_TYPE_SCAN_RSP_LEG 

Legacy scan response report.

GAPM_REPORT_TYPE_PER_ADV 

Periodic advertising report.

◆ gapm_adv_type

Type of advertising that can be created.

Enumerator
GAPM_ADV_TYPE_LEGACY 

Legacy advertising.

GAPM_ADV_TYPE_EXTENDED 

Extended advertising.

GAPM_ADV_TYPE_PERIODIC 

Periodic advertising.

◆ gapm_init_prop

Initiating Properties.

Enumerator
GAPM_INIT_PROP_1M_BIT 

Scan connectable advertisements on the LE 1M PHY. Connection parameters for the LE 1M PHY are provided.

GAPM_INIT_PROP_2M_BIT 

Connection parameters for the LE 2M PHY are provided.

GAPM_INIT_PROP_CODED_BIT 

Scan connectable advertisements on the LE Coded PHY. Connection parameters for the LE Coded PHY are provided.

◆ gapm_init_type

Initiating Types.

Enumerator
GAPM_INIT_TYPE_DIRECT_CONN_EST 

Direct connection establishment, establish a connection with an indicated device.

GAPM_INIT_TYPE_AUTO_CONN_EST 

Automatic connection establishment, establish a connection with all devices whose address is present in the white list

GAPM_INIT_TYPE_NAME_DISC 

Name discovery, Establish a connection with an indicated device in order to read content of its Device Name characteristic. Connection is closed once this operation is stopped.

◆ gapm_leg_adv_prop

Advertising properties configurations for legacy advertising.

Enumerator
GAPM_ADV_PROP_NON_CONN_NON_SCAN_MASK 

Non connectable non scannable advertising.

GAPM_ADV_PROP_BROADCAST_NON_SCAN_MASK 

Broadcast non scannable advertising - Discovery mode must be Non Discoverable.

GAPM_ADV_PROP_NON_CONN_SCAN_MASK 

Non connectable scannable advertising.

GAPM_ADV_PROP_BROADCAST_SCAN_MASK 

Broadcast non scannable advertising - Discovery mode must be Non Discoverable.

GAPM_ADV_PROP_UNDIR_CONN_MASK 

Undirected connectable advertising.

GAPM_ADV_PROP_DIR_CONN_MASK 

Directed connectable advertising.

GAPM_ADV_PROP_DIR_CONN_LDC_MASK 

Directed connectable with Low Duty Cycle.

GAPM_ADV_PROP_DIR_CONN_HDC_MASK 

Directed connectable with High Duty Cycle.

◆ gapm_own_addr

Own BD address source of the device.

Enumerator
GAPM_STATIC_ADDR 

Public or Private Static Address according to device address configuration.

GAPM_GEN_RSLV_ADDR 

Generated resolvable private random address.

GAPM_GEN_NON_RSLV_ADDR 

Generated non-resolvable private random address.

◆ gapm_scan_prop

Scanning properties bit field bit value.

Enumerator
GAPM_SCAN_PROP_PHY_1M_BIT 

Scan advertisement on the LE 1M PHY.

GAPM_SCAN_PROP_PHY_CODED_BIT 

Scan advertisement on the LE Coded PHY.

GAPM_SCAN_PROP_ACTIVE_1M_BIT 

Active scan on LE 1M PHY (Scan Request PDUs may be sent)

GAPM_SCAN_PROP_ACTIVE_CODED_BIT 

Active scan on LE Coded PHY (Scan Request PDUs may be sent)

GAPM_SCAN_PROP_ACCEPT_RPA_BIT 

Accept directed advertising packets if we use a RPA and target address cannot be solved by the controller

GAPM_SCAN_PROP_FILT_TRUNC_BIT 

Filter truncated advertising or scan response reports.

◆ gapm_scan_type

Scanning Types.

Enumerator
GAPM_SCAN_TYPE_GEN_DISC 

General discovery.

GAPM_SCAN_TYPE_LIM_DISC 

Limited discovery.

GAPM_SCAN_TYPE_OBSERVER 

Observer.

GAPM_SCAN_TYPE_SEL_OBSERVER 

Selective observer.

GAPM_SCAN_TYPE_CONN_DISC 

Connectable discovery.

GAPM_SCAN_TYPE_SEL_CONN_DISC 

Selective connectable discovery.

Function Documentation

◆ ble_gap_bond()

uint8_t ble_gap_bond ( ble_gap_bond_t bond)

Bond with peer device. The API could be only called via master device. Slave device can use ble_gap_security_request(). The event BLE_GAP_BOND_CNF indicate the bond command result. The event BLE_GAP_BOND_IND will indicate the bond process result.

Parameters
[in]bondbond information.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_bond_confirm()

uint8_t ble_gap_bond_confirm ( ble_gap_bond_confirm_t cfm)

Reponse with bond request from peer device. Should call this API after received BLE_GAP_BOND_REQ_IND. The event BLE_GAP_BOND_IND will indicate the bond result.

Parameters
[in]cfmconfirm parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_cancel_create_connection()

uint8_t ble_gap_cancel_create_connection ( void  )

Start connect peer device. The event BLE_GAP_CANCEL_CREATE_CONNECTION_CNF indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_configure_public_addr()

uint8_t ble_gap_configure_public_addr ( bd_addr_t addr)

Configure local public address.

Parameters
[in]addrpublic address.
Return values
Thestatus of configure.

◆ ble_gap_connect_response()

uint8_t ble_gap_connect_response ( ble_gap_connection_response_t rsp)

Provide link information for the connected request.

Parameters
[in]rspconnection information.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_create_advertising()

uint8_t ble_gap_create_advertising ( ble_gap_adv_parameter_t para)

Create a new advertising set. The event BLE_GAP_ADV_CREATED_IND will receive if created successful. BLE_GAP_CREATE_ADV_CNF will indicate the created compelted.

Parameters
[in]paraadvertising parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_create_connection()

uint8_t ble_gap_create_connection ( ble_gap_connection_create_param_t conn_param)

Start connect peer device. The event BLE_GAP_CREATE_CONNECTION_CNF will indicate connect operation result. BLE_GAP_CONNECTED_IND will indicate peer device connected.

Parameters
[in]conn_paramconnection parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_delete_advertising()

uint8_t ble_gap_delete_advertising ( ble_gap_adv_delete_t del)

Delete advertising set. The event BLE_GAP_DELETE_ADV_CNF will indicate the result.

Parameters
[in]deldelete advertising parameter.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_disconnect()

uint8_t ble_gap_disconnect ( ble_gap_disconnect_t conn)

Disconnect peer device. The event BLE_GAP_DISCONNECT_CNF will indicate disconnect operation result. BLE_GAP_DISCONNECTED_IND will indicate peer device disconnected.

Parameters
[in]conndisconnect parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_encrypt_confirm()

uint8_t ble_gap_encrypt_confirm ( ble_gap_encrypt_confirm_t cfm)

Reponse with encrypt request from peer device. Should call this API after received BLE_GAP_ENCRYPT_REQ_IND. The event BLE_GAP_ENCRYPT_IND will indicate the result.

Parameters
[in]cfmencrypt confirm parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_generate_rand_addr()

uint8_t ble_gap_generate_rand_addr ( uint8_t  rand_type)

Generate a random address by rand type. The event BLE_GAP_LOCAL_BD_ADDR_IND will indicate the result.

Parameters
[in]rand_typeaddress random type.(
See also
enum gapm_own_addr)
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_local_adv_tx_power()

uint8_t ble_gap_get_local_adv_tx_power ( void  )

Get the local advertising channel tx power. The event BLE_GAP_LOCAL_ADV_TX_POWER_IND will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_local_bdaddr()

uint8_t ble_gap_get_local_bdaddr ( void  )

Get the local address. The event BLE_GAP_LOCAL_BD_ADDR_IND will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_local_max_adv_data_len()

uint8_t ble_gap_get_local_max_adv_data_len ( void  )

Get the maximum adv data len and scan rsp len supported by controller.The event BLE_GAP_LOCAL_MAX_ADV_DATA_LEN_IND will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_local_max_data_len()

uint8_t ble_gap_get_local_max_data_len ( void  )

Get the local maximum data length support by controller. The event BLE_GAP_LOCAL_MAX_DATA_LEN_IND will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_local_ral_addr()

uint8_t ble_gap_get_local_ral_addr ( ble_gap_addr_t addr)

Get local ral address via peer ral address. The event BLE_GAP_RAL_ADDR_IND will indicate the result.

Parameters
[in]addrPeer ral address.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_local_version()

uint8_t ble_gap_get_local_version ( void  )

Get the local version supported by controller. The event BLE_GAP_LOCAL_VER_IND will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_number_of_adv_sets()

uint8_t ble_gap_get_number_of_adv_sets ( void  )

Get the maximum number of adv sets.The event BLE_GAP_NUMBER_ADV_SETS_IND will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_remote_feature()

uint8_t ble_gap_get_remote_feature ( bt_gap_get_remote_feature_t feature)

Get the peer device supported features. The event BLE_GAP_REMOTE_FEATURE_IND will indicate the result.

Parameters
[in]featureversion parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_remote_physical()

uint8_t ble_gap_get_remote_physical ( ble_gap_get_phy_t phy)

Get the peer device physical configuration. The event BLE_GAP_REMOTE_PHY_IND will indicate the result.

Parameters
[in]phyparameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_remote_rssi()

uint8_t ble_gap_get_remote_rssi ( ble_gap_get_rssi_t rssi)

Get the peer device RSSI. The event BLE_GAP_REMOTE_RSSI_IND will indicate the result.

Parameters
[in]rssiparameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_get_remote_version()

uint8_t ble_gap_get_remote_version ( ble_gap_get_remote_version_t ver)

Get the peer device Bluetooth version. The event BLE_GAP_REMOTE_VER_IND will indicate the result.

Parameters
[in]verversion parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_resolve_address()

uint8_t ble_gap_resolve_address ( ble_gap_resolve_address_t req)

Resolve RPA address with IRKs. The event BLE_GAP_RESOLVE_ADDRESS_CNF will indicate the result. BLE_GAP_SOLVED_ADDRESS_IND will indicate address is solved with the correct IRK.

Parameters
[in]reqresolve address and possible IRKs.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_scan_start()

uint8_t ble_gap_scan_start ( ble_gap_scan_start_t scan_param)

Start scan. The event BLE_GAP_SCAN_START_CNF will indicate the result.

Parameters
[in]scan_paramScan start parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_scan_stop()

uint8_t ble_gap_scan_stop ( void  )

Stop scan.The event BLE_GAP_SCAN_STOP_CNF will indicate the result.

Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_security_request()

uint8_t ble_gap_security_request ( ble_gap_sec_req_t req)

Request master initiates a security with associated parameters which only could be called as slave role. Master device can use ble_gap_bond(). The event BLE_GAP_SECURITY_REQUEST_CNF will indicate the result of request.

Parameters
[in]reqSecurity properties.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_adv_data()

uint8_t ble_gap_set_adv_data ( ble_gap_adv_data_t data)

Set advertising data, it should be set before advertising start. The event BLE_GAP_SET_ADV_DATA_CNF will indicate the result.

Parameters
[in]dataadvertising data.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_appearance()

uint8_t ble_gap_set_appearance ( uint16_t  appearance)

Set local appearance for GAP service.

Parameters
[in]appearancelocal appearance.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_dev_name()

uint8_t ble_gap_set_dev_name ( ble_gap_dev_name_t dev)

Set local device name. The event.

Parameters
[in]devlocal device name.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_irk()

uint8_t ble_gap_set_irk ( ble_gap_sec_key_t new_irk)

Set new irk. The event BLE_GAP_SET_IRK_CNF will indicate the result.

Parameters
[in]new_irknew irk to set.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_resolving_list()

uint8_t ble_gap_set_resolving_list ( ble_gap_resolving_list_t rl_list)

Set the resolving list.The event BLE_GAP_SET_RESOLVING_LIST_CNF will indicate the result.

Parameters
[in]rl_listDevices in resolving list.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_scan_rsp_data()

uint8_t ble_gap_set_scan_rsp_data ( ble_gap_adv_data_t data)

Set scan rsp data, it should be set before advertising start. The event BLE_GAP_SET_SCAN_RSP_DATA_CNF will indicate the result.

Parameters
[in]datascan response data.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_slave_prefer_param()

uint8_t ble_gap_set_slave_prefer_param ( ble_gap_slave_prf_param_t param)

Set local slave prefer param for GAP service.

Parameters
[in]paramlocal slave prefer param.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_set_white_list()

uint8_t ble_gap_set_white_list ( ble_gap_white_list_t white_list)

Set the white list.The event BLE_GAP_SET_WHITE_LIST_CNF will indicate the result.

Parameters
[in]white_listDevices in white list.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_start_advertising()

uint8_t ble_gap_start_advertising ( ble_gap_adv_start_t adv_start)

Start advertising. The event BLE_GAP_START_ADV_CNF will indicate the result.

Parameters
[in]adv_startstart advertising parameter.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_stop_advertising()

uint8_t ble_gap_stop_advertising ( ble_gap_adv_stop_t adv_stop)

Stop advertising. The event BLE_GAP_STOP_ADV_CNF will indicate the result.

Parameters
[in]adv_stopstop advertising parameter.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_update_channel_map()

uint8_t ble_gap_update_channel_map ( ble_gap_update_channel_map_t map)

Update channel map to avoid air collision. The event BLE_GAP_UPDATE_CHANNEL_MAP_CNF and BLE_GAP_UPDATE_CHANNEL_MAP_IND will indicate the result.

Parameters
[in]mapChannel updated parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_update_conn_param()

uint8_t ble_gap_update_conn_param ( ble_gap_update_conn_param_t conn_para)

Update the connection parameters with peer device. The event BLE_GAP_UPDATE_CONN_PARAM_IND will indicate the result.

Parameters
[in]conn_paraConnection update parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_update_data_len()

uint8_t ble_gap_update_data_len ( ble_gap_update_data_len_t req)

Update data length with peer device. The event BLE_GAP_UPDATE_DATA_LENGTH_IND will indicate the result.

Parameters
[in]reqUpdated parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_gap_update_phy()

uint8_t ble_gap_update_phy ( ble_gap_update_phy_t phy)

Update phy configuration with peer device. The event BLE_GAP_PHY_UPDATE_IND will indicate the result.

Parameters
[in]phyPhy updated parameters.
Return values
Thestatus of send to BLE subsystem.

◆ ble_get_local_irk()

uint8_t ble_get_local_irk ( ble_gap_sec_key_t local_irk)

Get local irk.

Parameters
[out]local_irkLocal irk.
Return values
0if local irk could get.

◆ ble_request_local_irk()

ble_common_update_type_t ble_request_local_irk ( ble_gap_sec_key_t local_irk)

User implementation function. Stack will call this function to get local irk.

Parameters
[out]local_irkLocal irk.
Return values
BLE_UPDATE_NO_UPDATENo need to update. BLE_UPDATE_ONCE Only update if public address not existed. BLE_UPDATE_ALWAYS Always use this public address.