Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_mesh_prov Struct Reference

Provisioning properties & capabilities. More...

#include <main.h>

Data Fields

const uint8_tuuid
 The UUID that's used when advertising as unprovisioned.
 
const char * uri
 Optional URI.
 
bt_mesh_prov_oob_info_t oob_info
 Out of Band information field.
 
const uint8_tpublic_key_be
 Pointer to Public Key in big-endian for OOB public key type support.
 
const uint8_tprivate_key_be
 Pointer to Private Key in big-endian for OOB public key type support.
 
const uint8_tstatic_val
 Static OOB value.
 
uint8_t static_val_len
 Static OOB value length.
 
uint8_t output_size
 Maximum size of Output OOB supported.
 
uint16_t output_actions
 Supported Output OOB Actions.
 
uint8_t input_size
 Maximum size of Input OOB supported.
 
uint16_t input_actions
 Supported Input OOB Actions.
 
void(* capabilities )(const struct bt_mesh_dev_capabilities *cap)
 Provisioning Capabilities.
 
int(* output_number )(bt_mesh_output_action_t act, uint32_t num)
 Output of a number is requested.
 
int(* output_string )(const char *str)
 Output of a string is requested.
 
int(* input )(bt_mesh_input_action_t act, uint8_t size)
 Input is requested.
 
void(* input_complete )(void)
 The other device finished their OOB input.
 
void(* unprovisioned_beacon )(uint8_t uuid[16], bt_mesh_prov_oob_info_t oob_info, uint32_t *uri_hash)
 Unprovisioned beacon has been received.
 
void(* unprovisioned_beacon_gatt )(uint8_t uuid[16], bt_mesh_prov_oob_info_t oob_info)
 PB-GATT Unprovisioned Advertising has been received.
 
void(* link_open )(bt_mesh_prov_bearer_t bearer)
 Provisioning link has been opened.
 
void(* link_close )(bt_mesh_prov_bearer_t bearer)
 Provisioning link has been closed.
 
void(* complete )(uint16_t net_idx, uint16_t addr)
 Provisioning is complete.
 
void(* reprovisioned )(uint16_t addr)
 Local node has been reprovisioned.
 
void(* node_added )(uint16_t net_idx, uint8_t uuid[16], uint16_t addr, uint8_t num_elem)
 A new node has been added to the provisioning database.
 
void(* reset )(void)
 Node has been reset.
 

Detailed Description

Provisioning properties & capabilities.

Field Documentation

◆ capabilities

void(* bt_mesh_prov::capabilities) (const struct bt_mesh_dev_capabilities *cap)

Provisioning Capabilities.

This callback notifies the application that the provisioning capabilities of the unprovisioned device has been received.

The application can consequently call bt_mesh_auth_method_set_<*> to select suitable provisioning oob authentication method.

When this callback returns, the provisioner will start authentication with the chosen method.

Parameters
capcapabilities supported by device.

◆ complete

void(* bt_mesh_prov::complete) (uint16_t net_idx, uint16_t addr)

Provisioning is complete.

This callback notifies the application that provisioning has been successfully completed, and that the local node has been assigned the specified NetKeyIndex and primary element address.

Parameters
net_idxNetKeyIndex given during provisioning.
addrPrimary element address.

◆ input

int(* bt_mesh_prov::input) (bt_mesh_input_action_t act, uint8_t size)

Input is requested.

This callback notifies the application that it should request input from the user using the given action. The requested input will either be a string or a number, and the application needs to consequently call the bt_mesh_input_string() or bt_mesh_input_number() functions once the data has been acquired from the user.

Parameters
actAction for inputting data.
numMaximum size of the inputted data.
Returns
Zero on success or negative error code otherwise

◆ input_actions

uint16_t bt_mesh_prov::input_actions

Supported Input OOB Actions.

◆ input_complete

void(* bt_mesh_prov::input_complete) (void)

The other device finished their OOB input.

This callback notifies the application that it should stop displaying its output OOB value, as the other party finished their OOB input.

◆ input_size

uint8_t bt_mesh_prov::input_size

Maximum size of Input OOB supported.

◆ link_close

void(* bt_mesh_prov::link_close) (bt_mesh_prov_bearer_t bearer)

Provisioning link has been closed.

This callback notifies the application that a provisioning link has been closed on the given provisioning bearer.

