Zephyr API Documentation 4.0.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Remote Provisioning Client model

Data Structures

struct  bt_mesh_rpr_scan_status
 Scan status response. More...
 
struct  bt_mesh_rpr_caps
 Remote Provisioning Server scanning capabilities. More...
 
struct  bt_mesh_rpr_cli
 Remote Provisioning Client model instance. More...
 

Macros

#define BT_MESH_RPR_SCAN_MAX_DEVS_ANY   0
 Special value for the max_devs parameter of bt_mesh_rpr_scan_start.
 
#define BT_MESH_MODEL_RPR_CLI(_cli)
 Remote Provisioning Client model composition data entry.
 

Functions

int bt_mesh_rpr_scan_caps_get (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_caps *caps)
 Get scanning capabilities of Remote Provisioning Server.
 
int bt_mesh_rpr_scan_get (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_scan_status *status)
 Get current scanning state of Remote Provisioning Server.
 
int bt_mesh_rpr_scan_start (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, const uint8_t uuid[16], uint8_t timeout, uint8_t max_devs, struct bt_mesh_rpr_scan_status *status)
 Start scanning for unprovisioned devices.
 
int bt_mesh_rpr_scan_start_ext (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, const uint8_t uuid[16], uint8_t timeout, const uint8_t *ad_types, size_t ad_count)
 Start extended scanning for unprovisioned devices.
 
int bt_mesh_rpr_scan_stop (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_scan_status *status)
 Stop any ongoing scanning on the Remote Provisioning Server.
 
int bt_mesh_rpr_link_get (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_link *rsp)
 Get the current link status of the Remote Provisioning Server.
 
int bt_mesh_rpr_link_close (struct bt_mesh_rpr_cli *cli, const struct bt_mesh_rpr_node *srv, struct bt_mesh_rpr_link *rsp)
 Close any open link on the Remote Provisioning Server.
 
int32_t bt_mesh_rpr_cli_timeout_get (void)
 Get the current transmission timeout value.
 
void bt_mesh_rpr_cli_timeout_set (int32_t timeout)
 Set the transmission timeout value.
 

Detailed Description

Macro Definition Documentation

◆ BT_MESH_MODEL_RPR_CLI

#define BT_MESH_MODEL_RPR_CLI ( _cli)

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Value:
_bt_mesh_rpr_cli_op, NULL, _cli, &_bt_mesh_rpr_cli_cb)
#define BT_MESH_MODEL_CB(_id, _op, _pub, _user_data, _cb)
Composition data SIG model entry with callback functions.
Definition access.h:495
#define BT_MESH_MODEL_ID_REMOTE_PROV_CLI
Remote Provisioning Client.
Definition access.h:189

Remote Provisioning Client model composition data entry.

Parameters
_cliPointer to a Remote Provisioning Client model instance.

◆ BT_MESH_RPR_SCAN_MAX_DEVS_ANY

#define BT_MESH_RPR_SCAN_MAX_DEVS_ANY   0

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Special value for the max_devs parameter of bt_mesh_rpr_scan_start.

Tells the Remote Provisioning Server not to put restrictions on the max number of devices reported to the Client.

Function Documentation

◆ bt_mesh_rpr_cli_timeout_get()

int32_t bt_mesh_rpr_cli_timeout_get ( void )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Get the current transmission timeout value.

Returns
The configured transmission timeout in milliseconds.

◆ bt_mesh_rpr_cli_timeout_set()

void bt_mesh_rpr_cli_timeout_set ( int32_t timeout)

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Set the transmission timeout value.

The transmission timeout controls the amount of time the Remote Provisioning Client models will wait for a response from the Server.

Parameters
timeoutThe new transmission timeout.

◆ bt_mesh_rpr_link_close()

int bt_mesh_rpr_link_close ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
struct bt_mesh_rpr_link * rsp )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Close any open link on the Remote Provisioning Server.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
rspLink status response buffer.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_rpr_link_get()

int bt_mesh_rpr_link_get ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
struct bt_mesh_rpr_link * rsp )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Get the current link status of the Remote Provisioning Server.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
rspLink status response buffer.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_rpr_scan_caps_get()

int bt_mesh_rpr_scan_caps_get ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
struct bt_mesh_rpr_caps * caps )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Get scanning capabilities of Remote Provisioning Server.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
capsCapabilities response buffer.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_rpr_scan_get()

int bt_mesh_rpr_scan_get ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
struct bt_mesh_rpr_scan_status * status )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Get current scanning state of Remote Provisioning Server.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
statusScan status response buffer.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_rpr_scan_start()

int bt_mesh_rpr_scan_start ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
const uint8_t uuid[16],
uint8_t timeout,
uint8_t max_devs,
struct bt_mesh_rpr_scan_status * status )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Start scanning for unprovisioned devices.

Tells the Remote Provisioning Server to start scanning for unprovisioned devices. The Server will report back the results through the bt_mesh_rpr_cli::scan_report callback.

Use the uuid parameter to scan for a specific device, or leave it as NULL to report all unprovisioned devices.

The Server will ignore duplicates, and report up to max_devs number of devices. Requesting a max_devs number that's higher than the Server's capability will result in an error.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
uuidDevice UUID to scan for, or NULL to report all devices.
timeoutScan timeout in seconds. Must be at least 1 second.
max_devsMax number of devices to report, or 0 to report as many as possible.
statusScan status response buffer.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_rpr_scan_start_ext()

int bt_mesh_rpr_scan_start_ext ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
const uint8_t uuid[16],
uint8_t timeout,
const uint8_t * ad_types,
size_t ad_count )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Start extended scanning for unprovisioned devices.

Extended scanning supplements regular unprovisioned scanning, by allowing the Server to report additional data for a specific device. The Remote Provisioning Server will use active scanning to request a scan response from the unprovisioned device, if supported. If no UUID is provided, the Server will report a scan on its own OOB information and advertising data.

Use the ad_types array to specify which AD types to include in the scan report. Some AD types invoke special behavior:

  • BT_DATA_NAME_COMPLETE Will report both the complete and the shortened name.
  • BT_DATA_URI If the unprovisioned beacon contains a URI hash, the Server will extend the scanning to include packets other than the scan response, to look for URIs matching the URI hash. Only matching URIs will be reported.

The following AD types should not be used:

Additionally, each AD type should only occur once.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
uuidDevice UUID to start extended scanning for, or NULL to scan the remote server.
timeoutScan timeout in seconds. Valid values from BT_MESH_RPR_EXT_SCAN_TIME_MIN to BT_MESH_RPR_EXT_SCAN_TIME_MAX. Ignored if UUID is NULL.
ad_typesList of AD types to include in the scan report. Must contain 1 to CONFIG_BT_MESH_RPR_AD_TYPES_MAX entries.
ad_countNumber of AD types in ad_types.
Returns
0 on success, or (negative) error code otherwise.

◆ bt_mesh_rpr_scan_stop()

int bt_mesh_rpr_scan_stop ( struct bt_mesh_rpr_cli * cli,
const struct bt_mesh_rpr_node * srv,
struct bt_mesh_rpr_scan_status * status )

#include <zephyr/bluetooth/mesh/rpr_cli.h>

Stop any ongoing scanning on the Remote Provisioning Server.

Parameters
cliRemote Provisioning Client.
srvRemote Provisioning Server.
statusScan status response buffer.
Returns
0 on success, or (negative) error code otherwise.