RA Flexible Software Package Documentation  Release v5.2.0

 

Functions

ble_status_t R_BLE_GAP_Init (ble_gap_app_cb_t gap_cb)
 Initialize the Host Stack. More...
 
ble_status_t R_BLE_GAP_Terminate (void)
 Terminate the Host Stack. More...
 
ble_status_t R_BLE_GAP_UpdConn (uint16_t conn_hdl, uint8_t mode, uint16_t accept, st_ble_gap_conn_param_t *p_conn_updt_param)
 Update the connection parameters. More...
 
ble_status_t R_BLE_GAP_SetDataLen (uint16_t conn_hdl, uint16_t tx_octets, uint16_t tx_time)
 Update the packet size and the packet transmit time. More...
 
ble_status_t R_BLE_GAP_Disconnect (uint16_t conn_hdl, uint8_t reason)
 Disconnect the link. More...
 
ble_status_t R_BLE_GAP_SetPhy (uint16_t conn_hdl, st_ble_gap_set_phy_param_t *p_phy_param)
 Set the phy for connection. More...
 
ble_status_t R_BLE_GAP_SetDefPhy (st_ble_gap_set_def_phy_param_t *p_def_phy_param)
 Set the default phy which allows remote device to change. More...
 
ble_status_t R_BLE_GAP_SetPrivMode (st_ble_dev_addr_t *p_addr, uint8_t *p_privacy_mode, uint8_t device_num)
 Set the privacy mode. More...
 
ble_status_t R_BLE_GAP_ConfWhiteList (uint8_t op_code, st_ble_dev_addr_t *p_addr, uint8_t device_num)
 Set White List. More...
 
ble_status_t R_BLE_GAP_GetVerInfo (void)
 Get the version number of the Controller and the host stack. More...
 
ble_status_t R_BLE_GAP_ReadPhy (uint16_t conn_hdl)
 Get the phy settings. More...
 
ble_status_t R_BLE_GAP_ConfRslvList (uint8_t op_code, st_ble_dev_addr_t *p_addr, st_ble_gap_rslv_list_key_set_t *p_peer_irk, uint8_t device_num)
 Set Resolving List. More...
 
ble_status_t R_BLE_GAP_EnableRpa (uint8_t enable)
 Enable/Disable address resolution and generation of a resolvable private address. More...
 
ble_status_t R_BLE_GAP_SetRpaTo (uint16_t rpa_timeout)
 Set the update time of resolvable private address. More...
 
ble_status_t R_BLE_GAP_ReadRpa (st_ble_dev_addr_t *p_addr)
 Get the resolvable private address of local device. More...
 
ble_status_t R_BLE_GAP_ReadRssi (uint16_t conn_hdl)
 Get RSSI. More...
 
ble_status_t R_BLE_GAP_ReadChMap (uint16_t conn_hdl)
 Get the Channel Map. More...
 
ble_status_t R_BLE_GAP_SetRandAddr (uint8_t *p_random_addr)
 Set a random address. More...
 
ble_status_t R_BLE_GAP_SetAdvParam (st_ble_gap_adv_param_t *p_adv_param)
 Set advertising parameters. More...
 
ble_status_t R_BLE_GAP_SetAdvSresData (st_ble_gap_adv_data_t *p_adv_srsp_data)
 Set advertising data/scan response data/periodic advertising data. More...
 
ble_status_t R_BLE_GAP_StartAdv (uint8_t adv_hdl, uint16_t duration, uint8_t max_extd_adv_evts)
 Start advertising. More...
 
ble_status_t R_BLE_GAP_StopAdv (uint8_t adv_hdl)
 Stop advertising. More...
 
ble_status_t R_BLE_GAP_SetPerdAdvParam (st_ble_gap_perd_adv_param_t *p_perd_adv_param)
 Set periodic advertising parameters. More...
 
ble_status_t R_BLE_GAP_StartPerdAdv (uint8_t adv_hdl)
 Start periodic advertising. More...
 
ble_status_t R_BLE_GAP_StopPerdAdv (uint8_t adv_hdl)
 Stop periodic advertising. More...
 
ble_status_t R_BLE_GAP_GetRemainAdvBufSize (uint16_t *p_remain_adv_data_size, uint16_t *p_remain_perd_adv_data_size)
 Get buffer size for advertising data/scan response data/periodic advertising data in the Controller. More...
 
ble_status_t R_BLE_GAP_RemoveAdvSet (uint8_t op_code, uint8_t adv_hdl)
 Delete advertising set. More...
 
ble_status_t R_BLE_GAP_CreateConn (st_ble_gap_create_conn_param_t *p_param)
 Request for a link establishment. More...
 
ble_status_t R_BLE_GAP_CancelCreateConn (void)
 Cancel the request for a link establishment. More...
 
ble_status_t R_BLE_GAP_SetChMap (uint8_t *p_channel_map)
 Set the Channel Map. More...
 
ble_status_t R_BLE_GAP_StartScan (st_ble_gap_scan_param_t *p_scan_param, st_ble_gap_scan_on_t *p_scan_enable)
 Set scan parameter and start scan. More...
 
ble_status_t R_BLE_GAP_StopScan (void)
 Stop scan. More...
 
ble_status_t R_BLE_GAP_CreateSync (st_ble_dev_addr_t *p_addr, uint8_t adv_sid, uint16_t skip, uint16_t sync_to)
 Request for a periodic sync establishment. More...
 
ble_status_t R_BLE_GAP_CancelCreateSync (void)
 Cancel the request for a periodic sync establishment. More...
 
ble_status_t R_BLE_GAP_TerminateSync (uint16_t sync_hdl)
 Terminate the periodic sync. More...
 
ble_status_t R_BLE_GAP_ConfPerdAdvList (uint8_t op_code, st_ble_dev_addr_t *p_addr, uint8_t *p_adv_sid_set, uint8_t device_num)
 Set Periodic Advertiser List. More...
 
ble_status_t R_BLE_GAP_AuthorizeDev (uint16_t conn_hdl, uint8_t author_flag)
 Authorize a remote device. More...
 
ble_status_t R_BLE_GAP_GetRemDevInfo (uint16_t conn_hdl)
 Get the information about remote device. More...
 
ble_status_t R_BLE_GAP_SetPairingParams (st_ble_gap_pairing_param_t *p_pair_param)
 Set the parameters using pairing. More...
 
ble_status_t R_BLE_GAP_SetLocIdInfo (st_ble_dev_addr_t *p_lc_id_addr, uint8_t *p_lc_irk)
 Set the IRK and the identity address distributed to a remote device. More...
 
ble_status_t R_BLE_GAP_SetLocCsrk (uint8_t *p_local_csrk)
 Set the CSRK distributed to a remote device. More...
 
ble_status_t R_BLE_GAP_StartPairing (uint16_t conn_hdl)
 Start pairing. More...
 
ble_status_t R_BLE_GAP_ReplyPairing (uint16_t conn_hdl, uint8_t response)
 Reply the pairing request from a remote device. More...
 
ble_status_t R_BLE_GAP_StartEnc (uint16_t conn_hdl)
 Encryption the link. More...
 
ble_status_t R_BLE_GAP_ReplyPasskeyEntry (uint16_t conn_hdl, uint32_t passkey, uint8_t response)
 Reply the passkey entry request. More...
 
ble_status_t R_BLE_GAP_ReplyNumComp (uint16_t conn_hdl, uint8_t response)
 Reply the numeric comparison request. More...
 
ble_status_t R_BLE_GAP_NotifyKeyPress (uint16_t conn_hdl, uint8_t key_press)
 Notify the input key type which a remote device inputs in the passkey entry. More...
 
ble_status_t R_BLE_GAP_GetDevSecInfo (uint16_t conn_hdl, st_ble_gap_auth_info_t *p_sec_info)
 Get the security information about the remote device. More...
 
ble_status_t R_BLE_GAP_ReplyExKeyInfoReq (uint16_t conn_hdl)
 Distribute the keys of local device. More...
 
ble_status_t R_BLE_GAP_SetRemOobData (st_ble_dev_addr_t *p_addr, uint8_t oob_data_flag, st_ble_gap_oob_data_t *p_oob)
 Set the oob data from a remote device. More...
 
ble_status_t R_BLE_GAP_CreateScOobData (void)
 Create data for oob in secure connection. More...
 
ble_status_t R_BLE_GAP_SetBondInfo (st_ble_gap_bond_info_t *p_bond_info, uint8_t device_num, uint8_t *p_set_num)
 Set the bonding information stored in non-volatile memory to the host stack. More...
 
void R_BLE_GAP_DeleteBondInfo (int32_t local, int32_t remote, st_ble_dev_addr_t *p_addr, ble_gap_del_bond_cb_t gap_del_bond_cb)
 This function deletes the bonding information in Host Stack.
When a function for deleting the bonding information stored in non-volatile area is registered by the gap_del_bond_cb parameter, it is deleted as well as the bonding information in Host Stack. More...
 
ble_status_t R_BLE_GAP_ReplyLtkReq (uint16_t conn_hdl, uint16_t ediv, uint8_t *p_peer_rand, uint8_t response)
 Reply the LTK request from a remote device. More...
 
ble_status_t R_BLE_GAP_SetCteConnlessParam (st_ble_gap_cte_connless_t *p_cte_param)
 Set the parameters for the transmission of Constant Tone Extensions in any periodic advertising. More...
 
ble_status_t R_BLE_GAP_EnableCteConnless (uint16_t adv_hdl, uint8_t enable)
 Enable or disable Constant Tone Extensions in periodic advertising identified by the adv_hdl. More...
 
ble_status_t R_BLE_GAP_StartCteConnlessRecv (st_ble_gap_cte_connless_recv_t *p_cte_recv)
 Enable sampling received Constant Tone Extension fields. More...
 
ble_status_t R_BLE_GAP_StopCteConnlessRecv (uint16_t sync_hdl)
 Disable sampling received Constant Tone Extension fields. More...
 
ble_status_t R_BLE_GAP_SetCteConnParam (st_ble_gap_cte_conn_t *p_cte_param)
 Set the parameters for the transmission of Constant Tone Extensions in ACL link. More...
 
ble_status_t R_BLE_GAP_EnableCteConnRsp (uint16_t conn_hdl, uint8_t enable)
 Enable or disable Constant Tone Extensions Transmission in ACL link by conn_hdl. More...
 
ble_status_t R_BLE_GAP_SetCteConnRecvParam (st_ble_gap_cte_conn_rx_param_t *p_cte_param)
 Set the parameters for the receiving of Constant Tone Extensions in ACL link. and start sampling. More...
 
ble_status_t R_BLE_GAP_StopCteConnRecvSampling (uint16_t conn_hdl)
 Stop sampling of Constant Tone Extensions on the specified connection. More...
 
ble_status_t R_BLE_GAP_StartCteConnReq (st_ble_gap_cte_conn_req_t *p_req)
 Set the parameters and start sending request of Constant Tone Extensions in ACL link to peer. More...
 
ble_status_t R_BLE_GAP_StopCteConnReq (uint16_t handle)
 Stop sending request of Constant Tone Extensions in ACL link to peer. More...
 
ble_status_t R_BLE_GAP_SetDefaultSubrate (st_ble_gap_subrate_param_t *p_subrate_param)
 Set the initial values for the acceptable parameters for subrating requests,. More...
 
ble_status_t R_BLE_GAP_RequestSubrate (uint16_t conn_hdl, st_ble_gap_subrate_param_t *p_subrate_param)
 Request a change to the subrating factor other parameters applied to an existing connection using the Connection Subrate Update procedure. More...
 
ble_status_t R_BLE_GAP_StartPerdAdvSetInfoTransfer (uint16_t adv_hdl, uint16_t conn_hdl, uint16_t service_data)
 This function starts Periodic advertising adv set info transfer to the connection. More...
 
ble_status_t R_BLE_GAP_StartPerdAdvSyncTransfer (uint16_t sync_hdl, uint16_t conn_hdl, uint16_t service_data)
 This function starts Periodic advertising sync transfer. More...
 
ble_status_t R_BLE_GAP_SetPerdAdvSyncTransferParam (uint16_t conn_hdl, st_ble_gap_past_param_t *p_past_param)
 This function starts to accept Periodic advertising sync transfer from the connection. More...
 
ble_status_t R_BLE_GAP_SetDefPerdAdvSyncTransferParam (st_ble_gap_past_param_t *p_past_param)
 This function set the default parameter of Periodic advertising sync transfer for all subsequent connection. It does not affect any existing connection. More...
 
ble_status_t R_BLE_GAP_ReadAntennaInfo (void)
 This function read the switching rates, the sampling rates, the number of antennae, and the maximum length of a transmitted Constant Tone Extension. More...
 
ble_status_t R_BLE_GAP_ReceiverTest (st_ble_gap_recv_test_param_t *p_rx_test_param)
 Start a test where the DUT receives test reference packets at a fixed interval. The tester generates the test reference packets. More...
 
ble_status_t R_BLE_GAP_TransmitterTest (st_ble_gap_trans_test_param_t *p_tx_test_param)
 Start a test where the DUT generates test reference packets at a fixed interval. The Controller shall transmit at the power level indicated by the TX_Power_Level parameter. More...
 
ble_status_t R_BLE_GAP_ModifySleepClockAccuracy (uint8_t act)
 request that the Controller changes its sleep clock accuracy for testing purposes. It should not be used under other circumstances. More...
 
ble_status_t R_BLE_GAP_ReadRemoteTransmitPowerLevel (uint16_t conn_hdl, uint8_t phy)
 Read the transmit power level used by the remote device. More...
 
ble_status_t R_BLE_GAP_SetPathLossReportingParam (st_ble_gap_set_path_loss_rpt_param_t *p_loss_rpt_param)
 Set the path loss threshold reporting parameters for the ACL connection identified. More...
 
ble_status_t R_BLE_GAP_SetPathLossReportingEnable (uint16_t conn_hdl, uint8_t enable)
 Enable or disable path loss reporting for the ACL connection. More...
 
ble_status_t R_BLE_GAP_SetTransmitPowerReportingEnable (uint16_t conn_hdl, uint8_t local_enable, uint8_t remote_enable)
 Enable or disable the transmit power level changing report. More...
 
ble_status_t R_BLE_GAP_SetDataRelatedAddrChanges (uint8_t adv_hdl, uint8_t change_reason)
 Specifies circumstances when the Controller shall refresh any Resolvable Private Address. More...
 
ble_status_t R_BLE_GAP_TestEnd (void)
 Stop any test which is in progress. The Num_Packets for a transmitter test shall be reported as 0x0000. The Num_Packets is an unsigned number and contains the number of received packets. More...
 
ble_status_t R_BLE_GAP_ReqPeerSCA (uint16_t conn_hdl)
 Read the Sleep Clock Accuracy (SCA) of the peer device. More...
 
ble_status_t R_BLE_GAP_EnhancedReadTxPowerLevel (uint16_t conn_hdl, uint8_t phy)
 Read the current and maximum transmit power levels of the local Controller on the ACL connection identified by the Connection_Handle parameter and the PHY indicated by the PHY parameter. More...
 
ble_status_t R_BLE_GAP_SetHostFeat (uint8_t bit_number, uint8_t bit_value)
 Set or clear a bit controlled by the Host in the Link Layer FeatureSet stored in the Controller. More...
 

Detailed Description

(end addtogroup BLE_API)

Data Structures

struct  st_ble_evt_data_t
 st_ble_evt_data_t is the type of the data notified in a GAP Event. More...
 
struct  st_ble_dev_addr_t
 st_ble_dev_addr_t is the type of bluetooth device address(BD_ADDR). More...
 
struct  st_ble_gap_ext_adv_param_t
 Advertising parameters. More...
 
struct  st_ble_gap_adv_data_t
 Advertising data/scan response data/periodic advertising data. More...
 
struct  st_ble_gap_perd_adv_param_t
 Periodic advertising parameter. More...
 
struct  st_ble_gap_scan_phy_param_t
 Scan parameters per scan PHY. More...
 
struct  st_ble_gap_ext_scan_param_t
 Scan parameters. More...
 
struct  st_ble_gap_scan_on_t
 Parameters configured when scanning starts. More...
 
struct  st_ble_gap_conn_param_t
 Connection parameters included in connection interval, slave latency, supervision timeout, ce length. More...
 
struct  st_ble_gap_conn_phy_param_t
 Connection parameters per PHY. More...
 
struct  st_ble_gap_create_conn_param_t
 Connection parameters used in R_BLE_GAP_CreateConn(). More...
 
struct  st_ble_gap_rslv_list_key_set_t
 IRK of a remote device and IRK type of local device used in R_BLE_GAP_ConfRslvList(). More...
 
struct  st_ble_gap_set_phy_param_t
 PHY configuration parameters used in R_BLE_GAP_SetPhy(). More...
 
struct  st_ble_gap_set_def_phy_param_t
 PHY preferences which allows a remote device to set used in R_BLE_GAP_SetDefPhy(). More...
 
struct  st_ble_gap_auth_info_t
 Pairing parameters required from a remote device or information about keys distributed from a remote device. More...
 
struct  st_ble_gap_key_dist_t
 Keys distributed from a remote device. More...
 
struct  st_ble_gap_key_ex_param_t
 This structure includes the distributed keys and negotiated LTK size. More...
 
struct  st_ble_gap_pairing_param_t
 Pairing parameters used in R_BLE_GAP_SetPairingParams(). More...
 
struct  st_ble_gap_oob_data_t
 Oob data received from the remote device. This is used in R_BLE_GAP_SetRemOobData(). More...
 
struct  st_ble_gap_cte_antenna_info_t
 This is the parameters used in R_BLE_GAP_GetAntennaInfo(). More...
 
struct  st_ble_gap_recv_test_param_t
 This is the parameters used in R_BLE_GAP_ReceiverTest() More...
 
struct  st_ble_gap_trans_test_param_t
 This is the parameters used in R_BLE_GAP_TransmitterTest(). More...
 
struct  st_ble_gap_set_path_loss_rpt_param_t
 This is the parameters used in R_BLE_GAP_SetPathLossReportingParam(). More...
 
struct  st_ble_gap_cte_connless_t
 connectionless CTE param More...
 
struct  st_ble_gap_cte_conn_t
 connection CTE param More...
 
struct  st_ble_gap_cte_connless_recv_t
 connectionless CTE receive param More...
 
struct  st_ble_gap_cte_conn_rx_param_t
 connection CTE receive param More...
 
struct  st_ble_gap_cte_conn_req_t
 connection CTE request More...
 
struct  st_ble_gap_subrate_param_t
 subrating param More...
 
struct  st_ble_gap_ver_num_t
 Version number of host stack. More...
 
struct  st_ble_gap_loc_ver_info_t
 Version number of Controller. More...
 
struct  st_ble_gap_loc_dev_info_evt_t
 Version information of local device. More...
 
struct  st_ble_gap_hw_err_evt_t
 Hardware error that is notified from Controller. More...
 
struct  st_ble_gap_cmd_err_evt_t
 HCI Command error. More...
 
struct  st_ble_gap_adv_rept_t
 Advertising Report. More...
 
struct  st_ble_gap_ext_adv_rept_t
 Extended Advertising Report. More...
 
struct  st_ble_gap_perd_adv_rept_t
 Periodic Advertising Report. More...
 
struct  st_ble_gap_adv_rept_evt_t
 Advertising report. More...
 
union  st_ble_gap_adv_rept_evt_t.param
 Advertising Report. More...
 
struct  st_ble_gap_adv_set_evt_t
 Advertising handle. More...
 
struct  st_ble_gap_adv_off_evt_t
 Information about the advertising set which stops advertising. More...
 
struct  st_ble_gap_adv_data_evt_t
 This structure notifies that advertising data has been set to Controller by R_BLE_GAP_SetAdvSresData(). More...
 
struct  st_ble_gap_rem_adv_set_evt_t
 This structure notifies that an advertising set has been removed. More...
 
struct  st_ble_gap_conn_evt_t
 This structure notifies that a link has been established. More...
 
struct  st_ble_gap_disconn_evt_t
 This structure notifies that a link has been disconnected. More...
 
struct  st_ble_gap_rd_ch_map_evt_t
 This structure notifies that Channel Map has been retrieved by R_BLE_GAP_ReadChMap(). More...
 
struct  st_ble_gap_rd_rssi_evt_t
 This structure notifies that RSSI has been retrieved by R_BLE_GAP_ReadRssi(). More...
 
struct  st_ble_gap_dev_info_evt_t
 This structure notifies that information about remote device has been retrieved by R_BLE_GAP_GetRemDevInfo(). More...
 
struct  st_ble_gap_conn_upd_evt_t
 This structure notifies that connection parameters has been updated. More...
 
struct  st_ble_gap_conn_upd_req_evt_t
 This structure notifies that a request for connection parameters update has been received. More...
 
struct  st_ble_gap_conn_hdl_evt_t
 This structure notifies that a GAP Event that includes only connection handle has occurred. More...
 
struct  st_ble_gap_data_len_chg_evt_t
 This structure notifies that the packet data length has been updated. More...
 
struct  st_ble_gap_rd_rpa_evt_t
 This structure notifies that the local resolvable private address has been retrieved by R_BLE_GAP_ReadRpa(). More...
 
struct  st_ble_gap_phy_upd_evt_t
 This structure notifies that PHY for a connection has been updated. More...
 
struct  st_ble_gap_phy_rd_evt_t
 This structure notifies that the PHY settings has been retrieved by R_BLE_GAP_ReadPhy(). More...
 
struct  st_ble_gap_scan_req_recv_evt_t
 This structure notifies that a Scan Request packet has been received from a Scanner. More...
 
struct  st_ble_gap_sync_est_evt_t
 This structure notifies that a Periodic sync has been established. More...
 
struct  st_ble_gap_sync_hdl_evt_t
 This structure notifies that a GAP Event that includes only sync handle has occurred. More...
 
struct  st_ble_gap_white_list_conf_evt_t
 This structure notifies that White List has been configured. More...
 
struct  st_ble_gap_rslv_list_conf_evt_t
 This structure notifies that Resolving List has been configured. More...
 
struct  st_ble_gap_perd_list_conf_evt_t
 This structure notifies that Periodic Advertiser List has been configured. More...
 
struct  st_ble_gap_set_priv_mode_evt_t
 This structure notifies that Privacy Mode has been configured. More...
 
struct  st_ble_gap_pairing_req_evt_t
 This structure notifies that a pairing request from a remote device has been received. More...
 
struct  st_ble_gap_passkey_display_evt_t
 This structure notifies that a request for Passkey display in pairing has been received. More...
 
struct  st_ble_gap_num_comp_evt_t
 This structure notifies that a request for Numeric Comparison in pairing has been received. More...
 
struct  st_ble_gap_key_press_ntf_evt_t
 This structure notifies that the remote device has input a key in Passkey Entry. More...
 
struct  st_ble_gap_pairing_info_evt_t
 This structure notifies that the pairing has completed. More...
 
struct  st_ble_gap_enc_chg_evt_t
 This structure notifies that the encryption status of a link has been changed. More...
 
struct  st_ble_gap_peer_key_info_evt_t
 This structure notifies that the remote device has distributed the keys. More...
 
struct  st_ble_gap_ltk_req_evt_t
 This structure notifies that a LTK request from a remote device has been received. More...
 
struct  st_ble_gap_ltk_rsp_evt_t
 This structure notifies that local device has replied to the LTK request from the remote device. More...
 
struct  st_ble_gap_sc_oob_data_evt_t
 This structure notifies that OOB data for Secure Connections has been generated by R_BLE_GAP_CreateScOobData(). More...
 
struct  st_ble_gap_bond_info_t
 Bonding information used in R_BLE_GAP_SetBondInfo(). More...
 
struct  st_cte_iq_sample_t
 CTE IQ sample data. More...
 
struct  st_ble_gap_cte_connless_rept_t
 connectionless CTE data report More...
 
struct  st_ble_gap_cte_conn_rept_t
 connection CTE data report More...
 
struct  st_ble_subrate_upd_t
 subrating update event More...
 
struct  st_ble_gap_past_est_evt_t
 This structure notifies that. More...
 
struct  st_ble_gap_tx_power_reporting_evt_t
 This structure notifies that. More...
 
struct  st_ble_gap_pass_loss_thr_evt_t
 This structure notifies that a path loss report has been received. More...
 
struct  st_ble_gap_req_peer_sca_evt_t
 This structure notifies that a SCA request to a remote device has been completed. More...
 