Parameters
bearerProvisioning bearer.

◆ link_open

void(* bt_mesh_prov::link_open) (bt_mesh_prov_bearer_t bearer)

Provisioning link has been opened.

This callback notifies the application that a provisioning link has been opened on the given provisioning bearer.

Parameters
bearerProvisioning bearer.

◆ node_added

void(* bt_mesh_prov::node_added) (uint16_t net_idx, uint8_t uuid[16], uint16_t addr, uint8_t num_elem)

A new node has been added to the provisioning database.

This callback notifies the application that provisioning has been successfully completed, and that a node has been assigned the specified NetKeyIndex and primary element address.

Parameters
net_idxNetKeyIndex given during provisioning.
uuidUUID of the added node
addrPrimary element address.
num_elemNumber of elements that this node has.

◆ oob_info

bt_mesh_prov_oob_info_t bt_mesh_prov::oob_info

Out of Band information field.

◆ output_actions

uint16_t bt_mesh_prov::output_actions

Supported Output OOB Actions.

◆ output_number

int(* bt_mesh_prov::output_number) (bt_mesh_output_action_t act, uint32_t num)

Output of a number is requested.

This callback notifies the application that it should output the given number using the given action.

Parameters
actAction for outputting the number.
numNumber to be outputted.
Returns
Zero on success or negative error code otherwise

◆ output_size

uint8_t bt_mesh_prov::output_size

Maximum size of Output OOB supported.

◆ output_string

int(* bt_mesh_prov::output_string) (const char *str)

Output of a string is requested.

This callback notifies the application that it should display the given string to the user.

Parameters
strString to be displayed.
Returns
Zero on success or negative error code otherwise

◆ private_key_be

const uint8_t* bt_mesh_prov::private_key_be

Pointer to Private Key in big-endian for OOB public key type support.

Remember to enable

CONFIG_BT_MESH_PROV_OOB_PUBLIC_KEY 

when initializing this parameter.

Must be used together with bt_mesh_prov::public_key_be.

◆ public_key_be

const uint8_t* bt_mesh_prov::public_key_be

Pointer to Public Key in big-endian for OOB public key type support.

Remember to enable

CONFIG_BT_MESH_PROV_OOB_PUBLIC_KEY 

when initializing this parameter.

Must be used together with bt_mesh_prov::private_key_be.

◆ reprovisioned

void(* bt_mesh_prov::reprovisioned) (uint16_t addr)

Local node has been reprovisioned.

This callback notifies the application that reprovisioning has been successfully completed.

Parameters
addrNew primary element address.

◆ reset

void(* bt_mesh_prov::reset) (void)

Node has been reset.

This callback notifies the application that the local node has been reset and needs to be provisioned again. The node will not automatically advertise as unprovisioned, rather the bt_mesh_prov_enable() API needs to be called to enable unprovisioned advertising on one or more provisioning bearers.

◆ static_val

const uint8_t* bt_mesh_prov::static_val

Static OOB value.

◆ static_val_len

uint8_t bt_mesh_prov::static_val_len

Static OOB value length.

◆ unprovisioned_beacon

void(* bt_mesh_prov::unprovisioned_beacon) (uint8_t uuid[16], bt_mesh_prov_oob_info_t oob_info, uint32_t *uri_hash)

Unprovisioned beacon has been received.

This callback notifies the application that an unprovisioned beacon has been received.

Parameters
uuidUUID
oob_infoOOB Information
uri_hashPointer to URI Hash value. NULL if no hash was present in the beacon.

◆ unprovisioned_beacon_gatt

void(* bt_mesh_prov::unprovisioned_beacon_gatt) (uint8_t uuid[16], bt_mesh_prov_oob_info_t oob_info)

PB-GATT Unprovisioned Advertising has been received.

This callback notifies the application that an PB-GATT unprovisioned Advertising has been received.

Parameters
uuidUUID
oob_infoOOB Information

◆ uri

const char* bt_mesh_prov::uri

Optional URI.

This will be advertised separately from the unprovisioned beacon, however the unprovisioned beacon will contain a hash of it so the two can be associated by the provisioner.

◆ uuid

const uint8_t* bt_mesh_prov::uuid

The UUID that's used when advertising as unprovisioned.


The documentation for this struct was generated from the following file: