Go to the documentation of this file.
50 #ifndef __BLE_GAPM_H__
51 #define __BLE_GAPM_H__
72 #define CO_BIT(pos)(1UL<<(pos))
73 #define BLE_GAP_MAX_ADV_NUM 5
74 #define BLE_GAP_MAX_PER_SYNC_NUM 5
75 #define BLE_GAP_MAX_BOND_NUM 10
76 #define BLE_GAP_MAX_WL_NUM 10
78 #define BLE_GAP_MAX_PRD_ADV_NUM 4
79 #define BLE_GAP_MAX_KEY_LEN 16
80 #define BLE_GAP_NVALID_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 BLE_GAP_ADV_CHANNEL_37 0x01
146 #define BLE_GAP_ADV_CHANNEL_38 0x02
147 #define BLE_GAP_ADV_CHANNEL_39 0x04
148 #define BLE_GAP_ADV_CHANNEL_37_38_39 0x07
uint8_t phy
PHY on which synchronization has been established.
ble_gap_per_sync_type_t
Periodic synchronization types.
uint16_t ble_gap_rslv_addr_read(ble_gap_rslv_addr_read_op_id_t op_code, ble_gap_bdaddr_t peer_iden_addr)
Read peer or local resolvable address, this address generated by controller.
@ BLE_GAP_AD_TYPE_RQRD_32_BIT_SVC_UUID
Require 32-bit service UUID.
@ BLE_GAP_ROLE_PERIPHERAL
Peripheral/Slave role.
@ BLE_GAP_ADV_PROP_SCANNABLE_POS
Indicate that advertising is scannable, reception of SCAN_REQ or AUX_SCAN_REQ PDUs is accepted.
@ BLE_GAP_PRIVACY_MODE_NETWORK
Set to the network privacy mode for the peer device.
uint8_t max_skip
Maximum number of advertising events the controller can skip before sending the AUX_ADV_IND packets.
uint16_t conn_to
Timeout for automatic connection establishment (in unit of 10ms).
@ BLE_GAP_SEC_LVL_LE_ENC_AUTH
Legacy encryption with auth.
ble_gap_scan_wd_op_param_t scan_param_1m
Scan window opening parameters for LE 1M PHY.
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.
uint16_t ble_gap_per_adv_list_del(const ble_gap_period_adv_list_t *p_pal_list)
Delete the devices out of periodic advertising list.
@ BLE_GAP_PHY_CODED_VALUE
LE Coded PHY.
uint16_t sup_timeout
Link supervision timeout (in unit of 10ms).
@ BLE_GAP_AD_TYPE_TRANSMIT_POWER
Transmit power.
@ BLE_GAP_CLK_ACC_250
250 ppm.
@ BLE_GAP_SCAN_GEN_DISC_MODE
General discoverable mode.
uint16_t ble_gap_whitelist_add(const ble_gap_white_list_t *p_whitelist)
Add the devices into current white list.
Configuration for advertising on primary channel.
uint16_t ble_gap_irk_set(ble_gap_sec_key_t *p_irk)
Set IRK used for resolvable random BD address generation (LSB first).
@ BLE_GAP_CLK_ACC_75
70 ppm.
uint16_t ble_gap_ppcp_get(ble_gap_conn_param_t *p_conn_params)
Get GAP Peripheral Preferred Connection Parameters.
ble_gap_privacy_mode_t priv_mode
Privacy mode, see enum ble_gap_privacy_mode_t.
Scan Window operation parameters.
ble_gap_bdaddr_t peer_addr
Peer address configuration (only used in case of directed advertising, or used to locate the IRK list...
ble_gap_bdaddr_t peer_addr
Scan request info.
@ BLE_GAP_ACTIVITY_ROLE_ADV
Adertise role.
@ BLE_GAP_REPORT_TYPE_PER_ADV
Periodic advertising report.
int8_t max_tx_pwr
Maximum power level at which the advertising packets have to be transmitted (between -20 and 7 dBm).
@ BLE_GAP_GET_MAX_LE_ADV_DATA_LEN
Get maximum data length for advertising data.
@ BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_ANY
Allow scan req from white-list devices only and connection req from anyone.
ble_gap_adv_prim_cfg_t prim_cfg
Configuration for primary advertising.
@ BLE_GAP_ROLE_BROADCASTER
Broadcaster role.
uint16_t ble_gap_scan_start(void)
Start scanning.
Parameters for legacy scanning.
@ BLE_GAP_ADV_PROP_PER_TX_PWR_POS
Include TX power in the periodic advertising PDU.
@ BLE_GAP_AD_TYPE_MORE_32_BIT_UUID
Use of more than 32-bit UUD.
@ BLE_GAP_REPORT_INFO_CONN_ADV_BIT
Connectable advertising.
ble_gap_privacy_mode_t
Privacy mode.
ble_gap_evt_rslv_addr_report_t rslv_addr_report
Resolvable Address report parameter, generated by host.
@ BLE_GAP_EXT_SCAN_TYPE_LIM_DISC
Limited discovery.
uint8_t rsvd
Reserved for future use.
@ BLE_GAP_ADV_PROP_HDC_BIT
@ BLE_GAP_WRITE_PERM_UNAUTH
LE Security Mode 1, Level 2.
@ BLE_GAP_ROLE_CENTRAL
Master/Central role.
@ BLE_GAP_ADV_PROP_TX_PWR_BIT
@ BLE_GAP_ADV_TYPE_LEGACY
Legacy advertising.
@ BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_POS
Indicate if application must be informed about receiving scan request PDUs.
ble_gap_scan_dup_filt_policy_t
Duplicate filter policy.
@ BLE_GAP_ROLE_ALL
Device has all roles, both peripheral and central.
@ BLE_GAP_GET_DEV_BDADDR
Get local device BD Address.
ble_gap_adv_data_type_t
Advertising data type.
uint16_t ble_gap_reslv_rpa_addr(uint8_t *reslv_addr, uint8_t src_info, ble_gap_reslv_rpa_addr_callback_t cb)
Resolve the rpa address.
uint16_t ble_gap_dev_info_get(ble_gap_dev_info_get_type_t type)
Get the device information according to param type.
uint16_t conn_latency
Slave latency.
@ BLE_GAP_GET_DEV_VERSION
Get version information for the local Controller.
ble_gap_bdaddr_t peer_addr
Peer address configuration (only used in case of directed advertising or used to locate the IRK list)...
@ BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED
Legacy BT not supported: AD Flag.
uint16_t ble_gap_connect_cancel(void)
Cancel an initiated connection.
@ BLE_GAP_AD_TYPE_COMPLETE_NAME
Complete Device name.
@ BLE_GAP_CLK_ACC_50
50 ppm.
uint16_t ble_gap_rpa_list_get(ble_gap_ral_dev_list_t *p_rpa_list)
Get the RPA list info.
ble_gap_disc_mode_t disc_mode
Discovery mode (see enum ble_gap_disc_mode_t).
void ble_gap_pair_enable(bool enable)
Decide whether to support the pair feature.
The struct of broadcast address with broadcast type.
uint16_t length
Report length.
@ BLE_GAP_OWN_ADDR_STATIC
Public or Private Static Address according to device address configuration.
@ BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE
General discovery flag: AD Flag.
bool mks_flag
Whether to use maximum-size key (16 bytes) or not.
@ BLE_GAP_SCAN_ACTIVE
Active scan type.
@ BLE_GAP_REPORT_INFO_DIR_ADV_BIT
Directed advertising.
@ BLE_GAP_ACTIVITY_ROLE_CON
Connect role.
@ BLE_GAP_AD_TYPE_MORE_16_BIT_UUID
Use of more than 16-bit UUID.
@ BLE_GAP_ADV_ALLOW_SCAN_WLST_CON_WLST
Allow scan and connection requests from white-list devices only.
@ BLE_GAP_OWN_ADDR_GEN_RSLV
Generated resolvable private random address.
@ BLE_GAP_CLK_ACC_20
20 ppm.
Advertising report event for BLE_GAPM_EVT_ADV_REPORT.
uint16_t sync_to
Synchronization timeout for the periodic advertising (in unit of 10ms between 100ms and 163....
@ BLE_GAP_SCAN_LIM_DISC_MODE
Limited discoverable mode.
uint16_t ble_gap_bond_devs_clear(void)
Clear all bonded devices.
@ BLE_GAP_ADV_PROP_TX_PWR_POS
Include TX power in the extended header of the advertising PDU.
uint8_t chnl_map
Bit field indicating the channel map.
int8_t max_tx_pwr
Maximum power level at which the advertising packets have to be transmitted (between -20dbm and 7dbm)...
Advertising timing parameter.
@ BLE_GAP_AD_TYPE_SERVICE_16_BIT_DATA
Service data 16-bit UUID.
@ BLE_GAP_AD_TYPE_LE_BT_ADDR
LE Bluetooth Device Address.
uint16_t ble_gap_tx_power_get(ble_gap_actv_role_t role, uint8_t index, int8_t *txpwr_dbm)
Get the tx power.
uint16_t ble_gap_addr_set(ble_gap_bdaddr_t const *p_addr)
Set the device identity address (public or random static).
ble_gap_adv_prop_pos_t
Advertising properties bit field and bit positions.
@ BLE_GAP_STOPPED_REASON_CONN_EST
Stop with connection established.
ble_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)...
ble_gap_bdaddr_t bd_addr
Advertiser address information.
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_STOPPED_REASON_TIMEOUT
Stop with timeout.
ble_gap_role_t
GAP role options.
Periodic advertising information.
uint16_t ble_gap_device_name_set(ble_gap_dev_name_write_perm_t write_perm, uint8_t const *p_dev_name, uint16_t length)
Set GAP device name.
ble_gap_ext_scan_type_t
Extended scanning types.
ble_gap_scan_wd_op_param_t scan_param_coded
Scan window opening parameters for LE Coded PHY.
ble_gap_adv_mode_t
GAP advertising modes.
ble_gap_adv_report_info_t adv_info
Bit field providing information about the received report.
@ BLE_GAP_ADV_PROP_ANONYMOUS_BIT
@ BLE_GAP_PHY_1MBPS_VALUE
LE 1M PHY.
ble_gap_actv_role_t
Possible roles of the activity.
Extended initiating parameters.
@ BLE_GAP_ADV_TYPE_ADV_LOW_DIRECT_IND
Directed low duty cycle mode.
ble_gap_le_phy_value_t
Specify what PHY the Controller has changed for TX/RX.
@ BLE_GAP_ADV_PROP_DIRECTED_BIT
uint8_t clk_acc
Advertiser clock accuracy.
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_128_BIT_UUID
Complete List of 128-bit UUID.
uint32_t adv_intv_max
Maximum advertising interval (in unit of 625 us).
@ BLE_GAP_ADV_PROP_SCAN_REQ_NTF_EN_BIT
@ BLE_GAP_WRITE_PERM_DISABLE
Disable write access.
uint16_t ble_gap_bond_dev_del(const ble_gap_bdaddr_t *p_peer_addr)
Delete a bond device with the specified BD address.
uint16_t ble_gap_whitelist_get(ble_gap_white_list_t *p_whitelist)
Get the content of the whole white list.
uint16_t conn_intv_max
Maximum value for the connection interval (in unit of 1.25ms).
@ BLE_GAP_CLK_ACC_100
10 ppm.
@ BLE_GAP_EXT_SCAN_TYPE_CONN_DISC
Connectable discovery.
Periodic advertising synchronization parameters.
Read resolvable address event for BLE_GAPM_EVT_READ_RSLV_ADDR.
ble_gap_rslv_addr_read_op_id_t
Operation code used to read resolvable address.
@ BLE_GAP_AD_TYPE_PUB_TGT_ADDR
Public Target Address.
@ BLE_GAP_GET_DEV_TX_POWER
Read the minimum and maximum transmit powers supported by the Controller.
uint16_t ble_gap_chnl_map_timer_set(bool enable_flag)
Set ble channel map update timer enable or disable.
LE Protocol/Service Multiplexer information.
@ BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_ANY
Allow both scan and connection requests from anyone.
ble_gap_scan_type_t scan_type
Active scanning or passive scanning.
@ BLE_GAP_ADV_PROP_PER_TX_PWR_BIT
uint16_t conn_intv_min
Minimum value for the connection interval (in unit of 1.25ms).
@ BLE_GAP_ADV_DATA_TYPE_DATA
Advertising data.
uint16_t ble_gap_per_sync_param_set(uint8_t per_sync_idx, ble_gap_per_sync_param_t *p_per_sync_param)
Set the parameters used for periodic sync.
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...
uint8_t adv_sid
Advertising SID , valid only for periodic advertising report.
ble_gap_clk_acc_t
Clock ACC error.
@ BLE_GAP_SCAN_PROP_FILT_TRUNC_BIT
Filter truncated advertising or scan response reports.
Legacy initiating parameters.
@ BLE_GAP_SCAN_PROP_PHY_CODED_BIT
Scan advertisement on the LE Coded PHY.
@ BLE_GAP_ADV_PROP_SCANNABLE_BIT
@ BLE_GAP_AD_TYPE_RQRD_128_BIT_SVC_UUID
Require 128-bit service UUID.
@ BLE_GAP_SCAN_FILT_DUPLIC_EN
Enable filtering of duplicate packets.
@ BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_BIT
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_LEG
Legacy scan response report.
@ BLE_GAP_SCAN_FILT_DUPLIC_DIS
Disable filtering of duplicate packets.
@ BLE_GAP_ADV_PROP_USE_LEGACY_PDUS_POS
Use legacy advertising PDUs.
uint16_t ble_gap_update_adv_data(uint8_t adv_idx, ble_gap_adv_data_type_t type, const uint8_t *p_data, uint16_t length)
Update Advertising Data, Scan Response Data and Periodic Advertising Data.
ble_gap_ext_scan_dup_filt_policy_t
Filtering policy for duplicated packets.
uint8_t per_sync_idx
Periodic syncronization index, valid only for periodic advertising report.
@ BLE_GAP_ADV_TYPE_ADV_IND
Undirected connectable and scannable mode.
ble_gap_stopped_reason_t reason
Scan Stop info.
@ BLE_GAP_PHY_UNDEF_VALUE
Undefined LE PHY.
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_16_BIT_UUID
Complete List of 16-bit UUID.
ble_gap_evt_dev_info_get_t dev_info
Device info parameters.
ble_gap_adv_period_cfg_t period_cfg
Configuration for periodic advertising (valid only if advertising type is GAP_ADV_TYPE_PERIODIC).
ble_gap_addr_t rpa_addr
rpa address info.
@ BLE_GAP_PRIVACY_MODE_DEVICE
Set to the device privacy mode for the peer device.
@ BLE_GAP_SCAN_PROP_ACTIVE_CODED_BIT
Active scan on LE Coded PHY (scan request PDUs may be sent).
#define CO_BIT(pos)
Bit operation helper.
BLE GAPM event structure.
uint8_t prop
Properties for the scan procedure (see enum ble_gap_scan_prop for bit signification).
uint16_t adv_intv_max
Maximum advertising interval (in unit of 1.25 ms).
@ BLE_GAP_ACTIVITY_ROLE_SCAN_INIT
Scann role.
@ BLE_GAP_DISC_MODE_BROADCASTER
Broadcaster mode.
ble_gap_actv_type_t
Activity type.
@ BLE_GAP_ADV_PROP_ANONYMOUS_POS
Enable anonymous mode.
@ BLE_GAP_ADV_FLAG_LE_LIMITED_DISC_MODE
Limited discovery flag: AD Flag.
@ BLE_GAP_CLK_ACC_150
150 ppm.
ble_gap_evt_scan_req_t scan_req
Scan Request parameter.
uint8_t adv_sid
Advertising SID.
uint16_t prop
Bit field value provided by advertising properties.
@ BLE_GAP_ADV_ALLOW_SCAN_ANY_CON_WLST
Allow scan req from anyone and connection req from white-list devices only.
@ BLE_GAP_AD_TYPE_SPAIR_RAND
Simple Pairing Randomizer R-256.
@ BLE_GAP_GET_DEV_RF_RF_PATH_COMP
Get RF path compensation values.
uint8_t num
Number of available items.
@ 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_reslv_rpa_addr_callback_t)(uint8_t status, ble_gap_bdaddr_t *iden_addr, uint8_t src_info)
The BLE reslove rpa address callback.
ble_gap_ext_conn_param_t conn_param_2m
Connection parameters for LE 2M PHY.
ble_gap_init_type_t type
Initiating type (see enum ble_gap_init_type_t).
uint16_t ble_gap_per_sync_stop(uint8_t per_sync_idx)
Stop periodic synchronization.
uint8_t op_code
Operation code.
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...
@ BLE_GAP_CLK_ACC_30
30 ppm.
int8_t tx_pwr
TX power (in dBm).
@ BLE_GAP_OPCODE_PEER_RSLV_ADDR_READ
Peer resolvable address operation.
@ BLE_GAP_AD_TYPE_LE_ROLE
LE Role.
@ BLE_GAP_ADV_TYPE_ADV_NONCONN_IND
Non-connectable and non-scanable mode.
The parameter of connection.
@ BLE_GAP_AD_TYPE_SLAVE_CONN_INT_RANGE
Slave connection interval range.
@ BLE_GAP_ROLE_NONE
No role set yet.
ble_gap_stopped_reason_t reason
Advertising Stop info.
ble_gap_ext_scan_dup_filt_policy_t dup_filt_pol
Duplicate packet filtering policy (see enum ble_gap_ext_scan_dup_filt_policy_t).
File that contains error codes.
@ BLE_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_connect(ble_gap_own_addr_t own_addr_type, ble_gap_init_param_t *p_init_param)
Start a legacy connection to a device.
ble_gap_ext_conn_param_t conn_param_coded
Connection parameters for LE Coded PHY.
ble_gap_init_type_t
Initiating types.
@ BLE_GAP_REPORT_INFO_SCAN_ADV_BIT
Scannable advertising.
@ BLE_GAP_ADV_PROP_CONNECTABLE_POS
Indicate that advertising is connectable, reception of CONNECT_REQ or UX_CONNECT_REQ PDUs is accepted...
@ BLE_GAP_EXT_DUP_FILT_DIS
Disable filtering of duplicated packets.
ble_gap_evt_adv_report_t adv_report
Advertising Report parameter.
@ BLE_GAP_INIT_TYPE_AUTO_CONN_EST
Automatic connection establishment: establish a connection with all devices whose address is present ...
ble_gap_adv_mode_t adv_mode
Advertising mode (see enum ble_gap_adv_mode_t).
bool use_whitelist
Filter policy.
@ BLE_GAP_REPORT_INFO_COMPLETE_BIT
Report is complete.
@ BLE_GAP_REPORT_TYPE_ADV_LEG
Legacy advertising report.
ble_gap_adv_type_t
Advertising type.
uint8_t num
Number of available items.
uint8_t adv_sid
Advertising SID.
ble_gap_scan_prop_t
Scanning properties bit field bit value.
@ BLE_GAP_ADV_TYPE_ADV_SCAN_IND
Undirected scannable mode.
Sync established event for BLE_GAPM_EVT_SYNC_ESTABLISH.
ble_gap_scan_type_t
Scanning types.
@ BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_HOST
Dual mode for host supported (BR/EDR/LE): AD Flag.
uint8_t phy_second
Secondary PHY on which advertising report has been received.
uint16_t ble_gap_adv_start(uint8_t adv_idx, ble_gap_adv_time_param_t *p_timeout)
Start advertising.
@ BLE_GAP_EXT_DUP_FILT_EN_PERIOD
Enable filtering of duplicated packets, reset for each scan period.
uint16_t duration
Advertising duration (in unit of 10ms).
@ BLE_GAP_ADV_FLAG_SIMUL_BR_EDR_LE_CONTROLLER
Dual mode for controller supported (BR/EDR/LE): AD Flag.
@ BLE_GAP_INIT_TYPE_NAME_DISC
Name discovery: establish a connection with an indicated device in order to read content of its devic...
@ BLE_GAP_ADV_DATA_TYPE_PER_DATA
Periodic advertising data.
ble_gap_disc_mode_t
GAP discoverability modes.
@ BLE_GAP_SCAN_PROP_ACTIVE_1M_BIT
Active scan on LE 1M PHY (scan request PDUs may be sent).
ble_gap_dev_name_write_perm_t
Write permissions of the device name characteristic.
uint16_t scan_wd
Scan window between 0x0004 and 0xFFFF in 0.625 ms (range: 2.5 ms to 40.959375s).
@ BLE_GAP_ADV_TYPE_PERIODIC
Periodic advertising.
uint16_t ble_gap_scan_stop(void)
Stop scanning.
uint32_t adv_intv_min
Minimum advertising interval (in unit of 625 us).
uint16_t ble_gap_per_adv_list_get(ble_gap_period_adv_list_t *p_pal_list)
Get the content of the whole periodic advertising list.
@ BLE_GAP_SEC_LVL_ENC_NO_AUTH
Encryption with no auth.
bool scan_req_ind_en
Indicate if the application should be informed when receiving a scan request from the scanner.
@ BLE_GAP_AD_TYPE_APPEARANCE
Appearance.
@ BLE_GAP_REPORT_TYPE_ADV_EXT
Extended advertising report.
uint8_t rsvd
Reserved for future use.
@ BLE_GAP_EXT_SCAN_TYPE_SEL_OBSERVER
Selective observer.
void ble_gap_ppcp_present_set(bool present_flag)
Set GAP Peripheral Preferred Connection Parameters present flag.
uint16_t interval_min
Minimum value for the connection interval (in unit of 1.25ms).
ble_gap_adv_type_t type
Advertising type (see enum ble_gap_adv_type_t).
@ BLE_GAP_DISC_MODE_LIM_DISCOVERABLE
Limited-discoverable mode.
uint16_t ble_gap_ext_connect(ble_gap_own_addr_t own_addr_type, ble_gap_ext_init_param_t *p_init_param)
Start an extended connection to a device.
uint16_t interval_max
Maximum value for the connection interval (in unit of 1.25ms).
ble_gap_per_sync_type_t type
Periodic synchronization type (see enum ble_gap_per_sync_type_t).
uint16_t ble_gap_whitelist_del(const ble_gap_white_list_t *p_whitelist)
Delete the devices out of current white list.
#define BLE_GAP_MAX_KEY_LEN
The key length.
uint16_t ble_gap_chnl_map_set(ble_gap_chnl_map_t *p_chnl_map)
Set advertising channel map before advertising starts.
@ BLE_GAP_OPCODE_LOCAL_RSLV_ADDR_READ
Local resolvable address operation.
@ BLE_GAP_AD_TYPE_SERVICE_128_BIT_DATA
Service data 128-bit UUID.
ble_gap_adv_flags_t
AD Type Flag - Bit mask.
@ BLE_GAP_AD_TYPE_3D_INFO
3D Information Data.
@ BLE_GAP_AD_TYPE_SHORTENED_NAME
Shortened Device name.
@ BLE_GAP_CLK_ACC_500
500 ppm.
@ BLE_GAP_PER_SYNC_TYPE_GENERAL
Do not use periodic advertiser list for synchronization.
@ BLE_GAP_AD_TYPE_SERVICE_32_BIT_DATA
Service data 32-bit UUID.
@ BLE_GAP_INIT_PROP_CODED_BIT
Scan connectable advertisements on the LE Coded PHY.
uint16_t ble_gap_l2cap_params_set(uint16_t max_mtu, uint16_t max_mps, uint8_t max_nb_lecb)
Set L2CAP related parameters.
@ BLE_GAP_AD_TYPE_SP_HASH_C
Simple Pairing Hash C.
@ BLE_GAP_EXT_SCAN_TYPE_SEL_CONN_DISC
Selective connectable discovery.
Advertising parameters for legacy advertising.
@ BLE_GAP_EXT_SCAN_TYPE_OBSERVER
Observer.
uint16_t ble_gap_privacy_mode_set(ble_gap_bdaddr_t peer_addr, ble_gap_privacy_mode_t mode)
Set privacy mode for peer device.
ble_gap_stopped_reason_t
Stop reason code.
ble_gap_adv_filter_policy_t filter_pol
Advertising filtering policy (see enum ble_gap_adv_filter_policy_t).
uint8_t index
Index of connection or advertising.
ble_gap_evt_rslv_addr_read_t rslv_addr
Read Resolvable Address parameter, generated by controller.
ble_gap_bdaddr_t bd_addr
Peer device identity.
@ BLE_GAP_STOPPED_REASON_ON_USER
Stop with user stopping it actively.
ble_gap_scan_mode_t scan_mode
Scan mode.
ble_gap_sec_lvl_type_t sec_lvl
Security level requirement, see ble_gap_sec_lvl_type_t.
int8_t rssi
RSSI (between -127 and +20 dBm).
uint8_t num
Number of RPA list.
uint16_t ble_gap_ppcp_set(ble_gap_conn_param_t const *p_conn_params)
Set GAP Peripheral Preferred Connection Parameters.
ble_gap_le_phy_value_t phy
Indicate on which PHY secondary advertising has to be performed.
@ BLE_GAP_SCAN_PROP_PHY_1M_BIT
Scan advertisement on the LE 1M PHY.
ble_gap_sec_lvl_type_t
Security level types.
uint16_t ble_gap_per_adv_list_clear(void)
Clear all the entries in the current periodic advertising list.
uint16_t period
Scan period, which is the time interval between two consequent starts of a scan duration by the contr...
uint8_t phy_prim
Primary PHY on which advertising report has been received.
uint16_t ble_gap_lepsm_register(ble_gap_lepsm_register_t *p_lepsm)
Register a LE Protocol/Service Multiplexer.
ble_gap_bdaddr_t broadcaster_addr
Broadcaster device address.
ble_gap_adv_second_cfg_t second_cfg
Configuration for secondary advertising (valid only if advertising type is GAP_ADV_TYPE_EXTENDED or G...
ble_gap_evt_sync_established_t sync_established
Periodic Advertising Synchronization Established parameter.
ble_gap_evt_scan_stop_t scan_stop
Scan Stop parameter.
ble_gap_evt_adv_stop_t adv_stop
Advertising stop parameter.
Parameters for extended scanning.
uint16_t ble_gap_adv_stop(uint8_t adv_idx)
Stop advertising.
@ BLE_GAP_GET_NB_ADV_SETS
Read the maximum number of advertising sets currently supported by the controller.
uint16_t ble_gap_lepsm_unregister(uint16_t le_psm)
Unregister a LE Protocol/Service Multiplexer.
@ BLE_GAP_ADV_TYPE_ADV_HIGH_DIRECT_IND
Directed high duty cycle mode.
void ble_gap_appearance_set(uint16_t appearance)
Set GAP appearance value.
@ BLE_GAP_DISC_MODE_NON_DISCOVERABLE
Non-discoverable mode.
uint16_t ble_gap_update_conn_param_method_set(uint8_t conn_idx, bool use_l2cap_flag)
Set the method for updating connection parameter.
@ BLE_GAP_WRITE_PERM_NOAUTH
LE Security Mode 1, Level 1.
@ BLE_GAP_DISC_MODE_GEN_DISCOVERABLE
General-discoverable mode.
Configuration for periodic advertising.
#define BLE_GAP_MAX_WL_NUM
Maximal white list number.
ble_gap_dev_info_get_type_t
Get device parameters operation code.
uint16_t ble_gap_addr_get(ble_gap_bdaddr_t *p_addr)
Get the device identity address (public or random static).
uint16_t period_adv_intv
Periodic advertising interval (in unit of 1.25ms, min is 7.5ms), valid only for periodic advertising ...
ble_gap_scan_wd_op_param_t scan_param_coded
Scan window opening parameters for LE Coded PHY.
@ BLE_GAP_GET_SUGGESTED_DFLT_LE_DATA_LEN
Get suggested values (SuggestedMaxTxOctets and SuggestedMaxTxTime) for the Controller's maximum trans...
uint16_t window
Scan window between 0x0004 and 0x4000 in 0.625 ms (range: 2.5 ms to 10.24s).
@ BLE_GAP_PER_SYNC_TYPE_SELECTIVE
Use periodic advertiser list for synchronization.
@ BLE_GAP_AD_TYPE_FLAGS
Flag.
@ BLE_GAP_INIT_PROP_1M_BIT
Scan connectable advertisements on the LE 1M PHY.
Periodic advertising list.
#define BLE_GAP_MAX_PRD_ADV_NUM
Maximal periodic advertising list number.
@ BLE_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
Advertising channel map.
@ BLE_GAP_ACTIVITY_ROLE_UNKNOWN
Unknown role.
@ BLE_GAP_SCAN_PASSIVE
Passive scan type.
ble_gap_adv_report_type_t adv_type
Advertising type.
ble_gap_scan_wd_op_param_t scan_param_1m
Scan window opening parameters for LE 1M PHY.
@ BLE_GAP_AD_TYPE_CLASS_OF_DEVICE
Class of device.
ble_gap_le_phy_value_t phy
Indicate on which PHY primary advertising has to be performed.
uint16_t ble_gap_appearance_get(uint16_t *p_appearance)
Get GAP appearance value.
@ BLE_GAP_AD_TYPE_OOB_FLAGS
Out of Band Flag.
@ BLE_GAP_AD_TYPE_RAND_TGT_ADDR
Random Target Address.
uint16_t duration
Scan duration (in unit of 10ms).
uint8_t prop
Properties for the initiating procedure (see enum ble_gap_init_prop_t for bit signification).
uint16_t ble_gap_adv_data_set(uint8_t adv_idx, ble_gap_adv_data_type_t type, const uint8_t *p_data, uint16_t length)
Set Advertising Data, Scan Response Data and Periodic Advertising Data.
ble_gap_adv_report_type_t
Advertising report type.
uint16_t slave_latency
Slave latency.
uint16_t ble_gap_adv_param_set(uint8_t adv_idx, ble_gap_own_addr_t own_addr_type, ble_gap_adv_param_t *p_adv_param)
Set parameters for advertising.
@ BLE_GAP_AD_TYPE_COMPLETE_LIST_32_BIT_UUID
Complete List of 32-bit UUID.
ble_gap_scan_mode_t
Scanning modes.
@ BLE_GAP_REPORT_TYPE_SCAN_RSP_EXT
Extended scan response report.
uint8_t num
Number of bonded device.
@ BLE_GAP_ROLE_OBSERVER
Observer role.
uint16_t scan_intv
Scan interval between 0x0004 and 0xFFFF in 0.625 ms (range: 2.5 ms to 40.959375s).
#define BLE_GAP_MAX_BOND_NUM
Maximal bonding number.
ble_gap_bdaddr_t peer_addr
Address of peer device in case white list is not used for connection.
@ BLE_GAP_AD_TYPE_MANU_SPECIFIC_DATA
Manufacturer specific data.
uint16_t ble_gap_device_name_get(uint8_t *p_dev_name, uint16_t *p_length)
Get GAP device name.
@ BLE_GAP_OWN_ADDR_GEN_NON_RSLV
Generated non-resolvable private random address.
ble_gap_adv_filter_policy_t filter_pol
Advertising filtering policy (see enum ble_gap_adv_filter_policy_t).
@ BLE_GAP_AD_TYPE_MORE_128_BIT_UUID
Use of more than 128-bit UUID.
uint16_t ble_gap_per_adv_list_add(const ble_gap_period_adv_list_t *p_pal_list)
Add the devices into current periodic advertising list.
ble_gap_own_addr_t
Own BD address source of the device.
@ BLE_GAP_AD_TYPE_RQRD_16_BIT_SVC_UUID
Require 16-bit service UUID.
uint16_t ble_gap_bond_dev_addr_get(uint8_t conn_idx, ble_gap_bdaddr_t *p_peer_addr)
Get BD address of the bonded device.
ble_gap_ext_scan_type_t type
Type of scanning to be started (see enum ble_gap_ext_scan_type_t).
ble_gap_actv_type_t type
Activity type.
uint16_t adv_intv_min
Minimum advertising interval (in unit of 1.25 ms).
@ BLE_GAP_INIT_PROP_2M_BIT
Connection parameters for the LE 2M PHY are provided.
ble_gap_addr_t gap_addr
Resolvable address info.
@ BLE_GAP_AD_TYPE_SP_RANDOMIZER_R
Simple Pairing Randomizer.
ble_gap_disc_mode_t disc_mode
Discovery mode (see enum ble_gap_disc_mode_t).
uint16_t interval
Scan interval between 0x0004 and 0x4000 in 0.625 ms (range: 2.5 ms to 10.24s).
uint16_t skip
Number of periodic advertising that can be skipped after a successful reception.
ble_gap_ext_conn_param_t conn_param_1m
Connection parameters for LE 1M PHY.
@ BLE_GAP_AD_TYPE_ADV_INTV
Advertising Interval.
ble_gap_bdaddr_t direct_addr
Target address (in case of a directed advertising report).
Get device info event for BLE_GAPC_EVT_DEV_INFO_GOT.
@ BLE_GAP_ACTV_TYPE_PER_SYNC
uint8_t max_adv_evt
Maximum number of extended advertising events.
Configuration for advertising on secondary channel.
uint16_t ble_gap_privacy_params_set(uint16_t renew_dur, bool enable_flag)
Set privacy related parameters.
uint16_t ble_gap_bond_devs_get(ble_gap_bond_dev_list_t *p_bond_list)
Get all bonded devices.
Resolvable address report event for BLE_GAPM_EVT_RSLV_ADDR_REPORT.
uint16_t timeout
Scan timeout should be a value between 0x0001 and 0xFFFF(unit: 10 ms).
@ BLE_GAP_EXT_DUP_FILT_EN
Enable filtering of duplicated packets.
@ BLE_GAP_ADV_TYPE_EXTENDED
Extended advertising.
ble_gap_scan_dup_filt_policy_t scan_dup_filt
Duplicate filter policy.
ble_gap_init_type_t type
Initiating type (see enum ble_gap_init_type_t).
uint16_t conn_timeout
Timeout for connection establishment (in unit of 10ms).
@ BLE_GAP_WRITE_PERM_AUTH
LE Security Mode 1, Level 3.
uint16_t adv_intv_max
Maximum advertising interval (in unit of 625 us).
Advertising parameters for extended advertising and periodic advertising.
ble_gap_bdaddr_t bd_addr
Advertiser address.
uint16_t adv_intv_min
Minimum advertising interval (in unit of 625 us).
@ BLE_GAP_ADV_PROP_DIRECTED_POS
Indicate that advertising targets at a specific device.
uint16_t ble_gap_whitelist_clear(void)
Clear all the entries in the current white list.
@ BLE_GAP_EXT_SCAN_TYPE_GEN_DISC
General discovery.
ble_gap_adv_filter_policy_t
Advertising filter policy.
uint16_t ble_gap_scan_param_set(ble_gap_own_addr_t own_addr_type, ble_gap_scan_param_t *p_scan_param)
Set parameters for scanning.
uint8_t adv_sid
Advertising SID.
@ BLE_GAP_SEC_LVL_SC_ENC_AUTH
Security connection encryption with auth.
ble_gap_ad_type_t
GAP advertising types.
uint16_t ble_gap_ext_adv_param_set(uint8_t adv_idx, ble_gap_own_addr_t own_addr_type, ble_gap_ext_adv_param_t *p_adv_param)
Set extended parameters for advertising.
ble_gap_adv_prop_t
Advertising properties bit field bit value.
@ BLE_GAP_SEC_LVL_NO_SECURITY
No encryption or auth.
@ BLE_GAP_AD_TYPE_SPAIR_HASH
Simple Pairing Hash C-256.
ble_gap_bdaddr_t peer_addr
Peer device address.
@ BLE_GAP_ADV_PROP_CONNECTABLE_BIT
@ BLE_GAP_PHY_2MBPS_VALUE
LE 2M PHY.
uint16_t intv
Periodic advertising interval (in unit of 1.25ms, min is 7.5ms).
uint16_t sync_hdl
Sync handle.
uint16_t supervision_to
Link supervision timeout (in unit of 10ms).
@ BLE_GAP_ADV_DATA_TYPE_SCAN_RSP
Scan response data.
ble_gap_adv_report_info_t
Advertising report information.
uint16_t le_psm
LE Protocol/Service Multiplexer (range: 1 to 255), PSMs should be odd.
uint16_t ble_gap_ext_scan_param_set(ble_gap_own_addr_t own_addr_type, ble_gap_ext_scan_param_t *p_scan_param)
Set extended parameters for scanning.
ble_gap_init_prop_t
Initiating properties.
@ BLE_GAP_SCAN_OBSERVER_MODE
Observer mode.
@ BLE_GAP_AD_TYPE_TK_VALUE
Temporary key value.
uint16_t ble_gap_tx_power_set(ble_gap_actv_role_t role, uint8_t index, int8_t txpwr_dbm)
Set the tx power.
uint16_t ce_len
The length of connection event needed for this LE connection.
@ BLE_GAP_INIT_TYPE_DIRECT_CONN_EST
Direct connection establishment: establish a connection with an indicated device.
@ BLE_GAP_WRITE_PERM_SEC_CON
LE Security Mode 1, Level 4.