struct  st_ble_gap_dtm_test_end_evt_t
 report of dtm transmit/receive test end More...
 
struct  st_ble_gap_enhanced_read_tx_power_level_evt_t
 Power level report of remove device. More...
 

Macros

#define BLE_BD_ADDR_LEN
 
#define BLE_MASTER
 
#define BLE_SLAVE
 
#define BLE_GAP_ADDR_PUBLIC
 
#define BLE_GAP_ADDR_RAND
 
#define BLE_GAP_ADDR_RPA_ID_PUBLIC
 Resolvable Private Address. More...
 
#define BLE_GAP_ADDR_RPA_ID_RANDOM
 Resolvable Private Address. More...
 
#define BLE_GAP_AD_FLAGS_LE_LIM_DISC_MODE
 LE Limited Discoverable Mode flag used in AD type.
 
#define BLE_GAP_AD_FLAGS_LE_GEN_DISC_MODE
 LE General Discoverable Mode flag used in AD type.
 
#define BLE_GAP_AD_FLAGS_BR_EDR_NOT_SUPPORTED
 BR/EDR Not Supported flag used in AD type.
 
#define BLE_GAP_ADV_DATA_MODE
 Advertising data.
 
#define BLE_GAP_SCAN_RSP_DATA_MODE
 Scan response data.
 
#define BLE_GAP_PERD_ADV_DATA_MODE
 Periodic advertising data.
 
#define BLE_GAP_ADV_CH_37
 Use 37 CH.
 
#define BLE_GAP_ADV_CH_38
 Use 38 CH.
 
#define BLE_GAP_ADV_CH_39
 Use 39 CH.
 
#define BLE_GAP_ADV_CH_ALL
 Use 37 - 39 CH.
 
#define BLE_GAP_SCAN_PASSIVE
 Passive Scan.
 
#define BLE_GAP_SCAN_ACTIVE
 Active Scan.
 
#define BLE_GAP_SCAN_INTV_MIN
 Active Scan.
 
#define BLE_GAP_SCAN_FILT_DUPLIC_DISABLE
 Duplicate filter disabled.
 
#define BLE_GAP_SCAN_FILT_DUPLIC_ENABLE
 Duplicate filter enabled.
 
#define BLE_GAP_SCAN_FILT_DUPLIC_ENABLE_FOR_PERIOD
 Duplicate filtering enabled, reset for each scan period.
 
#define BLE_GAP_SCAN_ALLOW_ADV_ALL
 Accept all advertising and scan response PDUs except directed advertising PDUs not addressed to local device.
 
#define BLE_GAP_SCAN_ALLOW_ADV_WLST
 Accept only advertising and scan response PDUs from remote devices whose address is registered in the White List. Directed advertising PDUs which are not addressed to local device is ignored.
 
#define BLE_GAP_SCAN_ALLOW_ADV_EXCEPT_DIRECTED
 Accept all advertising and scan response PDUs except directed advertising PDUs whose the target address is identity address but doesn't address local device. However directed advertising PDUs whose the target address is the local resolvable private address are accepted.
 
#define BLE_GAP_SCAN_ALLOW_ADV_EXCEPT_DIRECTED_WLST
 Accept all advertising and scan response PDUs.
The following are excluded. More...
 
#define BLE_GAP_INIT_FILT_USE_ADDR
 White List is not used.
 
#define BLE_GAP_INIT_FILT_USE_WLST
 White List is used.
 
#define BLE_GAP_DATA_0_CLEAR
 Clear the advertising data/scan response data/periodic advertising data in the advertising set.
 
#define BLE_GAP_DATA_0_DID_UPD
 Update Advertising DID without changing advertising data.
 
#define BLE_GAP_NET_PRIV_MODE
 Network Privacy Mode.
 
#define BLE_GAP_DEV_PRIV_MODE
 Device Privacy Mode.
 
#define BLE_GAP_REM_FEATURE_SIZE
 The length of the features supported by a remote device.
 
#define BLE_GAP_NOT_AUTHORIZED
 Not authorize the remote device.
 
#define BLE_GAP_AUTHORIZED
 Authorize the remote device.
 
#define BLE_GAP_RMV_ADV_SET_REM_OP
 Delete an advertising set.
 
#define BLE_GAP_RMV_ADV_SET_CLR_OP
 Delete all the advertising sets.
 
#define BLE_GAP_SC_PROC_GEN
 General Discovery Procedure.
 
#define BLE_GAP_SC_PROC_LIM
 Limited Discovery Procedure.
 
#define BLE_GAP_SC_PROC_OBS
 Observation Procedure.
 
#define BLE_GAP_LIST_ADD_DEV
 Add the device to the list.
 
#define BLE_GAP_LIST_REM_DEV
 Delete the device from the list.
 
#define BLE_GAP_LIST_CLR
 Clear the list.
 
#define BLE_GAP_WHITE_LIST_MAX_ENTRY
 The maximum entry number of White List.
 
#define BLE_GAP_RSLV_LIST_MAX_ENTRY
 The maximum entry number of Resolving List.
 
#define BLE_GAP_PERD_LIST_MAX_ENTRY
 The maximum entry number of Periodic Advertiser List.
 
#define BLE_GAP_RPA_DISABLED
 Disable RPA generation/resolution.
 
#define BLE_GAP_RPA_ENABLED
 Enable RPA generation/resolution.
 
#define BLE_GAP_RL_LOC_KEY_ALL_ZERO
 All-zero IRK.
 
#define BLE_GAP_RL_LOC_KEY_REGISTERED
 The IRK registered by R_BLE_GAP_SetLocIdInfo().
 
#define BLE_MAX_NO_OF_ADV_SETS_SUPPORTED
 The maximum number of advertising set for the Abstraction API.
 
#define BLE_GAP_LEGACY_PROP_ADV_IND
 Connectable and scannable undirected Legacy Advertising Packet.
 
#define BLE_GAP_LEGACY_PROP_ADV_DIRECT_IND
 Connectable directed (low duty cycle) Legacy Advertising Packet.
 
#define BLE_GAP_LEGACY_PROP_ADV_HDC_DIRECT_IND
 Connectable directed (high duty cycle) Legacy Advertising Packet.
 
#define BLE_GAP_LEGACY_PROP_ADV_SCAN_IND
 Scannable undirected Legacy Advertising Packet.
 
#define BLE_GAP_LEGACY_PROP_ADV_NONCONN_IND
 Non-connectable and non-scannable undirected Legacy Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_CONN_NOSCAN_UNDIRECT
 Connectable and non-scannable undirected Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_CONN_NOSCAN_DIRECT
 Connectable and non-scannable directed (low duty cycle) Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_CONN_NOSCAN_HDC_DIRECT
 Connectable and non-scannable directed (high duty cycle) Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_NOCONN_SCAN_UNDIRECT
 Non-connectable and scannable undirected Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_NOCONN_SCAN_DIRECT
 Non-connectable and scannable directed (low duty cycle) Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_NOCONN_SCAN_HDC_DIRECT
 Non-connectable and scannable directed (high duty cycle) Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_NOCONN_NOSCAN_UNDIRECT
 Non-connectable and non-scannable undirected Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_NOCONN_NOSCAN_DIRECT
 Non-connectable and non-scannable directed (low duty cycle) Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_NOCONN_NOSCAN_HDC_DIRECT
 Non-connectable and non-scannable directed (high duty cycle) Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_ANONYMOUS
 Omit the advertiser address from Extended Advertising Packet.
 
#define BLE_GAP_EXT_PROP_ADV_INCLUDE_TX_POWER
 Indicate that the advertising data includes TX Power.
 
#define BLE_GAP_ADV_ALLOW_SCAN_ANY_CONN_ANY
 Process scan and connection requests from all devices.
 
#define BLE_GAP_ADV_ALLOW_SCAN_WLST_CONN_ANY
 Process connection requests from all devices and scan requests from only devices that are in the White List.
 
#define BLE_GAP_ADV_ALLOW_SCAN_ANY_CONN_WLST
 Process scan requests from all devices and connection requests from only devices that are in the White List.
 
#define BLE_GAP_ADV_ALLOW_SCAN_WLST_CONN_WLST
 Process scan and connection requests from only devices in the White List.
 
#define BLE_GAP_ADV_PHY_1M
 Use 1M PHY.
 
#define BLE_GAP_ADV_PHY_2M
 Use 2M PHY.
 
#define BLE_GAP_ADV_PHY_CD
 Use Coded PHY.
 
#define BLE_GAP_SCAN_REQ_NTF_DISABLE
 Disable Scan Request Notification.
 
#define BLE_GAP_SCAN_REQ_NTF_ENABLE
 Enable Scan Request Notification.
 
#define BLE_GAP_PERD_PROP_TX_POWER
 Indicate that periodic advertising data includes Tx Power.
 
#define BLE_GAP_INVALID_ADV_HDL
 Invalid advertising handle.
 
#define BLE_GAP_SET_PHYS_HOST_PREF_1M
 Use 1M PHY.
 
#define BLE_GAP_SET_PHYS_HOST_PREF_2M
 Use 2M PHY.
 
#define BLE_GAP_SET_PHYS_HOST_PREF_CD
 Use Coded PHY.
 
#define BLE_GAP_SET_PHYS_OP_HOST_NO_PREF
 No preferred coding.
 
#define BLE_GAP_SET_PHYS_OP_HOST_PREF_S_2
 Use S=2 coding.
 
#define BLE_GAP_SET_PHYS_OP_HOST_PREF_S_8
 Use S=8 coding.
 
#define BLE_GAP_CONN_UPD_MODE_REQ
 Request for updating the connection parameters.
 
#define BLE_GAP_CONN_UPD_MODE_RSP
 Reply a connection parameter update request.
 
#define BLE_GAP_CONN_UPD_ACCEPT
 Accept the update request.
 
#define BLE_GAP_CONN_UPD_REJECT
 Reject the update request.
 
#define BLE_GAP_CH_MAP_SIZE
 The size of channel map.
 
#define BLE_GAP_INVALID_CONN_HDL
 Invalid Connection handle.
 
#define BLE_GAP_NOT_USE_CONN_HDL
 This macro indicates that connection handle is not used.
 
#define BLE_GAP_INIT_CONN_HDL
 Initial Connection handle.
 
#define BLE_GAP_PAIRING_ACCEPT
 Accept a request regarding pairing.
 
#define BLE_GAP_PAIRING_REJECT
 Reject a request regarding pairing.
 
#define BLE_GAP_LTK_REQ_ACCEPT
 Reply for the LTK request.
 
#define BLE_GAP_LTK_REQ_DENY
 Reject the LTK request.
 
#define BLE_GAP_LESC_PASSKEY_ENTRY_STARTED
 Notify that passkey entry started.
 
#define BLE_GAP_LESC_PASSKEY_DIGIT_ENTERED
 Notify that passkey digit entered.
 
#define BLE_GAP_LESC_PASSKEY_DIGIT_ERASED
 Notify that passkey digit erased.
 
#define BLE_GAP_LESC_PASSKEY_CLEARED
 Notify that passkey cleared.
 
#define BLE_GAP_LESC_PASSKEY_ENTRY_COMPLETED
 Notify that passkey entry completed.
 
#define BLE_GAP_SEC_MITM_BEST_EFFORT
 MITM Protection not required.
 
#define BLE_GAP_SEC_MITM_STRICT
 MITM Protection required.
 
#define BLE_GAP_KEY_DIST_ENCKEY
 LTK.
 
#define BLE_GAP_KEY_DIST_IDKEY
 IRK and Identity Address.
 
#define BLE_GAP_KEY_DIST_SIGNKEY
 CSRK.
 
#define BLE_GAP_ID_ADDR_SIZE
 The size of identity address.
 
#define BLE_GAP_IRK_SIZE
 The size of IRK.
 
#define BLE_GAP_CSRK_SIZE
 The size of CSRK.
 
#define BLE_GAP_LTK_SIZE
 The size of LTK.
 
#define BLE_GAP_EDIV_SIZE
 The size of EDIV.
 
#define BLE_GAP_RAND_64_BIT_SIZE
 The size of Rand.
 
#define BLE_GAP_UNAUTH_PAIRING
 Unauthenticated pairing.
 
#define BLE_GAP_AUTH_PAIRING
 Authenticated pairing.
 
#define BLE_GAP_LEGACY_PAIRING
 Legacy pairing.
 
#define BLE_GAP_LESC_PAIRING
 Secure Connections.
 
#define BLE_GAP_BONDING_NONE
 The device doesn't support Bonding.
 
#define BLE_GAP_BONDING
 The device supports Bonding.
 
#define BLE_GAP_IOCAP_DISPLAY_ONLY
 Display Only iocapability. More...
 
#define BLE_GAP_IOCAP_DISPLAY_YESNO
 Display Yes/No iocapability. More...
 
#define BLE_GAP_IOCAP_KEYBOARD_ONLY
 Keyboard Only iocapability. More...
 
#define BLE_GAP_IOCAP_NOINPUT_NOOUTPUT
 No Input No Output iocapability. More...
 
#define BLE_GAP_IOCAP_KEYBOARD_DISPLAY
 Keyboard Display iocapability. More...
 
#define BLE_GAP_OOB_DATA_NOT_PRESENT
 Reply that No OOB data has been received when pairing.
 
#define BLE_GAP_OOB_DATA_PRESENT
 Reply that the OOB data has been received when pairing.
 
#define BLE_GAP_SC_BEST_EFFORT
 Accept Legacy pairing and Secure Connections.
 
#define BLE_GAP_SC_STRICT
 Accept only Secure Connections.
 
#define BLE_GAP_SC_KEY_PRESS_NTF_NOT_SPRT
 Not support for Key Press Notification.
 
#define BLE_GAP_SC_KEY_PRESS_NTF_SPRT
 Support for Key Press Notification.
 
#define BLE_GAP_LEGACY_OOB_SIZE
 The size of Temporary Key for OOB in legacy pairing.
 
#define BLE_GAP_OOB_CONFIRM_VAL_SIZE
 The size of Confirmation Value for OOB in Secure Connections.
 
#define BLE_GAP_OOB_RANDOM_VAL_SIZE
 The size of Rand for OOB in Secure Connections.
 
#define BLE_GAP_SEC_DEL_LOC_NONE
 Delete no local keys.
 
#define BLE_GAP_SEC_DEL_LOC_IRK
 Delete local IRK.
 
#define BLE_GAP_SEC_DEL_LOC_CSRK
 Delete local CSRK.
 
#define BLE_GAP_SEC_DEL_LOC_ALL
 Delete all local keys.
 
#define BLE_GAP_SEC_DEL_REM_NONE
 Delete no remote device keys.
 
#define BLE_GAP_SEC_DEL_REM_SA
 Delete a key specified by the p_addr parameter.
 
#define BLE_GAP_SEC_DEL_REM_NOT_CONN
 Delete keys of not connected remote devices.
 
#define BLE_GAP_SEC_DEL_REM_ALL
 Delete all remote device keys.
 
#define BLE_GAP_CTE_DISABLED
 Disable CTE transmission or receive.
 
#define BLE_GAP_CTE_ENABLED
 Enable CTE transmission or receive.
 
#define BLE_GAP_CTE_MAX_ANTENNA
 Max antenna number.
 
#define BLE_GAP_CTE_TYPE_AOA
 CTE type AoA.
 
#define BLE_GAP_CTE_TYPE_AOD_1US
 CTE type AoD with slot of 1 us.
 
#define BLE_GAP_CTE_TYPE_AOD_2US
 CTE type AoD with slot of 2 us.
 

Typedefs

typedef void(* ble_gap_app_cb_t) (uint16_t event_type, ble_status_t event_result, st_ble_evt_data_t *p_event_data)
 ble_gap_app_cb_t is the GAP Event callback function type. More...
 
typedef void(* ble_gap_del_bond_cb_t) (st_ble_dev_addr_t *p_addr)
 ble_gap_del_bond_cb_t is the type of the callback function for delete bonding information stored in non-volatile area.
This type is used in R_BLE_GAP_DeleteBondInfo(). More...
 
typedef st_ble_gap_ext_adv_param_t st_ble_gap_adv_param_t
 Advertising parameters. More...
 
typedef st_ble_gap_ext_scan_param_t st_ble_gap_scan_param_t
 Scan parameters. More...
 

Enumerations

enum  e_ble_gap_evt_t
 GAP Event Identifier. More...
 

Data Structure Documentation

◆ st_ble_evt_data_t

struct st_ble_evt_data_t

st_ble_evt_data_t is the type of the data notified in a GAP Event.

Data Fields
uint16_t param_len The size of GAP Event parameters.
void * p_param GAP Event parameters. This parameter differs in each GAP Event.

◆ st_ble_dev_addr_t

struct st_ble_dev_addr_t

st_ble_dev_addr_t is the type of bluetooth device address(BD_ADDR).

Note
The BD address setting format is little endian.
If the address is "AA:BB:CC:DD:EE:FF", set the byte array in the order {0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA}.
Data Fields
uint8_t addr[BLE_BD_ADDR_LEN] BD_ADDR.
uint8_t type Bluetooth address type.
macro description
BLE_GAP_ADDR_PUBLIC(0x00) Public Address.
BLE_GAP_ADDR_RAND(0x01) Random Address.

◆ st_ble_gap_ext_adv_param_t

struct st_ble_gap_ext_adv_param_t

Advertising parameters.

Data Fields
uint8_t adv_hdl Advertising handle identifying the advertising set to be set the advertising parameters.

Valid range is 0x00 - 0x03.
In the first advertising parameters setting, the advertising set specified by adv_hdl is generated.
The Advertising Set ID(Advertising SID) of the advertising set is same as adv_hdl.

uint16_t adv_prop_type Advertising packet type.

Legacy advertising PDU type, or bitwise or of Extended advertising PDU type and Extended advertising option.

category macro description
Legacy Advertising PDU type BLE_GAP_LEGACY_PROP_ADV_IND(0x0013) Connectable and scannable undirected Legacy Advertising Packet
BLE_GAP_LEGACY_PROP_ADV_DIRECT_IND(0x0015) Connectable directed (low duty cycle) Legacy Advertising Packet
BLE_GAP_LEGACY_PROP_ADV_HDC_DIRECT_IND(0x001D) Connectable directed (high duty cycle) Legacy Advertising Packet
BLE_GAP_LEGACY_PROP_ADV_SCAN_IND(0x0012) Scannable undirected Legacy Advertising Packet
BLE_GAP_LEGACY_PROP_ADV_NONCONN_IND(0x0010) Non-connectable and non-scannable undirected Legacy Advertising Packet
Extended Advertising PDU type BLE_GAP_EXT_PROP_ADV_CONN_NOSCAN_UNDIRECT(0x0001) Connectable and non-scannable undirected Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_CONN_NOSCAN_DIRECT(0x0005) Connectable and non-scannable directed (low duty cycle) Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_CONN_NOSCAN_HDC_DIRECT(0x000D) Connectable and non-scannable directed (high duty cycle) Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_NOCONN_SCAN_UNDIRECT(0x0002) Non-connectable and scannable undirected Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_NOCONN_SCAN_DIRECT(0x0006) Non-connectable and scannable directed (low duty cycle) Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_NOCONN_SCAN_HDC_DIRECT(0x000E) Non-connectable and scannable directed (high duty cycle) Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_NOCONN_NOSCAN_UNDIRECT(0x0000) Non-connectable and non-scannable undirected Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_NOCONN_NOSCAN_DIRECT(0x0004) Non-connectable and non-scannable directed (low duty cycle) Extended Advertising Packet
BLE_GAP_EXT_PROP_ADV_NOCONN_NOSCAN_HDC_DIRECT(0x000C) Non-connectable and non-scannable directed (high duty cycle) Extended Advertising Packet
Extended Advertising Option BLE_GAP_EXT_PROP_ADV_ANONYMOUS(0x0020) Omit the advertiser address from Extended Advertising Packet.
BLE_GAP_EXT_PROP_ADV_INCLUDE_TX_POWER(0x0040) Indicate that the advertising data includes TX Power.
uint32_t adv_intv_min Minimum advertising interval.

Time(ms) = adv_intv_min * 0.625.
Valid range is 0x00000020 - 0x00FFFFFF.

uint32_t adv_intv_max Maximum Advertising interval.

Time(ms) = adv_intv_max * 0.625.
Valid range is 0x00000020 - 0x00FFFFFF.

uint8_t adv_ch_map The adv_ch_map is channels used in advertising with primary advertising channels.

It is a bitwise OR of the following values.

macro description
BLE_GAP_ADV_CH_37(0x01) Use 37 CH.
BLE_GAP_ADV_CH_38(0x02) Use 38 CH.
BLE_GAP_ADV_CH_39(0x04) Use 39 CH.
BLE_GAP_ADV_CH_ALL(0x07) Use 37 - 39 CH.
uint8_t o_addr_type Own BD Address Type.
macro description
BLE_GAP_ADDR_PUBLIC(0x00) Public Address
BLE_GAP_ADDR_RAND(0x01) Random Address
BLE_GAP_ADDR_RPA_ID_PUBLIC(0x02) Resolvable Private Address.
If the IRK of local device has not been registered in Resolving List, public address is used.
BLE_GAP_ADDR_RPA_ID_RANDOM(0x03) Resolvable Private Address.
If the IRK of local device has not been registered in Resolving List, the random address specified by the o_addr field is used.
uint8_t o_addr[BLE_BD_ADDR_LEN] Random address set to the advertising set, when the o_addr_type field is BLE_GAP_ADDR_RAND.

When the o_addr_type field is other than BLE_GAP_ADDR_RAND, this field is ignored.

Note
The BD address setting format is little endian.
If the address is "AA:BB:CC:DD:EE:FF", set the byte array in the order {0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA}.
uint8_t p_addr_type Peer address type.

When the Advertising PDU type is other than directed or the o_addr_type is BLE_GAP_ADDR_PUBLIC or BLE_GAP_ADDR_RAND,this field is ignored.

macro description
BLE_GAP_ADDR_PUBLIC(0x00) Public Address
BLE_GAP_ADDR_RAND(0x01) Random Address
uint8_t p_addr[BLE_BD_ADDR_LEN] Peer address.

When the Advertising PDU type is other than directed or the o_addr_type is BLE_GAP_ADDR_PUBLIC or BLE_GAP_ADDR_RAND,this field is ignored.

Note
The BD address setting format is little endian.
If the address is "AA:BB:CC:DD:EE:FF", set the byte array in the order {0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA}.
uint8_t filter_policy Advertising Filter Policy.
macro description
BLE_GAP_ADV_ALLOW_SCAN_ANY_CONN_ANY(0x00) Process scan and connection requests from all devices.
BLE_GAP_ADV_ALLOW_SCAN_WLST_CONN_ANY(0x01) Process connection requests from all devices and scan requests from only devices that are in the White List.
BLE_GAP_ADV_ALLOW_SCAN_ANY_CONN_WLST(0x02) Process scan requests from all devices and connection requests from only devices that are in the White List.
BLE_GAP_ADV_ALLOW_SCAN_WLST_CONN_WLST(0x03) Process scan and connection requests from only devices in the White List.
uint8_t adv_phy Primary ADV PHY.

In this parameter, only 1M PHY and Coded PHY can be specified, and 2M PHY cannot be specified.

macro description
BLE_GAP_ADV_PHY_1M(0x01) Use 1M PHY as Primary Advertising PHY.
When the adv_prop_type field is Legacy Advertising PDU type,
this field shall be set to BLE_GAP_ADV_PHY_1M.
BLE_GAP_ADV_PHY_CD(0x03) Use Coded PHY(S=8) as Primary Advertising PHY. Coding scheme is configured by R_BLE_VS_SetCodingScheme().
uint8_t sec_adv_max_skip Secondary ADV Max Skip.

Valid range is 0x00 - 0xFF.
When this field is 0x00, AUX_ADV_IND is sent before the next advertising event.
When the adv_prop_type field is Legacy Advertising PDU, this field is ignored.

uint8_t sec_adv_phy Secondary ADV Phy.

When the adv_prop_type is Legacy Advertising PDU, this field is ignored.

macro description
BLE_GAP_ADV_PHY_1M(0x01) Use 1M PHY as Secondary Advertising PHY.
BLE_GAP_ADV_PHY_2M(0x02) Use 2M PHY as Secondary Advertising PHY.
BLE_GAP_ADV_PHY_CD(0x03) Use Coded PHY(S=8) as Secondary Advertising PHY.

