Go to the documentation of this file.
50 #ifndef __BLE_GAPM_H__
51 #define __BLE_GAPM_H__
72 #define CO_BIT(pos)(1UL<<(pos))
74 #define MAX_PER_SYNC_NUM 5
75 #define MAX_BOND_NUM 10
78 #define MAX_PRD_ADV_NUM 4
79 #define MAX_KEY_LEN 16
80 #define INVALID_ADV_IDX 0xFF
81 #define BLE_GAP_DEVNAME_DEFAULT "GOODIX_BLE"
82 #define BLE_GAP_DEVNAME_MAX_LEN 248
84 #define BLE_APPEARANCE_UNKNOWN 0
85 #define BLE_APPEARANCE_GENERIC_PHONE 64
86 #define BLE_APPEARANCE_GENERIC_COMPUTER 128
87 #define BLE_APPEARANCE_GENERIC_WATCH 192
88 #define BLE_APPEARANCE_WATCH_SPORTS_WATCH 193
89 #define BLE_APPEARANCE_GENERIC_CLOCK 256
90 #define BLE_APPEARANCE_GENERIC_DISPLAY 320
91 #define BLE_APPEARANCE_GENERIC_REMOTE_CONTROL 384
92 #define BLE_APPEARANCE_GENERIC_EYE_GLASSES 448
93 #define BLE_APPEARANCE_GENERIC_TAG 512
94 #define BLE_APPEARANCE_GENERIC_KEYRING 576
95 #define BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 640
96 #define BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 704
97 #define BLE_APPEARANCE_GENERIC_THERMOMETER 768
98 #define BLE_APPEARANCE_THERMOMETER_EAR 769
99 #define BLE_APPEARANCE_GENERIC_HEART_RATE_SENSOR 832
100 #define BLE_APPEARANCE_HEART_RATE_SENSOR_HEART_RATE_BELT 833
101 #define BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 896
102 #define BLE_APPEARANCE_BLOOD_PRESSURE_ARM 897
103 #define BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 898
104 #define BLE_APPEARANCE_GENERIC_HID 960
105 #define BLE_APPEARANCE_HID_KEYBOARD 961
106 #define BLE_APPEARANCE_HID_MOUSE 962
107 #define BLE_APPEARANCE_HID_JOYSTICK 963
108 #define BLE_APPEARANCE_HID_GAMEPAD 964
109 #define BLE_APPEARANCE_HID_DIGITIZERSUBTYPE 965
110 #define BLE_APPEARANCE_HID_CARD_READER 966
111 #define BLE_APPEARANCE_HID_DIGITAL_PEN 967
112 #define BLE_APPEARANCE_HID_BARCODE 968
113 #define BLE_APPEARANCE_GENERIC_GLUCOSE_METER 1024
114 #define BLE_APPEARANCE_GENERIC_RUNNING_WALKING_SENSOR 1088
115 #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_IN_SHOE 1089
116 #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_SHOE 1090
117 #define BLE_APPEARANCE_RUNNING_WALKING_SENSOR_ON_HIP 1091
118 #define BLE_APPEARANCE_GENERIC_CYCLING 1152
119 #define BLE_APPEARANCE_CYCLING_CYCLING_COMPUTER 1153
120 #define BLE_APPEARANCE_CYCLING_SPEED_SENSOR 1154
121 #define BLE_APPEARANCE_CYCLING_CADENCE_SENSOR 1155
122 #define BLE_APPEARANCE_CYCLING_POWER_SENSOR 1156
123 #define BLE_APPEARANCE_CYCLING_SPEED_CADENCE_SENSOR 1157
124 #define BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 3136
125 #define BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 3137
126 #define BLE_APPEARANCE_PULSE_OXIMETER_WRIST_WORN 3138
127 #define BLE_APPEARANCE_GENERIC_WEIGHT_SCALE 3200
128 #define BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS_ACT 5184
129 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_DISP 5185
130 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_DISP 5186
131 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_POD 5187
132 #define BLE_APPEARANCE_OUTDOOR_SPORTS_ACT_LOC_AND_NAV_POD 5188
136 #define BLE_GAP_PHY_ANY 0x00
137 #define BLE_GAP_PHY_LE_1MBPS (1 << 0)
138 #define BLE_GAP_PHY_LE_2MBPS (1 << 1)
139 #define BLE_GAP_PHY_LE_CODED (1 << 2)
145 #define GAP_ADV_CHANNEL_37 0x01
146 #define GAP_ADV_CHANNEL_38 0x02
147 #define GAP_ADV_CHANNEL_39 0x04
148 #define GAP_ADV_CHANNEL_37_38_39 0x07
@ BLE_GAP_AD_TYPE_SP_RANDOMIZER_R
Simple Pairing Randomizer.
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID
Complete List of 16-bit UUID.
uint16_t duration
Scan duration (in unit of 10ms).
@ BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA
Service data 32-bit UUID.
@ BLE_GAP_GET_MAX_LE_DATA_LEN
Get the Controller' maximum supported payload octets and packet duration times for transmission and r...
void ble_gap_pref_phy_set(uint8_t tx_pref_phy, uint8_t rx_pref_phy)
Set the preferred values for the transmitter PHY and receiver PHY.
Configuration for advertising on secondary channel.
uint16_t duration
Advertising duration (in unit of 10ms).
uint16_t ble_gap_addr_get(gap_bdaddr_t *p_addr)
Get the device identity address (public or random static).
Periodic advertising information.
uint16_t sup_timeout
Link supervision timeout (in unit of 10ms).
@ BLE_GAP_WRITE_PERM_DISABLE
Disable write access.
@ GAP_DISC_MODE_LIM_DISCOVERABLE
Limited-discoverable mode.
@ BLE_GAP_AD_TYPE_FLAGS
Flag.
@ BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA
Service data 16-bit UUID.
uint16_t supervision_to
Link supervision timeout (in unit of 10ms).
@ GAP_EXT_SCAN_PROP_ACTIVE_1M_BIT
Active scan on LE 1M PHY (scan request PDUs may be sent).
gap_bdaddr_t peer_addr
Peer address configuration (only used in case of directed advertising or used to locate the IRK list)...
@ PRIVACY_MODE_DEVICE
Set to the device privacy mode for the peer device.
uint8_t disc_mode
Discovery mode (see enum gap_disc_mode_t).
@ BLE_GAP_AD_TYPE_LE_ROLE
LE Role.
@ GAP_PHY_CODED_VALUE
LE Coded PHY.
gap_ext_conn_param_t conn_param_1m
Connection parameters for LE 1M PHY.
@ BLE_GAP_AD_TYPE_ADV_INTV
Advertising Interval.
@ GAP_SCAN_LIM_DISC_MODE
Limited discoverable mode.
uint16_t ble_gap_scan_start(void)
Start scanning.
@ PRIVACY_MODE_NETWORK
Set to the network privacy mode for the peer device.
uint16_t conn_intv_max
Maximum value for the connection interval (in unit of 1.25ms).
@ GAP_INIT_PROP_1M_BIT
Scan connectable advertisements on the LE 1M PHY.
@ GAP_INIT_PROP_CODED_BIT
Scan connectable advertisements on the LE Coded PHY.
uint16_t ble_gap_irk_set(gap_sec_key_t *p_irk)
Set IRK used for resolvable random BD address generation (LSB first).
uint16_t ble_gap_dev_info_get(gap_dev_info_get_type_t type)
Get the device information according to param type.
@ GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS
Indicate if application must be informed about receiving scan request PDUs.
@ GAP_SCAN_ACTIVE
Active scan type.
uint8_t disc_mode
Discovery mode (see enum gap_disc_mode_t).
uint8_t num
Number of available items.
@ BLE_GAP_AD_TYPE_COMPLETE_NAME
Complete Device name.
@ GAP_SCAN_OBSERVER_MODE
Observer mode.
gap_scan_mode_t scan_mode
Scan mode.
uint8_t type
Initiating type (see enum gap_init_type_t).
uint16_t ble_gap_privacy_mode_set(gap_bdaddr_t peer_addr, privacy_mode_t mode)
Set privacy mode for peer device.
@ GAP_INIT_PROP_2M_BIT
Connection parameters for the LE 2M PHY are provided.
Parameters for legacy scanning.
gap_own_addr_t
Own BD address source of the device.
gap_adv_mode_t
GAP advertising modes.
@ BLE_GAP_AD_TYPE_SHORTENED_NAME
Shortened Device name.
@ GAP_ADV_PROP_USE_LEGACY_PDUS_BIT
@ GAP_EXT_SCAN_TYPE_SEL_OBSERVER
Selective observer.
@ BLE_GAP_GET_SUGGESTED_DFLT_LE_DATA_LEN
Get suggested values (SuggestedMaxTxOctets and SuggestedMaxTxTime) for the Controller's maximum trans...
bool scan_req_ind_en
Indicate if the application should be informed when receiving a scan request from the scanner.
uint8_t adv_sid
Advertising SID.
@ GAP_SEC_LVL_SC_ENC_AUTH
Security connection encryption with auth.
@ GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT
uint16_t ble_gap_connect_cancel(void)
Cancel an initiated connection.
uint16_t ble_gap_connect(gap_own_addr_t own_addr_type, gap_init_param_t *p_init_param)
Start a legacy connection to a device.
@ BLE_GAP_AD_TYPE_MORE_128_BIT_UUID
Use of more than 128-bit UUID.
uint16_t ble_gap_chnl_map_set(gap_chnl_map_t *p_chnl_map)
Set advertising channel map before advertising starts.
@ BLE_GAP_AD_TYPE_SPAIR_RAND
Simple Pairing Randomizer R-256.
@ GAP_INIT_TYPE_DIRECT_CONN_EST
Direct connection establishment: establish a connection with an indicated device.
uint8_t adv_sid
Advertising SID.
void ble_gap_pair_enable(bool enable)
Decide whether to support the pair feature.
@ GAP_SCAN_FILT_DUPLIC_EN
Enable filtering of duplicate packets.
uint8_t rsvd
Reserved for future use.
@ BLE_GAP_ROLE_CENTRAL
Master/Central role.
gap_bdaddr_t peer_addr
Address of peer device in case white list is not used for connection.
gap_scan_wd_op_param_t scan_param_coded
Scan window opening parameters for LE Coded PHY.
uint16_t ble_gap_rslv_addr_read(gap_rslv_addr_read_op_id_t op_code, gap_bdaddr_t peer_iden_addr)
Read peer or local resolvable address.
@ BLE_GAP_OWN_ADDR_GEN_RSLV
Generated resolvable private random address.
uint8_t dup_filt_pol
Duplicate packet filtering policy (see enum gap_ext_scan_dup_filt_policy_t).
gap_adv_prop_t
Advertising properties bit field bit value.
@ GAP_ADV_PROP_CONNECTABLE_BIT
uint16_t ble_gap_whitelist_add(const white_list_t *p_whitelist)
Add the devices into current white list.
@ GAP_EXT_SCAN_TYPE_SEL_CONN_DISC
Selective connectable discovery.
@ BLE_GAP_ROLE_PERIPHERAL
Peripheral/Slave role.
@ GAP_SCAN_GEN_DISC_MODE
General discoverable mode.
@ GAP_DISC_MODE_GEN_DISCOVERABLE
General-discoverable mode.
uint16_t ble_gap_scan_param_set(gap_own_addr_t own_addr_type, gap_scan_param_t *p_scan_param)
Set parameters for scanning.
uint16_t ble_gap_bond_devs_clear(void)
Clear all bonded devices.
@ GAP_EXT_DUP_FILT_DIS
Disable filtering of duplicated packets.
uint8_t num
Number of bonded device.
@ BLE_GAP_ADV_DATA_TYPE_SCAN_RSP
Scan response data.
uint16_t ble_gap_data_length_set(uint16_t sugg_max_tx_octet, uint16_t sugg_max_tx_time)
Set suggested default LE data length.
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID
Complete List of 128-bit UUID.
gap_scan_type_t
Scanning types.
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID
Complete List of 32-bit UUID.
gap_init_type_t
Initiating types.
@ GAP_ADV_FLAG_LE_GENERAL_DISC_MODE
General discovery flag: AD Flag.
gap_scan_dup_filt_policy_t
Duplicate filter policy.
uint16_t adv_intv_max
Maximum advertising interval (in unit of 625 us).
@ GAP_ADV_FLAG_LE_LIMITED_DISC_MODE
Limited discovery flag: AD Flag.
void(* reslv_rpa_addr_callback_t)(uint8_t status, gap_bdaddr_t *iden_addr, uint8_t src_info)
The BLE reslove rpa address callback.
@ GAP_INIT_TYPE_NAME_DISC
Name discovery: establish a connection with an indicated device in order to read content of its devic...
uint16_t conn_timeout
Timeout for connection establishment (in unit of 10ms).
@ BLE_GAP_GET_DEV_VERSION
Get version information for the local Controller.
uint8_t prop
Properties for the initiating procedure (see enum gap_init_prop_t for bit signification).
gap_scan_wd_op_param_t scan_param_coded
Scan window opening parameters for LE Coded PHY.
gap_disc_mode_t
GAP discoverability modes.
@ GAP_INIT_TYPE_AUTO_CONN_EST
Automatic connection establishment: establish a connection with all devices whose address is present ...
@ GAP_SCAN_PASSIVE
Passive scan type.
@ GAP_SEC_LVL_LE_ENC_AUTH
Legacy encryption with auth.
uint16_t ble_gap_bond_devs_get(bond_dev_list_t *p_bond_list)
Get all bonded devices.
@ GAP_ADV_PROP_TX_PWR_POS
Include TX power in the extended header of the advertising PDU.
uint16_t adv_intv_max
Maximum advertising interval (in unit of 1.25 ms).
uint16_t conn_latency
Slave latency.
@ GAP_PER_SYNC_TYPE_GENERAL
Do not use periodic advertiser list for synchronization.
int8_t max_tx_pwr
Maximum power level at which the advertising packets have to be transmitted (between -20dbm and 7dbm)...
@ GAP_SEC_LVL_NO_SECURITY
No encryption or auth.
gap_sec_lvl_type
Security level types.
uint16_t ble_gap_ext_scan_param_set(gap_own_addr_t own_addr_type, gap_ext_scan_param_t *p_scan_param)
Set extended parameters for scanning.
@ BLE_GAP_WRITE_PERM_NOAUTH
LE Security Mode 1, Level 1.
@ GAP_DISC_MODE_NON_DISCOVERABLE
Non-discoverable mode.
uint16_t conn_intv_min
Minimum value for the connection interval (in unit of 1.25ms).
uint16_t ble_gap_per_sync_start(uint8_t per_sync_idx)
Start to synchronize with periodic advertising from an advertiser and begin receiving periodic advert...
@ BLE_GAP_GET_DEV_RF_RF_PATH_COMP
Get RF path compensation values.
uint16_t prop
Bit field value provided by advertising properties.
uint32_t adv_intv_min
Minimum advertising interval (in unit of 625 us).
gap_adv_type_t
Advertising type.
uint8_t prop
Properties for the scan procedure (see enum gap_scan_prop for bit signification).
The struct of broadcast address with broadcast type.
@ BLE_GAP_AD_TYPE_MORE_32_BIT_UUID
Use of more than 32-bit UUD.
@ GAP_ADV_PROP_SCANNABLE_BIT
gap_activity_role_t
Possible roles of the activity.
gap_scan_prop
Scanning properties bit field bit value.
Periodic advertising list.
uint16_t interval_min
Minimum value for the connection interval (in unit of 1.25ms).
uint8_t type
Periodic synchronization type (see enum gap_per_sync_type).
@ BLE_GAP_ADV_DATA_TYPE_DATA
Advertising data.
uint16_t ble_gap_tx_power_get(gap_activity_role_t role, uint8_t index, int8_t *txpwr_dbm)
Get the tx power.
uint16_t ble_gap_reslv_rpa_addr(uint8_t *reslv_addr, uint8_t src_info, reslv_rpa_addr_callback_t cb)
Resolve the rpa address.
@ BLE_GAP_AD_TYPE_TRANSMIT_POWER
Transmit power.
uint8_t type
Advertising type (see enum gap_adv_type_t).
@ GAP_ADV_PROP_PER_TX_PWR_POS
Include TX power in the periodic advertising PDU.
@ GAP_SEC_LVL_ENC_NO_AUTH
Encryption with no auth.
Scan Window operation parameters.
@ GAP_ACTIVITY_ROLE_ADV
Adertise role.
gap_adv_prop_pos_t
Advertising properties bit field and bit positions.
uint8_t sec_lvl
Security level requirement, see gap_sec_lvl_type.
#define CO_BIT(pos)
Bit operation helper.
@ BLE_GAP_AD_TYPE_APPEARANCE
Appearance.
gap_dev_name_write_perm_t
Write permissions of the device name characteristic.
Advertising parameters for legacy advertising.
uint16_t ble_gap_per_sync_param_set(uint8_t per_sync_idx, gap_per_sync_param_t *p_per_sync_param)
Set the parameters used for periodic sync.
uint16_t ble_gap_addr_set(gap_bdaddr_t const *p_addr)
Set the device identity address (public or random static).
@ GAP_SCAN_PROP_ACTIVE_1M_BIT
Active scan on LE 1M PHY (scan request PDUs may be sent).
uint8_t max_skip
Maximum number of advertising events the controller can skip before sending the AUX_ADV_IND packets.
@ BLE_GAP_GET_DEV_BDADDR
Get local device BD Address.
uint16_t ble_gap_per_sync_stop(uint8_t per_sync_idx)
Stop periodic synchronization.
#define MAX_PRD_ADV_NUM
Maximal periodic advertising list number.
uint16_t ble_gap_path_compensation_set(int16_t tx_path_comp, int16_t rx_path_comp)
Set the RF path gain or loss between the RF transceiver and the antenna contributed by intermediate c...
uint8_t max_adv_evt
Maximum number of extended advertising events.
@ GAP_ADV_PROP_TX_PWR_BIT
@ GAP_EXT_DUP_FILT_EN
Enable filtering of duplicated packets.
@ BLE_GAP_OWN_ADDR_GEN_NON_RSLV
Generated non-resolvable private random address.
uint16_t ble_gap_whitelist_get(white_list_t *p_whitelist)
Get the content of the whole white list.
gap_role_t
GAP role options.
File that contains error codes.
uint16_t interval
Scan interval between 0x0004 and 0x4000 in 0.625 ms (range: 2.5 ms to 10.24s).
uint16_t period
Scan period, which is the time interval between two consequent starts of a scan duration by the contr...
gap_le_phy_value_t phy
Indicate on which PHY secondary advertising has to be performed.
@ BLE_GAP_WRITE_PERM_AUTH
LE Security Mode 1, Level 3.
@ GAP_SCAN_FILT_DUPLIC_DIS
Disable filtering of duplicate packets.
@ BLE_GAP_WRITE_PERM_SEC_CON
LE Security Mode 1, Level 4.
@ BLE_GAP_GET_NB_ADV_SETS
Read the maximum number of advertising sets currently supported by the controller.
gap_le_phy_value_t
Specify what PHY the Controller has changed for TX/RX.
@ GAP_PHY_UNDEF_VALUE
Undefined LE PHY.
@ BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE
Slave connection interval range.
@ GAP_EXT_SCAN_PROP_PHY_CODED_BIT
Scan advertisement on the LE Coded PHY.
gap_adv_data_type_t
Advertising data type.
@ BLE_GAP_AD_TYPE_LE_BT_ADDR
LE Bluetooth Device Address.
void ble_gap_rpa_addr_report_cb_register(rpa_addr_report_callback_t cb)
Set the cb for rpa address report.
gap_adv_second_cfg_t second_cfg
Configuration for secondary advertising (valid only if advertising type is GAP_ADV_TYPE_EXTENDED or G...
@ GAP_ADV_TYPE_EXTENDED
Extended advertising.
@ GAP_ADV_FLAG_SIMUL_BR_EDR_LE_CONTROLLER
Dual mode for controller supported (BR/EDR/LE): AD Flag.
uint32_t adv_intv_max
Maximum advertising interval (in unit of 625 us).
gap_adv_filter_policy_t
Advertising filter policy.
uint16_t adv_intv_min
Minimum advertising interval (in unit of 625 us).
Advertising timing parameter.
uint16_t window
Scan window between 0x0004 and 0x4000 in 0.625 ms (range: 2.5 ms to 10.24s).
uint16_t ble_gap_scan_stop(void)
Stop scanning.
@ BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA
Service data 128-bit UUID.
Legacy initiating parameters.
uint16_t skip
Number of periodic advertising that can be skipped after a successful reception.
void ble_gap_ppcp_present_set(bool present_flag)
Set GAP Peripheral Preferred Connection Parameters present flag.
@ GAP_EXT_SCAN_TYPE_CONN_DISC
Connectable discovery.
@ BLE_GAP_ROLE_OBSERVER
Observer role.
@ GAP_EXT_SCAN_PROP_PHY_1M_BIT
Scan advertisement on the LE 1M PHY.
gap_init_prop_t
Initiating properties.
@ BLE_GAP_ROLE_ALL
Device has all roles, both peripheral and central.
uint8_t num
Number of RPA list.
@ GAP_EXT_SCAN_PROP_ACTIVE_CODED_BIT
Active scan on LE Coded PHY (scan request PDUs may be sent).
@ GAP_SCAN_PROP_ACTIVE_CODED_BIT
Active scan on LE Coded PHY (scan request PDUs may be sent).
ble_actv_type_t
Activity type.
@ GAP_SCAN_PROP_ACCEPT_RPA_BIT
Accept directed advertising packets if the used RPA and target address cannot be solved by the contro...
uint8_t chnl_map
Bit field indicating the channel map.
gap_period_adv_addr_cfg_t adv_addr
Address of advertiser with which synchronization has to be established(used only if use_pal is false)...
uint16_t ble_gap_l2cap_params_set(uint16_t max_mtu, uint16_t max_mps, uint8_t max_nb_lecb)
Set L2CAP related parameters.
uint16_t sync_to
Synchronization timeout for the periodic advertising (in unit of 10ms between 100ms and 163....
uint16_t ble_gap_per_adv_list_get(period_adv_list_t *p_pal_list)
Get the content of the whole periodic advertising list.
@ BLE_GAP_AD_TYPE_TK_VALUE
Temporary key value.
@ BLE_GAP_AD_TYPE_RAND_TGT_ADDR
Random Target Address.
@ GAP_ADV_PROP_DIRECTED_POS
Indicate that advertising targets at a specific device.
Configuration for periodic advertising.
uint8_t filter_pol
Advertising filtering policy (see enum gap_adv_filter_policy_t).
@ GAP_SCAN_PROP_PHY_1M_BIT
Scan advertisement on the LE 1M PHY.
@ GAP_ADV_PROP_ANONYMOUS_POS
Enable anonymous mode.
@ GAP_ADV_TYPE_ADV_NONCONN_IND
Non-connectable and non-scanable mode.
uint16_t conn_to
Timeout for automatic connection establishment (in unit of 10ms).
@ GAP_ADV_FLAG_SIMUL_BR_EDR_LE_HOST
Dual mode for host supported (BR/EDR/LE): AD Flag.
uint8_t num
Number of available items.
uint16_t ble_gap_ppcp_get(gap_conn_param_t *p_conn_params)
Get GAP Peripheral Preferred Connection Parameters.
@ GAP_ADV_TYPE_ADV_SCAN_IND
Undirected scannable mode.
uint16_t ble_gap_per_adv_list_del(const period_adv_list_t *p_pal_list)
Delete the devices out of periodic advertising list.
@ GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED
Legacy BT not supported: AD Flag.
@ GAP_ADV_TYPE_ADV_IND
Undirected connectable and scannable mode.
gap_ad_type_t
GAP advertising types.
Parameters for extended scanning.
@ GAP_ADV_ALLOW_SCAN_WLST_CON_WLST
Allow scan and connection requests from white-list devices only.
uint16_t ble_gap_adv_data_set(uint8_t adv_idx, gap_adv_data_type_t type, const uint8_t *p_data, uint16_t length)
Set Advertising Data, Scan Response Data and Periodic Advertising Data.
gap_le_phy_value_t phy
Indicate on which PHY primary advertising has to be performed.
@ BLE_GAP_ROLE_NONE
No role set yet.
#define MAX_BOND_NUM
Maximal bonding number.
gap_bdaddr_t peer_addr
Peer device address.
#define MAX_WL_NUM
Maximal white list number.
@ BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA
Manufacturer specific data.
uint8_t rsvd
Reserved for future use.
@ GAP_PHY_2MBPS_VALUE
LE 2M PHY.
@ GAP_ADV_ALLOW_SCAN_ANY_CON_ANY
Allow both scan and connection requests from anyone.
uint16_t ble_gap_per_adv_list_clear(void)
Clear all the entries in the current periodic advertising list.
@ GAP_SCAN_PROP_FILT_TRUNC_BIT
Filter truncated advertising or scan response reports.
uint16_t ce_len
The length of connection event needed for this LE connection.
@ GAP_ADV_PROP_HDC_POS
Indicate that High Duty Cycle has to be used for advertising on primary channel, applicable only if c...
uint16_t ble_gap_adv_param_set(uint8_t adv_idx, gap_own_addr_t own_addr_type, gap_adv_param_t *p_adv_param)
Set parameters for advertising.
@ BLE_GAP_GET_MAX_LE_ADV_DATA_LEN
Get maximum data length for advertising data.
@ GAP_SCAN_PROP_PHY_CODED_BIT
Scan advertisement on the LE Coded PHY.
@ GAP_ACTIVITY_ROLE_UNKNOWN
Unknown role.
uint16_t ble_gap_adv_stop(uint8_t adv_idx)
Stop advertising.
@ GAP_ADV_TYPE_ADV_LOW_DIRECT_IND
Directed low duty cycle mode.
@ BLE_GAP_OWN_ADDR_STATIC
Public or Private Static Address according to device address configuration.
uint16_t ble_gap_lepsm_unregister(uint16_t le_psm)
Unregister a LE Protocol/Service Multiplexer.
void ble_gap_appearance_set(uint16_t appearance)
Set GAP appearance value.
gap_ext_scan_dup_filt_policy_t
Filtering policy for duplicated packets.
uint16_t ble_gap_ext_adv_param_set(uint8_t adv_idx, gap_own_addr_t own_addr_type, gap_ext_adv_param_t *p_adv_param)
Set extended parameters for advertising.
@ GAP_ADV_PROP_CONNECTABLE_POS
Indicate that advertising is connectable, reception of CONNECT_REQ or UX_CONNECT_REQ PDUs is accepted...
gap_adv_flags_t
AD Type Flag - Bit mask.
uint16_t scan_wd
Scan window between 0x0004 and 0xFFFF in 0.625 ms (range: 2.5 ms to 40.959375s).
@ BLE_GAP_ADV_DATA_TYPE_PER_DATA
Periodic advertising data.
gap_rslv_addr_read_op_id_t
Operation code used to read resolvable address.
bool use_whitelist
Filter policy.
@ GAP_ADV_PROP_SCANNABLE_POS
Indicate that advertising is scannable, reception of SCAN_REQ or AUX_SCAN_REQ PDUs is accepted.
uint16_t ble_gap_update_conn_param_method_set(uint8_t conn_idx, bool use_l2cap_flag)
Set the method for updating connection parameter.
uint16_t interval_max
Maximum value for the connection interval (in unit of 1.25ms).
@ GAP_ADV_TYPE_LEGACY
Legacy advertising.
gap_ext_conn_param_t conn_param_coded
Connection parameters for LE Coded PHY.
uint16_t ble_gap_rpa_list_get(ral_dev_list_t *p_rpa_list)
Get the RPA list info.
@ GAP_ADV_TYPE_PERIODIC
Periodic advertising.
uint16_t le_psm
LE Protocol/Service Multiplexer (range: 1 to 255), PSMs should be odd.
uint16_t ble_gap_adv_start(uint8_t adv_idx, gap_adv_time_param_t *p_timeout)
Start advertising.
@ BLE_GAP_WRITE_PERM_UNAUTH
LE Security Mode 1, Level 2.
uint16_t ble_gap_update_adv_data(uint8_t adv_idx, gap_adv_data_type_t type, const uint8_t *p_data, uint16_t length)
Update Advertising Data, Scan Response Data and Periodic Advertising Data.
uint16_t timeout
Scan timeout should be a value between 0x0001 and 0xFFFF(unit: 10 ms).
@ BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID
Require 128-bit service UUID.
gap_ext_scan_type_t
Extended scanning types.
uint8_t chnl_map
Advertising channel map.
bool mks_flag
Whether to use maximum-size key (16 bytes) or not.
uint8_t priv_mode
Privacy mode, see enum privacy_mode_t.
gap_bdaddr_t bd_addr
Advertiser address information.
@ GAP_ADV_PROP_ANONYMOUS_BIT
@ GAP_EXT_SCAN_PROP_ACCEPT_RPA_BIT
Accept directed advertising packets if the uesd RPA and target address cannot be solved by the contro...
@ GAP_ADV_TYPE_ADV_HIGH_DIRECT_IND
Directed high duty cycle mode.
Periodic advertising synchronization parameters.
uint16_t ble_gap_ext_connect(gap_own_addr_t own_addr_type, gap_ext_init_param_t *p_init_param)
Start an extended connection to a device.
uint16_t ble_gap_bond_dev_addr_get(uint8_t conn_idx, gap_bdaddr_t *p_peer_addr)
Get BD address of the bonded device.
uint16_t ble_gap_appearance_get(uint16_t *p_appearance)
Get GAP appearance value.
gap_adv_prim_cfg_t prim_cfg
Configuration for primary advertising.
gap_adv_period_cfg_t period_cfg
Configuration for periodic advertising (valid only if advertising type is GAP_ADV_TYPE_PERIODIC).
The parameter of connection.
uint16_t ble_gap_ppcp_set(gap_conn_param_t const *p_conn_params)
Set GAP Peripheral Preferred Connection Parameters.
gap_scan_wd_op_param_t scan_param_1m
Scan window opening parameters for LE 1M PHY.
gap_scan_mode_t
Scanning modes.
@ BLE_GAP_AD_TYPE_MORE_16_BIT_UUID
Use of more than 16-bit UUID.
gap_scan_wd_op_param_t scan_param_1m
Scan window opening parameters for LE 1M PHY.
uint16_t ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_length)
Get GAP device name.
@ BLE_GAP_AD_TYPE_3D_INFO
3D Information Data.
@ GAP_ADV_PROP_PER_TX_PWR_BIT
uint8_t adv_mode
Advertising mode (see enum gap_adv_mode_t).
gap_scan_type_t scan_type
Active scanning or passive scanning.
@ GAP_ADV_ALLOW_SCAN_WLST_CON_ANY
Allow scan req from white-list devices only and connection req from anyone.
uint16_t ble_gap_tx_power_set(gap_activity_role_t role, uint8_t index, int8_t txpwr_dbm)
Set the tx power.
int8_t max_tx_pwr
Maximum power level at which the advertising packets have to be transmitted (between -20 and 7 dBm).
uint16_t ble_gap_lepsm_register(gap_lepsm_register_t *p_lepsm)
Register a LE Protocol/Service Multiplexer.
Configuration for advertising on primary channel.
uint8_t type
Initiating type (see enum gap_init_type_t).
@ GAP_EXT_SCAN_TYPE_LIM_DISC
Limited discovery.
gap_scan_dup_filt_policy_t scan_dup_filt
Duplicate filter policy.
Advertising parameters for extended advertising and periodic advertising.
@ GAP_DISC_MODE_BROADCASTER
Broadcaster mode.
@ BLE_GAP_AD_TYPE_SP_HASH_C
Simple Pairing Hash C.
gap_bdaddr_t bd_addr
Peer device identity.
@ GAP_ACTIVITY_ROLE_SCAN_INIT
Scann role.
@ BLE_GAP_AD_TYPE_PUB_TGT_ADDR
Public Target Address.
void(* rpa_addr_report_callback_t)(ble_actv_type_t type, uint8_t index, const uint8_t *rpa_addr)
The BLE rpa address report callback.
@ GAP_ADV_ALLOW_SCAN_ANY_CON_WLST
Allow scan req from anyone and connection req from white-list devices only.
@ GAP_ADV_PROP_USE_LEGACY_PDUS_POS
Use legacy advertising PDUs.
uint16_t ble_gap_privacy_params_set(uint16_t renew_dur, bool enable_flag)
Set privacy related parameters.
uint16_t ble_gap_bond_dev_del(const gap_bdaddr_t *p_peer_addr)
Delete a bond device with the specified BD address.
gap_per_sync_type
Periodic synchronization types.
uint16_t adv_intv_min
Minimum advertising interval (in unit of 1.25 ms).
@ BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID
Require 32-bit service UUID.
gap_dev_info_get_type_t
Get device parameters operation code.
@ BLE_GAP_AD_TYPE_OOB_FLAGS
Out of Band Flag.
@ GAP_PHY_1MBPS_VALUE
LE 1M PHY.
@ GAP_ACTIVITY_ROLE_CON
Connect role.
#define MAX_KEY_LEN
The key length.
gap_bdaddr_t peer_addr
Peer address configuration (only used in case of directed advertising, or used to locate the IRK list...
uint16_t ble_gap_whitelist_clear(void)
Clear all the entries in the current white list.
@ BLE_GAP_AD_TYPE_CLASS_OF_DEVICE
Class of device.
@ GAP_EXT_DUP_FILT_EN_PERIOD
Enable filtering of duplicated packets, reset for each scan period.
uint16_t slave_latency
Slave latency.
uint16_t scan_intv
Scan interval between 0x0004 and 0xFFFF in 0.625 ms (range: 2.5 ms to 40.959375s).
gap_ext_conn_param_t conn_param_2m
Connection parameters for LE 2M PHY.
@ GAP_EXT_SCAN_TYPE_GEN_DISC
General discovery.
uint16_t ble_gap_device_name_set(gap_dev_name_write_perm_t write_perm, uint8_t const *p_dev_name, uint16_t length)
Set GAP device name.
@ GAP_EXT_SCAN_PROP_FILT_TRUNC_BIT
Filter truncated advertising or scan response reports.
uint16_t ble_gap_per_adv_list_add(const period_adv_list_t *p_pal_list)
Add the devices into current periodic advertising list.
uint16_t ble_gap_whitelist_del(const white_list_t *p_whitelist)
Delete the devices out of current white list.
@ BLE_GAP_ROLE_BROADCASTER
Broadcaster role.
uint8_t type
Type of scanning to be started (see enum gap_ext_scan_type_t).
@ BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID
Require 16-bit service UUID.
@ GAP_EXT_SCAN_TYPE_OBSERVER
Observer.
@ BLE_GAP_GET_DEV_TX_POWER
Read the minimum and maximum transmit powers supported by the Controller.
uint8_t filter_pol
Advertising filtering policy (see enum gap_adv_filter_policy_t).
LE Protocol/Service Multiplexer information.
@ BLE_GAP_AD_TYPE_SPAIR_HASH
Simple Pairing Hash C-256.
Extended initiating parameters.
@ GAP_PER_SYNC_TYPE_SELECTIVE
Use periodic advertiser list for synchronization.
@ GAP_ADV_PROP_DIRECTED_BIT
privacy_mode_t
Privacy mode.
gap_scan_prop_t
Scanning properties bit field bit value.