Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Provisioning. More...
Data Structures | |
struct | bt_mesh_dev_capabilities |
struct | bt_mesh_prov |
Enumerations | |
enum | bt_mesh_output_action_t { BT_MESH_NO_OUTPUT = 0 , BT_MESH_BLINK = BIT(0) , BT_MESH_BEEP = BIT(1) , BT_MESH_VIBRATE = BIT(2) , BT_MESH_DISPLAY_NUMBER = BIT(3) , BT_MESH_DISPLAY_STRING = BIT(4) } |
enum | bt_mesh_input_action_t { BT_MESH_NO_INPUT = 0 , BT_MESH_PUSH = BIT(0) , BT_MESH_TWIST = BIT(1) , BT_MESH_ENTER_NUMBER = BIT(2) , BT_MESH_ENTER_STRING = BIT(3) } |
enum | bt_mesh_prov_bearer_t { BT_MESH_PROV_ADV = BIT(0) , BT_MESH_PROV_GATT = BIT(1) } |
enum | bt_mesh_prov_oob_info_t { BT_MESH_PROV_OOB_OTHER = BIT(0) , BT_MESH_PROV_OOB_URI = BIT(1) , BT_MESH_PROV_OOB_2D_CODE = BIT(2) , BT_MESH_PROV_OOB_BAR_CODE = BIT(3) , BT_MESH_PROV_OOB_NFC = BIT(4) , BT_MESH_PROV_OOB_NUMBER = BIT(5) , BT_MESH_PROV_OOB_STRING = BIT(6) , BT_MESH_PROV_OOB_ON_BOX = BIT(11) , BT_MESH_PROV_OOB_IN_BOX = BIT(12) , BT_MESH_PROV_OOB_ON_PAPER = BIT(13) , BT_MESH_PROV_OOB_IN_MANUAL = BIT(14) , BT_MESH_PROV_OOB_ON_DEV = BIT(15) } |
Functions | |
int | bt_mesh_input_string (const char *str) |
Provide provisioning input OOB string. More... | |
int | bt_mesh_input_number (uint32_t num) |
Provide provisioning input OOB number. More... | |
int | bt_mesh_prov_remote_pub_key_set (const uint8_t public_key[64]) |
Provide Device public key. More... | |
int | bt_mesh_auth_method_set_input (bt_mesh_input_action_t action, uint8_t size) |
Use Input OOB authentication. More... | |
int | bt_mesh_auth_method_set_output (bt_mesh_output_action_t action, uint8_t size) |
Use Output OOB authentication. More... | |
int | bt_mesh_auth_method_set_static (const uint8_t *static_val, uint8_t size) |
Use static OOB authentication. More... | |
int | bt_mesh_auth_method_set_none (void) |
Don't use OOB authentication. More... | |
int | bt_mesh_prov_enable (bt_mesh_prov_bearer_t bearers) |
Enable specific provisioning bearers. More... | |
int | bt_mesh_prov_disable (bt_mesh_prov_bearer_t bearers) |
Disable specific provisioning bearers. More... | |
int | bt_mesh_provision (const uint8_t net_key[16], uint16_t net_idx, uint8_t flags, uint32_t iv_index, uint16_t addr, const uint8_t dev_key[16]) |
Provision the local Mesh Node. More... | |
int | bt_mesh_provision_adv (const uint8_t uuid[16], uint16_t net_idx, uint16_t addr, uint8_t attention_duration) |
Provision a Mesh Node using PB-ADV. More... | |
bool | bt_mesh_is_provisioned (void) |
Check if the local node has been provisioned. More... | |
Provisioning.
#include <include/bluetooth/mesh/main.h>
Available Provisioning input authentication actions.
Enumerator | |
---|---|
BT_MESH_NO_INPUT | |
BT_MESH_PUSH | |
BT_MESH_TWIST | |
BT_MESH_ENTER_NUMBER | |
BT_MESH_ENTER_STRING |
#include <include/bluetooth/mesh/main.h>
Available Provisioning output authentication actions.
Enumerator | |
---|---|
BT_MESH_NO_OUTPUT | |
BT_MESH_BLINK | |
BT_MESH_BEEP | |
BT_MESH_VIBRATE | |
BT_MESH_DISPLAY_NUMBER | |
BT_MESH_DISPLAY_STRING |
#include <include/bluetooth/mesh/main.h>
Available Provisioning bearers.
Enumerator | |
---|---|
BT_MESH_PROV_ADV | |
BT_MESH_PROV_GATT |
#include <include/bluetooth/mesh/main.h>
Out of Band information location.
int bt_mesh_auth_method_set_input | ( | bt_mesh_input_action_t | action, |
uint8_t | size | ||
) |
#include <include/bluetooth/mesh/main.h>
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.
action | Authentication action used by the unprovisioned device. |
size | Authentication size. |
int bt_mesh_auth_method_set_none | ( | void | ) |
#include <include/bluetooth/mesh/main.h>
Don't use OOB authentication.
Provisioner only.
Don't use any authentication when provisioning new devices. This is the default behavior.
int bt_mesh_auth_method_set_output | ( | bt_mesh_output_action_t | action, |
uint8_t | size | ||
) |
#include <include/bluetooth/mesh/main.h>
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.
action | Authentication action used by the unprovisioned device. |
size | Authentication size. |
#include <include/bluetooth/mesh/main.h>
Use static OOB authentication.
Provisioner only.
Instruct the unprovisioned device to use static OOB authentication, and use the given static authentication value when provisioning.
static_val | Static OOB value. |
size | Static OOB value size. |
int bt_mesh_input_number | ( | uint32_t | num | ) |
#include <include/bluetooth/mesh/main.h>
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.
num | Number. |
int bt_mesh_input_string | ( | const char * | str | ) |
#include <include/bluetooth/mesh/main.h>
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.
str | String. |
#include <include/bluetooth/mesh/main.h>
Check if the local node has been provisioned.
This API can be used to check if the local node has been provisioned or not. It can e.g. be helpful to determine if there was a stored network in flash, i.e. if the network was restored after calling settings_load().
int bt_mesh_prov_disable | ( | bt_mesh_prov_bearer_t | bearers | ) |
#include <include/bluetooth/mesh/main.h>
Disable specific provisioning bearers.
Disable one or more provisioning bearers.
bearers | Bit-wise or of provisioning bearers. |
int bt_mesh_prov_enable | ( | bt_mesh_prov_bearer_t | bearers | ) |
#include <include/bluetooth/mesh/main.h>
Enable specific provisioning bearers.
Enable one or more provisioning bearers.
bearers | Bit-wise or of provisioning bearers. |
int bt_mesh_prov_remote_pub_key_set | ( | const uint8_t | public_key[64] | ) |
#include <include/bluetooth/mesh/main.h>
Provide Device public key.
public_key | Device public key in big-endian. |
int bt_mesh_provision | ( | const uint8_t | net_key[16], |
uint16_t | net_idx, | ||
uint8_t | flags, | ||
uint32_t | iv_index, | ||
uint16_t | addr, | ||
const uint8_t | dev_key[16] | ||
) |
#include <include/bluetooth/mesh/main.h>
Provision the local Mesh Node.
This API should normally not be used directly by the application. The only exception is for testing purposes where manual provisioning is desired without an actual external provisioner.
net_key | Network Key |
net_idx | Network Key Index |
flags | Provisioning Flags |
iv_index | IV Index |
addr | Primary element address |
dev_key | Device Key |
int bt_mesh_provision_adv | ( | const uint8_t | uuid[16], |
uint16_t | net_idx, | ||
uint16_t | addr, | ||
uint8_t | attention_duration | ||
) |
#include <include/bluetooth/mesh/main.h>
Provision a Mesh Node using PB-ADV.
uuid | UUID |
net_idx | Network Key Index |
addr | Address to assign to remote device. If addr is 0, the lowest available address will be chosen. |
attention_duration | The attention duration to be send to remote device |