Coding scheme is configured by R_BLE_VS_SetCodingScheme().

uint8_t scan_req_ntf_flag Scan Request Notifications Flag.

When the adv_prop_type field is non-scannable Advertising PDU, this field is ignored.

macro description
BLE_GAP_SCAN_REQ_NTF_DISABLE(0x00) Disable Scan Request Notification.
BLE_GAP_SCAN_REQ_NTF_ENABLE(0x01) Enable Scan Request Notification.
When a Scan Request Packet from Scanner has been received, the BLE_GAP_EVENT_SCAN_REQ_RECV event is notified.

◆ st_ble_gap_adv_data_t

struct st_ble_gap_adv_data_t

Advertising data/scan response data/periodic advertising data.

Data Fields
uint8_t adv_hdl Advertising handle identifying the advertising set to be set advertising data/scan response/periodic advertising data.

Valid range is 0x00 - 0x03.

uint8_t data_type Data type.
macro description
BLE_GAP_ADV_DATA_MODE (0x00) Advertising data.
BLE_GAP_SCAN_RSP_DATA_MODE(0x01) Scan response data.
BLE_GAP_PERD_ADV_DATA_MODE(0x02) Periodic advertising data.
uint16_t data_length The length of advertising data/scan response data/periodic advertising data (in bytes).

In case of Legacy Advertising PDU, the length is 0 - 31 bytes.
In case of Extended Advertising PDU, the length is 0 - 1650 bytes.
Note that the length of the advertising data/scan response data in the BLE_MAX_NO_OF_ADV_SETS_SUPPORTED number of the advertising sets may not exceed the buffer size(4250 bytes) in Controller.

In case of periodic advertising data, the length is 0 - 1650 bytes.
Note that the length of the periodic advertising data in the BLE_MAX_NO_OF_ADV_SETS_SUPPORTED number of the advertising sets may not exceed the buffer size(4306 bytes) in Controller.

When this field is 0, the operations specified by the zero_length_flag is executed.

uint8_t * p_data Advertising data/scan response data/periodic advertising data.

When the data_length field is 0, this field is ignored.

uint8_t zero_length_flag Operation when the data_length field is 0.

If the data_length is other than 0, this field is ignored.

macro description
BLE_GAP_DATA_0_CLEAR(0x01) Clear the advertising data/scan response data/periodic advertising data in the advertising set.
BLE_GAP_DATA_0_DID_UPD(0x02) Update Advertising DID without changing advertising data. If the data_type field is BLE_GAP_ADV_DATA_MODE, this value is allowed.

◆ st_ble_gap_perd_adv_param_t

struct st_ble_gap_perd_adv_param_t

Periodic advertising parameter.

Data Fields
uint8_t adv_hdl Advertising handle identifying the advertising set to be set periodic advertising parameter.

Valid range is 0x00 - 0x03.

uint16_t prop_type Periodic ADV Properties.

The prop_type field is set to the following values.
If the type of the periodic advertising data cannot be applied from the following, set 0x0000.

macro description
BLE_GAP_PERD_PROP_TX_POWER(0x0040) Indicate that periodic advertising data includes Tx Power.
uint16_t perd_intv_min Minimum Periodic Advertising Interval.

Time(ms) = perd_intv_min * 1.25.
Valid range is 0x0006 - 0xFFFF.

uint16_t perd_intv_max Maximum Periodic Advertising Interval.

Time(ms) = perd_intv_max * 1.25.
Valid range is 0x0006 - 0xFFFF.

◆ st_ble_gap_scan_phy_param_t

struct st_ble_gap_scan_phy_param_t

Scan parameters per scan PHY.

In case of start scanning with both 1M PHY and Coded PHY, adjust scan windows and scan intervals according to the following.
p_phy_param_1M->scan_window / p_phy_param_1M->scan_intv + p_phy_param_coded->scan_window / p_phy_param_coded->scan_intv <= 1

Data Fields
uint8_t scan_type Scan type.
macro description
BLE_GAP_SCAN_PASSIVE(0x00) Passive Scan.
BLE_GAP_SCAN_ACTIVE(0x01) Active Scan.
uint16_t scan_intv Scan interval.

interval(ms) = scan_intv * 0.625.
Valid range is 0x0000 and 0x0004 - 0xFFFF.

uint16_t scan_window Scan window.

window(ms) = scan_window * 0.625.
Valid range is 0x0000 and 0x0004 - 0xFFFF.

◆ st_ble_gap_ext_scan_param_t

struct st_ble_gap_ext_scan_param_t

Scan parameters.

Data Fields
uint8_t o_addr_type Own BD Address Type.

In case of passive scan, this field is ignored.

macro description
BLE_GAP_ADDR_PUBLIC(0x00) Public Address
BLE_GAP_ADDR_RAND(0x01) Random Address
BLE_GAP_ADDR_RPA_ID_PUBLIC(0x02) Resolvable Private Address.
If the IRK of local device has not been registered in Resolving List, public address is used.
BLE_GAP_ADDR_RPA_ID_RANDOM(0x03) Resolvable Private Address.
If the IRK of local device has not been registered in Resolving List, the random address set by R_BLE_GAP_SetRandAddr() is used.
uint8_t filter_policy Scan Filter Policy.
macro description
BLE_GAP_SCAN_ALLOW_ADV_ALL(0x00) Accept all advertising and scan response PDUs except directed advertising PDUs not addressed to local device.
BLE_GAP_SCAN_ALLOW_ADV_WLST(0x01) Accept only advertising and scan response PDUs from remote devices whose address is registered in the White List.
Directed advertising PDUs which are not addressed to local device is ignored.
BLE_GAP_SCAN_ALLOW_ADV_EXCEPT_DIRECTED(0x02) Accept all advertising and scan response PDUs except directed advertising PDUs whose the target address is identity address but doesn't address local device. However directed advertising PDUs whose the target address is the local resolvable private address are accepted.
BLE_GAP_SCAN_ALLOW_ADV_EXCEPT_DIRECTED_WLST(0x03) Accept all advertising and scan response PDUs.
The following are excluded.
  • Advertising and scan response PDUs where the advertiser's identity address is not in the White List.
  • Directed advertising PDUs whose the target address is identity address but doesn't address local device. However directed advertising PDUs whose the target address is the local resolvable private address are accepted.
st_ble_gap_scan_phy_param_t * p_phy_param_1M Scan parameters 1M PHY.

When this field is NULL, Controller doesn't set the scan parameters for 1M PHY.

st_ble_gap_scan_phy_param_t * p_phy_param_coded Scan parameters Coded PHY.

When this field is NULL, Controller doesn't set the scan parameters for Coded PHY.

◆ st_ble_gap_scan_on_t

struct st_ble_gap_scan_on_t

Parameters configured when scanning starts.

Data Fields
uint8_t proc_type Procedure type.
macro description
BLE_GAP_SC_PROC_OBS(0x00) Observation Procedure.
Notify all advertising PDUs.
BLE_GAP_SC_PROC_LIM(0x01) Limited Discovery Procedure.
Notify advertising PDUs from only devices in the limited discoverable mode.
BLE_GAP_SC_PROC_GEN(0x02) General Discovery Procedure.
Notify advertising PDUs from devices in the limited discoverable mode and the general discoverable mode.
uint8_t filter_dups Filter duplicates.
macro description
BLE_GAP_SCAN_FILT_DUPLIC_DISABLE(0x00) Duplicate filter disabled.
BLE_GAP_SCAN_FILT_DUPLIC_ENABLE(0x01) Duplicate filter enabled.
BLE_GAP_SCAN_FILT_DUPLIC_ENABLE_FOR_PERIOD(0x02) Duplicate filtering enabled, reset for each scan period
uint16_t duration Scan duration.

Time(ms) = duration * 10.
Valid range is 0x0000 - 0xFFFF.
If this field is set to 0x0000, scanning is continued until R_BLE_GAP_StopScan() is called.
When the period field is zero and the time specified the duration field expires, BLE_GAP_EVENT_SCAN_TO event notifies the application layer that scanning stops.

uint16_t period Scan period.

Time(s) = N * 1.28.
Valid range is 0x0000 - 0xFFFF.
If the duration field is set to 0x0000, this field is ignored.

◆ st_ble_gap_conn_param_t

struct st_ble_gap_conn_param_t

Connection parameters included in connection interval, slave latency, supervision timeout, ce length.

This structure is used in R_BLE_GAP_CreateConn() and R_BLE_GAP_UpdConn().

Set the fields in this structure to match the following condition.

Supervision_timeout(ms) >= (1 + conn_latency) * conn_intv_max_Time(ms)

conn_intv_max_Time(ms) = conn_intv_max * 1.25 Supervision_timeout(ms) = sup_to * 10

Data Fields
uint16_t conn_intv_min Minimum connection interval.

Time(ms) = conn_intv_min * 1.25.
Valid range is 0x0006 - 0x0C80.

uint16_t conn_intv_max Maximum connection interval.

Time(ms) = conn_intv_max * 1.25.
Valid range is 0x0006 - 0x0C80.

uint16_t conn_latency Slave latency.

Valid range is 0x0000 - 0x01F3.

uint16_t sup_to Supervision timeout.

Time(ms) = sup_to * 10.
Valid range is 0x000A - 0x0C80.

uint16_t min_ce_length Minimum CE Length.

Valid range is 0x0000 - 0xFFFF.

uint16_t max_ce_length Maximum CE Length.

Valid range is 0x0000 - 0xFFFF.

◆ st_ble_gap_conn_phy_param_t

struct st_ble_gap_conn_phy_param_t

Connection parameters per PHY.

Data Fields
uint16_t scan_intv Scan interval.

Time(ms) = scan_intv * 0.625.
Valid range is 0x0004 - 0xFFFF.

uint16_t scan_window Scan window.

Time(ms) = scan_window * 0.625.
Valid range is 0x0004 - 0xFFFF.

st_ble_gap_conn_param_t * p_conn_param Connection interval, slave latency, supervision timeout, and CE length.

◆ st_ble_gap_create_conn_param_t

struct st_ble_gap_create_conn_param_t

Connection parameters used in R_BLE_GAP_CreateConn().

Data Fields
uint8_t init_filter_policy This field specifies whether the White List is used or not, when connecting with a remote device.
macro description
BLE_GAP_INIT_FILT_USE_ADDR(0x00) White List is not used.
The remote device to be connected is specified by the remote_bd_addr field and
the remote_bd_addr_type field is used.
BLE_GAP_INIT_FILT_USE_WLST(0x01) White List is used.
The remote device registered in White List is connected with local device.
The remote_bd_addr field and the remote_bd_addr_type field are ignored.
uint8_t remote_bd_addr[BLE_BD_ADDR_LEN] Address of the device to be connected.
Note
The BD address setting format is little endian.
If the address is "AA:BB:CC:DD:EE:FF", set the byte array in the order {0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA}.
uint8_t remote_bd_addr_type Address type of the device to be connected.
macro description
BLE_GAP_ADDR_PUBLIC(0x00) Public Address or Public Identity Address
BLE_GAP_ADDR_RAND(0x01) Random Address or Random (Static) Identity Address
uint8_t own_addr_type Address type which local device uses in creating a link with the remote device.
macro description
BLE_GAP_ADDR_PUBLIC(0x00) Public Address
BLE_GAP_ADDR_RAND(0x01) Random Address
BLE_GAP_ADDR_RPA_ID_PUBLIC(0x02) Resolvable Private Address.
If the IRK of local device has not been registered in Resolving List, public address is used.
BLE_GAP_ADDR_RPA_ID_RANDOM(0x03) Resolvable Private Address.
If the IRK of local device has not been registered in Resolving List, the random address set by R_BLE_GAP_SetRandAddr().
st_ble_gap_conn_phy_param_t * p_conn_param_1M Connection parameters for 1M PHY.

If this field is set to NULL, 1M PHY is not used in connecting.

st_ble_gap_conn_phy_param_t * p_conn_param_2M Connection parameters for 2M PHY.

If this field is set to NULL, 2M PHY is not used in connecting.

st_ble_gap_conn_phy_param_t * p_conn_param_coded Connection parameters for Coded PHY.

If this field is set to NULL, Coded PHY is not used in connecting.

◆ st_ble_gap_rslv_list_key_set_t

struct st_ble_gap_rslv_list_key_set_t

IRK of a remote device and IRK type of local device used in R_BLE_GAP_ConfRslvList().

Data Fields
uint8_t remote_irk[BLE_GAP_IRK_SIZE] IRK of a remote device to be registered in the Resolving List.
uint8_t local_irk_type IRK type of the local device to be registered in the Resolving List.
macro description
BLE_GAP_RL_LOC_KEY_ALL_ZERO(0x00) All-zero IRK.
BLE_GAP_RL_LOC_KEY_REGISTERED(0x01) The IRK registered by R_BLE_GAP_SetLocIdInfo().

◆ st_ble_gap_set_phy_param_t

struct st_ble_gap_set_phy_param_t

PHY configuration parameters used in R_BLE_GAP_SetPhy().

Data Fields
uint8_t tx_phys Transmitter PHY preference.

The tx_phys field is set to a bitwise OR of the following values. All other values are ignored.

macro description
BLE_GAP_SET_PHYS_HOST_PREF_1M(0x01) Use 1M PHY for Transmitter PHY.
BLE_GAP_SET_PHYS_HOST_PREF_2M(0x02) Use 2M PHY for Transmitter PHY.
BLE_GAP_SET_PHYS_HOST_PREF_CD(0x04) Use Coded PHY for Transmitter PHY.
uint8_t rx_phys Receiver PHY preference.

The rx_phys field is set to a bitwise OR of the following values. All other values are ignored.

macro description
BLE_GAP_SET_PHYS_HOST_PREF_1M(0x01) Use 1M PHY for Receiver PHY.
BLE_GAP_SET_PHYS_HOST_PREF_2M(0x02) Use 2M PHY for Receiver PHY.
BLE_GAP_SET_PHYS_HOST_PREF_CD(0x04) Use Coded PHY for Receiver PHY.
uint16_t phy_options Coding scheme used in Coded PHY.

Select one of the following.

macro description
BLE_GAP_SET_PHYS_OP_HOST_NO_PREF(0x00) No preferred coding.
BLE_GAP_SET_PHYS_OP_HOST_PREF_S_2(0x01) Use S=2 coding.
BLE_GAP_SET_PHYS_OP_HOST_PREF_S_8(0x02) Use S=8 coding.

◆ st_ble_gap_set_def_phy_param_t

struct st_ble_gap_set_def_phy_param_t

PHY preferences which allows a remote device to set used in R_BLE_GAP_SetDefPhy().

Data Fields
uint8_t tx_phys Transmitter PHY preferences which a remote device may change.

The tx_phys field is set to a bitwise OR of the following values. All other values are ignored.

macro description
BLE_GAP_SET_PHYS_HOST_PREF_1M(0x01) Allow a remote device to set 1M PHY for transmitter PHY.
BLE_GAP_SET_PHYS_HOST_PREF_2M(0x02) Allow a remote device to set 2M PHY for transmitter PHY.
BLE_GAP_SET_PHYS_HOST_PREF_CD(0x04) Allow a remote device to set Coded PHY for transmitter PHY.
uint8_t rx_phys Receiver PHY preferences which a remote device may change.

The rx_phys field is set to a bitwise OR of the following values. All other values are ignored.

macro description
BLE_GAP_SET_PHYS_HOST_PREF_1M(0x01) Allow a remote device to set 1M PHY for receiver PHY.
BLE_GAP_SET_PHYS_HOST_PREF_2M(0x02) Allow a remote device to set 2M PHY for receiver PHY.
BLE_GAP_SET_PHYS_HOST_PREF_CD(0x04) Allow a remote device to set Coded PHY for receiver PHY.

◆ st_ble_gap_auth_info_t

struct st_ble_gap_auth_info_t

Pairing parameters required from a remote device or information about keys distributed from a remote device.

Data Fields
uint8_t security Security level.
value description
0x01 The remote device requests Unauthenticated pairing.
0x02 The remote device requests Authenticated pairing.
uint8_t pair_mode Pairing mode.
value description
0x01 The remote device requests Legacy pairing.
0x02 The remote device requests Secure Connections.
uint8_t bonding Bonding policy.
value description
0x00 The remote device does not store the Bonding information.
0x01 The remote device stores the Bonding information.
uint8_t ekey_size Encryption key size.

◆ st_ble_gap_key_dist_t

struct st_ble_gap_key_dist_t

Keys distributed from a remote device.

Data Fields
uint8_t enc_info[BLE_GAP_LTK_SIZE] LTK.
uint8_t mid_info[BLE_GAP_EDIV_SIZE+BLE_GAP_RAND_64_BIT_SIZE] Ediv and rand. The first two bytes is ediv, the remaining bytes are rand.
uint8_t id_info[BLE_GAP_IRK_SIZE] IRK.
uint8_t id_addr_info[BLE_GAP_ID_ADDR_SIZE] Identity address. The first byte is address type. The remaining bytes are device address.
uint8_t sign_info[BLE_GAP_CSRK_SIZE] CSRK.

◆ st_ble_gap_key_ex_param_t

struct st_ble_gap_key_ex_param_t

This structure includes the distributed keys and negotiated LTK size.

Data Fields
st_ble_gap_key_dist_t * p_keys_info Key information.
uint8_t keys Type of the distributed keys.

This field is a bitwise OR of the following values.

Bit Number description
0 LTK and Master Identification.
LTK is distributed in Secure Connections, even if the bit is 1.
1 IRK and Identity Address Information.
2 CSRK
uint8_t ekey_size The negotiated LTK size.

◆ st_ble_gap_pairing_param_t

struct st_ble_gap_pairing_param_t

Pairing parameters used in R_BLE_GAP_SetPairingParams().

Data Fields
uint8_t iocap IO capabilities of local device.

Select one of the following.

macro description
BLE_GAP_IOCAP_DISPLAY_ONLY(0x00) Output function : Local device has the ability to display a 6 digit decimal number.
Input function : None
BLE_GAP_IOCAP_DISPLAY_YESNO(0x01) Output function : Output function : Local device has the ability to display a 6 digit decimal number.
Input function : Local device has the ability to indicate 'yes' or 'no'
BLE_GAP_IOCAP_KEYBOARD_ONLY(0x02) Output function : None
Input function : Local device has the ability to input the number '0' - '9'.
BLE_GAP_IOCAP_NOINPUT_NOOUTPUT(0x03) Output function : None
Input function : None
BLE_GAP_IOCAP_KEYBOARD_DISPLAY(0x04) Output function : Output function : Local device has the ability to display a 6 digit decimal number.
Input function : Local device has the ability to input the number '0' - '9'.
uint8_t mitm MITM protection policy.

Select one of the following.

macro description
BLE_GAP_SEC_MITM_BEST_EFFORT(0x00) MITM Protection not required.
BLE_GAP_SEC_MITM_STRICT (0x01) MITM Protection required.
uint8_t bonding Bonding policy.
macro description
BLE_GAP_BONDING_NONE(0x00) Local device doesn't stores Bonding information.
BLE_GAP_BONDING (0x01) Local device stores Bonding information.
uint8_t max_key_size Maximum LTK size(in bytes).

Valid range is 7 - 16.
This field shall be set to a value not less than the min_key_size field.

uint8_t min_key_size Minimum LTK size(in bytes).

Valid range is 7 - 16.
This field shall be set to a value not more than the max_key_size field.

uint8_t loc_key_dist Type of keys to be distributed from local device.

The loc_key_dist field is set to a bitwise OR of the following values.

macro description
BLE_GAP_KEY_DIST_ENCKEY(0x01) LTK
BLE_GAP_KEY_DIST_IDKEY(0x02) IRK and Identity Address.
BLE_GAP_KEY_DIST_SIGNKEY(0x04) CSRK
uint8_t rem_key_dist Type of keys which local device requests a remote device to distribute.

The rem_key_dist field is set to a bitwise OR of the following values.

macro description
BLE_GAP_KEY_DIST_ENCKEY(0x01) LTK. In case of Secure Connections, LTK is notified even if this bit is not set.
BLE_GAP_KEY_DIST_IDKEY(0x02) IRK and Identity Address.
BLE_GAP_KEY_DIST_SIGNKEY(0x04) CSRK
uint8_t key_notf Support for Key Press Notification in Passkey Entry.
macro description
BLE_GAP_SC_KEY_PRESS_NTF_NOT_SPRT(0x00) Not support for Key Press Notification.
BLE_GAP_SC_KEY_PRESS_NTF_SPRT(0x01) Support for Key Press Notification.
uint8_t sec_conn_only Determine whether to accept only Secure Connections or not.
macro description
BLE_GAP_SC_BEST_EFFORT(0x00) Accept Legacy pairing and Secure Connections.
BLE_GAP_SC_STRICT(0x01) Accept only Secure Connections.

◆ st_ble_gap_oob_data_t

struct st_ble_gap_oob_data_t

Oob data received from the remote device. This is used in R_BLE_GAP_SetRemOobData().

Data Fields
uint8_t legacy_oob[BLE_GAP_LEGACY_OOB_SIZE] OOB data used in Legacy Pairing.
uint8_t sc_cnf_val[BLE_GAP_OOB_CONFIRM_VAL_SIZE] OOB confirmation value used in Secure Connections.
uint8_t sc_rand[BLE_GAP_OOB_RANDOM_VAL_SIZE] OOB rand used in Secure Connections.

◆ st_ble_gap_cte_antenna_info_t

struct st_ble_gap_cte_antenna_info_t

This is the parameters used in R_BLE_GAP_GetAntennaInfo().

◆ st_ble_gap_recv_test_param_t

struct st_ble_gap_recv_test_param_t

This is the parameters used in R_BLE_GAP_ReceiverTest()

Data Fields
uint8_t rx_ch RF channel.
uint8_t phy The transmitter PHY of packets.
uint8_t mod_idx Whether or not the Controller should assume the receiver has a stable modulation index.
uint8_t expect_cte_len Expected length of the Constant Tone Extensions in received test reference packets.
uint8_t expect_cte_type Expected type of the Constant Tone Extensions in received test reference packets.
uint8_t slot_duration Switching and sampling slots durations.
uint8_t switch_pattern_len The number of Antenna IDs in the pattern.
uint8_t ant_ids[BLE_GAP_CTE_MAX_ANTENNA] Antenna ID in the pattern.

◆ st_ble_gap_trans_test_param_t

struct st_ble_gap_trans_test_param_t

This is the parameters used in R_BLE_GAP_TransmitterTest().

Data Fields
uint8_t tx_ch RF channel.
uint8_t test_data_len Length of the Payload of the test reference packets.
uint8_t packet_payload Contents of the Payload of the test reference packets.
uint8_t phy The transmitter PHY of packets.
uint8_t cte_len Length of the Constant Tone Extension in the test reference packets.
uint8_t cte_type Type of the Constant Tone Extension in the test reference packets.
uint8_t switch_pattern_len The number of Antenna IDs in the pattern.
uint8_t ant_ids[BLE_GAP_CTE_MAX_ANTENNA] Antenna ID in the pattern.
int8_t tx_power_level Transmit power level to be used by the transmitter.

◆ st_ble_gap_set_path_loss_rpt_param_t

struct st_ble_gap_set_path_loss_rpt_param_t

This is the parameters used in R_BLE_GAP_SetPathLossReportingParam().

Data Fields
uint16_t conn_hdl Connection handle.
uint8_t high_thr High threshold for the path loss.
uint8_t high_hys Hysteresis value for the high threshold.
uint8_t low_thr Low threshold for the path loss.
uint8_t low_hys Hysteresis value for the low threshold.
uint16_t min_time_spent Minimum time in number of connection events to be observed once the path loss crosses the threshold before an event is generated.

◆ st_ble_gap_cte_connless_t

struct st_ble_gap_cte_connless_t

connectionless CTE param

Data Fields
uint16_t adv_hdl For connectionless CTE handle is the Sync handle identifying the Periodic Sync that has been established.
uint8_t cte_len

Length of CTE in 8us units. Range: 0x02 to 0x14

uint8_t cte_type CTE type.

Allowed values are: BLE_GAP_CTE_TYPE_AOA BLE_GAP_CTE_TYPE_AOD_1US BLE_GAP_CTE_TYPE_AOD_2US

uint8_t cte_count

Number of CTE to transmit in each periodic adv interval. Range: 0x01 to 0x10

uint8_t pattern_len

Number of Antenna IDs in the switch pattern.

