NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
Bluetooth Mesh Provisioning

Bluetooth Mesh Provisioning. More...

Classes

struct  bt_mesh_dev_capabilities
 
struct  bt_mesh_prov
 

Functions

int bt_mesh_input_string (const char *str)
 Provide provisioning input OOB string.
 
int bt_mesh_input_number (uint32_t num)
 Provide provisioning input OOB number.
 
int bt_mesh_prov_remote_pub_key_set (const uint8_t public_key[BT_PUB_KEY_LEN])
 Provide Device public key.
 
int bt_mesh_auth_method_set_input (bt_mesh_input_action_t action, uint8_t size)
 Use Input OOB authentication.
 
int bt_mesh_auth_method_set_output (bt_mesh_output_action_t action, uint8_t size)
 Use Output OOB authentication.
 
int bt_mesh_auth_method_set_static (const uint8_t *static_val, uint8_t size)
 Use static OOB authentication.
 
int bt_mesh_auth_method_set_none (void)
 Don't use OOB authentication.
 
int bt_mesh_prov_enable (bt_mesh_prov_bearer_t bearers)
 Enable specific provisioning bearers.
 
int bt_mesh_prov_disable (bt_mesh_prov_bearer_t bearers)
 Disable specific provisioning bearers.
 

Detailed Description

Bluetooth Mesh Provisioning.

Function Documentation

◆ bt_mesh_auth_method_set_input()

int bt_mesh_auth_method_set_input ( bt_mesh_input_action_t  action,
uint8_t  size 
)

Use Input OOB authentication.

Provisioner only.

Instruct the unprovisioned device to use the specified Input OOB authentication action. When using BT_MESH_PUSH, BT_MESH_TWIST or BT_MESH_ENTER_NUMBER, the bt_mesh_prov::output_number callback is called with a random number that has to be entered on the unprovisioned device.

When using BT_MESH_ENTER_STRING, the bt_mesh_prov::output_string callback is called with a random string that has to be entered on the unprovisioned device.

Parameters
actionAuthentication action used by the unprovisioned device.
sizeAuthentication size.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_auth_method_set_none()

int bt_mesh_auth_method_set_none ( void  )

Don't use OOB authentication.

Provisioner only.

Don't use any authentication when provisioning new devices. This is the default behavior.

Warning
Not using any authentication exposes the mesh network to impersonation attacks, where attackers can pretend to be the unprovisioned device to gain access to the network. Authentication is strongly encouraged.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_auth_method_set_output()

int bt_mesh_auth_method_set_output ( bt_mesh_output_action_t  action,
uint8_t  size 
)

Use Output OOB authentication.

Provisioner only.

Instruct the unprovisioned device to use the specified Output OOB authentication action. The bt_mesh_prov::input callback will be called.

When using BT_MESH_BLINK, BT_MESH_BEEP, BT_MESH_VIBRATE or BT_MESH_DISPLAY_NUMBER, and the application has to call bt_mesh_input_number with the random number indicated by the unprovisioned device.

When using BT_MESH_DISPLAY_STRING, the application has to call bt_mesh_input_string with the random string displayed by the unprovisioned device.

Parameters
actionAuthentication action used by the unprovisioned device.
sizeAuthentication size.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_auth_method_set_static()

int bt_mesh_auth_method_set_static ( const uint8_t *  static_val,
uint8_t  size 
)

Use static OOB authentication.

Provisioner only.

Instruct the unprovisioned device to use static OOB authentication, and use the given static authentication value when provisioning.

Parameters
static_valStatic OOB value.
sizeStatic OOB value size.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_input_number()

int bt_mesh_input_number ( uint32_t  num)

Provide provisioning input OOB number.

This is intended to be called after the bt_mesh_prov input callback has been called with BT_MESH_ENTER_NUMBER as the action.

Parameters
numNumber.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_input_string()

int bt_mesh_input_string ( const char *  str)

Provide provisioning input OOB string.

This is intended to be called after the bt_mesh_prov input callback has been called with BT_MESH_ENTER_STRING as the action.

Parameters
strString.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_prov_disable()

int bt_mesh_prov_disable ( bt_mesh_prov_bearer_t  bearers)

Disable specific provisioning bearers.

Disable one or more provisioning bearers.

Parameters
bearersBit-wise or of provisioning bearers.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_prov_enable()

int bt_mesh_prov_enable ( bt_mesh_prov_bearer_t  bearers)

Enable specific provisioning bearers.

Enable one or more provisioning bearers.

Parameters
bearersBit-wise or of provisioning bearers.
Returns
Zero on success or (negative) error code otherwise.

◆ bt_mesh_prov_remote_pub_key_set()

int bt_mesh_prov_remote_pub_key_set ( const uint8_t  public_key[BT_PUB_KEY_LEN])

Provide Device public key.

Parameters
public_keyDevice public key in big-endian.
Returns
Zero on success or (negative) error code otherwise.