RA Flexible Software Package Documentation
Release v5.2.0
|
|
The BLE Mesh Network Provision 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_provision0 | Module name. |
Provision Capabilities | |||
Number of Elements | Invalid Number of Elements | 1 | Provision capabilities number of elements. |
Supported Algorithms | Invalid Supported Algorithms | 0 | Provision capabilities supported algorithms. |
Public Key Type | Invalid Public Key Type | 0 | Provision capabilities public key type. |
Static OOB Type | Invalid Static OOB Type | 0 | Provision capabilities static OOB type. |
Output OOB Action | Invalid Output OOB Action | 0 | Provision capabilities output OOB action. |
Output OOB Size | Invalid Output OOB Size | 0 | Provision capabilities output OOB size. |
Input OOB Action | Invalid Input OOB Action | 0 | Provision capabilities input OOB action. |
Input OOB Size | Invalid Input OOB Size | 0 | Provision capabilities iutput OOB size. |
Channel Number | Invalid Channel Number | 0 | Select channel corresponding to the channel number of the hardware. |
Provision Callback | Name Must Be a Valid C Symbol. | NULL | Provision callback function name. |
Data Structures | |
struct | rm_ble_mesh_provision_instance_ctrl_t |
struct rm_ble_mesh_provision_instance_ctrl_t |
RM_BLE_MESH_PROVISION private control block. DO NOT MODIFY. Initialization occurs when RM_BLE_MESH_PROVISION_Open() is called.
fsp_err_t RM_BLE_MESH_PROVISION_Open | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
rm_ble_mesh_provision_cfg_t const *const | p_cfg | ||
) |
Open access middleware. This function registers the provisioning capabilities of the application along with the application callback to notify events during the provisioning procedure.
Implements rm_ble_mesh_provision_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_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_PROVISION_Close | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl | ) |
Close access middleware. Implements rm_ble_mesh_provision_api_t::close.
Example:
FSP_SUCCESS | Module successfully closed. |
FSP_ERR_ASSERTION | The parameter p_ctrl 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_PROVISION_Setup | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
rm_ble_mesh_provision_role_t | role, | ||
rm_ble_mesh_provision_device_info_t | info, | ||
uint16_t | timeout | ||
) |
Setup the device for provisioning. This function configures the device to get in a provisionable state by specifying the role, bearer and creating a context.
Implements rm_ble_mesh_provision_api_t::setup.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_POINTER | The parameter info->p_device is NULL. |
FSP_ERR_OUT_OF_MEMORY | Memory allocation is failed. |
FSP_ERR_OVERFLOW | TX queue is full. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_PROVISION_Bind | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
rm_ble_mesh_provision_device_info_t | info, | ||
uint8_t | attention, | ||
rm_ble_mesh_provision_handle_t *const | p_handle | ||
) |
Bind to the peer device for provisioning. This function establishes a provisioning link with the peer device and exchanges the capabilities for provisioning.
Implements rm_ble_mesh_provision_api_t::bind.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_POINTER | The parameter p_handle is NULL. |
FSP_ERR_OUT_OF_MEMORY | Memory allocation is failed. |
FSP_ERR_OVERFLOW | TX queue is full. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_PROVISION_SendPdu | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
rm_ble_mesh_provision_handle_t const *const | p_handle, | ||
rm_ble_mesh_provision_pdu_type_t | type, | ||
rm_ble_mesh_buffer_t | pdu_data | ||
) |
Send provisioning PDUs to the peer. This function is used by the provisioning application to send the provisioning PDUs to the peer device during the procedure.
Implements rm_ble_mesh_provision_api_t::sendPdu.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_POINTER | The parameter p_handle is NULL. |
FSP_ERR_UNSUPPORTED | The pdu type is not supported. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_PROVISION_SetAuthVal | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
rm_ble_mesh_provision_handle_t const *const | p_handle, | ||
rm_ble_mesh_buffer_t | auth_value | ||
) |
Set the display authval. This function shall be used by the provisioning application to set the authval being displayed to the user on receiving RM_BLE_MESH_PROVISION_EVENT_TYPE_OOB_DISPLAY event with the respective OOB Action and Size.
Implements rm_ble_mesh_provision_api_t::setAuthVal.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_handle is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_PROVISION_Abort | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
rm_ble_mesh_provision_handle_t const *const | p_handle, | ||
rm_ble_mesh_provision_link_close_reason_t | reason | ||
) |
Abort the provisioning procedure. This API can be used by the application to abort the ongoing provisioning procedure. This routine closes the provisioning link with the reason as specified.
Implements rm_ble_mesh_provision_api_t::abort.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_handle is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
FSP_ERR_INVALID_STATE | Lower layer is invalid state. |
fsp_err_t RM_BLE_MESH_PROVISION_GetLocalPublicKey | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
uint8_t *const | p_public_key | ||
) |
Utility API to get current ECDH public key to be used for provisioning. This API can be used by the application to fetch the current ECDH P256 Public Key which is to be used for the Provisioning Procedure.
Implements rm_ble_mesh_provision_api_t::getLocalPublicKey.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_public_key is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_PROVISION_SetLocalPublicKey | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_public_key | ||
) |
Utility API to set current ECDH public key to be used for provisioning. This API can be used by the application to fetch the current ECDH P256 Public Key which is to be used for the Provisioning Procedure.
Implements rm_ble_mesh_provision_api_t::setLocalPublicKey.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_public_key is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
FSP_ERR_INVALID_ARGUMENT | Input parameter is invalid. |
fsp_err_t RM_BLE_MESH_PROVISION_GenerateRandomizedNumber | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
uint8_t *const | p_key | ||
) |
Utility API to generate 128bits (16 bytes) randomized number to be used for provisioning. The randomized number can be used for UUID, Net Key and Application Key.
Implements rm_ble_mesh_provision_api_t::generateRandomizedNumber.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_key is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_PROVISION_SetOobPublicKey | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_key, | ||
uint8_t | size | ||
) |
Utility API to set device out of band public key for provisioning.
Implements rm_ble_mesh_provision_api_t::setOobPublicKey.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_key is NULL. |
FSP_ERR_INVALID_ARGUMENT | The parameter size is more than 64. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_PROVISION_SetOobAuthInfo | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
uint8_t const *const | p_auth_info, | ||
uint8_t | size | ||
) |
Utility API to set device out of band authentication information for provisioning.
Implements rm_ble_mesh_provision_api_t::setOobAuthInfo.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_auth_info is NULL. |
FSP_ERR_INVALID_ARGUMENT | The parameter size is more than 16. |
FSP_ERR_NOT_OPEN | Module is not open. |
fsp_err_t RM_BLE_MESH_PROVISION_GenerateEcdhKey | ( | rm_ble_mesh_provision_ctrl_t *const | p_ctrl, |
uint8_t *const | p_public_key | ||
) |
Utility API to generate ECDH public key to be used for provisioning.
Implements rm_ble_mesh_provision_api_t::generateEcdhKey.
Example:
FSP_SUCCESS | Operation succeeded. |
FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
FSP_ERR_INVALID_POINTER | The parameter p_public_key is NULL. |
FSP_ERR_NOT_OPEN | Module is not open. |