uint8_t ant_ids[BLE_GAP_CTE_MAX_ANTENNA]

List of antenna IDs in the pattern.

◆ st_ble_gap_cte_conn_t

struct st_ble_gap_cte_conn_t

connection CTE param

Data Fields
uint16_t conn_hdl The ACL connection handle.
uint8_t allow_cte_types bitfield of CTE types that are allowed

bit should be one or compose of: BLE_GAP_CTE_TYPE_AOA (bit 0) BLE_GAP_CTE_TYPE_AOD_1US (bit 1) BLE_GAP_CTE_TYPE_AOD_2US (bit 2)

uint8_t pattern_len

Number of Antenna IDs in the switch pattern.

uint8_t ant_ids[BLE_GAP_CTE_MAX_ANTENNA]

List of antenna IDs in the pattern.

◆ st_ble_gap_cte_connless_recv_t

struct st_ble_gap_cte_connless_recv_t

connectionless CTE receive param

Data Fields
uint16_t sync_hdl Periodic Sync that has been established for CTE.
uint8_t cte_type CTE type.

CTE type should be get from st_ble_gap_perd_adv_rept_t of BLE_GAP_EVENT_ADV_REPT_IND event in connectionless CTE, or get from ACL connection in connection CTE. The slot_durations, pattern_len, and ant_ids parameters are only used when receiving an AoA Constant Tone Extension and do not affect the reception of an AoD Constant Tone Extension.

uint8_t max_cte_count Max number of CTEs to receive. Min is 1, max is 10, 0 means receive continuously.
uint8_t slot_durations

Antenna switching slots. 1 for 1us or 2 for 2us

uint8_t pattern_len Length of antenna switch pattern.
uint8_t ant_ids[BLE_GAP_CTE_MAX_ANTENNA] Antenna switch pattern.

◆ st_ble_gap_cte_conn_rx_param_t

struct st_ble_gap_cte_conn_rx_param_t

connection CTE receive param

Data Fields
uint16_t conn_hdl For connection CTE handle is the ACL connection handle.
uint8_t slot_durations

Antenna switching slots. 1 for 1us or 2 for 2us

uint8_t pattern_len Length of antenna switch pattern.
uint8_t ant_ids[BLE_GAP_CTE_MAX_ANTENNA] Antenna switch pattern.

◆ st_ble_gap_cte_conn_req_t

struct st_ble_gap_cte_conn_req_t

connection CTE request

Data Fields
uint16_t conn_hdl For connection CTE handle is the ACL connection handle.
uint16_t interval Requested interval for initiating the CTE Request procedure.

Value 0x0 means, run the procedure once. Other values are intervals in number of connection events, to run the command periodically.

uint8_t cte_length

Requested length of the CTE in 8 us units.

uint8_t cte_type Requested type of the CTE.

Allowed values are BLE_GAP_CTE_TYPE_AOA, BLE_GAP_CTE_TYPE_AOD_1US and BLE_GAP_CTE_TYPE_AOD_2US

◆ st_ble_gap_subrate_param_t

struct st_ble_gap_subrate_param_t

subrating param

◆ st_ble_gap_ver_num_t

struct st_ble_gap_ver_num_t

Version number of host stack.

Data Fields
uint8_t major Major version number.
uint8_t minor Minor version number.
uint8_t subminor Subminor version number.

◆ st_ble_gap_loc_ver_info_t

struct st_ble_gap_loc_ver_info_t

Version number of Controller.

Refer Bluetooth SIG Assigned Number(https://www.bluetooth.com/specifications/assigned-numbers).

Data Fields
uint8_t hci_ver Bluetooth HCI version.
uint16_t hci_rev Bluetooth HCI revision.
uint8_t lmp_ver Link Layer revision.
uint16_t mnf_name Manufacturer ID.
uint16_t lmp_sub_ver Link Layer subversion.

◆ st_ble_gap_loc_dev_info_evt_t

struct st_ble_gap_loc_dev_info_evt_t

Version information of local device.

Data Fields
st_ble_dev_addr_t l_dev_addr Bluetooth Device Address.
st_ble_gap_ver_num_t l_ver_num Version number of host stack in local device.
st_ble_gap_loc_ver_info_t l_bt_info Version number of Controller in local device.

◆ st_ble_gap_hw_err_evt_t

struct st_ble_gap_hw_err_evt_t

Hardware error that is notified from Controller.

Data Fields
uint8_t hw_code The hw_code field indicates the cause of the hardware error.

◆ st_ble_gap_cmd_err_evt_t

struct st_ble_gap_cmd_err_evt_t

HCI Command error.

Data Fields
uint16_t op_code The opcode of HCI Command which caused the error.
uint32_t module_id Module ID which caused the error.

◆ st_ble_gap_adv_rept_t

struct st_ble_gap_adv_rept_t

Advertising Report.

Data Fields
uint8_t num The number of Advertising Reports received.
uint8_t adv_type Type of Advertising Packet.
valuer description
0x00 Connectable and scannable undirected advertising(ADV_IND).
0x01 Connectable directed advertising(ADV_DIRECT_IND).
0x02 Scannable undirected advertising(ADV_SCAN_IND).
0x03 Non-connectable undirected advertising(ADV_NONCONN_IND).
0x04 Scan response(SCAN_RSP).
uint8_t addr_type Address type of the advertiser.
value description
0x00 Public Address.
0x01 Random Address.
0x02 Public Identity Address which could be resolved in Controller.
0x03 Random Identity Address which could be resolved in Controller.
uint8_t * p_addr Address of the advertiser.
Note
The BD address setting format is little endian.
uint8_t len Length of Advertising data(in bytes).

Valid range is 0 - 31.

int8_t rssi RSSI(in dBm).

Valid range is -127 <= tx_pwr <= 20 and 127.
If the tx_pwr is 127, it means that RSSI could not be retrieved.

uint8_t * p_data Advertising data/Scan Response Data.

◆ st_ble_gap_ext_adv_rept_t

struct st_ble_gap_ext_adv_rept_t

Extended Advertising Report.

Data Fields
uint8_t num The number of Advertising Reports received.
uint16_t adv_type Type of Advertising Packet.
Bit Number description
0 Connectable advertising.
1 Scannable advertising.
2 Directed advertising.
3 Scan response.
4 Legacy advertising PDU.
5-6 The status of Advertising Data/Scan Response Data.
Data Status:
00b = Complete
01b = Incomplete, more data come
10b = Incomplete, data truncated, no more to come
All other bits Reserved for future use
uint8_t addr_type Address type of the advertiser.
value description
0x00 Public Address.
0x01 Random Address.
0x02 Public Identity Address which could be resolved in Controller.
0x03 Random Identity Address which could be resolved in Controller.
0xFF Anonymous advertisement.
uint8_t * p_addr Address of the advertiser.
Note
The BD address setting format is little endian.
uint8_t adv_phy The primary PHY configuration of the advertiser.

The primary PHY configuration of the advertiser.

value description
0x01 1M PHY
0x03 Coded PHY
uint8_t sec_adv_phy The secondary PHY configuration of the advertiser.
value description
0x00 Nothing has been received with Secondary Advertising Channel.
0x01 The Secondary Advertising PHY configuration was 1M PHY.
0x02 The Secondary Advertising PHY configuration was 2M PHY.
0x03 The Secondary Advertising PHY configuration was Coded PHY.
uint8_t adv_sid Advertising SID included in the received Advertising Report.

Valid range is 0 <= adv_sid <= 0x0F and 0xFF.
If the adv_sid is 0xFF, there is no field which includes SID.

int8_t tx_pwr TX power(in dBm).

Valid range is -127 <= tx_pwr <= 20 and 127.
If the tx_pwr is 127, it means that Tx power could not be retrieved.

int8_t rssi RSSI(in dBm).

Valid range is -127 <= tx_pwr <= 20 and 127.
If the tx_pwr is 127, it means that RSSI could not be retrieved.

uint16_t perd_adv_intv Periodic Advertising interval.

If the perd_adv_intv is 0x0000, it means that this advertising is not periodic advertising.
If the perd_adv_intv is 0x0006 - 0xFFFF, it means that this field is the Periodic Advertising interval.
Periodic Advertising interval = per_adv_intr * 1.25ms.

uint8_t dir_addr_type The address type of Direct Advertising PDU.
value description
0x00 Public Address.
0x01 Random Address.
0x02 Public Identity Address which could be resolved in Controller.
0x03 Random Identity Address which could be resolved in Controller.
0xFE Resolvable Privacy Address which could not be resolved in Controller.
uint8_t * p_dir_addr Address of Direct Advertising PDU.
Note
The BD address setting format is little endian.
uint8_t len Length of Advertising data(in bytes).

Valid range is 0 - 229.

uint8_t * p_data Advertising data/Scan Response Data.

◆ st_ble_gap_perd_adv_rept_t

struct st_ble_gap_perd_adv_rept_t

Periodic Advertising Report.

Data Fields
uint16_t sync_hdl Sync handle.

Valid range is 0x0000 - 0x0EFF.

int8_t tx_pwr TX power(in dBm).

Valid range is -127 <= tx_pwr <= 20 and 127.
If tx_pwr is 127, it means that Tx power could not be retrieved.

int8_t rssi RSSI(in dBm).

Valid range is -127 <= rssi <= 20 and 127.
If rssi is 127, it means that RSSI could not be retrieved.

uint8_t cte_type Type of Constant Tone Extension in the periodic advertising packets.
value description
0x00 AoA Constant Tone Extension.
0x01 AoD Constant Tone Extension with 1 μs slots.
0x02 AoD Constant Tone Extension with 2 μs slots.
0xFF No Constant Tone Extension.
uint8_t data_status Reserved for future use.
value description
0x00 Data Complete.
0x01 Data incomplete, more data to come.
0x02 Data incomplete, data truncated, no more to come.
uint8_t len Length of Periodic Advertising data(in bytes).

Valid range is 0 - 247.

uint8_t * p_data Periodic Advertising data.

◆ st_ble_gap_adv_rept_evt_t

struct st_ble_gap_adv_rept_evt_t

Advertising report.

Data Fields
uint8_t adv_rpt_type Data type.
value description
0x00 Advertising Report.
0x01 Extended Advertising Report.
0x02 Periodic Advertising Report.

If the BLE Protocol Stack library type is "extended", the adv_rpt_type field in a Legacy Advertising Report event is 0x01.

union st_ble_gap_adv_rept_evt_t param Advertising Report.

◆ st_ble_gap_adv_rept_evt_t.param

union st_ble_gap_adv_rept_evt_t.param

Advertising Report.

Data Fields
st_ble_gap_adv_rept_t * p_adv_rpt Advertising Report.
st_ble_gap_ext_adv_rept_t * p_ext_adv_rpt Extended Advertising Report.
st_ble_gap_perd_adv_rept_t * p_per_adv_rpt Periodic Advertising Report.

◆ st_ble_gap_adv_set_evt_t

struct st_ble_gap_adv_set_evt_t

Advertising handle.

Data Fields
uint8_t adv_hdl Advertising handle specifying the advertising set configured advertising parameters.

◆ st_ble_gap_adv_off_evt_t

struct st_ble_gap_adv_off_evt_t

Information about the advertising set which stops advertising.

Data Fields
uint8_t adv_hdl Advertising handle identifying the advertising set which has stopped advertising.

Valid range is 0x00 - 0x03.

uint8_t reason The reason for stopping advertising.
value description
0x01 Advertising has been stopped by R_BLE_GAP_StopAdv().
0x02 Because the duration specified by R_BLE_GAP_StartAdv() was expired, advertising has terminated.
0x03 Because the max_extd_adv_evts parameter specified by R_BLE_GAP_StartAdv() was reached, advertising has terminated.
0x04 Because the connection was established with the remote device, advertising has terminated.
uint16_t conn_hdl Connection handle.

If the reason field is 0x04, this field indicates connection handle identifying the remote device connected with local device. If other reasons, ignore this field.

uint8_t num_comp_ext_adv_evts The number of the advertising event that has been received until advertising has terminated.

If max_extd_adv_evts by R_BLE_GAP_StartAdv() is not 0, this parameter is valid.

◆ st_ble_gap_adv_data_evt_t

struct st_ble_gap_adv_data_evt_t

This structure notifies that advertising data has been set to Controller by R_BLE_GAP_SetAdvSresData().

Data Fields
uint8_t adv_hdl Advertising handle identifying the advertising set to which advertising data/scan response data/periodic advertising data is set.
uint8_t data_type Type of the data set to the advertising set.
value description
BLE_GAP_ADV_DATA_MODE(0x00) Advertising data
BLE_GAP_SCAN_RSP_DATA_MODE(0x01) Scan response data
BLE_GAP_PERD_ADV_DATA_MODE(0x02) Periodic advertising data

◆ st_ble_gap_rem_adv_set_evt_t

struct st_ble_gap_rem_adv_set_evt_t

This structure notifies that an advertising set has been removed.

Data Fields
uint8_t remove_op This field indicates that the advertising set has been removed or cleared.
value description
0x01 The advertising set has been removed.
0x02 The advertising set has been cleared.
uint8_t adv_hdl Advertising handle identifying the advertising set which has been removed.

If the advertising set has been cleared, this field is ignored.

◆ st_ble_gap_conn_evt_t

struct st_ble_gap_conn_evt_t

This structure notifies that a link has been established.

Data Fields
uint16_t conn_hdl Connection handle identifying the created link.
uint8_t role The role of the link.
value description
0x00 Master
0x01 Slave
uint8_t remote_addr_type Address type of the remote device.
value description
0x00 Public Address
0x01 Random Address
0x02 Public Identity Address.
It indicates that the Controller could resolve the resolvable private address of the remote device.
0x03 Random Identity Address.
It indicates that the Controller could resolve the resolvable private address of the remote device.
uint8_t remote_addr[BLE_BD_ADDR_LEN] Address of the remote device.
Note
The BD address setting format is little endian.
uint8_t local_rpa[BLE_BD_ADDR_LEN] Resolvable private address that local device used in connection procedure.

The local device address used in creating the link when the address type was set to BLE_GAP_ADDR_RPA_ID_PUBLIC or BLE_GAP_ADDR_RPA_ID_RANDOM by R_BLE_GAP_SetAdvParam() or R_BLE_GAP_CreateConn(). If the address type was set to other than BLE_GAP_ADDR_RPA_ID_PUBLIC and BLE_GAP_ADDR_RPA_ID_RANDOM, this field is set to all-zero.

Note
The BD address setting format is little endian.
uint8_t remote_rpa[BLE_BD_ADDR_LEN] Resolvable private address that the remote device used in connection procedure.

This field indicates the remote resolvable private address when remote_addr_type is 0x02 or 0x03. If remote_addr_type is other than 0x02 and 0x03, this field is set to all-zero.

Note
The BD address setting format is little endian.
uint16_t conn_intv Connection interval.

Valid range is 0x0006 - 0x0C80.
Time(ms) = conn_intv * 1.25.

uint16_t conn_latency Slave latency.

Valid range is 0x0000 - 0x01F3.

uint16_t sup_to Supervision timeout.

Valid range is 0x000A - 0x0C80.Time(ms) = sup_to * 10.

uint8_t clk_acc Master_Clock_Accuracy.
value description
0x00 500ppm
0x01 250ppm
0x02 150ppm
0x03 100ppm
0x04 75ppm
0x05 50ppm
0x06 30ppm
0x07 20ppm

◆ st_ble_gap_disconn_evt_t

struct st_ble_gap_disconn_evt_t

This structure notifies that a link has been disconnected.

Data Fields
uint16_t conn_hdl Connection handle identifying the link disconnected.
uint8_t reason The reason for disconnection.

Refer Core Specification Vol.2 Part D ,"2 Error Code Descriptions".

◆ st_ble_gap_rd_ch_map_evt_t

struct st_ble_gap_rd_ch_map_evt_t

This structure notifies that Channel Map has been retrieved by R_BLE_GAP_ReadChMap().

Data Fields
uint16_t conn_hdl Connection handle identifying the link whose Channel Map was retrieved.
uint8_t ch_map[BLE_GAP_CH_MAP_SIZE] Channel Map.

◆ st_ble_gap_rd_rssi_evt_t

struct st_ble_gap_rd_rssi_evt_t

This structure notifies that RSSI has been retrieved by R_BLE_GAP_ReadRssi().

Data Fields
uint16_t conn_hdl Connection handle identifying the link whose RSSI was retrieved.
int8_t rssi RSSI(in dBm).

Valid range is -127 < rssi < 20 and 127.
If this field is 127, it indicates that RSSI could not be retrieved.

◆ st_ble_gap_dev_info_evt_t

struct st_ble_gap_dev_info_evt_t

This structure notifies that information about remote device has been retrieved by R_BLE_GAP_GetRemDevInfo().

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device whose information has been retrieved.
uint8_t get_status Information about the remote device. This field is a bitwise OR of the following values.
Bit Number description
bit0 Address
bit1 Version, company_id, subversion
bit2 Feature
All other bits Reserved for future use
st_ble_dev_addr_t addr Address of the remote device.
uint8_t version The version of Link Layer of the remote device.

Refer to Bluetooth SIG Assigned Number (https://www.bluetooth.com/specifications/assigned-numbers) regarding defined number.

uint16_t company_id The manufacturer ID of the remote device.

Refer to Bluetooth SIG Assigned Number (https://www.bluetooth.com/specifications/assigned-numbers) regarding defined number.

uint16_t subversion The subversion of Link Layer.
uint8_t features[BLE_GAP_REM_FEATURE_SIZE] LE feature supported in the remote device.

Refer to Core Spec Vol 6, Part B 4.6 FEATURE SUPPORT.

◆ st_ble_gap_conn_upd_evt_t

struct st_ble_gap_conn_upd_evt_t

This structure notifies that connection parameters has been updated.

Data Fields
uint16_t conn_hdl Connection handle identifying the connection whose parameters has been updated.
uint16_t conn_intv Updated Connection Interval.

Valid range is 0x0006 - 0x0C80.
Time(ms) = conn_intv * 1.25.

uint16_t conn_latency Updated slave latency.

Valid range is 0x0000 - 0x01F3.

uint16_t sup_to Updated supervision timeout.

Valid range is 0x000A - 0x0C80.
Time(ms) = sup_to * 10.

◆ st_ble_gap_conn_upd_req_evt_t

struct st_ble_gap_conn_upd_req_evt_t

This structure notifies that a request for connection parameters update has been received.

Data Fields
uint16_t conn_hdl Connection handle identifying the link that was requested to update connection parameters.
uint16_t conn_intv_min Minimum connection interval.

Valid range is 0x0006 - 0x0C80.
Time(ms) = conn_intv_min * 1.25.

uint16_t conn_intv_max Maximum connection interval.

Valid range is 0x0006 - 0x0C80.
Time(ms) = conn_intv_max * 1.25.

uint16_t conn_latency Slave latency.

Valid range is 0x0000 - 0x01F3.

uint16_t sup_to Supervision timeout.

Valid range is 0x000A - 0x0C80.
Time(ms) = sup_to * 10

◆ st_ble_gap_conn_hdl_evt_t

struct st_ble_gap_conn_hdl_evt_t

This structure notifies that a GAP Event that includes only connection handle has occurred.

Data Fields
uint16_t conn_hdl Connection handle.

◆ st_ble_gap_data_len_chg_evt_t

struct st_ble_gap_data_len_chg_evt_t

This structure notifies that the packet data length has been updated.

Data Fields
uint16_t conn_hdl Connection handle identifying the link that updated Data Length.
uint16_t tx_octets Updated transmission packet size(in bytes).

Valid range is 0x001B - 0x00FB.

uint16_t tx_time Updated transmission time(us).

Valid range is 0x0148 - 0x4290.

uint16_t rx_octets Updated receive packet size(in bytes).

Valid range is 0x001B - 0x00FB.

uint16_t rx_time Updated receive time(us).

Valid range is 0x0148 - 0x4290.

◆ st_ble_gap_rd_rpa_evt_t

struct st_ble_gap_rd_rpa_evt_t

This structure notifies that the local resolvable private address has been retrieved by R_BLE_GAP_ReadRpa().

Data Fields
st_ble_dev_addr_t addr The resolvable private address of local device.

◆ st_ble_gap_phy_upd_evt_t

struct st_ble_gap_phy_upd_evt_t

This structure notifies that PHY for a connection has been updated.

Data Fields
uint16_t conn_hdl Connection handle identifying the link that has been updated.
uint8_t tx_phy Transmitter PHY.
value description
0x01 The transmitter PHY has been updated to 1M PHY.
0x02 The transmitter PHY has been updated to 2M PHY.
0x03 The transmitter PHY has been updated to Coded PHY.
uint8_t rx_phy Receiver PHY.
value description
0x01 The receiver PHY has been updated to 1M PHY.
0x02 The receiver PHY has been updated to 2M PHY.
0x03 The receiver PHY has been updated to Coded PHY.

◆ st_ble_gap_phy_rd_evt_t

struct st_ble_gap_phy_rd_evt_t

This structure notifies that the PHY settings has been retrieved by R_BLE_GAP_ReadPhy().

Data Fields
uint16_t conn_hdl Connection handle identifying the link that has been retrieved the PHY settings.
uint8_t tx_phy Transmitter PHY.
value description
0x01 The transmitter PHY has been updated to 1M PHY.
0x02 The transmitter PHY has been updated to 2M PHY.
0x03 The transmitter PHY has been updated to Coded PHY.
uint8_t rx_phy Receiver PHY.
value description
0x01 The receiver PHY has been updated to 1M PHY.
0x02 The receiver PHY has been updated to 2M PHY.
0x03 The receiver PHY has been updated to Coded PHY.

◆ st_ble_gap_scan_req_recv_evt_t

struct st_ble_gap_scan_req_recv_evt_t

This structure notifies that a Scan Request packet has been received from a Scanner.

Data Fields
uint8_t adv_hdl Advertising handle identifying the advertising set that has received the Scan Request.
uint8_t scanner_addr_type Address type of the Scanner.
value description
0x00 Public Address.
0x01 Random Address.
0x02 Public Identity Address which could be resolved in Controller.
0x03 Random Identity Address which could be resolved in Controller.
uint8_t scanner_addr[BLE_BD_ADDR_LEN] Address of the Scanner.
Note
The BD address setting format is little endian.

◆ st_ble_gap_sync_est_evt_t

struct st_ble_gap_sync_est_evt_t

This structure notifies that a Periodic sync has been established.

Data Fields
uint16_t sync_hdl Sync handle identifying the Periodic Sync that has been established.
uint8_t adv_sid Advertising SID identifying the advertising set that has established the Periodic Sync.
uint8_t adv_addr_type Address type of the advertiser.
value description
0x00 Public Address.
0x01 Random Address.
0x02 Public Identity Address which could be resolved in Controller.
0x03 Random Identity Address which could be resolved in Controller.
uint8_t * p_adv_addr Address of the advertiser.
Note
The BD address setting format is little endian.
uint8_t adv_phy Advertising PHY.
value description
0x01 Advertiser PHY is 1M PHY.
0x02 Advertiser PHY is 2M PHY.
0x03 Advertiser PHY is Coded PHY.
uint16_t perd_adv_intv Periodic Advertising Interval.

Valid range is 0x0006 - 0xFFFF.
Time(ms) = perd_adv_intv * 1.25.

uint8_t adv_clk_acc Advertiser Clock Accuracy.
value description
0x00 500ppm
0x01 250ppm
0x02 150ppm
0x03 100ppm
0x04 75ppm
0x05 50ppm
0x06 30ppm
0x07 20ppm

◆ st_ble_gap_sync_hdl_evt_t

struct st_ble_gap_sync_hdl_evt_t

This structure notifies that a GAP Event that includes only sync handle has occurred.

Data Fields
uint16_t sync_hdl Sync handle.

◆ st_ble_gap_white_list_conf_evt_t

struct st_ble_gap_white_list_conf_evt_t

This structure notifies that White List has been configured.

Data Fields
uint8_t op_code The operation for White List.
value description
0x01 A device was added to White List.
0x02 A device was deleted from White List.
0x03 White List was cleared.
uint8_t num The number or devices which have been added to or deleted from White List.

◆ st_ble_gap_rslv_list_conf_evt_t

struct st_ble_gap_rslv_list_conf_evt_t

This structure notifies that Resolving List has been configured.

Data Fields
uint8_t op_code The operation for Resolving List.
value description
0x01 A device was added to Resolving List.
0x02 A device was deleted from Resolving List.
0x03 Resolving List was cleared.
uint8_t num The number or devices which have been added to or deleted from Resolving List.

◆ st_ble_gap_perd_list_conf_evt_t

struct st_ble_gap_perd_list_conf_evt_t

This structure notifies that Periodic Advertiser List has been configured.

Data Fields
uint8_t op_code The operation for Periodic Advertiser List.
value description
0x01 A device was added to Periodic Advertiser List.
0x02 A device was deleted from Periodic Advertiser List.
0x03 Periodic Advertiser List was cleared.
uint8_t num The number or devices which have been added to or deleted from Periodic Advertiser List.

◆ st_ble_gap_set_priv_mode_evt_t

struct st_ble_gap_set_priv_mode_evt_t

This structure notifies that Privacy Mode has been configured.

Data Fields
uint8_t num The number or devices which have been set privacy mode.

◆ st_ble_gap_pairing_req_evt_t

struct st_ble_gap_pairing_req_evt_t

This structure notifies that a pairing request from a remote device has been received.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device that sent the pairing request.
st_ble_dev_addr_t bd_addr The address of the remote device.
st_ble_gap_auth_info_t auth_info The Pairing parameters of the remote device.

◆ st_ble_gap_passkey_display_evt_t

struct st_ble_gap_passkey_display_evt_t

This structure notifies that a request for Passkey display in pairing has been received.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device that requested Passkey display.
uint32_t passkey Passkey.

This field is a 6 digit decimal number(000000-999999).

◆ st_ble_gap_num_comp_evt_t

struct st_ble_gap_num_comp_evt_t

This structure notifies that a request for Numeric Comparison in pairing has been received.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device that requested Numeric Comparison.
uint32_t numeric The number to be confirmed in Numeric Comparison.

This field is a 6 digit decimal number(000000-999999).

◆ st_ble_gap_key_press_ntf_evt_t

struct st_ble_gap_key_press_ntf_evt_t

This structure notifies that the remote device has input a key in Passkey Entry.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device that input a key.
uint8_t key_type Type of the key that the remote device input.
value description
0x00 Passkey entry started.
0x01 Passkey digit entered.
0x02 Passkey digit erased.
0x03 Passkey cleared.
0x04 Passkey entry completed.

◆ st_ble_gap_pairing_info_evt_t

struct st_ble_gap_pairing_info_evt_t

This structure notifies that the pairing has completed.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device that the pairing has been done with.
st_ble_dev_addr_t bd_addr Address of the remote device.
st_ble_gap_auth_info_t auth_info Key information exchanged in pairing.

If local device supports bonding, store the information in non-volatile memory in order to set it to host stack after power re-supply.

◆ st_ble_gap_enc_chg_evt_t

struct st_ble_gap_enc_chg_evt_t

This structure notifies that the encryption status of a link has been changed.

Data Fields
uint16_t conn_hdl Connection handle identifying the link that has been changed.
uint8_t enc_status Encryption Status.
value description
0x00 Encryption OFF.
0x01 Encryption ON.
0x03 Encryption updated by Encryption Key Refresh Completed.

◆ st_ble_gap_peer_key_info_evt_t

struct st_ble_gap_peer_key_info_evt_t

This structure notifies that the remote device has distributed the keys.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device that has distributed the keys.
st_ble_dev_addr_t bd_addr Address of the remote device.
st_ble_gap_key_ex_param_t key_ex_param Distributed keys.

If local device supports bonding, store the keys in non-volatile memory and at power re-supply set to the host stack by R_BLE_GAP_SetBondInfo().

◆ st_ble_gap_ltk_req_evt_t

struct st_ble_gap_ltk_req_evt_t

This structure notifies that a LTK request from a remote device has been received.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device which requests for the LTK.
uint16_t ediv Ediv.
uint8_t * p_peer_rand Rand.

◆ st_ble_gap_ltk_rsp_evt_t

struct st_ble_gap_ltk_rsp_evt_t

This structure notifies that local device has replied to the LTK request from the remote device.

Data Fields
uint16_t conn_hdl Connection handle identifying the remote device to be sent the response to the LTK request.
uint8_t response The response to the LTK request.
value description
0x00 Local device replied with the stored LTK.
0x01 Local device rejected the LTK request, because the LTK was not found.

◆ st_ble_gap_sc_oob_data_evt_t

struct st_ble_gap_sc_oob_data_evt_t

This structure notifies that OOB data for Secure Connections has been generated by R_BLE_GAP_CreateScOobData().

Data Fields
uint8_t * p_sc_oob_conf Confirmation value(16 bytes) of OOB Data.
uint8_t * p_sc_oob_rand Rand(16bytes) of OOB Data.

◆ st_ble_gap_bond_info_t

struct st_ble_gap_bond_info_t

Bonding information used in R_BLE_GAP_SetBondInfo().

Data Fields
st_ble_dev_addr_t * p_addr Address of the device which exchanged the keys.
st_ble_gap_auth_info_t * p_auth_info Information about the keys.
st_ble_gap_key_ex_param_t * p_keys Keys distributed from the remote device in paring.

◆ st_cte_iq_sample_t

struct st_cte_iq_sample_t

CTE IQ sample data.

◆ st_ble_gap_cte_connless_rept_t

struct st_ble_gap_cte_connless_rept_t

connectionless CTE data report

◆ st_ble_gap_cte_conn_rept_t

struct st_ble_gap_cte_conn_rept_t

connection CTE data report

◆ st_ble_subrate_upd_t

struct st_ble_subrate_upd_t

subrating update event

◆ st_ble_gap_past_est_evt_t

struct st_ble_gap_past_est_evt_t

This structure notifies that.

Data Fields
uint16_t conn_hdl

Periodic Advertising Sync Transfer options

uint16_t service_data
st_ble_gap_sync_est_evt_t sync

◆ st_ble_gap_tx_power_reporting_evt_t

struct st_ble_gap_tx_power_reporting_evt_t

This structure notifies that.

◆ st_ble_gap_pass_loss_thr_evt_t

struct st_ble_gap_pass_loss_thr_evt_t

This structure notifies that a path loss report has been received.

◆ st_ble_gap_req_peer_sca_evt_t

struct st_ble_gap_req_peer_sca_evt_t

This structure notifies that a SCA request to a remote device has been completed.

◆ st_ble_gap_dtm_test_end_evt_t

struct st_ble_gap_dtm_test_end_evt_t

report of dtm transmit/receive test end

Data Fields
uint16_t recv_cnt the number of received packets

◆ st_ble_gap_enhanced_read_tx_power_level_evt_t

struct st_ble_gap_enhanced_read_tx_power_level_evt_t

Power level report of remove device.

Data Fields
uint16_t handle Indicate an ACL connection.
uint8_t phy PHY.
int8_t crt_tx_power_level Current transmit power level.
int8_t max_tx_power_level Maximum transmit power level.

Macro Definition Documentation

◆ BLE_BD_ADDR_LEN

#define BLE_BD_ADDR_LEN

Bluetooth Device Address Size

◆ BLE_MASTER

#define BLE_MASTER

Master Role.

◆ BLE_SLAVE

#define BLE_SLAVE

Slave Role.

◆ BLE_GAP_ADDR_PUBLIC

#define BLE_GAP_ADDR_PUBLIC

Public Address.

◆ BLE_GAP_ADDR_RAND

#define BLE_GAP_ADDR_RAND

Random Address.

◆ BLE_GAP_ADDR_RPA_ID_PUBLIC

#define BLE_GAP_ADDR_RPA_ID_PUBLIC

Resolvable Private Address.

If the IRK of local device has not been registered in Resolving List, public address is used.

◆ BLE_GAP_ADDR_RPA_ID_RANDOM

#define BLE_GAP_ADDR_RPA_ID_RANDOM

Resolvable Private Address.

If the IRK of local device has not been registered in Resolving List, random address is used.

◆ BLE_GAP_SCAN_ALLOW_ADV_EXCEPT_DIRECTED_WLST

#define BLE_GAP_SCAN_ALLOW_ADV_EXCEPT_DIRECTED_WLST

Accept all advertising and scan response PDUs.
The following are excluded.

  • Advertising and scan response PDUs where the advertiser's identity address is not in the White List.
  • Directed advertising PDUs whose the target address is identity address but doesn't address local device. However directed advertising PDUs whose the target address is the local resolvable private address are accepted.

◆ BLE_GAP_IOCAP_DISPLAY_ONLY

#define BLE_GAP_IOCAP_DISPLAY_ONLY

Display Only iocapability.

Output function : Local device has the ability to display a 6 digit decimal number.
Input function : None

◆ BLE_GAP_IOCAP_DISPLAY_YESNO

#define BLE_GAP_IOCAP_DISPLAY_YESNO

Display Yes/No iocapability.

Output function : Output function : Local device has the ability to display a 6 digit decimal number.
Input function : Local device has the ability to indicate 'yes' or 'no'

◆ BLE_GAP_IOCAP_KEYBOARD_ONLY

#define BLE_GAP_IOCAP_KEYBOARD_ONLY

Keyboard Only iocapability.

Output function : None
Input function : Local device has the ability to input the number '0' - '9'.

◆ BLE_GAP_IOCAP_NOINPUT_NOOUTPUT

#define BLE_GAP_IOCAP_NOINPUT_NOOUTPUT

No Input No Output iocapability.

Output function : None
Input function : None

◆ BLE_GAP_IOCAP_KEYBOARD_DISPLAY

#define BLE_GAP_IOCAP_KEYBOARD_DISPLAY

Keyboard Display iocapability.

Output function : Output function : Local device has the ability to display a 6 digit decimal number.
Input function : Local device has the ability to input the number '0' - '9'.

Typedef Documentation

◆ ble_gap_app_cb_t

ble_gap_app_cb_t

ble_gap_app_cb_t is the GAP Event callback function type.

Parameters
[in]event_typeThe type of GAP Event.
[in]event_resultThe result of API call which generates the GAP Event.
[in]p_event_dataData notified in the GAP Event.
Returns
none

◆ ble_gap_del_bond_cb_t

ble_gap_del_bond_cb_t

ble_gap_del_bond_cb_t is the type of the callback function for delete bonding information stored in non-volatile area.
This type is used in R_BLE_GAP_DeleteBondInfo().

Parameters
[in]p_addrThe parameter returns the address of the remote device whose keys are deleted by R_BLE_GAP_DeleteBondInfo().
If R_BLE_GAP_DeleteBondInfo() deletes the keys of all remote devices, the parameter returns NULL.
Returns
none

◆ st_ble_gap_adv_param_t

◆ st_ble_gap_scan_param_t

Enumeration Type Documentation

◆ e_ble_gap_evt_t

GAP Event Identifier.

Enumerator
BLE_GAP_EVENT_INVALID 

Invalid GAP Event.

Event Code: 0x1001

Event Data:

none

BLE_GAP_EVENT_STACK_ON 

Host Stack has been initialized.

When initializing host stack by R_BLE_GAP_Init() has been completed, BLE_GAP_EVENT_STACK_ON event is notified.

Event Code: 0x1002

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GAP_EVENT_STACK_OFF 

Host Stack has been terminated.

When terminating host stack by R_BLE_GAP_Terminate() has been completed, BLE_GAP_EVENT_STACK_OFF event is notified.

Event Code: 0x1003

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_STATE(0x0008) When function was called, host stack has not yet been initialized.

Event Data:

none

BLE_GAP_EVENT_LOC_VER_INFO 

Version information of local device.

When version information of local device has been retrieved by R_BLE_GAP_GetVerInfo(), BLE_GAP_EVENT_LOC_VER_INFO event is notified.

Event Code: 0x1004

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_loc_dev_info_evt_t

BLE_GAP_EVENT_HW_ERR 

Hardware Error.

When hardware error has been received from Controller, BLE_GAP_EVENT_HW_ERR event is notified.

Event Code: 0x1005

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_hw_err_evt_t

BLE_GAP_EVENT_CMD_ERR 

Command Status Error.

When the error of HCI Command has occurred after a R_BLE GAP API call, BLE_GAP_EVENT_CMD_ERR event is notified.

Event Code: 0x1101

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_cmd_err_evt_t

BLE_GAP_EVENT_ADV_REPT_IND 

Advertising Report.

When advertising PDUs has been received after scanning was started by R_BLE_GAP_StartScan().

Event Code: 0x1102

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_adv_rept_evt_t

BLE_GAP_EVENT_ADV_PARAM_SET_COMP 

Advertising parameters have been set.

Advertising parameters have been configured by R_BLE_GAP_SetAdvParam().

Event Code: 0x1103

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The advertising type that doesn't support advertising data/scan response data was specified to the advertising set which has already set advertising data/scan response data.
BLE_ERR_INVALID_OPERATION(0x0009) The reason for this error is as follows.
  • Advertising parameters were configured to the advertising set in advertising.
  • The sec_adv_phy field in adv_paran was not specified when Periodic Advertising was started.

Event Data:

st_ble_gap_adv_set_evt_t

BLE_GAP_EVENT_ADV_DATA_UPD_COMP 

Advertising data has been set.

This event notifies that Advertising Data/Scan Response Data/Periodic Advertising Data has been set to the advertising set by R_BLE_GAP_SetAdvSresData().

Event Code: 0x1104

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) The reason for this error is as follows.
  • The advertising set that doesn't support advertising data/scan response data was set to the data.
  • The advertising set that supports legacy advertising was set to advertising data/scan response data larger than 31 bytes.
  • The advertising set that has advertising data/scan response data greater than or equal to 252 bytes was set the data in advertising.
  • The advertising set that has periodic advertising data greater than or equal to 253 bytes was set the data in advertising.
BLE_ERR_MEM_ALLOC_FAILED(0x000C) Length exceeded the length that the advertising set could be set.
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_SetAdvSresData() has not been created.

Event Data:

st_ble_gap_adv_data_evt_t

BLE_GAP_EVENT_ADV_ON 

Advertising has started.

When advertising has been started by R_BLE_GAP_StartAdv(), this event is notified to the application layer.

Event Code: 0x1105

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The reason for this error is as follows.
  • The advertising data length set to the advertising set for connectable extended advertising was invalid.
  • If o_addr_type field in adv_param used in R_BLE_GAP_SetAdvParam() is 0x03, the address which is set in o_addr field of adv_param has not been registered in Resolving List.
BLE_ERR_INVALID_OPERATION(0x0009) Setting of advertising data/scan response data has not been completed.
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_StartAdv() has not been created.
BLE_ERR_LIMIT_EXCEEDED(0x0010) When the maximum connections are established, a new connectable advertising tried starting.

Event Data:

st_ble_gap_adv_set_evt_t

BLE_GAP_EVENT_ADV_OFF 

Advertising has stopped.

This event notifies the application layer that advertising has stopped.

Event Code: 0x1106

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_StopAdv() has not been created.

Event Data:

st_ble_gap_adv_off_evt_t

BLE_GAP_EVENT_PERD_ADV_PARAM_SET_COMP 

Periodic advertising parameters have been set.

This event notifies the application layer that Periodic Advertising Parameters has been configured by R_BLE_GAP_SetPerdAdvParam().

Event Code: 0x1107

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The advertising set was the setting for anonymous advertising.
BLE_ERR_INVALID_OPERATION(0x0009) The advertising set was configured to the parameters in periodic advertising.
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_SetPerdAdvParam() has not been created.

Event Data:

st_ble_gap_adv_set_evt_t

BLE_GAP_EVENT_PERD_ADV_ON 

Periodic advertising has started.

When Periodic Advertising has been started by R_BLE_GAP_StartPerdAdv(), this event is notified to the application layer.

Event Code: 0x1108

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) The periodic advertising data set in the advertising set has not been completed.
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_StartPerdAdv() has not been created.

Event Data:

st_ble_gap_adv_set_evt_t

BLE_GAP_EVENT_PERD_ADV_OFF 

Periodic advertising has stopped.

When Periodic Advertising has terminated by R_BLE_GAP_StopPerdAdv(), this event is notified to the application layer.

Event Code: 0x1109

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_StopPerdAdv() has not been created.

Event Data:

st_ble_gap_adv_set_evt_t

BLE_GAP_EVENT_ADV_SET_REMOVE_COMP 

Advertising set has been deleted.

When the advertising set has been removed by R_BLE_GAP_RemoveAdvSet(), this event is notified to the application layer.

Event Code: 0x110A

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) When the advertising set was in advertising, R_BLE_GAP_RemoveAdvSet() was called.
BLE_ERR_INVALID_HDL(0x000E) The advertising set specified by R_BLE_GAP_RemoveAdvSet() has not been created.

