RA Flexible Software Package Documentation
Release v5.2.0
|
|
The BLE Mesh Network Bearer Platform module supports the following devices.
Configuration | Options | Default | Description |
---|---|---|---|
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 MESH_BEARER_PLATFORM_CFG_RF_EXTERNAL_32K_ENABLE = 1, Set port of MCU CLKOUT. |
MCU CLKOUT Frequency Output |
| MCU CLKOUT frequency 32.768kHz | When MESH_BEARER_PLATFORM_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 MESH_BEARER_PLATFORM_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(MESH_BEARER_PLATFORM_CFG_RF_MAX_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_rm_mesh_bearer_platform0 | Module name. |
Channel Number | Invalid Channel Number | 0 | Select channel corresponding to the channel number of the hardware. |
Device Address Type | Invalid Device Address Type | 0 | Select device address type ( public : 0, random : 1). |
GATT Server Callback Number | Invalid Callback Number | 1 | Number of GATT server callback. |
GATT Client Callback Number | Invalid Callback Number | 1 | Number of GATT client callback. |
Vender Specific Callback | Name Must Be a Valid C Symbol. | NULL | Vendor specific callback function name. |
Data Structures | |
struct | rm_mesh_bearer_platform_instance_ctrl_t |
struct | rm_mesh_bearer_platform_extended_cfg_t |
Typedefs | |
typedef void(* | rm_mesh_bearer_platform_gatt_iface_cb_t) (uint8_t event_name, uint8_t event_param, uint16_t conn_hdl, st_ble_dev_addr_t *peer_addr) |
Callback function for GATT interface event. More... | |
Enumerations | |
enum | rm_mesh_bearer_platform_interface_event_t |
struct rm_mesh_bearer_platform_instance_ctrl_t |
RM_BLE_MESH_BEARER private control block. DO NOT MODIFY. Initialization occurs when RM_BLE_MESH_BEARER_Open() is called.
struct rm_mesh_bearer_platform_extended_cfg_t |
Bearer port extension for renesas BLE stack.
typedef void(* rm_mesh_bearer_platform_gatt_iface_cb_t) (uint8_t event_name, uint8_t event_param, uint16_t conn_hdl, st_ble_dev_addr_t *peer_addr) |
Callback function for GATT interface event.
event_name | The event defined by rm_mesh_bearer_platform_interface_event_t |
event_param | The mode of GATT connection rm_mesh_bearer_platform_gatt_mode_t |
conn_hdl | The connection handle |
peer_addr | Pointer to the connected device address |
GATT Interface Events
fsp_err_t RM_MESH_BEARER_PLATFORM_Open | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
rm_mesh_bearer_platform_cfg_t const *const | p_cfg | ||
) |
Open Bearer Platform middleware. Initialize underlying BLE Protocol Stack to use as a Mesh Bearer. API to initialize underlying BLE Protocol Stack to use as a Mesh Bearer. Completion of the initialization is notified by the callback function.
Implements rm_mesh_bearer_platform_api_t::open.
Example:
FSP_SUCCESS | Module opened successfully. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_ALREADY_OPEN | Module is already open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_MESH_BEARER_PLATFORM_Close | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl | ) |
Close Bearer Platform middleware. Terminate BLE stack.
Implements rm_mesh_bearer_platform_api_t::close.
Example:
FSP_SUCCESS | Module opened successfully. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_Setup | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl | ) |
Register ADV bearer with Mesh stack and start scan. API to register ADV bearer with Mesh stack. After registering, this routine starts Scan.
[in] | p_ctrl | rm_mesh_bearer_platform control block. |
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_CallbackSet | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
rm_mesh_bearer_platform_gatt_iface_cb_t | callback | ||
) |
Register callback function to receive GATT interface events. API to register callback function to receive GATT interface events.
[in] | p_ctrl | rm_mesh_bearer_platform control block. |
[in] | callback | Callback function. |
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_SetGattMode | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
rm_mesh_bearer_platform_gatt_mode_t | mode | ||
) |
Set GATT Bearer mode.
[in] | p_ctrl | rm_mesh_bearer_platform control block. |
[in] | mode | GATT interface mode, either RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION or RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY. |
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_GetGattMode | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
rm_mesh_bearer_platform_gatt_mode_t * | p_mode | ||
) |
Get current GATT Bearer mode.
[in] | p_ctrl | rm_mesh_bearer_platform control block. |
[in] | p_mode | GATT interface mode, either RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION or RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY. |
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_mode is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_SetScanResponseData | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
uint8_t * | p_data, | ||
uint8_t | len | ||
) |
Set scan response data in connectable and scannable undirected advertising event. API to Set Scan Response Data in Connectable and scannable undirected Advertising event. Scan Response Data can be used for indicating additional information such as << Complete Local Name>>.
Implements rm_mesh_bearer_platform_api_t::setScanResponseData.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_data is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_ScanGattBearer | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
rm_mesh_bearer_platform_state_t | state, | ||
rm_mesh_bearer_platform_gatt_mode_t | mode | ||
) |
Manage reporting connectable device having Mesh GATT service. API to manage reporting connectable device having Mesh GATT service.
[in] | p_ctrl | rm_mesh_bearer_platform control block. |
[in] | state | Notification configuration flag; enable if RM_MESH_BEARER_PLATFORM_STATE_ENABLE, or disable if RM_MESH_BEARER_PLATFORM_STATE_DISABLE. |
[in] | mode | GATT interface mode, either RM_MESH_BEARER_PLATFORM_GATT_MODE_PROVISION or RM_MESH_BEARER_PLATFORM_GATT_MODE_PROXY. |
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Model is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_Connect | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
uint8_t * | p_remote_address, | ||
uint8_t | address_type, | ||
rm_mesh_bearer_platform_gatt_mode_t | mode | ||
) |
Request to create connection. API to request to Create Connection. Completion of the establishing a connection is notified by RM_BLE_MESH_BEARER_IFACE_UP. After establishing a connection, RM_MESH_BEARER_PLATFORM_DiscoverService() is invoked automatically.
Implements rm_mesh_bearer_platform_api_t::connect.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_remote_address is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_DiscoverService | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
uint16_t | handle, | ||
rm_mesh_bearer_platform_gatt_mode_t | mode | ||
) |
Start service discovery for Mesh GATT service. API to start Service Discovery for Mesh GATT Service. If Mesh GATT Service specified by the "mode" argument, this routine enables Notification of the Mesh GATT Service by invoking RM_MESH_BEARER_PLATFORM_ConfigureNotification().
Implements rm_mesh_bearer_platform_api_t::discoverService.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_ConfigureNotification | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
uint16_t | handle, | ||
rm_mesh_bearer_platform_state_t | state, | ||
rm_mesh_bearer_platform_gatt_mode_t | mode | ||
) |
Configure GATT notification of Mesh GATT service. API to configure GATT Notification of Mesh GATT Service.
Implements rm_mesh_bearer_platform_api_t::configureNotification.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_MESH_BEARER_PLATFORM_Disconnect | ( | rm_mesh_bearer_platform_ctrl_t *const | p_ctrl, |
uint16_t | handle | ||
) |
Terminate Connection. API to terminate connection.
Implements rm_mesh_bearer_platform_api_t::disconnect.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |