SAR Configuration Client

The SAR Configuration Client model is a foundation model defined by the Bluetooth Mesh specification. It is an optional model, enabled with the CONFIG_BT_MESH_SAR_CFG_CLI configuration option.

The SAR Configuration Client model is introduced in the Bluetooth Mesh Protocol Specification version 1.1, and it supports the configuration of the lower transport layer behavior of a node that supports the SAR Configuration Server model.

The model can send messages to query or change the states supported by the SAR Configuration Server (SAR Transmitter and SAR Receiver) using SAR Configuration messages.

The SAR Transmitter procedure is used to determine and configure the SAR Transmitter state of a SAR Configuration Server. Function calls bt_mesh_sar_cfg_cli_transmitter_get() and bt_mesh_sar_cfg_cli_transmitter_set() are used to get and set the SAR Transmitter state of the Target node respectively.

The SAR Receiver procedure is used to determine and configure the SAR Receiver state of a SAR Configuration Server. Function calls bt_mesh_sar_cfg_cli_receiver_get() and bt_mesh_sar_cfg_cli_receiver_set() are used to get and set the SAR Receiver state of the Target node respectively.

For more information about the two states, see SAR states.

An element can send any SAR Configuration Client message at any time to query or change the states supported by the SAR Configuration Server model of a peer node. The SAR Configuration Client model only accepts messages encrypted with the device key of the node supporting the SAR Configuration Server model.

If present, the SAR Configuration Client model must only be instantiated on the primary element.

API reference

group bt_mesh_sar_cfg_cli

Bluetooth Mesh.

Defines

BT_MESH_MODEL_SAR_CFG_CLI(_cli)

SAR Configuration Client model composition data entry.

Parameters:

Functions

int bt_mesh_sar_cfg_cli_transmitter_get(uint16_t net_idx, uint16_t addr, struct bt_mesh_sar_tx *rsp)

Get the SAR Transmitter state of the target node.

Parameters:
  • net_idx – Network index to encrypt with.

  • addr – Target node address.

  • rsp – Status response parameter.

Returns:

0 on success, or (negative) error code on failure.

int bt_mesh_sar_cfg_cli_transmitter_set(uint16_t net_idx, uint16_t addr, const struct bt_mesh_sar_tx *set, struct bt_mesh_sar_tx *rsp)

Set the SAR Transmitter state of the target node.

Parameters:
  • net_idx – Network index to encrypt with.

  • addr – Target node address.

  • set – New SAR Transmitter state to set on the target node.

  • rsp – Status response parameter.

Returns:

0 on success, or (negative) error code on failure.

int bt_mesh_sar_cfg_cli_receiver_get(uint16_t net_idx, uint16_t addr, struct bt_mesh_sar_rx *rsp)

Get the SAR Receiver state of the target node.

Parameters:
  • net_idx – Network index to encrypt with.

  • addr – Target node address.

  • rsp – Status response parameter.

Returns:

0 on success, or (negative) error code on failure.

int bt_mesh_sar_cfg_cli_receiver_set(uint16_t net_idx, uint16_t addr, const struct bt_mesh_sar_rx *set, struct bt_mesh_sar_rx *rsp)

Set the SAR Receiver state of the target node.

Parameters:
  • net_idx – Network index to encrypt with.

  • addr – Target node address.

  • set – New SAR Receiver state to set on the target node.

  • rsp – Status response parameter.

Returns:

0 on success, or (negative) error code on failure.

int32_t bt_mesh_sar_cfg_cli_timeout_get(void)

Get the current transmission timeout value.

Returns:

The configured transmission timeout in milliseconds.

void bt_mesh_sar_cfg_cli_timeout_set(int32_t timeout)

Set the transmission timeout value.

Parameters:
  • timeout – The new transmission timeout.

struct bt_mesh_sar_cfg_cli
#include <sar_cfg_cli.h>

Mesh SAR Configuration Client Model Context.

Public Members

const struct bt_mesh_model *model

Access model pointer.