Event Data:

st_ble_gap_rem_adv_set_evt_t

BLE_GAP_EVENT_SCAN_ON 

Scanning has started.

When scanning has started by R_BLE_GAP_StartScan(), this event is notified to the application layer.

Event Code: 0x110B

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The reason for this error is as follows:
BLE_ERR_INVALID_OPERATION(0x0009) In scanning, R_BLE_GAP_StartScan() was called.

Event Data:

none

BLE_GAP_EVENT_SCAN_OFF 

Scanning has stopped.

When scanning has been stopped by R_BLE_GAP_StopScan(), this event is notified to the application layer.

Event Code: 0x110C

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GAP_EVENT_SCAN_TO 

Scanning has stopped, because duration specified by API expired.

When the scan duration specified by R_BLE_GAP_StartScan() has expired, this event notifies scanning has stopped.

Event Code: 0x110D

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GAP_EVENT_CREATE_CONN_COMP 

Connection Request has been sent to Controller.

This event notifies a request for a connection has been sent to Controller.

Event Code: 0x110E

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The reason for this error is as follows:
  • Scan interval or scan windows specified by R_BLE_GAP_CreateConn() is invalid.
  • Although the own_addr_type field in p_param was set to 0x03, random address had not been registered in Resolving List.
BLE_ERR_INVALID_OPERATION(0x0009) R_BLE_GAP_CreateConn() was called while creating a link by previous R_BLE_GAP_CreateConn() call .
BLE_ERR_LIMIT_EXCEEDED(0x0010) When the maximum connections are established, R_BLE_GAP_CreateConn() was called.

Event Data:

none

BLE_GAP_EVENT_CONN_IND 

Link has been established.

This event notifies a link has been established.

Event Code: 0x110F

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The request for a connection has been cancelled by R_BLE_GAP_CancelCreateConn().

Event Data:

st_ble_gap_conn_evt_t

BLE_GAP_EVENT_DISCONN_IND 

Link has been disconnected.

This event notifies a link has been disconnected.

Event Code: 0x1110

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_disconn_evt_t

BLE_GAP_EVENT_CONN_CANCEL_COMP 

Connection Cancel Request has been sent to Controller.

This event notifies the request for a connection has been cancelled by R_BLE_GAP_CancelCreateConn().

Event Code: 0x1111

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) When a request for a connection has not been sent to Controller, R_BLE_GAP_CancelCreateConn() was called.

Event Data:

none

BLE_GAP_EVENT_WHITE_LIST_CONF_COMP 

The White List has been configured.

When White List has been configured, this event is notified to the application layer.

Event Code: 0x1112

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_STATE(0x0008) The add or delete operation was called, before the previous clear operation has been completed.
BLE_ERR_INVALID_OPERATION(0x0009) While doing advertising or scanning or creating a link with the White List, R_BLE_GAP_ConfWhiteList() was called.
BLE_ERR_MEM_ALLOC_FAILED(0x000C) White List has already registered the maximum number of devices.

Event Data:

st_ble_gap_white_list_conf_evt_t

BLE_GAP_EVENT_RAND_ADDR_SET_COMP 

Random address has been set to Controller.

This event notifies Controller has been set the random address by R_BLE_GAP_SetRandAddr().

Event Code: 0x1113

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) When local device was in legacy advertising, R_BLE_GAP_SetRandAddr() was called.

Event Data:

none

BLE_GAP_EVENT_CH_MAP_RD_COMP 

Channel Map has been retrieved.

This event notifies Channel Map has been retrieved by R_BLE_GAP_ReadChMap().

Event Code: 0x1114

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The remote device specified by R_BLE_GAP_ReadChMap() was not found.

Event Data:

st_ble_gap_rd_ch_map_evt_t

BLE_GAP_EVENT_CH_MAP_SET_COMP 

Channel Map has set.

This event notifies Channel Map has been configured by R_BLE_GAP_SetChMap().

Event Code: 0x1115

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The channel map specified by R_BLE_GAP_SetChMap() was all-zero.

Event Data:

none

BLE_GAP_EVENT_RSSI_RD_COMP 

RSSl has been retrieved.

This event notifies RSSI has been retrieved by R_BLE_GAP_ReadRssi().

Event Code: 0x1116

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The remote device specified by R_BLE_GAP_ReadRssi() was not found.

Event Data:

st_ble_gap_rd_rssi_evt_t

BLE_GAP_EVENT_GET_REM_DEV_INFO 

Information about the remote device has been retrieved.

This event notifies information about the remote device has been retrieved by R_BLE_GAP_GetRemDevInfo().

Event Code: 0x1117

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_dev_info_evt_t

BLE_GAP_EVENT_CONN_PARAM_UPD_COMP 

Connection parameters has been configured.

This event notifies the connection parameters has been updated.

Event Code: 0x1118

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_DATA(0x0002) Local device rejected the request for updating connection parameters.
BLE_ERR_INVALID_ARG(0x0003) The remote device rejected the connection parameters suggested from local device.
BLE_ERR_UNSUPPORTED(0x0007) The remote device doesn't support connection parameters update feature.

Event Data:

st_ble_gap_conn_upd_evt_t

BLE_GAP_EVENT_CONN_PARAM_UPD_REQ 

Local device has received the request for configuration of connection parameters.

This event notifies the request for connection parameters update has been received.

Event Code: 0x1119

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_conn_upd_req_evt_t

BLE_GAP_EVENT_AUTH_PL_TO_EXPIRED 

Authenticated Payload Timeout.

This event notifies Authenticated Payload Timeout has occurred.

Event Code: 0x111A

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_SET_DATA_LEN_COMP 

The request for update transmission packet size and transmission time have been sent to Controller.

This event notifies a request for updating packet data length and transmission timer has been sent to Controller.

Event Code: 0x111B

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The tx_octets or tx_time parameter specified by R_BLE_GAP_SetDataLen() is invalid.
BLE_ERR_UNSUPPORTED(0x0007) The remote device does not support updating packet data length and transmission time.
BLE_ERR_INVALID_HDL(0x000E) When R_BLE_GAP_SetDataLen() was called, the connection was not established.

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_DATA_LEN_CHG 

Transmission packet size and transmission time have been changed.

This event notifies packet data length and transmission time have been updated.

Event Code: 0x111C

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_data_len_chg_evt_t

BLE_GAP_EVENT_RSLV_LIST_CONF_COMP 

The Resolving List has been configured.

When Resolving List has been configured by R_BLE_GAP_ConfRslvList(), this event is notified to the application layer.

Event Code: 0x111D

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_STATE(0x0008) The add or delete operation was called, before the previous clear operation has been completed.
BLE_ERR_INVALID_OPERATION(0x0009) While doing advertising or scanning or creating a link with resolvable private address, R_BLE_GAP_ConfRslvList() was called.
BLE_ERR_MEM_ALLOC_FAILED(0x000C) Resolving List has already registered the maximum number of devices.
BLE_ERR_INVALID_HDL(0x000E) The specified Identity Address was not found in Resolving List.

Event Data:

st_ble_gap_rslv_list_conf_evt_t

BLE_GAP_EVENT_RPA_EN_COMP 

Resolvable private address function has been enabled or disabled.

When Resolvable Private Address function in Controller has been enabled by R_BLE_GAP_EnableRpa(), this event is notified to the application layer.

Event Code: 0x111E

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) While advertising, scanning, or establishing a link with resolvable private address, R_BLE_GAP_EnableRpa() was called.

Event Data:

none

BLE_GAP_EVENT_SET_RPA_TO_COMP 

The update time of resolvable private address has been changed.

When Resolvable Private Address Timeout in Controller has been updated by R_BLE_GAP_SetRpaTo(), this event is notified to the application layer.

Event Code: 0x111F

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The rpa_timeout parameter specified by R_BLE_GAP_SetRpaTo() is out of range.

Event Data:

none

BLE_GAP_EVENT_RD_RPA_COMP 

The resolvable private address of local device has been retrieved.

When the resolvable private address of local device has been retrieved by R_BLE_GAP_ReadRpa(), this event is notified to the application layer.

