RA Flexible Software Package Documentation
Release v5.7.0
|
|
Middleware for the Bluetooth peripheral on RA MCUs. This module implements the BLE ABS Interface.
This module provides BLE GAP functionality that complies with the Bluetooth Core Specification version 5.0 specified by the Bluetooth SIG. This module is configured via the QE for BLE. QE for BLE provides standard services defined by standardization organization and custom services defined by user. Bluetooth LE Profile API Document User's Manual describes the APIs for standard services.
The Bluetooth Low Energy (BLE) Abstraction module supports the following features:
There are three types of BLE Protocol Stacks, and the functions provided are different depending on the type of BLE Protocol Stack you select.
BLE library feature | Extended | Balance | Compact |
---|---|---|---|
GAP Role | Central Peripheral Observer Broadcaster | Central Peripheral Observer Broadcaster | Peripheral Broadcaster |
LE 2M PHY | Yes | Yes | No |
LE Coded PHY | Yes | Yes | No |
LE Advertising Extensions | Yes | No | No |
LE Channel Selection Algorithm #2 | Yes | Yes | No |
High Duty Cycle Non-Connectable Advertising | Yes | Yes | Yes |
LE Secure Connections | Yes | Yes | Yes |
Link Layer privacy | Yes | Yes | Yes |
Link Layer Extended Scanner Filter policies | Yes | Yes | No |
LE Data Packet Length Extension | Yes | Yes | Yes |
LE L2CAP Connection Oriented Channel Support | Yes | No | No |
Low Duty Cycle Directed Advertising | Yes | Yes | Yes |
LE Link Layer Topology | Yes | Yes | No |
LE Ping | Yes | Yes | Yes |
32-bit UUID Support in LE | Yes | Yes | Yes |
The BLE Abstraction module supports the following devices.
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | Specify whether to include code for API parameter checking. Valid settings include. |
Debug Public Address | Must be a valid device address | FF:FF:FF:50:90:74 | Public Address of firmware initial value. |
Debug Random Address | Must be a valid device address | FF:FF:FF:FF:FF:FF | Random Address of firmware initial value. |
Maximum number of connections | Value must be an integer between 1 and 7, and lower than the value defined in ble module. | 7 | Maximum number of connections. |
Maximum connection data length | Value must be an integer between 27 and 251, and lower than the value defined in ble module. | 251 | Maximum connection data length. |
Maximum advertising data length | Value must be an integer between 31 and 1650, and lower than the value defined in ble module. | 1650 | Maximum advertising data length. |
Maximum advertising set number | Value must be an integer between 1 and 4, and lower than the value defined in ble module. | 4 | Maximum advertising set number. |
Maximum periodic sync set number. | Value must be an integer between 1 and 2, and lower than the value defined in ble module. | 2 | Maximum periodic sync set number. |
Store Security Data |
| Disable | Store Security Data in DataFlash. |
Data Flash Block for Security Data | Value must be an integer between 0 and 7, and lower than the value defined in ble module. | 0 | Data Flash Block for Security Data Management. |
Remote Device Bonding Number | Value must be an integer between 1 and 7, and lower than the value defined in ble module. | 7 | Number of remote device bonding information. |
Connection Event Start Notify |
| Disable | Set Connection event start notify enable/disable. |
Connection Event Close Notify |
| Disable | Set Connection event close notify enable/disable. |
Advertising Event Start Notify |
| Disable | Set Advertising event start notify enable/disable. |
Advertising Event Close Notify |
| Disable | Set Advertising event close notify enable/disable. |
Scanning Event Start Notify |
| Disable | Set Scanning event start notify enable/disable. |
Scanning Event Close Notify |
| Disable | Set Scanning event close notify enable/disable. |
Initiating Event Start Notify |
| Disable | Set Initiating event start notify enable/disable. |
Initiating Event Close Notify |
| Disable | Set Initiating event close notify enable/disable. |
RF Deep Sleep Start Notify |
| Disable | Set RF_DEEP_SLEEP start notify enable/disable. |
RF Deep Sleep Wakeup Notify |
| Disable | Set RF_DEEP_SLEEP wakeup notify enable/disable. |
Bluetooth dedicated clock | Value must be an integer between 0 and 15, and lower than the value defined in ble module. | 6 | Load capacitance adjustment. |
DC-DC converter |
| Disable | Set DC-DC converter for RF part. |
Slow Clock Source |
| Use RF_LOCO | Set slow clock source for RF part. |
MCU CLKOUT Port |
| P109 | When BLE_ABS_CFG_RF_EXTERNAL_32K_ENABLE = 1, Set port of MCU CLKOUT. |
MCU CLKOUT Frequency Output |
| MCU CLKOUT frequency 32.768kHz | When BLE_ABS_CFG_RF_EXTERNAL_32K_ENABLE = 1, set frequency output from CLKOUT of MCU part. |
Sleep Clock Accuracy(SCA) | Value must be an integer between 0 and 500, and lower than the value defined in ble module. | 250 | When BLE_ABS_CFG_RF_EXTERNAL_32K_ENABLE = 1, set Sleep Clock Accuracy(SCA) for RF slow clock. |
Transmission Power Maximum Value |
| max +4dBm | Set transmission power maximum value. |
Transmission Power Default Value |
| High 0dBm(Transmission Power Maximum Value = +0dBm) / +4dBm(Transmission Power Maximum Value = +4dBm) | Set default transmit power. Default transmit power is dependent on the configuration of Maximum transmission power(BLE_ABS_CFG_RF_DEF_TX_POW). |
CLKOUT_RF Output |
| No output | Set CLKOUT_RF output setting. |
RF_DEEP_SLEEP Transition |
| Enable | Set RF_DEEP_SLEEP transition. |
MCU Main Clock Frequency | Value must be an integer between 1000 and 20000, and lower than the value defined in ble module. | 8000 | Set MCU Main Clock Frequency (kHz). Set clock source according to your board environment. HOCO: don't care. / Main Clock: 1000 to 20000 kHz / PLL Circuit: 4000 to 12500 kHz |
Code Flash(ROM) Device Data Block | Value must be an integer between -1 and 255, and lower than the value defined in ble module. | 255 | Device specific data block on Code Flash (ROM). |
Device Specific Data Flash Block | Value must be an integer between -1 and 7, and lower than the value defined in ble module. | -1 | Device specific data block on E2 Data Flash. |
MTU Size Configured | Value must be an integer between 23 and 247, and lower than the value defined in ble module. | 247 | MTU Size configured by GATT MTU exchange procedure. |
Timer Slot Maximum Number | Value must be an integer between 1 and 10, and lower than the value defined in ble module. | 10 | The maximum number of timer slot. |
Configuration | Options | Default | Description |
---|---|---|---|
General | |||
Name | Name must be a valid C symbol | g_ble_abs0 | Module name. |
Gap callback | Name must be a valid C symbol | gap_cb | A user callback function must be provided if the BLE_ABS is configured to generate a GAP. If QE is used, set to NULL. |
Vendor specific callback | Name must be a valid C symbol | vs_cb | A user callback function must be provided if the BLE_ABS is configured to generate a Vendor Specific. If QE is used, set to NULL. |
GATT server callback parameter | Name must be a valid C symbol | gs_abs_gatts_cb_param | Set GATT server callback parameter. If QE is used, set to NULL. |
GATT server callback number | Must be a valid number | 2 | The number of GATT Server callback functions. |
GATT client callback parameter | Name must be a valid C symbol | gs_abs_gattc_cb_param | Set GATT client callback parameter. If QE is used, set to NULL. |
GATT client callback number | Must be a valid number | 2 | The number of GATT Server callback functions. |
Security | |||
Pairing parameters | Name must be a valid C symbol | gs_abs_pairing_param | Set pairing parameters. |
IO capabilities of local device. |
| BLE_GAP_IOCAP_NOINPUT_NOOUTPUT | Select IO capabilities of local device. |
MITM protection policy. |
| BLE_GAP_SEC_MITM_BEST_EFFORT | Select MITM protection policy. |
Determine whether to accept only Secure Connections or not. |
| BLE_GAP_SC_BEST_EFFORT | Select determine whether to accept only Secure Connections or not. |
Type of keys to be distributed from local device. |
| Select type of keys to be distributed from local device. | |
Type of keys which local device requests a remote device to distribute. |
| Set type of keys which local device requests a remote device to distribute. | |
Maximum LTK size. | Valid range is 7 - 16 | 16 | Set Maximum LTK size. |
Interrupts | |||
Callback provided when an ISR occurs | Name must be a valid C symbol | NULL | Callback provided when BLE ABS ISR occurs |
This module does not use I/O pins.
Developers should be aware of the following limitations when using the BLE_ABS:
This is a basic example of minimal use of the BLE_ABS in an application.
Data Structures | |
struct | abs_advertising_parameter_t |
struct | abs_scan_parameter_t |
struct | ble_abs_instance_ctrl_t |
Typedefs | |
typedef void(* | ble_abs_timer_cb_t) (uint32_t timer_hdl) |
Enumerations | |
enum | e_ble_timer_type_t |
struct abs_advertising_parameter_t |
advertising set parameters structure
Data Fields | ||
---|---|---|
union abs_advertising_parameter_t | advertising_parameter | Advertising parameters. |
uint32_t | advertising_status | Advertising status. |
ble_device_address_t | remote_device_address | Remote device address for direct advertising. |
struct abs_scan_parameter_t |
scan parameters structure
Data Fields | ||
---|---|---|
ble_abs_scan_parameter_t | scan_parameter | Scan parameters. |
ble_abs_scan_phy_parameter_t | scan_phy_parameter_1M | 1M phy parameters for scan. |
ble_abs_scan_phy_parameter_t | scan_phy_parameter_coded | Coded phy parameters for scan. */. |
uint32_t | scan_status |
struct ble_abs_instance_ctrl_t |
BLE ABS private control block. DO NOT MODIFY. Initialization occurs when RM_BLE_ABS_Open() is called.
Data Fields | ||
---|---|---|
uint32_t | open | Indicates whether the open() API has been successfully called. |
void const * | p_context | Placeholder for user data. Passed to the user callback in ble_abs_callback_args_t. |
ble_gap_application_callback_t | abs_gap_callback | GAP callback function. |
ble_vendor_specific_application_callback_t | abs_vendor_specific_callback | Vendor specific callback function. |
ble_abs_delete_bond_application_callback_t | abs_delete_bond_callback | Delete bond information callback function. |
uint32_t | connection_timer_handle | Cancel a request for connection timer. |
uint32_t | advertising_timer_handle | Advertising timer for legacy advertising. |
uint32_t | scan_timer_handle | Scan interval timer. |
abs_advertising_parameter_t | advertising_sets[BLE_MAX_NO_OF_ADV_SETS_SUPPORTED] | Advertising set information. |
abs_scan_parameter_t | abs_scan | Scan information. |
st_ble_dev_addr_t | loc_bd_addr | Local device address. |
uint8_t | privacy_mode | Privacy mode. |
uint32_t | set_privacy_status | Local privacy status. |
ble_abs_timer_t | timer[BLE_ABS_CFG_TIMER_NUMBER_OF_SLOT] | |
uint8_t | local_irk[BLE_GAP_IRK_SIZE] | |
ble_abs_identity_address_info_t | identity_address_info | |
uint32_t | current_timeout_ms | Current timeout. |
uint32_t | elapsed_timeout_ms | Elapsed timeout. |
ble_abs_cfg_t const * | p_cfg | Pointer to the BLE ABS configuration block. |
typedef void(* ble_abs_timer_cb_t) (uint32_t timer_hdl) |
The timer callback invoked when the timer expired.
enum e_ble_timer_type_t |
fsp_err_t RM_BLE_ABS_Open | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_cfg_t const *const | p_cfg | ||
) |
Host stack is initialized with this function. Before using All the R_BLE APIs, it's necessary to call this function. A callback functions are registered with this function. In order to receive the GAP, GATT, Vendor specific event, it's necessary to register a callback function. The result of this API call is notified in BLE_GAP_EVENT_STACK_ON event. Implements ble_abs_api_t::open.
Example:
FSP_SUCCESS | Channel opened successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_ALREADY_OPEN | Requested channel is already open in a different configuration. |
FSP_ERR_INVALID_ARGUMENT | Invalid input parameter. |
FSP_ERR_INVALID_MODE | Invalid mode during open call |
Host stack is initialized with this function. Before using All the R_BLE APIs, it's necessary to call this function. A callback functions are registered with this function. In order to receive the GAP, GATT, Vendor specific event, it's necessary to register a callback function. The result of this API call is notified in BLE_GAP_EVENT_STACK_ON event. Implements ble_abs_api_t::open.
Example:
FSP_SUCCESS | Channel opened successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_ALREADY_OPEN | Requested channel is already open in a different configuration. |
FSP_ERR_INVALID_ARGUMENT | Invalid input parameter. |
FSP_ERR_INVALID_MODE | Invalid mode during open call |
Host stack is initialized with this function. Before using All the R_BLE APIs, it's necessary to call this function. A callback functions are registered with this function. In order to receive the GAP, GATT, Vendor specific event, it's necessary to register a callback function. The result of this API call is notified in BLE_GAP_EVENT_STACK_ON event. Implements ble_abs_api_t::open.
Example:
FSP_SUCCESS | Channel opened successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_INVALID_CHANNEL | The channel number is invalid. |
FSP_ERR_ALREADY_OPEN | Requested channel is already open in a different configuration. |
FSP_ERR_INVALID_ARGUMENT | Invalid input parameter. |
fsp_err_t RM_BLE_ABS_Close | ( | ble_abs_ctrl_t *const | p_ctrl | ) |
Close the BLE channel. Implements ble_abs_api_t::close.
Example:
FSP_SUCCESS | Channel closed successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_NOT_OPEN | Control block not open. |
Example:
FSP_SUCCESS | Channel closed successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_NOT_OPEN | Control block not open. |
Example:
FSP_SUCCESS | Channel closed successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_NOT_OPEN | Control block not open. |
fsp_err_t RM_BLE_ABS_Reset | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_event_cb_t | init_callback | ||
) |
This function is not implemented. To perform this function call R_BLE_Close followed by R_BLE_Open. Implements ble_abs_api_t::reset.
FSP_ERR_UNSUPPORTED | Function is not supported |
BLE is reset with this function. The process is carried out in the following order. R_BLE_Close() -> R_BLE_GAP_Terminate() -> R_BLE_Open() -> R_BLE_SetEvent(). The init_cb callback initializes the others (Host Stack, timer, etc...). Implements ble_abs_api_t::reset.
FSP_SUCCESS | Channel closed successfully. |
FSP_ERR_ASSERTION | Null pointer presented. |
FSP_ERR_NOT_OPEN | Control block not open. |
fsp_err_t RM_BLE_ABS_StartLegacyAdvertising | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_legacy_advertising_parameter_t const *const | p_advertising_parameter | ||
) |
Start Legacy Advertising after setting advertising parameters, advertising data and scan response data. The legacy advertising uses the advertising set whose advertising handle is 0. The advertising type is connectable and scannable(ADV_IND). The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Implements ble_abs_api_t::startLegacyAdvertising
Example:
FSP_SUCCESS | Operation succeeded |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_STATE | Host stack hasn't been initialized. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The advertising parameter is out of range. |
Start Legacy Advertising after setting advertising parameters, advertising data and scan response data. The legacy advertising uses the advertising set whose advertising handle is 0. The advertising type is connectable and scannable(ADV_IND). The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Implements ble_abs_api_t::startLegacyAdvertising
Example:
FSP_SUCCESS | Operation succeeded |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_STATE | Host stack hasn't been initialized. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The advertising parameter is out of range. |
Start Legacy Advertising after setting advertising parameters, advertising data and scan response data. The legacy advertising uses the advertising set whose advertising handle is 0. The advertising type is connectable and scannable(ADV_IND). The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Implements ble_abs_api_t::startLegacyAdvertising
Example:
FSP_SUCCESS | Operation succeeded |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_STATE | Host stack hasn't been initialized. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The advertising parameter is out of range. |
fsp_err_t RM_BLE_ABS_StartExtendedAdvertising | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_extend_advertising_parameter_t const *const | p_advertising_parameter | ||
) |
Start Extended Advertising after setting advertising parameters, advertising data. The extended advertising uses the advertising set whose advertising handle is 1. The advertising type is connectable and non-scannable. The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Implements ble_abs_api_t::startExtendedAdvertising
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_UNSUPPORTED | Subordinate modules do not support this feature. |
Start Extended Advertising after setting advertising parameters, advertising data. The extended advertising uses the advertising set whose advertising handle is 1. The advertising type is connectable and non-scannable. The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Implements ble_abs_api_t::startExtendedAdvertising
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_INVALID_STATE | Host stack hasn't been initialized. |
FSP_ERR_INVALID_ARGUMENT | The advertising parameter is out of range. |
FSP_ERR_UNSUPPORTED | Subordinate modules do not support this feature. |
fsp_err_t RM_BLE_ABS_StartNonConnectableAdvertising | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_non_connectable_advertising_parameter_t const *const | p_advertising_parameter | ||
) |
Start Non-Connectable Advertising after setting advertising parameters, advertising data. The non-connectable advertising uses the advertising set whose advertising handle is 2. The advertising type is non-connectable and non-scannable. The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Secondary Advertising Max Skip is 0. Implements ble_abs_api_t::startNonConnectableAdvertising.
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_UNSUPPORTED | Feature not yet supported. |
Start Non-Connectable Advertising after setting advertising parameters, advertising data. The non-connectable advertising uses the advertising set whose advertising handle is 2. The advertising type is non-connectable and non-scannable. The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Secondary Advertising Max Skip is 0. Implements ble_abs_api_t::startNonConnectableAdvertising.
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_INVALID_STATE | Host stack hasn't been initialized. |
FSP_ERR_INVALID_ARGUMENT | The advertising parameter is out of range. |
fsp_err_t RM_BLE_ABS_StartPeriodicAdvertising | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_periodic_advertising_parameter_t const *const | p_advertising_parameter | ||
) |
Start Periodic Advertising after setting advertising parameters, periodic advertising parameters, advertising data and periodic advertising data. The periodic advertising uses the advertising set whose advertising handle is 3. The advertising type is non-connectable and non-scannable. The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Secondary Advertising Max Skip is 0. Implements ble_abs_api_t::startPeriodicAdvertising
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_UNSUPPORTED | Subordinate modules do not support this feature. |
Start Periodic Advertising after setting advertising parameters, periodic advertising parameters, advertising data and periodic advertising data. The periodic advertising uses the advertising set whose advertising handle is 3. The advertising type is non-connectable and non-scannable. The address type of local device is Public Identity Address or RPA(If the resolving list contains no matching entry, use the public address.). Scan request event(BLE_GAP_EVENT_SCAN_REQ_RECV) is not notified. Secondary Advertising Max Skip is 0. Implements ble_abs_api_t::startPeriodicAdvertising
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_advertising_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The advertising parameter is out of range. |
FSP_ERR_UNSUPPORTED | This feature is not supported in this configuration. |
fsp_err_t RM_BLE_ABS_StartScanning | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_scan_parameter_t const *const | p_scan_parameter | ||
) |
Start scanning after setting scan parameters. The scanner address type is Public Identity Address. Fast scan is followed by slow scan. The end of fast scan or slow scan is notified with BLE_GAP_EVENT_SCAN_TO event. If fast_period is 0, only slow scan is carried out. If scan_period is 0, slow scan continues. Implements ble_abs_api_t::startScanning.
Example:
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_scan_parameter is specified as NULL. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Start scanning after setting scan parameters. The scanner address type is Public Identity Address. Fast scan is followed by slow scan. The end of fast scan or slow scan is notified with BLE_GAP_EVENT_SCAN_TO event. If fast_period is 0, only slow scan is carried out. If scan_period is 0, slow scan continues. Implements ble_abs_api_t::startScanning.
Example:
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_scan_parameter is specified as NULL. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Start scanning after setting scan parameters. The scanner address type is Public Identity Address. Fast scan is followed by slow scan. The end of fast scan or slow scan is notified with BLE_GAP_EVENT_SCAN_TO event. If fast_period is 0, only slow scan is carried out. If scan_period is 0, slow scan continues. Implements ble_abs_api_t::startScanning.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_scan_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The scan parameter is out of range. |
FSP_ERR_IN_USE | This API is called in scanning. |
FSP_ERR_BLE_ABS_NOT_FOUND | Usable timer slot not found. |
FSP_ERR_UNSUPPORTED | This feature is not supported in this configuration. |
fsp_err_t RM_BLE_ABS_CreateConnection | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_connection_parameter_t const *const | p_connection_parameter | ||
) |
Request create connection. The initiator address type is Public Identity Address. The scan interval is 60ms and the scan window is 30ms in case of 1M PHY or 2M PHY. The scan interval is 180ms and the scan window is 90ms in case of coded PHY. The Minimum CE Length and the Maximum CE Length are 0xFFFF. When the request for a connection has been received by the Controller, BLE_GAP_EVENT_CREATE_CONN_COMP event is notified. When a link has beens established, BLE_GAP_EVENT_CONN_IND event is notified. Implements ble_abs_api_t::createConnection.
Example:
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_connection_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The create connection parameter is out of range. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Request create connection. The initiator address type is Public Identity Address. The scan interval is 60ms and the scan window is 30ms in case of 1M PHY or 2M PHY. The scan interval is 180ms and the scan window is 90ms in case of coded PHY. The Minimum CE Length and the Maximum CE Length are 0xFFFF. When the request for a connection has been received by the Controller, BLE_GAP_EVENT_CREATE_CONN_COMP event is notified. When a link has beens established, BLE_GAP_EVENT_CONN_IND event is notified. Implements ble_abs_api_t::createConnection.
Example:
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_connection_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The create connection parameter is out of range. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Request create connection. The initiator address type is Public Identity Address. The scan interval is 60ms and the scan window is 30ms in case of 1M PHY or 2M PHY. The scan interval is 180ms and the scan window is 90ms in case of coded PHY. The Minimum CE Length and the Maximum CE Length are 0xFFFF. When the request for a connection has been received by the Controller, BLE_GAP_EVENT_CREATE_CONN_COMP event is notified. When a link has beens established, BLE_GAP_EVENT_CONN_IND event is notified. Implements ble_abs_api_t::createConnection.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_POINTER | p_connection_parameter is specified as NULL. |
FSP_ERR_INVALID_ARGUMENT | The create connection parameter is out of range. |
FSP_ERR_IN_USE | This API is called while creating a link by previous API call. |
FSP_ERR_BLE_ABS_NOT_FOUND | Couldn't find a valid timer. |
FSP_ERR_UNSUPPORTED | This feature is not supported in this configuration. |
fsp_err_t RM_BLE_ABS_SetLocalPrivacy | ( | ble_abs_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_lc_irk, | ||
uint8_t | privacy_mode | ||
) |
Generate a IRK, add it to the resolving list, set privacy mode and enable RPA function. Register vendor specific callback function, if IRK is generated by this function. After configuring local device privacy, BLE_GAP_ADDR_RPA_ID_PUBLIC is specified as own device address in theadvertising/scan/create connection API. Implements ble_abs_api_t::setLocalPrivacy
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_ARGUMENT | The privacy_mode parameter is out of range. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Generate a IRK, add it to the resolving list, set privacy mode and enable RPA function. Register vendor specific callback function, if IRK is generated by this function. After configuring local device privacy, BLE_GAP_ADDR_RPA_ID_PUBLIC is specified as own device address in theadvertising/scan/create connection API. Implements ble_abs_api_t::setLocalPrivacy
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl is specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_ARGUMENT | The privacy_mode parameter is out of range. |
fsp_err_t RM_BLE_ABS_StartAuthentication | ( | ble_abs_ctrl_t *const | p_ctrl, |
uint16_t | connection_handle | ||
) |
Start pairing or encryption. If pairing has been done, start encryption. The pairing parameters are configured by RM_BLE_ABS_Open() or R_BLE_GAP_SetPairingParams(). If the pairing parameters are configure by RM_BLE_ABS_Open(),
Example:
FSP_ERR_ASSERTION | p_instance_ctrl or connection_handle are specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Start pairing or encryption. If pairing has been done, start encryption. The pairing parameters are configured by RM_BLE_ABS_Open() or R_BLE_GAP_SetPairingParams(). If the pairing parameters are configure by RM_BLE_ABS_Open(),
Example:
FSP_ERR_ASSERTION | p_instance_ctrl or connection_handle are specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_UNSUPPORTED | Function is not supported |
Start pairing or encryption. If pairing has been done, start encryption. The pairing parameters are configured by RM_BLE_ABS_Open() or R_BLE_GAP_SetPairingParams(). If the pairing parameters are configure by RM_BLE_ABS_Open(),
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | p_instance_ctrl or connection_handle are specified as NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_ARGUMENT | The connection handle parameter is out of range. |
fsp_err_t RM_BLE_ABS_DeleteBondInformation | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_abs_bond_information_parameter_t const *const | p_bond_information_parameter | ||
) |
Delete bonding information from BLE stack and storage. Implements ble_abs_api_t::deleteBondInformation.
Example:
FSP_SUCCESS | Operation was successful |
FSP_ERR_ASSERTION | The parameter p_instance_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_bond_information_parameter is NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
Delete bonding information from BLE stack and storage. Implements ble_abs_api_t::deleteBondInformation.
Example:
FSP_SUCCESS | Operation was successful |
FSP_ERR_ASSERTION | The parameter p_instance_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_bond_information_parameter is NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
Delete bonding information from BLE stack and storage. Implements ble_abs_api_t::deleteBondInformation.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_instance_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_bond_information_parameter is NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
fsp_err_t RM_BLE_ABS_ImportKeyInformation | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_device_address_t * | p_local_identity_address, | ||
uint8_t * | p_local_irk, | ||
uint8_t * | p_local_csrk | ||
) |
Import key information to BLE stack and storage. Implements ble_abs_api_t::importKeyInformation.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_instance_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_local_identity_address, p_local_irk or p_local_csrk is NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_INVALID_HW_CONDITION | Failure to access internal storage. |
FSP_ERR_UNSUPPORTED | Not supported in this configuration. |
fsp_err_t RM_BLE_ABS_ExportKeyInformation | ( | ble_abs_ctrl_t *const | p_ctrl, |
ble_device_address_t * | p_local_identity_address, | ||
uint8_t * | p_local_irk, | ||
uint8_t * | p_local_csrk | ||
) |
Export key information to BLE stack and storage. Implements ble_abs_api_t::exportKeyInformation.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_instance_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_local_identity_address, p_local_irk or p_local_csrk is NULL. |
FSP_ERR_NOT_OPEN | Control block not open. |
FSP_ERR_BUFFER_EMPTY | Dynamic memory allocation failed. |
FSP_ERR_OUT_OF_MEMORY | Failure to access internal storage. |
FSP_ERR_NOT_INITIALIZED | Not initialized internal storage. |
FSP_ERR_UNSUPPORTED | Not supported in this configuration. |