RA Flexible Software Package Documentation
Release v5.2.0
|
|
The BLE Mesh Network Bearer module supports the following devices.
Configuration | Options | Default | Description |
---|
Configuration | Options | Default | Description |
---|---|---|---|
General | |||
Name | Name Must Be a Valid C Symbol | g_rm_ble_mesh_bearer0 | Module name. |
Channel Number | Invalid Channel Number | 0 | Select channel corresponding to the channel number of the hardware. |
Data Structures | |
struct | rm_ble_mesh_bearer_instance_ctrl_t |
struct rm_ble_mesh_bearer_instance_ctrl_t |
RM_BLE_MESH_BEARER private control block. DO NOT MODIFY. Initialization occurs when RM_BLE_MESH_BEARER_Open() is called.
fsp_err_t RM_BLE_MESH_BEARER_Open | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
rm_ble_mesh_bearer_cfg_t const *const | p_cfg | ||
) |
Open bearer middleware.
Implements rm_ble_mesh_bearer_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 | Model is already open. |
fsp_err_t RM_BLE_MESH_BEARER_Close | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl | ) |
Close bearer middleware. Implements rm_ble_mesh_bearer_api_t::close.
Example:
FSP_SUCCESS | Module successfully closed. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_BEARER_RegisterInterface | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
rm_ble_mesh_bearer_type_t | brr_type, | ||
rm_ble_mesh_bearer_ntf_callback_result_t(*)(rm_ble_mesh_bearer_ntf_callback_args_t *p_args) | p_callback | ||
) |
Register interface with Bearer Layer. This routine registers interface with the Bearer Layer. Bearer Layer supports single Application, hence this rouine shall be called once.
Implements rm_ble_mesh_bearer_api_t::registerInterface.
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_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_BEARER_RegisterBeaconHandler | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
rm_ble_mesh_bearer_beacon_type_t | bcon_type, | ||
void(*)(rm_ble_mesh_bearer_beacon_callback_args_t *p_args) | p_handler | ||
) |
Register beacon interface with Bearer Layer. This routine registers interface with the Bearer Layer to process Beacons. Bearer Layer supports single Application, hence this rouine shall be called once.
Implements rm_ble_mesh_bearer_api_t::registerBeaconHandler.
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_BLE_MESH_BEARER_AddBearer | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
rm_ble_mesh_bearer_type_t | brr_type, | ||
rm_ble_mesh_bearer_info_t const *const | p_brr_info, | ||
rm_ble_mesh_bearer_handle_t *const | p_brr_handle | ||
) |
Add a bearer to Bearer Layer. This routine adds a bearer that is setup by the application for use by the Mesh Stack. Bearer Layer supports single Application, hence this rouine shall be called once.
Implements rm_ble_mesh_bearer_api_t::addBearer.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_brr_info and p_brr_handle are NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_BEARER_RemoveBearer | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
rm_ble_mesh_bearer_type_t | brr_type, | ||
rm_ble_mesh_bearer_handle_t const *const | p_brr_handle | ||
) |
Remove a bearer from Bearer Layer. This routine removes a bearer from the Mesh Stack. Bearer Layer supports single Application, hence this rouine shall be called once.
Implements rm_ble_mesh_bearer_api_t::removeBearer.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_brr_handle is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_BEARER_ObserveBeacon | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
uint8_t | bcon_type, | ||
uint8_t | enable | ||
) |
Observe on/off for the beacon type. This routine sends enables/disables the observation procedure for the given beacon type.
Implements rm_ble_mesh_bearer_api_t::observeBeacon.
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_BLE_MESH_BEARER_BcastUnprovisionedBeacon | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
uint8_t | type, | ||
uint8_t const *const | p_dev_uuid, | ||
uint16_t | oob_info, | ||
rm_ble_mesh_buffer_t const *const | p_uri | ||
) |
API to send unprovisioned device beacon. This routine sends Unprovisioned Device Beacon.
Implements rm_ble_mesh_bearer_api_t::bcastUnprovisionedBeacon.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_dev_uuid and p_uri are NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_BEARER_BroadcastBeacon | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
uint8_t | type, | ||
uint8_t const *const | p_packet, | ||
uint16_t | length | ||
) |
API to broadcast a beacon. This routine sends the beacon of given type on Adv and GATT bearers.
Implements rm_ble_mesh_bearer_api_t::broadcastBeacon.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_packet is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_BEARER_StartProxyAdv | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
uint8_t | type, | ||
uint8_t const *const | p_data, | ||
uint16_t | datalen | ||
) |
API to send proxy device ADV. This routine sends Proxy Device ADV.
Implements rm_ble_mesh_bearer_api_t::startProxyAdv.
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_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_BEARER_SendPdu | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
rm_ble_mesh_bearer_handle_t const *const | p_brr_handle, | ||
rm_ble_mesh_bearer_type_t | brr_type, | ||
rm_ble_mesh_buffer_t const *const | p_buffer | ||
) |
Send a bearer PDU. This routine sends a PDU from the Mesh stack to over the bearer indicated by the bearer handle.
Implements rm_ble_mesh_bearer_api_t::sendPdu.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_brr_handle and p_buffer are NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_BEARER_GetPacketRssi | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
uint8_t * | p_rssi_value | ||
) |
Get the RSSI of current received packet being processed. This routine returns the RSSI value of the received packet in its context when called from the Mesh stack.
Implements rm_ble_mesh_bearer_api_t::getPacketRssi.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | Pointer to control block or configuration structure is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_rssi_value is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_BEARER_Sleep | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl | ) |
Put the bearer to sleep. This routine requests the underlying bearer interface to sleep. Default bearer interface is that of advertising bearer.
Implements rm_ble_mesh_bearer_api_t::sleep.
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_BLE_MESH_BEARER_Wakeup | ( | rm_ble_mesh_bearer_ctrl_t *const | p_ctrl, |
uint8_t | mode | ||
) |
Wakeup the bearer. This routine requests the underlying bearer interface to wakeup. Default bearer interface is that of advertising bearer.
Implements rm_ble_mesh_bearer_api_t::wakeup.
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. |