Event Code: 0x1120

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The identity address specified by R_BLE_GAP_ReadRpa() was not registered in Resolving List.

Event Data:

st_ble_gap_rd_rpa_evt_t

BLE_GAP_EVENT_PHY_UPD 

PHY for connection has been changed.

This event notifies the application layer that PHY for a connection has been updated.

Event Code: 0x1121

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_phy_upd_evt_t

BLE_GAP_EVENT_PHY_SET_COMP 

The request for updating PHY for connection has been sent to Controller.

When Controller has received a request for updating PHY for a connection by R_BLE_GAP_SetPhy(), this event is notified to the application layer.

Event Code: 0x1122

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The remote device specified by R_BLE_GAP_SetPhy() was not found.

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_DEF_PHY_SET_COMP 

The request for setting default PHY has been sent to Controller.

When the PHY preferences which a remote device may change has been configured by R_BLE_GAP_SetDefPhy(), this event is notified to the application layer.

Event Code: 0x1123

result:

BLE_SUCCESS(0x0000) Success

Event Data:

none

BLE_GAP_EVENT_PHY_RD_COMP 

PHY configuration has been retrieved.

When the PHY settings has been retrieved by R_BLE_GAP_ReadPhy(), this event is notified to the application layer.

Event Code: 0x1124

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_HDL(0x000E) The link specified by R_BLE_GAP_ReadPhy() was not found.

Event Data:

st_ble_gap_phy_rd_evt_t

BLE_GAP_EVENT_SCAN_REQ_RECV 

Scan Request has been received.

This event notifies the application layer that a Scan Request packet has been received from a Scanner.

Event Code: 0x1125

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_scan_req_recv_evt_t

BLE_GAP_EVENT_CREATE_SYNC_COMP 

The request for establishing a periodic sync has been sent to Controller.

This event notifies the application layer that Controller has received a request for a Periodic Sync establishment.

Event Code: 0x1126

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) When R_BLE_GAP_CreateSync() was called, this event for previous the API call has not been received.
BLE_ERR_ALREADY_IN_PROGRESS(0x000A) The advertising set specified by R_BLE_GAP_CreateSync() has already established a periodic sync.

Event Data:

none

BLE_GAP_EVENT_SYNC_EST 

The periodic advertising sync has been established.

This event notifies the application layer that a Periodic sync has been established.

Event Code: 0x1127

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_NOT_YET_READY(0x0012) The request for a Periodic Sync establishment was cancelled by R_BLE_GAP_CancelCreateSync().

Event Data:

st_ble_gap_sync_est_evt_t

BLE_GAP_EVENT_SYNC_TERM 

The periodic advertising sync has been terminated.

This event notifies the application layer that the Periodic Sync has been terminated by R_BLE_GAP_TerminateSync().

Event Code: 0x1128

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) While establishing a Periodic Sync by R_BLE_GAP_CreateSync(), R_BLE_GAP_TerminateSync() was called.
BLE_ERR_INVALID_HDL(0x000E) The sync handle specified by R_BLE_GAP_TerminateSync() was not found.

Event Data:

st_ble_gap_sync_hdl_evt_t

BLE_GAP_EVENT_SYNC_LOST 

The periodic advertising sync has been lost.

This event notifies the application layer that the Periodic Sync has been lost.

Event Code: 0x1129

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_sync_hdl_evt_t

BLE_GAP_EVENT_SYNC_CREATE_CANCEL_COMP 

The request for cancel of establishing a periodic advertising sync has been sent to Controller.

This event notifies the request for a Periodic Sync establishment has been cancelled by R_BLE_GAP_CancelCreateSync().

Event Code: 0x112A

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_OPERATION(0x0009) When R_BLE_GAP_CancelCreateSync() was called, a request for a Periodic Sync establishment by R_BLE_GAP_CreateSync() has not been sent to Controller.

Event Data:

none

BLE_GAP_EVENT_PERD_LIST_CONF_COMP 

The Periodic Advertiser list has been configured.

When Periodic Advertiser List has been configured by R_BLE_GAP_ConfPerdAdvList(), this event is notified to the application layer.

Event Code: 0x112B

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) The advertiser has already been registered in Periodic Advertiser List.
BLE_ERR_INVALID_STATE(0x0008) The add or delete operation was called, before the previous clear operation has been completed.
BLE_ERR_INVALID_OPERATION(0x0009) When establishing a periodic sync by R_BLE_GAP_CreateSync(), R_BLE_GAP_ConfPerdAdvList() was called.
BLE_ERR_MEM_ALLOC_FAILED(0x000C) Periodic Advertiser List has already registered the maximum number of devices.
BLE_ERR_INVALID_HDL(0x000E) The device specified by R_BLE_GAP_ConfPerdAdvList() was not found.

Event Data:

st_ble_gap_perd_list_conf_evt_t

BLE_GAP_EVENT_PRIV_MODE_SET_COMP 

Privacy Mode has been configured.

This event notifies the application layer that the Privacy Mode has been configured by R_BLE_GAP_SetPrivMode().

Event Code: 0x112B

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_INVALID_ARG(0x0003) Address type or privacy mode is out of range.
BLE_ERR_INVALID_OPERATION(0x0009) While advertising, scanning, or establishing a link with resolvable private address, R_BLE_GAP_SetPrivMode() was called.
BLE_ERR_INVALID_HDL(0x000E) The address specified by R_BLE_GAP_SetPrivMode() has not been registered in Resolving List.

Event Data:

none

BLE_GAP_EVENT_PAIRING_REQ 

The pairing request from a remote device has been received.

This event notifies the application layer that a pairing request from a remote device has been received.

Event Code: 0x1401

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_pairing_info_evt_t

BLE_GAP_EVENT_PASSKEY_ENTRY_REQ 

The request for input passkey has been received.

This event notifies that a request for Passkey input in pairing has been received.

Event Code: 0x1402

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_PASSKEY_DISPLAY_REQ 

The request for displaying a passkey has been received.

This event notifies that a request for Passkey display in pairing has been received.

Event Code: 0x1403

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_passkey_display_evt_t

BLE_GAP_EVENT_NUM_COMP_REQ 

The request for confirmation with Numeric Comparison has received.

This event notifies that a request for Numeric Comparison in pairing has been received.

Event Code: 0x1404

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_num_comp_evt_t

BLE_GAP_EVENT_KEY_PRESS_NTF 

Key Notification from a remote device has been received.

This event notifies the application layer that the remote device has input a key in Passkey Entry.

Event Code: 0x1405

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_key_press_ntf_evt_t

BLE_GAP_EVENT_PAIRING_COMP 

Pairing has been completed.

This event notifies the application layer that the pairing has completed.

Event Code: 0x1406

result:

BLE_SUCCESS(0x0000) Success
BLE_ERR_SMP_LE_PASSKEY_ENTRY_FAIL(0x2001) PassKey Entry is failed.
BLE_ERR_SMP_LE_OOB_DATA_NOT_AVAILABLE(0x2002) OOB Data is not available.
BLE_ERR_SMP_LE_AUTH_REQ_NOT_MET(0x2003) The requested pairing can not be performed because of IO Capability.
BLE_ERR_SMP_LE_CONFIRM_VAL_NOT_MATCH(0x2004) Confirmation value does not match.
BLE_ERR_SMP_LE_PAIRING_NOT_SPRT(0x2005) Pairing is not supported.
BLE_ERR_SMP_LE_INSUFFICIENT_ENC_KEY_SIZE(0x2006) Encryption Key Size is insufficient.
BLE_ERR_SMP_LE_CMD_NOT_SPRT(0x2007) The pairing command received is not supported.
BLE_ERR_SMP_LE_UNSPECIFIED_REASON(0x2008) Pairing failed with an unspecified reason.
BLE_ERR_SMP_LE_REPEATED_ATTEMPTS(0x2009) The number of repetition exceeded the upper limit.
BLE_ERR_SMP_LE_INVALID_PARAM(0x200A) Invalid parameter is set.
BLE_ERR_SMP_LE_DHKEY_CHECK_FAIL(0x200B) DHKey Check error.
BLE_ERR_SMP_LE_NUM_COMP_FAIL(0x200C) Numeric Comparison failure.
BLE_ERR_SMP_LE_DISCONNECTED(0x200F) Disconnection in pairing.
BLE_ERR_SMP_LE_TO(0x2011) Failure due to timeout.
BLE_ERR_SMP_LE_LOC_KEY_MISSING(0x2014) Pairing/Encryption failure because local device lost the LTK.

Event Data:

st_ble_gap_pairing_info_evt_t

BLE_GAP_EVENT_ENC_CHG 

Key Notification from a remote device has been received.

This event notifies the application layer that the encryption status of a link has been changed.

Event Code: 0x1407

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_enc_chg_evt_t

BLE_GAP_EVENT_PEER_KEY_INFO 

Keys has been received from a remote device.

This event notifies the application layer that the remote device has distributed the keys.

Event Code: 0x1408

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_peer_key_info_evt_t

BLE_GAP_EVENT_EX_KEY_REQ 

The request for key distribution has been received.

When local device has been received a request for key distribution to remote device, this event is notified to the application layer.

Event Code: 0x1409

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_LTK_REQ 

LTK has been request from a remote device.

When local device has been received a LTK request from a remote device, this event is notified to the application layer.

Event Code: 0x140A

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_ltk_req_evt_t

BLE_GAP_EVENT_LTK_RSP_COMP 

LTK reply has been sent to Controller.

When local device has replied to the LTK request from the remote device, this event is notified to the application layer.

Event Code: 0x140B

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_ltk_rsp_evt_t

BLE_GAP_EVENT_SC_OOB_CREATE_COMP 

The authentication data to be used in Secure Connections OOB has been created.

This event notifies OOB data for Secure Connections has been generated by R_BLE_GAP_CreateScOobData().

Event Code: 0x140C

result:

BLE_SUCCESS(0x0000) Success

Event Data:

st_ble_gap_sc_oob_data_evt_t

BLE_GAP_EVENT_CTE_CONN_REQ_FAILED 

An connectionless CTE IQ sample is reported.

result

0x0000 Response without CTE info other Rejected by remote peer

Event Data:

None

BLE_GAP_EVENT_CTE_CONNLESS_REPT 

An connectionless CTE IQ sample is reported.

Event Data:

st_ble_gap_cte_connless_rept_t

BLE_GAP_EVENT_CTE_CONN_REPT 

An connection CTE IQ sample is reported.

Event Data:

st_ble_gap_cte_conn_rept_t

BLE_GAP_EVENT_SUBRATE_CHANGE 

a Connection Subrate Update procedure has completed and some parameters of the specified connection have changed.

Event Data:

st_ble_subrate_upd_t

BLE_GAP_EVENT_PAST_RECV 

This event notifies that it has received periodic advertising synchronization information from the device referred to by the Connection_Handle parameter

Event Data:

st_ble_gap_past_est_evt_t.

BLE_GAP_EVENT_TX_POWER_REPT 

Transmit power level report.

This event is a report of the transmit power level on the ACL connection identified by the conn_hdl

Event Data:

st_ble_gap_tx_power_reporting_evt_t

BLE_GAP_EVENT_PATH_LOSS_THR 

Report a path loss threshold crossing on the ACL connection identified by the Connection_Handle parameter.

Event Data:

st_ble_gap_pass_loss_thr_evt_t

BLE_GAP_EVENT_REQ_PEER_SCA_COMP 

Indicates that the HCI_LE_Request_Peer_SCA command has been completed.

Event Data:

st_ble_gap_req_peer_sca_evt_t.

BLE_GAP_EVENT_CTE_SET_CONNLESS_PARAM_COMP 

Event Data:

None

BLE_GAP_EVENT_CTE_CONNLESS_TX_ON 

Event Data:

None

BLE_GAP_EVENT_CTE_CONNLESS_TX_OFF 

Event Data:

None

BLE_GAP_EVENT_CTE_CONNLESS_RX_ON 

Event Data:

st_ble_gap_sync_hdl_evt_t

BLE_GAP_EVENT_CTE_CONNLESS_RX_OFF 

Event Data:

st_ble_gap_sync_hdl_evt_t

BLE_GAP_EVENT_CTE_SET_CONN_PARAM_COMP 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_CTE_SET_CONN_RSP_ON 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_CTE_SET_CONN_RSP_OFF 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_CTE_SET_CONN_RECV_PARAM_COMP 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_CTE_CONN_REQ_ON 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_CTE_CONN_REQ_OFF 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_SET_DEF_SUBRATE_COMP 

Event Data:

None

BLE_GAP_EVENT_REQ_SUBRATE_COMP 

Event Data:

None

BLE_GAP_EVENT_PAST_START_COMP 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_PAST_SET_PARAM_COMP 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_PAST_SET_DEF_PARAM_COMP 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_UPD_SCA_COMP 

Event Data:

None

BLE_GAP_EVENT_READ_REMOTE_TX_POWER_COMP 

Event Data:

None

BLE_GAP_EVENT_SET_PATHLOSS_REPT_PARAM_COMP 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_PATHLOSS_REPT_ON 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_PATHLOSS_REPT_OFF 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_LOCAL_TX_POWER_REPT_ON 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_LOCAL_TX_POWER_REPT_OFF 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_REMOTE_TX_POWER_REPT_ON 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_REMOTE_TX_POWER_REPT_OFF 

Event Data:

st_ble_gap_conn_hdl_evt_t

BLE_GAP_EVENT_SET_RPA_UPD_REASON_COMP 

Event Data:

None

BLE_GAP_EVENT_DTM_RX_TEST_COMP 

Event Data:

None

BLE_GAP_EVENT_DTM_TX_TEST_COMP 

Event Data:

None

BLE_GAP_EVENT_DTM_TEST_END_COMP 

Event Data:

st_ble_gap_dtm_test_end_evt_t

BLE_GAP_EVENT_ENHANCED_READ_TX_POWER_LEVEL_COMP 

Event Data:

st_ble_gap_enhanced_read_tx_power_level_evt_t

BLE_GAP_EVENT_SET_HOST_FEAT_COMP 

Event Data:

None

Function Documentation

◆ R_BLE_GAP_Init()

ble_status_t R_BLE_GAP_Init ( ble_gap_app_cb_t  gap_cb)

Initialize the Host Stack.

Host stack is initialized with this function. Before using All the R_BLE APIs, it's necessary to call this function. A callback function is registered with this function. In order to receive the GAP event, it's necessary to register a callback function. The result of this API call is notified in BLE_GAP_EVENT_STACK_ON event.

Parameters
[in]gap_cbA callback function registered with this function.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)gap_cb is specified as NULL.
BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
  • Host Stack was already initialized.
  • The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_Terminate()

ble_status_t R_BLE_GAP_Terminate ( void  )

Terminate the Host Stack.

Host stack is terminated with this function. In order to reset all the Bluetooth functions, it's necessary to call this function. The result of this API call is notified in BLE_GAP_EVENT_STACK_OFF event.

Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)Host stack hasn't been initialized.

◆ R_BLE_GAP_UpdConn()

ble_status_t R_BLE_GAP_UpdConn ( uint16_t  conn_hdl,
uint8_t  mode,
uint16_t  accept,
st_ble_gap_conn_param_t p_conn_updt_param 
)

Update the connection parameters.

This function updates the connection parameters or replies a request for updating connection parameters notified by BLE_GAP_EVENT_CONN_PARAM_UPD_REQ event. When the connection parameters has been updated, BLE_GAP_EVENT_CONN_PARAM_UPD_COMP event is notified to the application layer.

Parameters
[in]conn_hdlConnection handle identifying the link to be updated.
[in]modeConnection parameter update request or response.
macro description
BLE_GAP_CONN_UPD_MODE_REQ (0x01) Request for updating the connection parameters.
BLE_GAP_CONN_UPD_MODE_RSP (0x02) Reply a connection parameter update request.
[in]acceptWhen mode is BLE_GAP_CONN_UPD_MODE_RSP, accept or reject the connection parameters update request. If mode is BLE_GAP_CONN_UPD_MODE_REQ, accept is ignored.
macro description
BLE_GAP_CONN_UPD_ACCEPT (0x0000) Accept the update request.
BLE_GAP_CONN_UPD_REJECT (0x0001) Reject the update request.
[in]p_conn_updt_paramConnection parameters to be updated. When mode is BLE_GAP_CONN_UPD_MODE_RSP and accept is BLE_GAP_CONN_UPD_REJECT, p_conn_updt_param is ignored.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)When accept is BLE_GAP_CONN_UPD_ACCEPT, p_conn_updt_param is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The following is out of range.
  • mode
  • accept
  • conn_intv_min field in p_conn_updt_param
  • conn_intv_max field in p_conn_updt_param
  • conn_latency in p_conn_updt_param
  • sup_to in p_conn_updt_param
  • conn_hdl
BLE_ERR_INVALID_STATE(0x0008)Not connected with the remote device.
BLE_ERR_CONTEXT_FULL(0x000B)Sending a L2CAP command, an error occurred.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_SetDataLen()

ble_status_t R_BLE_GAP_SetDataLen ( uint16_t  conn_hdl,
uint16_t  tx_octets,
uint16_t  tx_time 
)

Update the packet size and the packet transmit time.

This function requests for changing the maximum transmission packet size and the maximum packet transmission time. When Controller has received the request from host stack, BLE_GAP_EVENT_SET_DATA_LEN_COMP event is notified to the application layer. When the transmission packet size or the transmission time has been changed, BLE_GAP_EVENT_DATA_LEN_CHG event is notified to the application layer.

Parameters
[in]conn_hdlConnection handle identifying the link whose the transmission packet size or the transmission time to be changed.
[in]tx_octetsMaximum transmission packet size. Valid range is 0x001B - 0x00FB.
[in]tx_timeMaximum transmission time(us). Valid range is 0x0148 - 0x4290.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_Disconnect()

ble_status_t R_BLE_GAP_Disconnect ( uint16_t  conn_hdl,
uint8_t  reason 
)

Disconnect the link.

This function disconnects a link. When the link has disconnected, BLE_GAP_EVENT_DISCONN_IND event is notified to the application layer.

Parameters
[in]conn_hdlConnection handle identifying the link to be disconnected.
[in]reasonThe reason for disconnection. Usually, set 0x13 which indicates that a user disconnects the link. If setting other than 0x13, refer the error code described in Core Specification Vol.2 Part D ,"2 Error Code Descriptions".
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)conn_hdl is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_SetPhy()

ble_status_t R_BLE_GAP_SetPhy ( uint16_t  conn_hdl,
st_ble_gap_set_phy_param_t p_phy_param 
)

Set the phy for connection.

This function sets the PHY preferences for the connection. The result of this API call is notified in BLE_GAP_EVENT_PHY_SET_COMP event. When the PHY has been updated, BLE_GAP_EVENT_PHY_UPD event is notified to the application layer.

After PHY update, the PHY accept configuration of local device is the same as the values in BLE_GAP_EVENT_PHY_UPD event.
For example, after calling R_BLE_GAP_SetPhy(), if tx_phy, rx_phy by BLE_GAP_EVENT_PHY_UPD event are updated to 2M PHY, the PHY accept configuration is 2M PHY only.
Therefore after receiving BLE_GAP_EVENT_PHY_UPD event, if local device wants to accept the other PHY configuration, it needs to call R_BLE_GAP_SetPhy() with the desired PHY accept configuration.

Because the maximum transmission packet size or the maximum transmission time might be updated by PHY update, if the same packet size or transmission time as the previous one is desired, change the maximum transmission packet size or the maximum transmission time by R_BLE_GAP_SetDataLen().

Parameters
[in]conn_hdlConnection handle identifying the link whose PHY to be updated.
[in]p_phy_paramPHY preferences.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_phy_param is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)conn_hdl or option field in p_phy_param is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetDefPhy()

ble_status_t R_BLE_GAP_SetDefPhy ( st_ble_gap_set_def_phy_param_t p_def_phy_param)

Set the default phy which allows remote device to change.

This function sets the PHY preferences which a remote device may change. The result of this API call is notified in BLE_GAP_EVENT_DEF_PHY_SET_COMP event.

Parameters
[in]p_def_phy_paramThe PHY preference which a remote device may change.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_def_phy_param is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)tx_phys or tx_phys field in p_def_phy_param is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetPrivMode()

ble_status_t R_BLE_GAP_SetPrivMode ( st_ble_dev_addr_t p_addr,
uint8_t *  p_privacy_mode,
uint8_t  device_num 
)

Set the privacy mode.

This function sets privacy mode for the remote device registered in Resolving List. By default, Network Privacy Mode is set.
The result of this API call is notified in BLE_GAP_EVENT_PRIV_MODE_SET_COMP event.

Parameters
[in]p_addrAn array of identity address of the remote device to set privacy mode. The number of elements is specified by device_num.

[in]p_privacy_modeAn array of privacy mode to set to remote device. The number of elements is specified by device_num.
The following value is set as the privacy mode.
macro description
BLE_GAP_NET_PRIV_MODE (0x00) Network Privacy Mode.
BLE_GAP_DEV_PRIV_MODE (0x01) Device Privacy Mode.
[in]device_numThe number of devices to set privacy mode. Valid range is 1-BLE_GAP_RSLV_LIST_MAX_ENTRY.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_addr or p_privacy_mode is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The following parameter is out of range.
  • The address type in p_addr.
  • The privacy mode specified by p_privacy_mode.
  • device_num
BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
  • While configuring privacy mode, this function was called.
  • The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ConfWhiteList()

ble_status_t R_BLE_GAP_ConfWhiteList ( uint8_t  op_code,
st_ble_dev_addr_t p_addr,
uint8_t  device_num 
)

Set White List.

This function supports the following operations regarding White List.

  • Add the device to White List.
  • Delete the device from White List.
  • Clear White List.

    The total number of White List entries is defined as BLE_GAP_WHITE_LIST_MAX_ENTRY. The result of this API call is notified in BLE_GAP_EVENT_WHITE_LIST_CONF_COMP event.

    Parameters
    [in]op_codeThe operation for White List.
    macro description
    BLE_GAP_LIST_ADD_DEV(0x01) Add the device to the list.
    BLE_GAP_LIST_REM_DEV(0x02) Delete the device from the list.
    BLE_GAP_LIST_CLR(0x03) Clear the list.
    [in]p_addrAn array of device address to add / delete to the list. The number of elements is specified by device_num. If op_code is BLE_GAP_LIST_CLR, p_addr is ignored.
    [in]device_numThe number of devices add / delete to the list. Valid range is 1-BLE_GAP_WHITE_LIST_MAX_ENTRY. If op_code is BLE_GAP_LIST_CLR, device_num is ignored.
    Return values
    BLE_SUCCESS(0x0000)Success
    BLE_ERR_INVALID_PTR(0x0001)When op_code is BLE_GAP_LIST_ADD_DEV or BLE_GAP_LIST_REM_DEV, p_addr is specified as NULL.
    BLE_ERR_INVALID_ARG(0x0003)op_code or address type field in p_addr is out of range.
    BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
    • While operating White List, this function was called.
    • The task for host stack is not running.
    BLE_ERR_MEM_ALLOC_FAILED(0x000C)There are no memories for operating the White List.

◆ R_BLE_GAP_GetVerInfo()

ble_status_t R_BLE_GAP_GetVerInfo ( void  )

Get the version number of the Controller and the host stack.

This function retrieves the version information of local device. The result of this API call is notified in BLE_GAP_EVENT_LOC_VER_INFO event.

Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ReadPhy()

ble_status_t R_BLE_GAP_ReadPhy ( uint16_t  conn_hdl)

Get the phy settings.

This function gets the PHY settings for the connection. The result of this API call is notified in BLE_GAP_EVENT_PHY_RD_COMP event.

Parameters
[in]conn_hdlConnection handle identifying the link whose PHY settings to be retrieved.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)conn_hdl is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ConfRslvList()

ble_status_t R_BLE_GAP_ConfRslvList ( uint8_t  op_code,
st_ble_dev_addr_t p_addr,
st_ble_gap_rslv_list_key_set_t p_peer_irk,
uint8_t  device_num 
)

Set Resolving List.

