NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
bt_mesh_prov Struct Reference

#include <main.h>

Public Attributes

const uint8_t * uuid
 
const char * uri
 
bt_mesh_prov_oob_info_t oob_info
 
const uint8_t * public_key_be
 
const uint8_t * private_key_be
 
const uint8_t * static_val
 
uint8_t static_val_len
 
uint8_t output_size
 
uint16_t output_actions
 
uint16_t input_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(* 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(* 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.

Member Data 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.

◆ 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 @option{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 @option{CONFIG_BT_MESH_PROV_OOB_PUBLIC_KEY} when initializing this parameter.

Must be used together with bt_mesh_prov::private_key_be.

◆ 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 reprovisioned. 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.

◆ 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