RA Flexible Software Package Documentation
Release v5.3.0
|
|
Interface for BLE Mesh Provision functions.
The BLE Mesh Provision interface for the BLE Mesh Provision (BLE MESH PROVISION) peripheral provides BLE Mesh Provision functionality.
Data Structures | |
struct | rm_ble_mesh_provision_device_t |
struct | rm_ble_mesh_provision_oob_info_t |
struct | rm_ble_mesh_provision_capabilities_t |
struct | rm_ble_mesh_provision_method_t |
struct | rm_ble_mesh_provision_data_t |
struct | rm_ble_mesh_provision_device_info_t |
struct | rm_ble_mesh_provision_callback_args_t |
struct | rm_ble_mesh_provision_cfg_t |
struct | rm_ble_mesh_provision_api_t |
struct | rm_ble_mesh_provision_instance_t |
Macros | |
#define | RM_BLE_MESH_PROVISION_KEY_NETKEY_SIZE |
#define | RM_BLE_MESH_PROVISION_ECDH_KEY_SIZE |
#define | RM_BLE_MESH_PROVISION_OOB_VALUE_SIZE |
#define | RM_BLE_MESH_PROVISION_URI_HASH_SIZE |
#define | RM_BLE_MESH_PROVISION_HANDLE_INVALID |
Typedefs | |
typedef uint8_t | rm_ble_mesh_provision_handle_t |
typedef void | rm_ble_mesh_provision_ctrl_t |
struct rm_ble_mesh_provision_device_t |
Device Information used for Provisioning
Data Fields | ||
---|---|---|
uint8_t | uuid[RM_BLE_MESH_DEVICE_UUID_SIZE] |
Device UUID - Used in unprovisioned device beacon and Provisioning Invite |
uint16_t | oob |
OOB Information |
rm_ble_mesh_buffer_t * | uri |
URI if any, to be given in encoded form |
struct rm_ble_mesh_provision_oob_info_t |
struct rm_ble_mesh_provision_capabilities_t |
Device capabilities used for Provisioning
Data Fields | ||
---|---|---|
uint8_t | num_elements |
Number of Elements |
uint16_t | supported_algorithms |
Supported algorithms |
uint8_t | supported_pubkey |
Public key type |
uint8_t | supported_soob |
Static OOB type |
rm_ble_mesh_provision_oob_info_t | output_oob |
Output OOB information |
rm_ble_mesh_provision_oob_info_t | input_oob |
Input OOB information |
struct rm_ble_mesh_provision_method_t |
Provisioning method information
Data Fields | ||
---|---|---|
uint8_t | algorithm |
Algorithm selected |
uint8_t | pubkey |
Public key usage |
uint8_t | auth |
Authentication type |
rm_ble_mesh_provision_oob_info_t | oob |
OOB type |
struct rm_ble_mesh_provision_data_t |
Data exchanged during Provisioning procedure
Data Fields | ||
---|---|---|
uint8_t | netkey[RM_BLE_MESH_PROVISION_KEY_NETKEY_SIZE] |
NetKey |
uint16_t | keyid |
Index of the NetKey |
uint8_t | flags |
Flags bit-mask bit 0: Key Refresh Flag. 0: Not-In-Phase2 1: In-Phase2 bit 1: IV Update Flag 0: Normal operation 1: IV Update active bits 2-7: RFU |
uint32_t | iv_index |
Current value of the IV index |
uint16_t | unicast_addr |
Unicast address of the primary element |
struct rm_ble_mesh_provision_device_info_t |
Provisioning device information
Data Fields | ||
---|---|---|
rm_ble_mesh_provision_bearer_type_t | type | Provisioning Bearer Types. |
rm_ble_mesh_provision_device_t * | p_device | Device Information used for Provisioning. |
struct rm_ble_mesh_provision_callback_args_t |
Mesh model client callback parameter definition
Data Fields | ||
---|---|---|
rm_ble_mesh_provision_handle_t * | p_handle | Handle to reference the active provisioning context. |
rm_ble_mesh_provision_event_type_t | event_type | Provisioning event type. |
rm_ble_mesh_error_code_t | event_result | BLE MESH error code. |
rm_ble_mesh_buffer_t | event_data | Payload type. |
void const * | p_context |
struct rm_ble_mesh_provision_cfg_t |
BLE MESH PROVISION configuration parameters.
Data Fields | |
uint32_t | channel |
Select a channel corresponding to the channel number of the hardware. More... | |
rm_ble_mesh_provision_capabilities_t * | p_capabilities |
Device capabilities used for Provisioning. | |
rm_ble_mesh_instance_t const * | p_mesh_instance |
Instance structure of BLE Mesh. | |
void(* | p_callback )(rm_ble_mesh_provision_callback_args_t *p_args) |
Callback function. | |
void const * | p_context |
Placeholder for user data. Passed to the user callback in ble_abs_callback_args_t. | |
void const * | p_extend |
Placeholder for user extension. | |
uint32_t rm_ble_mesh_provision_cfg_t::channel |
Select a channel corresponding to the channel number of the hardware.
the parameters for initialization.
struct rm_ble_mesh_provision_api_t |
BLE MESH PROVISION functions implemented at the HAL layer will follow this API.
fsp_err_t(* rm_ble_mesh_provision_api_t::open) (rm_ble_mesh_provision_ctrl_t *const p_ctrl, rm_ble_mesh_provision_cfg_t const *const p_cfg) |
Open access middleware.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* rm_ble_mesh_provision_api_t::close) (rm_ble_mesh_provision_ctrl_t *const p_ctrl) |
Close access middleware.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | role | Provisioning role to be setup - Device or Provisioner. |
[in] | info | Device information. |
[in] | timeout | The time period for which the setup shall be active. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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
[in] | p_ctrl | Pointer to control structure. |
[in] | info | Device information. |
[in] | attention | Attention duration. |
[out] | p_handle | Pointer to handle. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_handle | Pointer to provisioning context to be used. |
[in] | type | Following PDU types are handled - RM_BLE_MESH_PROVISION_PDU_TYPE_START RM_BLE_MESH_PROVISION_PDU_TYPE_INPUT_COMPLETE RM_BLE_MESH_PROVISION_PDU_TYPE_DATA |
[in] | pdu_data | Pointer to the data corresponding to the above PDUs. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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 Auth-Value.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_handle | Pointer to provisioning context to be used. |
[in] | auth_value | Pointer to the Authval (UINT32 *) or (uint8_t *). |
fsp_err_t(* rm_ble_mesh_provision_api_t::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
[in] | p_ctrl | Pointer to control structure. |
[in] | p_handle | Pointer to provisioning context to be used. |
[in] | reason | Reason for termination. |
fsp_err_t(* rm_ble_mesh_provision_api_t::getLocalPublicKey) (rm_ble_mesh_provision_ctrl_t *const p_ctrl, uint8_t *const public_key) |
Utility API to get current ECDH Public Key to be used for Provisioning
[in] | p_ctrl | Pointer to control structure. |
[out] | public_key | To a pointer of uint8_t array of length RM_BLE_MESH_PROVISION_KEY_NETKEY_SIZE. |
fsp_err_t(* rm_ble_mesh_provision_api_t::setLocalPublicKey) (rm_ble_mesh_provision_ctrl_t *const p_ctrl, uint8_t const *const public_key) |
Utility API to set current ECDH Public Key to be used for Provisioning
[in] | p_ctrl | Pointer to control structure. |
[out] | public_key | To a pointer of uint8_t array of length RM_BLE_MESH_PROVISION_KEY_NETKEY_SIZE. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_key | Pointer to buffer to store random number. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_key | Pointer to public key. |
[in] | size | Size of public key. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_auth_info | Pointer to authentication information. |
[in] | size | Size of authentication information. |
fsp_err_t(* rm_ble_mesh_provision_api_t::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
[in] | p_ctrl | Pointer to control structure. |
[out] | p_public_key | Pointer to public key. Size of public key is RM_BLE_MESH_PROVISION_ECDH_KEY_SIZE. |
struct rm_ble_mesh_provision_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
rm_ble_mesh_provision_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
rm_ble_mesh_provision_cfg_t const * |
p_cfg | Pointer to the configuration structure for this instance. |
rm_ble_mesh_provision_api_t const * |
p_api | Pointer to the API structure for this instance. |
#define RM_BLE_MESH_PROVISION_KEY_NETKEY_SIZE |
Provisioning array size requirements Provisioning key NetKey size
#define RM_BLE_MESH_PROVISION_ECDH_KEY_SIZE |
Provisioning ECDH Key size
#define RM_BLE_MESH_PROVISION_OOB_VALUE_SIZE |
Provisioning OOB value size
#define RM_BLE_MESH_PROVISION_URI_HASH_SIZE |
Provisioning URI hash size
#define RM_BLE_MESH_PROVISION_HANDLE_INVALID |
Invalid Provisioning Handle
typedef uint8_t rm_ble_mesh_provision_handle_t |
Handle to reference the active provisioning context
typedef void rm_ble_mesh_provision_ctrl_t |
BLE MESH PROVISION control block. Allocate an instance specific control block to pass into the BLE MESH API calls.
Provisioning PDU Types
Provisioning authentication method values
Provisioning Output OOB action values
Provisioning Input OOB action values
Provisioning Failure Error Codes
Provisioning OOB type masks for ADV data
Provision Events The Asynchronous Events notified to Application by the Module.
Enumerator | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RM_BLE_MESH_PROVISION_EVENT_TYPE_UNPROVISIONED_BEACON | This event indicates the availability of an unprovisioned device beacon, with the following values as parameters in the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_PROVISIONING_SETUP | This event indicates that the provisioning procedure capability exchange is complete, with the following values as parameters in the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_OOB_DISPLAY | This event indicates to the application the OOB random data that is to be displayed on the UI via the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_OOB_ENTRY | This event indicates to the application requesting for OOB random data that is to be used in the procedure via the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_DEVINPUT_COMPLETE | This event indicates to the application that the peer device has completed the Input of OOB when this capability is negotiated via the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_PROVDATA_INFO_REQ | This event indicates to the application requesting for Provisional data to be sent to the peer device via the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_PROVDATA_INFO | This event indicates to the application the Provisional data received from the Provisioner via the rm_ble_mesh_provision_callback_args_t callback.
| |||||||||||||||
RM_BLE_MESH_PROVISION_EVENT_TYPE_PROVISIONING_COMPLETE | This event indicates to the application that the provisioning procedure is complete via the rm_ble_mesh_provision_callback_args_t callback.
|