This function supports the following operations regarding Resolving List.

  • Add the device to Resolving List.
  • Delete the device from Resolving List.
  • Clear Resolving List.

    In order to generate a resolvable private address, a local IRK needs to be registered by R_BLE_GAP_SetLocIdInfo(). If communicating with the identity address, register all-zero IRK as local IRK. In order to resolve resolvable private address of the remote device, the IRK distributed from the remote device needs to be added to Resolving List. The total number of Resolving List entries is defined as BLE_GAP_RESOLV_LIST_MAX_ENTRY. The result of this API call is notified in BLE_GAP_EVENT_RSLV_LIST_CONF_COMP event.

    Parameters
    [in]op_codeThe operation for Resolving List.
    macro description
    BLE_GAP_LIST_ADD_DEV(0x01) Add the device to the list.
    BLE_GAP_LIST_REM_DEV(0x02) Delete the device from the list.
    BLE_GAP_LIST_CLR(0x03) Clear the list.
    [in]p_addrAn array of Identity Addresses to add / delete to the list. The number of elements is specified by device_num. If op_code is BLE_GAP_LIST_CLR, p_addr is ignored.
    [in]p_peer_irkThe remote IRK and the type of local IRK added to Resolving List. If op_code is other than BLE_GAP_LIST_ADD_DEV, p_peer_irk is ignored. The number of elements is specified by device_num.
    [in]device_numThe number of devices add / delete to the list. Valid range is 1-BLE_GAP_RSLV_LIST_MAX_ENTRY. If op_code is BLE_GAP_LIST_CLR, device_num is ignored.
    Return values
    BLE_SUCCESS(0x0000)Success
    BLE_ERR_INVALID_PTR(0x0001)The reason for this error is as follows:
    • When added to or deleted from the list, p_addr is specified as NULL.
    • When added to the list, p_peer_irk is specified as NULL.
    BLE_ERR_INVALID_ARG(0x0003)The reason for this error is as follows:
    • op_code is out of range.
    • When op_code is BLE_GAP_LIST_ADD_DEV or BLE_GAP_LIST_REM_DEV, device_num is out of range.
    • When op_code is BLE_GAP_LIST_ADD_DEV or BLE_GAP_LIST_REM_DEV, address type field in p_addr is out of range.
    BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
    • While operating Resolving List, this function was called.
    • The task for host stack is not running.
    BLE_ERR_MEM_ALLOC_FAILED(0x000C)There are no memories for operating the Resolving List.
    BLE_ERR_INVALID_HDL(0x000E)The specified Identity Address was not found in Resolving List.

◆ R_BLE_GAP_EnableRpa()

ble_status_t R_BLE_GAP_EnableRpa ( uint8_t  enable)

Enable/Disable address resolution and generation of a resolvable private address.

This function enables or disables RPA functionality. The RPA functionality includes the following.

  • Generation of local resolvable private address
  • Resolution of remote resolvable private address

In order to do advertising, scanning or creating a link with local resolvable private address, the RPA functionality needs to be enabled. After enabling the RPA functionality and the identity address of remote device and the IRKs of local/remote device is registered, local device can generate own resolvable private address in the time interval set by R_BLE_GAP_SetRpaTo(), and can resolve a resolvable private address of a remote device. It is recommended that the RPA functionality is called immediately after the initialization by R_BLE_GAP_Init(). The result of this API call is notified in BLE_GAP_EVENT_RPA_EN_COMP event.

Parameters
[in]enableEnable or disable address resolution function.
macro description
BLE_GAP_RPA_DISABLED(0x00) Disable RPA generation/resolution.
BLE_GAP_RPA_ENABLED(0x01) Enable RPA generation/resolution.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)enable is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetRpaTo()

ble_status_t R_BLE_GAP_SetRpaTo ( uint16_t  rpa_timeout)

Set the update time of resolvable private address.

This function sets the time interval to update the resolvable private address. The result of this API call is notified in BLE_GAP_EVENT_SET_RPA_TO_COMP event.

Parameters
[in]rpa_timeoutTime interval to update resolvable private address in seconds. Valid range is 0x003C - 0xA1B8. Default is 900s.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ReadRpa()

ble_status_t R_BLE_GAP_ReadRpa ( st_ble_dev_addr_t p_addr)

Get the resolvable private address of local device.

This function retrieves the local resolvable private address. Before getting the address, enable the resolvable private address function by R_BLE_GAP_EnableRpa(). The result of this API call is notified in BLE_GAP_EVENT_RD_RPA_COMP event.

Parameters
[in]p_addrIdentity address registered in Resolving List.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_addr is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)Address type in p_addr is out of range.
BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows.
  • When retrieving the local resolvable private address, this function was called.
  • The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ReadRssi()

ble_status_t R_BLE_GAP_ReadRssi ( uint16_t  conn_hdl)

Get RSSI.

This function retrieves RSSI. The result of this API call is notified in BLE_GAP_EVENT_RSSI_RD_COMP event.

Parameters
[in]conn_hdlConnection handle identifying the link whose RSSI to be retrieved.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)conn_hdl is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ReadChMap()

ble_status_t R_BLE_GAP_ReadChMap ( uint16_t  conn_hdl)

Get the Channel Map.

This function retrieves the channel map. The result of this API call is notified in BLE_GAP_EVENT_CH_MAP_RD_COMP event.

Parameters
[in]conn_hdlConnection handle identifying the link whose channel map to be retrieved.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)conn_hdl is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetRandAddr()

ble_status_t R_BLE_GAP_SetRandAddr ( uint8_t *  p_random_addr)

Set a random address.

This function sets static address or non-resolvable private address to Controller. Refer to Core Specification Vol 6, PartB, "1.3.2 Random Device Address" regarding the format of the random address. Resolvable private address cannot set by this API. The result of this API call is notified in BLE_GAP_EVENT_RAND_ADDR_SET_COMP event.

Parameters
[in]p_random_addrStatic address or non-resolvable private address.
The BD address setting format is little endian.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_random_addr is specified as NULL.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetAdvParam()

ble_status_t R_BLE_GAP_SetAdvParam ( st_ble_gap_adv_param_t p_adv_param)

Set advertising parameters.

This function sets advertising parameters. It's possible to do advertising where the advertising parameters are different every each advertising set. The number of advertising set in the Controller is defined as BLE_MAX_NO_OF_ADV_SETS_SUPPORTED. Each advertising set is identified with advertising handle (0x00-0x03). Create an advertising set with this function before start advertising, setting periodic advertising parameters, start periodic advertising, setting advertising data/scan response data/periodic advertising data. The result of this API call is notified in BLE_GAP_EVENT_ADV_PARAM_SET_COMP event.

Parameters
[in]p_adv_paramAdvertising parameters.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_adv_param is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The below p_adv_param field value is out of range.
  • adv_handle
  • adv_intv_min/adv_intv_max
  • adv_ch_map
  • o_addr_type
  • p_addr_type
  • adv_phy
  • sec_adv_phy
  • scan_req_ntf_flag
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetAdvSresData()

ble_status_t R_BLE_GAP_SetAdvSresData ( st_ble_gap_adv_data_t p_adv_srsp_data)

Set advertising data/scan response data/periodic advertising data.

This function sets advertising data/scan response data/periodic advertising data to the advertising set. It is necessary to create an advertising set by R_BLE_GAP_SetAdvParam(), before calling this function. Set advertising data/scan response data/periodic advertising data, after allocating the memory for the data. The following shall be applied regarding the adv_prop_type field and the data_type field in st_ble_gap_adv_param_t parameter specified in R_BLE_GAP_SetAdvParam().

The following shall be applied regarding the adv_prop_type field and the data_type field in st_ble_gap_adv_param_t parameter specified in R_BLE_GAP_SetAdvParam().

  • When adv_prop_type is Legacy Advertising PDU type,
    • it's possible to set advertising data/scan response data up to 31 bytes.
    • advertising data/scan response data can be updated by this function in advertising.
  • When adv_prop_type is Extended Advertising PDU type,
    • it's possible to set at most 1650 bytes of data as advertising data/scan response data per 1 advertising set.
    • the total buffer size in Controller for advertising data/scan response data is 4250 bytes. Therefore please note that more than 4250 bytes of advertising data/scan response data can not be set to all the advertising sets. Please refer to Figure 1.1 and Figure 1.2 about examples of setting advertising data/scan response data.
    • it's possible to update advertising data/scan response data in advertising, if the data_length field in st_ble_gap_adv_data_t parameter is up to 251 bytes.
      adv_data_alloc_fail_en.svg
      Figure 1.1
      adv_data_alloc_success_en.svg
      Figure 1.2
  • When periodic advertising data is set,
    • At most 1650 bytes of data can be set to 1 advertising set.
    • The total buffer size in Controller for periodic advertising data is 4306 bytes. Therefore please note that more than 4306 bytes of periodic advertising data can not be set to all the advertising sets.
    • it's possible to update periodic advertising data in advertising, if the data_length field in st_ble_gap_adv_data_t parameter is up to 252 bytes.

The result of this API call is notified in BLE_GAP_EVENT_ADV_DATA_UPD_COMP event.

Parameters
[in]p_adv_srsp_dataAdvertising data/scan response data/periodic advertising data.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)The reason for this error is as follows:
  • p_adv_srsp_data is specified as NULL.
  • data_length field in p_adv_srsp_data parameter is not 0 and p_data field is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The following field in p_adv_srsp_data parameter is out of range.
  • adv_hdl
  • data_type
  • data_length
  • zero_length_flag
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_StartAdv()

ble_status_t R_BLE_GAP_StartAdv ( uint8_t  adv_hdl,
uint16_t  duration,
uint8_t  max_extd_adv_evts 
)

Start advertising.

This function starts advertising. Create the advertising set specified with adv_hdl by R_BLE_GAP_SetAdvParam(), before calling this function. The result of this API call is notified in BLE_GAP_EVENT_ADV_ON event.

Parameters
[in]adv_hdlThe advertising handle pointing to the advertising set which starts advertising. The valid range is 0x00 - 0x03.
[in]durationThe duration for which the advertising set identified by adv_hdl is enabled. Time = duration * 10ms. When the duration expires, BLE_GAP_EVENT_ADV_OFF event notifies that advertising is stopped. The valid range is 0x0000 - 0xFFFF. The duration parameter is ignored when the value is set to 0x0000.
[in]max_extd_adv_evtsThe maximum number of advertising events that be sent during advertising. When all the advertising events(max_extd_adv_evts) have been sent, BLE_GAP_EVENT_ADV_OFF event notifies that advertising is stopped. The max_extd_adv_evts parameter is ignored when the value is set to 0x00.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)adv_hdl is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_StopAdv()

ble_status_t R_BLE_GAP_StopAdv ( uint8_t  adv_hdl)

Stop advertising.

This function stops advertising. The result of this API call is notified in BLE_GAP_EVENT_ADV_OFF event.

Parameters
[in]adv_hdlThe advertising handle pointing to the advertising set which stops advertising. The valid range is 0x00 - 0x03.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)adv_hdl is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetPerdAdvParam()

ble_status_t R_BLE_GAP_SetPerdAdvParam ( st_ble_gap_perd_adv_param_t p_perd_adv_param)

Set periodic advertising parameters.

This function sets periodic advertising parameters. Create the advertising set which supports Non-Connectable, Non-Scannable advertising by R_BLE_GAP_SetAdvParam() before setting periodic advertising parameters. The result of this API call is notified in BLE_GAP_EVENT_PERD_ADV_PARAM_SET_COMP event.

Parameters
[in]p_perd_adv_paramPeriodic advertising parameters.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_perd_adv_param is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The following field in the p_perd_adv_param parameter is out of range.
  • adv_hdl
  • perd_intv_min or perd_intv_max
  • prop_type is neither 0x0000 nor 0x0040(BLE_GAP_PERD_PROP_TX_POWER)
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_StartPerdAdv()

ble_status_t R_BLE_GAP_StartPerdAdv ( uint8_t  adv_hdl)

Start periodic advertising.

This function starts periodic advertising. Set periodic advertising parameters to the advertising set, before starting periodic advertising. The result of this API call is notified in BLE_GAP_EVENT_PERD_ADV_ON event.

Parameters
[in]adv_hdlAdvertising handle identifying the advertising set which starts periodic advertising.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)adv_hdl is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_StopPerdAdv()

ble_status_t R_BLE_GAP_StopPerdAdv ( uint8_t  adv_hdl)

Stop periodic advertising.

This function stops periodic advertising. If the return value of this API is BLE_SUCCESS, the result is notified in BLE_GAP_EVENT_PERD_ADV_OFF event.

Parameters
[in]adv_hdlSpecify the handle of Advertising Set to stop Periodic Advertising.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)adv_hdl is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_GetRemainAdvBufSize()

ble_status_t R_BLE_GAP_GetRemainAdvBufSize ( uint16_t *  p_remain_adv_data_size,
uint16_t *  p_remain_perd_adv_data_size 
)

Get buffer size for advertising data/scan response data/periodic advertising data in the Controller.

This function gets the total size of advertising data/scan response data/periodic advertising data which can be currently set to Controller(all of the advertising sets). The application layer gets the data sizes via the parameters. By this API function call, no events occur.

Parameters
[out]p_remain_adv_data_sizeThe free buffer size of Controller to which advertising data/scan response data can be currently set.
[out]p_remain_perd_adv_data_sizeThe free buffer size of Controller to which periodic advertising data can be currently set.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_remain_adv_data_size or p_remain_perd_adv_data_size is specified as NULL.

◆ R_BLE_GAP_RemoveAdvSet()

ble_status_t R_BLE_GAP_RemoveAdvSet ( uint8_t  op_code,
uint8_t  adv_hdl 
)

Delete advertising set.

This function deletes an advertising set or deletes all the advertising sets. The result of this API call is notified in BLE_GAP_EVENT_ADV_SET_REMOVE_COMP event.

Parameters
[in]op_codeThe operation for delete or clear.
macro description
BLE_GAP_RMV_ADV_SET_REM_OP(0x01) Delete an advertising set.
BLE_GAP_RMV_ADV_SET_CLR_OP(0x02) Delete all the advertising sets.
[in]adv_hdlAdvertising handle identifying the advertising set deleted. If op_code is BLE_GAP_RMV_ADV_SET_CLR_OP, adv_hdl is ignored.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)The reason for this error is as follows:
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_CreateConn()

ble_status_t R_BLE_GAP_CreateConn ( st_ble_gap_create_conn_param_t p_param)

Request for a link establishment.

This function sends a connection request to a remote device to create a link. When Controller has received a request for establishment of a link from host stack, BLE_GAP_EVENT_CREATE_CONN_COMP event is notified to the application layer. When the link is established, BLE_GAP_EVENT_CONN_IND event is notified to the application layer.

Parameters
[in]p_paramConnection parameters.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)The reason for this error is as follows:
  • p_param is specified as NULL.
  • p_conn_param_1M field and p_conn_param_2M and p_conn_param_coded field in p_param are specified as NULL.
  • When creating a link with 1M PHY, p_conn_param in p_conn_param_1M field in p_param is specified as NULL.
  • When creating a link with 2M PHY, p_conn_param in p_conn_param_2M field in p_param is specified as NULL.
  • When creating a link with coded MPHY, p_conn_param in p_conn_param_coded field in p_param is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The reason for this error is as follows:
  • init_filter_policy in p_param is out of range.
  • remote_bd_addr_type field or own_addr_type address field in p_param is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_CancelCreateConn()

ble_status_t R_BLE_GAP_CancelCreateConn ( void  )

Cancel the request for a link establishment.

This function cancels a request for establishing a link. When Controller has received the cancel request from host stack, BLE_GAP_EVENT_CONN_CANCEL_COMP event is notified to the application layer. When the cancel procedure has completed, BLE_GAP_EVENT_CONN_IND event is notified to the application layer.

Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetChMap()

ble_status_t R_BLE_GAP_SetChMap ( uint8_t *  p_channel_map)

Set the Channel Map.

This function sets the channel map. The result of this API call is notified in BLE_GAP_EVENT_CH_MAP_SET_COMP event.

Parameters
[in]p_channel_mapChannel map.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_channel_map is specified as NULL.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_StartScan()

ble_status_t R_BLE_GAP_StartScan ( st_ble_gap_scan_param_t p_scan_param,
st_ble_gap_scan_on_t p_scan_enable 
)

Set scan parameter and start scan.

This function starts scanning. When scanning for the first time, set the p_scan_param. Setting scan parameters can be omitted by specifying p_scan_param as NULL after next time. The result of this API call is notified in BLE_GAP_EVENT_SCAN_ON event. Advertising report is notified in BLE_GAP_EVENT_ADV_REPT_IND event. Figure 1.3 shows the relationship between scan period, scan duration, scan interval and scan window.

scan_period_en.svg
Figure 1.3

When scan duration is non-zero, scan period is zero and scan duration expires, BLE_GAP_EVENT_SCAN_TO event is notified to the application layer.

Parameters
[in]p_scan_paramScan parameter. When p_scan_param is specified as NULL, host stack doesn't set scan parameters and start scanning with the previous parameters.
[in]p_scan_enableScan period, scan duration, duplicate filter and procedure type.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)The reason for this error is as follows:
  • p_scan_enable is specified as NULL.
  • p_phy_param_1M field and p_phy_param_coded field in p_scan_param are specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The reason for this error is as follows:
  • proc_type field in p_scan_enable is out of range.
  • filter_dups in p_scan_enable is out of range.
  • o_addr_type in p_scan_param is out of range.
  • filter_policy in p_scan_param is out of range.
  • scan_type of p_scan_param's p_phy_param_1M or p_phy_param_coded is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_StopScan()

ble_status_t R_BLE_GAP_StopScan ( void  )

Stop scan.

This function stops scanning. The result of this API call is notified in BLE_GAP_EVENT_SCAN_OFF event.

Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_CreateSync()

ble_status_t R_BLE_GAP_CreateSync ( st_ble_dev_addr_t p_addr,
uint8_t  adv_sid,
uint16_t  skip,
uint16_t  sync_to 
)

Request for a periodic sync establishment.

This function sends a request for establishment of a periodic sync to a advertiser. In order to create a periodic sync, scan needs to be starting by R_BLE_GAP_StartScan(). When Controller has received the request from host stack, BLE_GAP_EVENT_CREATE_SYNC_COMP event is notified to the application layer. When the periodic sync is established, BLE_GAP_EVENT_SYNC_EST event is notified to the application layer.

Parameters
[in]p_addrThe address of periodic advertiser.When p_addr is specified as NULL, local device creates a periodic sync with the advertiser registered in Periodic Advertiser List.
[in]adv_sidAdvertising SID. When p_addr is specified as NULL, adv_sid is ignored. Valid range is 0x00 - 0x0F.
[in]skipThe number of consecutive periodic advertising packets that local device may skip after receiving a periodic advertising packet. Valid range is 0x0000 - 0x01F3.
[in]sync_toThe maximum permitted time between successful receives.When sync_to expires, the periodic sync is lost. Time(ms) = sync_to * 10. Valid range is 0x000A - 0x4000.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_addr is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)The following parameter is out of range.
  • address type in p_addr
  • adv_sid
  • skip
  • sync_to
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_CancelCreateSync()

ble_status_t R_BLE_GAP_CancelCreateSync ( void  )

Cancel the request for a periodic sync establishment.

This function cancels a request for establishing a periodic sync. The result of this API call is notified in BLE_GAP_EVENT_SYNC_CREATE_CANCEL_COMP event.

Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_TerminateSync()

ble_status_t R_BLE_GAP_TerminateSync ( uint16_t  sync_hdl)

Terminate the periodic sync.

This function terminates a periodic sync. The result of this API call is notified in BLE_GAP_EVENT_SYNC_TERM event.

Parameters
[in]sync_hdlSync handle identifying the periodic sync to be terminated.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)sync_hdl is out of range.
BLE_ERR_UNSUPPORTED(0x0007)Not supported.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_ConfPerdAdvList()

ble_status_t R_BLE_GAP_ConfPerdAdvList ( uint8_t  op_code,
st_ble_dev_addr_t p_addr,
uint8_t *  p_adv_sid_set,
uint8_t  device_num 
)

Set Periodic Advertiser List.

This function supports the following operations regarding Periodic Advertiser List.

  • Add the device to Periodic Advertiser List.
  • Delete the device from Periodic Advertiser List.
  • Clear Periodic Advertiser List.

    The total number of Periodic Advertiser List entries is defined as BLE_GAP_PERD_LIST_MAX_ENTRY. The result of this API call is notified in BLE_GAP_EVENT_PERD_LIST_CONF_COMP event.

    Parameters
    [in]op_codeThe operation for Periodic Advertiser List.
    macro description
    BLE_GAP_LIST_ADD_DEV(0x01) Add the device to the list.
    BLE_GAP_LIST_REM_DEV(0x02) Delete the device from the list.
    BLE_GAP_LIST_CLR(0x03) Clear the list.
    [in]p_addrAn array of device address to add / delete to the list. The number of elements is specified by device_num. If op_code is BLE_GAP_LIST_CLR, p_addr is ignored.
    [in]p_adv_sid_setAn array of SID of the advertiser to add / delete to the list. The number of elements is specified by device_num. If op_code is BLE_GAP_LIST_CLR, p_adv_sid_set is ignored.
    [in]device_numThe number of devices add / delete to the list. Valid range is 1-BLE_GAP_PERD_LIST_MAX_ENTRY. If op_code is BLE_GAP_LIST_CLR, device_num is ignored.
    Return values
    BLE_SUCCESS(0x0000)Success
    BLE_ERR_INVALID_PTR(0x0001)When op_code is BLE_GAP_LIST_ADD_DEV or BLE_GAP_LIST_REM_DEV, p_addr or p_adv_sid_set is specified as NULL.
    BLE_ERR_INVALID_ARG(0x0003)op_code or address type field in p_addr or p_adv_sid_set or device_num is out of range.
    BLE_ERR_UNSUPPORTED(0x0007)Not supported.
    BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
    • While operating Periodic Advertiser List, this function was called.
    • The task for host stack is not running.
    BLE_ERR_MEM_ALLOC_FAILED(0x000C)There are no memories for operating periodic advertiser.

◆ R_BLE_GAP_AuthorizeDev()

ble_status_t R_BLE_GAP_AuthorizeDev ( uint16_t  conn_hdl,
uint8_t  author_flag 
)

Authorize a remote device.

User authorizes a remote device by this function. This function is used when a remote device accesses a GATT Characteristic in local device which requests user authorization. The result of this API call is returned by a return value.

Parameters
[in]conn_hdlConnection handle identifying the remote device to be authorized or not by user.
[in]author_flagAuthorize or not the remote device.
macro description
BLE_GAP_NOT_AUTHORIZED(0x00) Not authorize the remote device.
BLE_GAP_AUTHORIZED(0x01) Authorize the remote device.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)author_flag is out of range.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_GetRemDevInfo()

ble_status_t R_BLE_GAP_GetRemDevInfo ( uint16_t  conn_hdl)

Get the information about remote device.

This function retrieves information about the remote device. The information includes BD_ADDR, the version number and LE features. The result of this API call is notified in BLE_GAP_EVENT_GET_REM_DEV_INFO event.

Parameters
[in]conn_hdlConnection handle identifying the remote device whose information to be retrieved.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetPairingParams()

ble_status_t R_BLE_GAP_SetPairingParams ( st_ble_gap_pairing_param_t p_pair_param)

Set the parameters using pairing.

This function sets the parameters used in pairing. The parameters set by this API are sent to the remote device when pairing occurred. The result of this API call is returned by a return value.

Parameters
[in]p_pair_paramPairing parameters.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)The following field in p_pair_param is out of range.
  • iocap
  • max_key_size
  • mitm
  • bonding
  • key_notf
  • sec_conn_only

◆ R_BLE_GAP_SetLocIdInfo()

ble_status_t R_BLE_GAP_SetLocIdInfo ( st_ble_dev_addr_t p_lc_id_addr,
uint8_t *  p_lc_irk 
)

Set the IRK and the identity address distributed to a remote device.

This function registers local IRK and identity address of local device in host stack. The IRK and the identity address are distributed to a remote device in pairing. The result of this API call is returned by a return value.

Parameters
[in]p_lc_id_addrIdentity address to be registered in host stack.
[in]p_lc_irkIRK to be registered in host stack.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_lc_id_addr or p_lc_irk is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)Address type field in p_lc_id_addr is out of range.

◆ R_BLE_GAP_SetLocCsrk()

ble_status_t R_BLE_GAP_SetLocCsrk ( uint8_t *  p_local_csrk)

Set the CSRK distributed to a remote device.

This function registers local CSRK in host stack. The CSRK is distributed to a remote device in pairing. The result of this API call is returned by a return value.

