RA Flexible Software Package Documentation
Release v5.2.0
|
|
Interface for BLE Mesh Network functions.
The BLE Mesh Network interface for the BLE Mesh Network (BLE MESH NETWORK) peripheral provides BLE Mesh Network functionality.
Data Structures | |
struct | rm_ble_mesh_network_header_t |
struct | rm_ble_mesh_network_seq_number_state_t |
struct | rm_ble_mesh_network_route_info_t |
struct | rm_ble_mesh_network_proxy_address_list_t |
struct | rm_ble_mesh_network_callback_args_t |
struct | rm_ble_mesh_network_cfg_t |
struct | rm_ble_mesh_network_api_t |
struct | rm_ble_mesh_network_instance_t |
Macros | |
#define | RM_BLE_MESH_NETWORK_UNASSIGNED_ADDRESS |
#define | RM_BLE_MESH_NETWORK_PRIMARY_SUBNET |
#define | RM_BLE_MESH_NETWORK_INVALID_SUBNET_HANDLE |
#define | RM_BLE_MESH_NETWORK_INVALID_APPKEY_HANDLE |
#define | RM_BLE_MESH_NETWORK_INVALID_NID |
Typedefs | |
typedef uint16_t | rm_ble_mesh_network_address_t |
typedef uint16_t | rm_ble_mesh_network_subnet_handle_t |
typedef uint16_t | rm_ble_mesh_network_appkey_handle_t |
typedef uint16_t | rm_ble_mesh_network_proxy_address_t |
typedef uint8_t | rm_ble_mesh_network_interface_handle_t |
typedef void | rm_ble_mesh_network_ctrl_t |
struct rm_ble_mesh_network_header_t |
Network Header Type
Data Fields | ||
---|---|---|
uint8_t | ivi |
Least significant bit of IV Index - 1 bit |
uint8_t | nid |
Value derived from the NetKey used to identify the Encrytion Key and Privacy Key used to secure this PDU - 7 bits |
uint8_t | new_key |
Indicates use of a new NetKey to which the network is being updated to. |
uint8_t | ctl |
Network Control - 1 bit |
uint8_t | ttl |
Time To Live - 7 bits |
rm_ble_mesh_network_address_t | src_addr |
16 Bit Source Address |
rm_ble_mesh_network_address_t | dst_addr |
16 Bit Destination Address |
uint32_t | seq_num |
24 bit sequence number - currently filled only in reception path |
struct rm_ble_mesh_network_seq_number_state_t |
struct rm_ble_mesh_network_route_info_t |
Network configuration information
Data Fields | ||
---|---|---|
rm_ble_mesh_network_interface_handle_t * | interface_handle |
Pointer to list of address to be added/deleted |
rm_ble_mesh_network_subnet_handle_t | subnet_handle |
Count of addresses present in the provided list |
struct rm_ble_mesh_network_proxy_address_list_t |
Proxy Server's filter List
Data Fields | ||
---|---|---|
rm_ble_mesh_network_proxy_address_t * | address |
Pointer to list of address to be added/deleted |
uint16_t | count |
Count of addresses present in the provided list |
struct rm_ble_mesh_network_callback_args_t |
BLE Mesh Network callback parameter definition
Data Fields | ||
---|---|---|
rm_ble_mesh_network_event_t | event | Event code. |
rm_ble_mesh_network_header_t * | p_header | Network header type. |
rm_ble_mesh_network_subnet_handle_t | subnet_handle | Subnet handle. |
rm_ble_mesh_network_interface_handle_t * | p_network_interface | Network interface handle. |
rm_ble_mesh_buffer_t | event_data | Event data. |
void const * | p_context | Context provided to user during callback. |
struct rm_ble_mesh_network_cfg_t |
BLE MESH NETWORK configuration parameters.
Data Fields | |
uint32_t | channel |
Select a channel corresponding to the channel number of the hardware. More... | |
rm_ble_mesh_bearer_instance_t const * | p_mesh_bearer_instance |
Instance structure of BLE Mesh Bearer. | |
rm_ble_mesh_provision_instance_t const * | p_mesh_provision_instance |
Instance structure of BLE Mesh Provision. | |
void(* | p_callback )(rm_ble_mesh_network_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_network_cfg_t::channel |
Select a channel corresponding to the channel number of the hardware.
the parameters for initialization.
struct rm_ble_mesh_network_api_t |
BLE MESH NETWORK functions implemented at the HAL layer will follow this API.
fsp_err_t(* rm_ble_mesh_network_api_t::open) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_cfg_t const *const p_cfg) |
Register Interface with Network Layer.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* rm_ble_mesh_network_api_t::close) (rm_ble_mesh_network_ctrl_t *const p_ctrl) |
Unregister Interface with Network Layer.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_network_api_t::broadcastSecureBeacon) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_subnet_handle_t subnet_handle) |
API to send Secure Network Beacon.
[in] | p_ctrl | Pointer to control structure. |
[in] | subnet_handle | Subnet handle of the network to be broadcasted. |
fsp_err_t(* rm_ble_mesh_network_api_t::sendPduOnInterface) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_route_info_t const *const p_route_info, rm_ble_mesh_network_header_t const *const p_header, rm_ble_mesh_buffer_t const *const p_buffer) |
Extension API to send network PDUs on selected network interfaces.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_route_info | Pointer to network configuration information. |
[in] | p_header | Pointer to network Header. |
[in] | p_buffer | Pointer to Lower Transport Payload. |
fsp_err_t(* rm_ble_mesh_network_api_t::getAddressType) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_address_t addr, rm_ble_mesh_network_address_type_t *const p_type) |
To get address type.
[in] | p_ctrl | Pointer to control structure. |
[in] | addr | Input network address. |
[in] | p_type | One of the following address type RM_BLE_MESH_NETWORK_ADDRESS_TYPE_INVALID RM_BLE_MESH_NETWORK_ADDRESS_TYPE_UNICAST RM_BLE_MESH_NETWORK_ADDRESS_TYPE_GROUP |
fsp_err_t(* rm_ble_mesh_network_api_t::fetchProxyState) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_gatt_proxy_state_t *const p_proxy_state) |
Check if the proxy module is ready to handle proxy messages/events.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_proxy_state | Returns the current state of the proxy. |
fsp_err_t(* rm_ble_mesh_network_api_t::setProxyFilter) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_route_info_t const *const p_route_info, rm_ble_mesh_proxy_filter_type_t type) |
Set proxy server's filter type.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_route_info | Pointer to network configuration information. |
[in] | type | Type of the proxy filter to be set. Either RM_BLE_MESH_NETWORK_PROXY_FILTER_TYPE_WHITELIST or RM_BLE_MESH_NETWORK_PROXY_FILTER_TYPE_BLACKLIST |
fsp_err_t(* rm_ble_mesh_network_api_t::configProxyFilter) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_route_info_t const *const p_route_info, rm_ble_mesh_proxy_config_opcode_t opcode, rm_ble_mesh_network_proxy_address_list_t *const p_addr_list) |
Add or Delete/Remove addresses to/from proxy filter list.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_route_info | Pointer to network configuration information. |
[in] | opcode | Operation to be performed. Either RM_BLE_MESH_NETWORK_PROXY_CONFIG_OPECODE_ADD_TO_FILTER or RM_BLE_MESH_NETWORK_PROXY_CONFIG_OPECODE_REM_FROM_FILTER |
[in] | p_addr_list | Pointer to list of address to be added/deleted. And count of addresses present in the provided List. |
fsp_err_t(* rm_ble_mesh_network_api_t::startProxyServerAdv) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_subnet_handle_t subnet_handle, rm_ble_mesh_network_gatt_proxy_adv_mode_t proxy_adv_mode) |
Start connectable advertisements for a proxy server.
[in] | p_ctrl | Pointer to control structure. |
[in] | subnet_handle | Subnet handle which the proxy server is part of network. |
[in] | proxy_adv_mode | Mode of proxy advertisements. This could be of two types RM_BLE_MESH_NETWORK_GATT_PROXY_ADV_MODE_NET_ID or RM_BLE_MESH_NETWORK_GATT_PROXY_ADV_MODE_NODE_ID |
fsp_err_t(* rm_ble_mesh_network_api_t::stopProxyServerAdv) (rm_ble_mesh_network_ctrl_t *const p_ctrl) |
Stop connectable advertisements for a proxy server.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* rm_ble_mesh_network_api_t::allocateSeqNumber) (rm_ble_mesh_network_ctrl_t *const p_ctrl, uint32_t *const p_seq_num) |
To allocate sequence number.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_seq_num | Location where sequence number to be filled. |
fsp_err_t(* rm_ble_mesh_network_api_t::getSeqNumberState) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_seq_number_state_t *const p_seq_num_state) |
To get current sequence number state.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_seq_num_state | Location where sequence number state to be filled. |
fsp_err_t(* rm_ble_mesh_network_api_t::setSeqNumberState) (rm_ble_mesh_network_ctrl_t *const p_ctrl, rm_ble_mesh_network_seq_number_state_t const *const p_seq_num_state) |
To set current sequence number state.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_seq_num_state | Location from where sequence number state to be taken. |
fsp_err_t(* rm_ble_mesh_network_api_t::resetNetCache) (rm_ble_mesh_network_ctrl_t *const p_ctrl) |
To reinitialize all Network Layer cache entries.
[in] | p_ctrl | Pointer to control structure. |
struct rm_ble_mesh_network_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
rm_ble_mesh_network_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
rm_ble_mesh_network_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
rm_ble_mesh_network_api_t const * | p_api | Pointer to the API structure for this instance. |
#define RM_BLE_MESH_NETWORK_UNASSIGNED_ADDRESS |
Unassigned Address.
#define RM_BLE_MESH_NETWORK_PRIMARY_SUBNET |
Primary Subnet - NetKey Index is 0x000
#define RM_BLE_MESH_NETWORK_INVALID_SUBNET_HANDLE |
Invalid Subnet Handle
#define RM_BLE_MESH_NETWORK_INVALID_APPKEY_HANDLE |
Invalid AppKey Handle
#define RM_BLE_MESH_NETWORK_INVALID_NID |
Invalid NID Identifier. The NID is a 7-bit value that identifies the security material that is used to secure Network PDUs. Treating 0xFF as Invalid NID value.
typedef uint16_t rm_ble_mesh_network_address_t |
Network Address Type
typedef uint16_t rm_ble_mesh_network_subnet_handle_t |
Subnet Handle
typedef uint16_t rm_ble_mesh_network_appkey_handle_t |
AppKey Handle
typedef uint16_t rm_ble_mesh_network_proxy_address_t |
Proxy Address
typedef uint8_t rm_ble_mesh_network_interface_handle_t |
Network Interface Handle
typedef void rm_ble_mesh_network_ctrl_t |
BLE MESH NETWORK control block. Allocate an instance specific control block to pass into the BLE MESH API calls.
GATT Proxy Configuration Opcodes
GATT Proxy States.
Proxy Callback | Proxy Iface | Error Code |
---|---|---|
NULL | Down | MS_PROXY_NULL |
NULL | Up | MS_PROXY_NULL |
!NULL | Down | MS_PROXY_READY |
!NULL | UP | MS_PROXY_CONNECTED |
GATT Proxy Events