Parameters
[in]p_local_csrkCSRK to be registered in host stack.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_local_csrk is specified as NULL.

◆ R_BLE_GAP_StartPairing()

ble_status_t R_BLE_GAP_StartPairing ( uint16_t  conn_hdl)

Start pairing.

This function starts pairing with a remote device. The result of this API call is returned by a return value. The result of pairing is notified in BLE_GAP_EVENT_PAIRING_COMP event.

Parameters
[in]conn_hdlConnection handle identifying the remote device which local device starts pairing with.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)While generating OOB data, this function was called.
BLE_ERR_CONTEXT_FULL(0x000B)While pairing, this function was called.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_ReplyPairing()

ble_status_t R_BLE_GAP_ReplyPairing ( uint16_t  conn_hdl,
uint8_t  response 
)

Reply the pairing request from a remote device.

This function replies to the pairing request from the remote device. The pairing request from the remote device is notified in BLE_GAP_EVENT_PAIRING_REQ event. The result of this API call is returned by a return value. The result of pairing is notified in BLE_GAP_EVENT_PAIRING_COMP event.

Parameters
[in]conn_hdlConnection handle identifying the remote device which local device starts pairing with.
[in]responseAccept or reject the pairing request from the remote device.
macro description
BLE_GAP_PAIRING_ACCEPT(0x00) Accept the pairing request.
BLE_GAP_PAIRING_REJECT(0x01) Reject the pairing request.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)response is out of range.
BLE_ERR_INVALID_STATE(0x0008)While generating OOB data, this function was called.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.
BLE_ERR_NOT_YET_READY(0x0012)When this function was called, host stack has not yet received BLE_GAP_EVENT_PAIRING_REQ event.

◆ R_BLE_GAP_StartEnc()

ble_status_t R_BLE_GAP_StartEnc ( uint16_t  conn_hdl)

Encryption the link.

This function starts encryption of the link. In case of master device, the local device requests for the encryption to a remote device. In case of slave device, the local device sends a Security Request to a remote device. After receiving the Security Request, the remote device requests for the encryption to the local device. The result of the encryption is returned in BLE_GAP_EVENT_ENC_CHG event.

Parameters
[in]conn_hdlConnection handle identifying the link which is encrypted.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
  • Pairing has not been completed.
  • The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_ReplyPasskeyEntry()

ble_status_t R_BLE_GAP_ReplyPasskeyEntry ( uint16_t  conn_hdl,
uint32_t  passkey,
uint8_t  response 
)

Reply the passkey entry request.

When BLE_GAP_EVENT_PASSKEY_ENTRY_REQ event is notified, the response to passkey entry is sent by this function. The result of this API call is returned by a return value.

Parameters
[in]conn_hdlConnection handle identifying the remote device which the reply to passkey entry is sent.
[in]passkeyPasskey. The valid range is 000000 - 999999 in decimal.
[in]responseActive or negative reply to passkey entry.
macro description
BLE_GAP_PAIRING_ACCEPT(0x00) Accept the passkey entry pairing.
BLE_GAP_PAIRING_REJECT(0x01) Reject the passkey entry pairing.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)passkey or response is out of range.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.
BLE_ERR_NOT_YET_READY(0x0012)When this function was called, pairing has not yet started.

◆ R_BLE_GAP_ReplyNumComp()

ble_status_t R_BLE_GAP_ReplyNumComp ( uint16_t  conn_hdl,
uint8_t  response 
)

Reply the numeric comparison request.

When BLE_GAP_EVENT_NUM_COMP_REQ event is notified, the response to Numeric Comparison is sent by this function. The result of this API call is returned by a return value.

Parameters
[in]conn_hdlConnection handle identifying the remote device which the reply to Numeric Comparison is sent.
[in]responseActive or negative reply in Numeric Comparison.
macro description
BLE_GAP_PAIRING_ACCEPT(0x00)The number displayed in the local is the same as the one of the remote.
BLE_GAP_PAIRING_REJECT(0x01)The number displayed in the local is differs from the one of the remote.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)response is out of range.
BLE_ERR_INVALID_STATE(0x0008)When this function was called, host stack has not yet received BLE_GAP_EVENT_NUM_COMP_REQ event.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.
BLE_ERR_NOT_YET_READY(0x0012)When this function was called, pairing has not yet started.

◆ R_BLE_GAP_NotifyKeyPress()

ble_status_t R_BLE_GAP_NotifyKeyPress ( uint16_t  conn_hdl,
uint8_t  key_press 
)

Notify the input key type which a remote device inputs in the passkey entry.

This function notifies the input key type to the remote device in passkey entry. The result is returned from this API.

Parameters
[in]conn_hdlConnection handle identifying the remote device to which the key notification is sent.
[in]key_pressInput key type.
macro description
BLE_GAP_LESC_PASSKEY_ENTRY_STARTED(0x00) Notify that passkey entry started.
BLE_GAP_LESC_PASSKEY_DIGIT_ENTERED(0x01) Notify that passkey digit entered.
BLE_GAP_LESC_PASSKEY_DIGIT_ERASED(0x02) Notify that passkey digit erased.
BLE_GAP_LESC_PASSKEY_CLEARED(0x03) Notify that passkey cleared.
BLE_GAP_LESC_PASSKEY_ENTRY_COMPLETED(0x04) Notify that passkey entry completed.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_ARG(0x0003)key_press parameter is out of range.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.
BLE_ERR_NOT_YET_READY(0x0012)When this function was called, pairing has not yet started.

◆ R_BLE_GAP_GetDevSecInfo()

ble_status_t R_BLE_GAP_GetDevSecInfo ( uint16_t  conn_hdl,
st_ble_gap_auth_info_t p_sec_info 
)

Get the security information about the remote device.

This function gets the parameters which has been negotiated with the remote device in pairing. The parameters can be retrieved after pairing. The result is returned by p_sec_info.

Parameters
[in]conn_hdlConnection handle identifying the remote device whose bonding information is retrieved.
[in]p_sec_infoReturn the security information which has been negotiated in pairing.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_sec_info is specified as NULL.
BLE_ERR_INVALID_STATE(0x0008)The remote device bonding information has not been set to host stack.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_ReplyExKeyInfoReq()

ble_status_t R_BLE_GAP_ReplyExKeyInfoReq ( uint16_t  conn_hdl)

Distribute the keys of local device.

When key exchange request is notified by BLE_GAP_EVENT_EX_KEY_REQ event at pairing, keys of the local device are distributed. The result is returned from this API.

Parameters
[in]conn_hdlConnection handle identifying the remote device to which the key is distributed.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.
BLE_ERR_NOT_YET_READY(0x0012)When this function was called, pairing has not yet started.

◆ R_BLE_GAP_SetRemOobData()

ble_status_t R_BLE_GAP_SetRemOobData ( st_ble_dev_addr_t p_addr,
uint8_t  oob_data_flag,
st_ble_gap_oob_data_t p_oob 
)

Set the oob data from a remote device.

This function registers the OOB data received from a remote device. When oob_data_flag indicates that the OOB data has been received, the setting regarding OOB data is reflected in pairing. In order to do OOB pairing, set the OOB data received from the remote device before pairing. The result is returned from this API.

Parameters
[in]p_addrThe remote device address.
[in]oob_data_flagThis parameter indicates whether the local device has received the OOB data from the remote device or not.
macro description
BLE_GAP_OOB_DATA_NOT_PRESENT(0x00)Reply that No OOB data has been received when pairing.
BLE_GAP_OOB_DATA_PRESENT(0x01) Reply that the OOB data has been received when pairing.
[in]p_oobThe OOB data received from the remote device.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)The reason for this error is as follows.
  • p_addr is specified as NULL.
  • oob_data_flag is BLE_GAP_OOB_DATA_PRESENT and p_oob is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)oob_data_flag is out of range.
BLE_ERR_CONTEXT_FULL(0x000B)There is no room to register the OOB data received from a remote device.

◆ R_BLE_GAP_CreateScOobData()

ble_status_t R_BLE_GAP_CreateScOobData ( void  )

Create data for oob in secure connection.

This function generates the OOB data distributed to a remote device in Secure Connections. The result of this API call is notified in BLE_GAP_EVENT_SC_OOB_CREATE_COMP event.

Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_STATE(0x0008)The reason for this error is as follows:
  • This function was called in pairing.
  • The task for host stack is not running.
BLE_ERR_ALREADY_IN_PROGRESS(0x000A)This function was called in creating OOB data.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.

◆ R_BLE_GAP_SetBondInfo()

ble_status_t R_BLE_GAP_SetBondInfo ( st_ble_gap_bond_info_t p_bond_info,
uint8_t  device_num,
uint8_t *  p_set_num 
)

Set the bonding information stored in non-volatile memory to the host stack.

Set the bonding information of the remote device in the host stack. After power re-supply, when the remote device bonding information stored in non-volatile memory is set to host stack, this function is used. Host stack can be set the number specified by the device_num parameter of bonding information.

Parameters
[in]p_bond_infoAn array of bonding information. The number of elements is specified by device_num.
[in]device_numThe number of the devices of which host stack registers bonding information.
[in]p_set_numThe number of the devices whose bonding information was registered in host stack.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_bond_info or p_set_num is specified as NULL.
BLE_ERR_INVALID_ARG(0x0003)device_num is out of range.
BLE_ERR_CONTEXT_FULL(0x000B)Host stack already has the maximum number of bonding information.

◆ R_BLE_GAP_DeleteBondInfo()

void R_BLE_GAP_DeleteBondInfo ( int32_t  local,
int32_t  remote,
st_ble_dev_addr_t p_addr,
ble_gap_del_bond_cb_t  gap_del_bond_cb 
)

This function deletes the bonding information in Host Stack.
When a function for deleting the bonding information stored in non-volatile area is registered by the gap_del_bond_cb parameter, it is deleted as well as the bonding information in Host Stack.

Parameters
[in]localThe type of the local bonding information to be deleted.
macro description
BLE_GAP_SEC_DEL_LOC_NONE(0x00) Delete no local keys.
BLE_GAP_SEC_DEL_LOC_IRK(0x01) Delete local IRK and identity address.
BLE_GAP_SEC_DEL_LOC_CSRK(0x02) Delete local CSRK.
BLE_GAP_SEC_DEL_LOC_ALL(0x03) Delete all local keys.
[in]remoteThe type of the remote bonding information to be deleted.
macro description
BLE_GAP_SEC_DEL_REM_NONE(0x00) Delete no remote device keys.
BLE_GAP_SEC_DEL_REM_SA(0x01) Delete the keys specified by the p_addr parameter.
BLE_GAP_SEC_DEL_REM_NOT_CONN(0x02)Delete keys of not connected remote devices.
BLE_GAP_SEC_DEL_REM_ALL(0x03) Delete all remote device keys.


[in]p_addrp_addr is specified as the address of the remote device whose keys are deleted when the rem_info parameter is set to BLE_GAP_SEC_DEL_REM_SA(0x01).

[in]gap_del_bond_cbThis parameter is a callback function which deletes the bonding information stored in non-volatile area.
After deleting the bonding information stored in Host Stack, the callback function is called. If no bonding information is stored in non-volatile area, specify the parameter as NULL.
Return values
none

◆ R_BLE_GAP_ReplyLtkReq()

ble_status_t R_BLE_GAP_ReplyLtkReq ( uint16_t  conn_hdl,
uint16_t  ediv,
uint8_t *  p_peer_rand,
uint8_t  response 
)

Reply the LTK request from a remote device.

This function replies to the LTK request in BLE_GAP_EVENT_LTK_REQ event from a remote device. The result of the LTK reply is returned in BLE_GAP_EVENT_LTK_RSP_COMP event. When the link encryption has completed, BLE_GAP_EVENT_ENC_CHG event is notified.

Parameters
[in]conn_hdlConnection handle identifying the remote device which sent the LTK request.
[in]edivEdiv notified in BLE_GAP_EVENT_LTK_REQ event.
[in]p_peer_randRand notified in BLE_GAP_EVENT_LTK_REQ event.
[in]responseResponse to the LTK request. If "BLE_GAP_LTK_REQ_ACCEPT" is specified, when no LTK has been exchanged in pairing, reject the LTK request.
macro description
BLE_GAP_LTK_REQ_ACCEPT(0x00) Reply for the LTK request.
BLE_GAP_LTK_REQ_DENY(0x01) Reject the LTK request.
Return values
BLE_SUCCESS(0x0000)Success
BLE_ERR_INVALID_PTR(0x0001)p_peer_rand is specified as NULL in case of legacy pairing.
BLE_ERR_INVALID_ARG(0x0003)response is out of range.
BLE_ERR_INVALID_STATE(0x0008)The task for host stack is not running.
BLE_ERR_MEM_ALLOC_FAILED(0x000C)Insufficient memory is needed to generate this function.
BLE_ERR_INVALID_HDL(0x000E)The remote device specified by conn_hdl is not found.

◆ R_BLE_GAP_SetCteConnlessParam()

ble_status_t R_BLE_GAP_SetCteConnlessParam ( st_ble_gap_cte_connless_t p_cte_param)

Set the parameters for the transmission of Constant Tone Extensions in any periodic advertising.

Parameters
[in]p_cte_paramparameters of type, length, and antenna switching pattern.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_EnableCteConnless()

ble_status_t R_BLE_GAP_EnableCteConnless ( uint16_t  adv_hdl,
uint8_t  enable 
)

Enable or disable Constant Tone Extensions in periodic advertising identified by the adv_hdl.

Parameters
[in]adv_hdlhandle of the periodic advertising which carries the CTE info.
[in]enableEnable or disable address resolution function.
macro description
BLE_GAP_CTE_DISABLED(0x00) Disable connectionless CTE transmission
BLE_GAP_CTE_ENABLED(0x01) Enable connectionless CTE transmission
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StartCteConnlessRecv()

ble_status_t R_BLE_GAP_StartCteConnlessRecv ( st_ble_gap_cte_connless_recv_t p_cte_recv)

Enable sampling received Constant Tone Extension fields.

Application should receive BLE_GAP_EVENT_CTE_CONNLESS_REPT event.

Parameters
[in]p_cte_recvantenna switching pattern and switching and sampling slot durations to be used.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StopCteConnlessRecv()

ble_status_t R_BLE_GAP_StopCteConnlessRecv ( uint16_t  sync_hdl)

Disable sampling received Constant Tone Extension fields.

Parameters
[in]sync_hdlhandle of the periodic advertising sync which carries the CTE info.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_SetCteConnParam()

ble_status_t R_BLE_GAP_SetCteConnParam ( st_ble_gap_cte_conn_t p_cte_param)

Set the parameters for the transmission of Constant Tone Extensions in ACL link.

Parameters
[in]p_cte_paramparameters of type, length, and antenna switching pattern.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_EnableCteConnRsp()

ble_status_t R_BLE_GAP_EnableCteConnRsp ( uint16_t  conn_hdl,
uint8_t  enable 
)

Enable or disable Constant Tone Extensions Transmission in ACL link by conn_hdl.

Parameters
[in]conn_hdlhandle of the ACL link which carries the CTE info.
[in]enableEnable or disable address resolution function.
macro description
BLE_GAP_CTE_DISABLED(0x00) Disable connectionless CTE transmission
BLE_GAP_CTE_ENABLED(0x01) Enable connectionless CTE transmission
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_SetCteConnRecvParam()

ble_status_t R_BLE_GAP_SetCteConnRecvParam ( st_ble_gap_cte_conn_rx_param_t p_cte_param)

Set the parameters for the receiving of Constant Tone Extensions in ACL link. and start sampling.

Parameters
[in]p_cte_paramparameters of type, length, and antenna switching pattern.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StopCteConnRecvSampling()

ble_status_t R_BLE_GAP_StopCteConnRecvSampling ( uint16_t  conn_hdl)

Stop sampling of Constant Tone Extensions on the specified connection.

Parameters
[in]conn_hdlhandle of the ACL link which carries the CTE info.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StartCteConnReq()

ble_status_t R_BLE_GAP_StartCteConnReq ( st_ble_gap_cte_conn_req_t p_req)

Set the parameters and start sending request of Constant Tone Extensions in ACL link to peer.

If the request does not receive a CTE Response PDU with CTE info, BLE_GAP_EVENT_CTE_CONN_REQ_FAILED event is sent to application. Otherwise application should receive BLE_GAP_EVENT_CTE_CONN_REPT event.

Parameters
[in]p_reqparameters connection CTE request.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StopCteConnReq()

ble_status_t R_BLE_GAP_StopCteConnReq ( uint16_t  handle)

Stop sending request of Constant Tone Extensions in ACL link to peer.

Parameters
[in]handlehandle of the ACL link which carries the CTE info.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_SetDefaultSubrate()

ble_status_t R_BLE_GAP_SetDefaultSubrate ( st_ble_gap_subrate_param_t p_subrate_param)

Set the initial values for the acceptable parameters for subrating requests,.

Parameters
[in]p_subrate_paramdefault parameters of subrate.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_RequestSubrate()

ble_status_t R_BLE_GAP_RequestSubrate ( uint16_t  conn_hdl,
st_ble_gap_subrate_param_t p_subrate_param 
)

Request a change to the subrating factor other parameters applied to an existing connection using the Connection Subrate Update procedure.

Parameters
[in]conn_hdlhandle of the ACL link which carries the CTE info.
[in]p_subrate_paramrequest parameters of subrate.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StartPerdAdvSetInfoTransfer()

ble_status_t R_BLE_GAP_StartPerdAdvSetInfoTransfer ( uint16_t  adv_hdl,
uint16_t  conn_hdl,
uint16_t  service_data 
)

This function starts Periodic advertising adv set info transfer to the connection.

Send synchronization information about the periodic advertising in an advertising set to a connected device.

Parameters
[in]adv_hdlIdentifies the advertising set.
[in]conn_hdlConnection handle identifying the remote device.
[in]service_dataA value provided by the application for use by the application of the peer device.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_StartPerdAdvSyncTransfer()

ble_status_t R_BLE_GAP_StartPerdAdvSyncTransfer ( uint16_t  sync_hdl,
uint16_t  conn_hdl,
uint16_t  service_data 
)

This function starts Periodic advertising sync transfer.

send synchronization information about the periodic advertising train identified by the Sync_Handle parameter to a connected device.

Parameters
[in]sync_hdlSync handle identifying the Periodic Sync that has been established.
[in]conn_hdlConnection handle identifying the remote device.
[in]service_dataA value provided by the application for use by the application of the peer device.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_SetPerdAdvSyncTransferParam()

ble_status_t R_BLE_GAP_SetPerdAdvSyncTransferParam ( uint16_t  conn_hdl,
st_ble_gap_past_param_t *  p_past_param 
)

This function starts to accept Periodic advertising sync transfer from the connection.

This API call enables BLE_GAP_EVENT_PAST_RECV event.n

Parameters
[in]conn_hdlConnection handle identifying the remote device.
[in]p_past_paramPeriodic advertising sync transfer parameters.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_SetDefPerdAdvSyncTransferParam()

ble_status_t R_BLE_GAP_SetDefPerdAdvSyncTransferParam ( st_ble_gap_past_param_t *  p_past_param)

This function set the default parameter of Periodic advertising sync transfer for all subsequent connection. It does not affect any existing connection.

This API call enables BLE_GAP_EVENT_PAST_RECV event.

Parameters
[in]p_past_paramPeriodic advertising sync transfer parameters.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_ReadAntennaInfo()

ble_status_t R_BLE_GAP_ReadAntennaInfo ( void  )

This function read the switching rates, the sampling rates, the number of antennae, and the maximum length of a transmitted Constant Tone Extension.

Return values
BLE_SUCCESS(0x0000)Success
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.
BLE_ERR_UNSPECIFIED(0x0013)Unspecified error.

◆ R_BLE_GAP_ReceiverTest()

ble_status_t R_BLE_GAP_ReceiverTest ( st_ble_gap_recv_test_param_t p_rx_test_param)

Start a test where the DUT receives test reference packets at a fixed interval. The tester generates the test reference packets.

Parameters
[in]p_rx_test_paramreceiver test parameter
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_TransmitterTest()

ble_status_t R_BLE_GAP_TransmitterTest ( st_ble_gap_trans_test_param_t p_tx_test_param)

Start a test where the DUT generates test reference packets at a fixed interval. The Controller shall transmit at the power level indicated by the TX_Power_Level parameter.

Parameters
[in]p_tx_test_paramtransmitter test parameter
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_ModifySleepClockAccuracy()

ble_status_t R_BLE_GAP_ModifySleepClockAccuracy ( uint8_t  act)

request that the Controller changes its sleep clock accuracy for testing purposes. It should not be used under other circumstances.

Parameters
[in]actSwitch to a more/less accurate clock.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_ReadRemoteTransmitPowerLevel()

ble_status_t R_BLE_GAP_ReadRemoteTransmitPowerLevel ( uint16_t  conn_hdl,
uint8_t  phy 
)

Read the transmit power level used by the remote device.

BLE_GAP_EVENT_TX_POWER_REPT is received as a result when R_BLE_GAP_SetTransmitPowerReportingEnable is enabled.

Parameters
[in]conn_hdlConnection handle.
[in]phyThe transmitter PHY of packets.
Return values
BLE_SUCCESS(0x0000)Success

◆ R_BLE_GAP_SetPathLossReportingParam()

ble_status_t R_BLE_GAP_SetPathLossReportingParam ( st_ble_gap_set_path_loss_rpt_param_t p_loss_rpt_param)

Set the path loss threshold reporting parameters for the ACL connection identified.

Parameters
[in]p_loss_rpt_paramparameter for path loss report.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_SetPathLossReportingEnable()

ble_status_t R_BLE_GAP_SetPathLossReportingEnable ( uint16_t  conn_hdl,
uint8_t  enable 
)

Enable or disable path loss reporting for the ACL connection.

Parameters
[in]conn_hdlConnection handle.
[in]enableReporting enable/disable.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_SetTransmitPowerReportingEnable()

ble_status_t R_BLE_GAP_SetTransmitPowerReportingEnable ( uint16_t  conn_hdl,
uint8_t  local_enable,
uint8_t  remote_enable 
)

Enable or disable the transmit power level changing report.

Enable or disable the reporting to the local Host of transmit power level changes in the local and remote Controllers for the ACL connection identified by the Connection_Handle parameter.

Parameters
[in]conn_hdlConnection handle.
[in]local_enableLocal transmit power reports enable/disable.
[in]remote_enableRemote transmit power reports enable/disable.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_SetDataRelatedAddrChanges()

ble_status_t R_BLE_GAP_SetDataRelatedAddrChanges ( uint8_t  adv_hdl,
uint8_t  change_reason 
)

Specifies circumstances when the Controller shall refresh any Resolvable Private Address.

Specifies circumstances when the Controller shall refresh any Resolvable Private Addresss used by the advertising set identified by the Advertising_Handle parameter, whether or not the address timeout period has been reached. This function may be used while advertising is enabled.

Parameters
[in]adv_hdlUsed to identify an advertising set.
[in]change_reasonreason(s) for refreshing addresses.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_TestEnd()

ble_status_t R_BLE_GAP_TestEnd ( void  )

Stop any test which is in progress. The Num_Packets for a transmitter test shall be reported as 0x0000. The Num_Packets is an unsigned number and contains the number of received packets.

Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_ReqPeerSCA()

ble_status_t R_BLE_GAP_ReqPeerSCA ( uint16_t  conn_hdl)

Read the Sleep Clock Accuracy (SCA) of the peer device.

Parameters
[in]conn_hdlIndicate an ACL connection.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_EnhancedReadTxPowerLevel()

ble_status_t R_BLE_GAP_EnhancedReadTxPowerLevel ( uint16_t  conn_hdl,
uint8_t  phy 
)

Read the current and maximum transmit power levels of the local Controller on the ACL connection identified by the Connection_Handle parameter and the PHY indicated by the PHY parameter.

Parameters
[in]conn_hdlIndicate an ACL connection.
[in]phyIndicate PHY.
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.

◆ R_BLE_GAP_SetHostFeat()

ble_status_t R_BLE_GAP_SetHostFeat ( uint8_t  bit_number,
uint8_t  bit_value 
)

Set or clear a bit controlled by the Host in the Link Layer FeatureSet stored in the Controller.

Parameters
[in]bit_numberBit position in the FeatureSet
[in]bit_valueValue of the bit
Return values
BLE_SUCCESS(0x0000)Success, otherwise "HCI Spec Error" in enum RBLE_STATUS_enum.