On-Demand Private Proxy Client
The On-Demand Private Proxy Client model is a foundation model defined by the Bluetooth Mesh
specification. The model is optional, and is enabled with the
CONFIG_BT_MESH_OD_PRIV_PROXY_CLI option.
The On-Demand Private Proxy Client model was introduced in the Bluetooth Mesh Protocol Specification version 1.1, and is used to set and retrieve the On-Demand Private GATT Proxy state. The state defines how long a node will advertise Mesh Proxy Service with Private Network Identity type after it receives a Solicitation PDU.
The On-Demand Private Proxy Client model communicates with an On-Demand Private Proxy Server model using the device key of the node containing the target On-Demand Private Proxy Server model instance.
If present, the On-Demand Private Proxy Client model must only be instantiated on the primary element.
Configurations
The On-Demand Private Proxy Client model behavior can be configured with the transmission timeout
option CONFIG_BT_MESH_OD_PRIV_PROXY_CLI_TIMEOUT.  The
CONFIG_BT_MESH_OD_PRIV_PROXY_CLI_TIMEOUT controls how long the Client waits for a
state response message to arrive in milliseconds. This value can be changed at runtime using
bt_mesh_od_priv_proxy_cli_timeout_set().
API reference
- group bt_mesh_od_priv_proxy_cli
- Defines - 
BT_MESH_MODEL_OD_PRIV_PROXY_CLI(cli_data)
- On-Demand Private Proxy Client model composition data entry. 
 - Functions - 
int bt_mesh_od_priv_proxy_cli_get(uint16_t net_idx, uint16_t addr, uint8_t *val_rsp)
- Get the target’s On-Demand Private GATT Proxy state. - This method can be used asynchronously by setting - val_rspas NULL. This way the method will not wait for response and will return immediately after sending the command.- To process the response arguments of an async method, register the - od_statuscallback in- bt_mesh_od_priv_proxy_clistruct.- Parameters:
- net_idx – Network index to encrypt with. 
- addr – Target node address. 
- val_rsp – Response buffer for On-Demand Private GATT Proxy value. 
 
- Returns:
- 0 on success, or (negative) error code otherwise. 
 
 - 
int bt_mesh_od_priv_proxy_cli_set(uint16_t net_idx, uint16_t addr, uint8_t val, uint8_t *val_rsp)
- Set the target’s On-Demand Private GATT Proxy state. - This method can be used asynchronously by setting - val_rspas NULL. This way the method will not wait for response and will return immediately after sending the command.- To process the response arguments of an async method, register the - od_statuscallback in- bt_mesh_od_priv_proxy_clistruct.- Parameters:
- net_idx – Network index to encrypt with. 
- addr – Target node address. 
- val – On-Demand Private GATT Proxy state to be set 
- val_rsp – Response buffer for On-Demand Private GATT Proxy value. 
 
- Returns:
- 0 on success, or (negative) error code otherwise. 
 
 - 
void bt_mesh_od_priv_proxy_cli_timeout_set(int32_t timeout)
- Set the transmission timeout value. - Parameters:
- timeout – The new transmission timeout in milliseconds. 
 
 
 - 
struct bt_mesh_od_priv_proxy_cli
- #include <od_priv_proxy_cli.h>On-Demand Private Proxy Client Model Context. Public Members - 
const struct bt_mesh_model *model
- Solicitation PDU RPL model entry pointer. 
 - 
void (*od_status)(struct bt_mesh_od_priv_proxy_cli *cli, uint16_t addr, uint8_t state)
- Optional callback for On-Demand Private Proxy Status messages. - Handles received On-Demand Private Proxy Status messages from a On-Demand Private Proxy server.The - stateparam represents state of On-Demand Private Proxy server.- Param cli:
- On-Demand Private Proxy client that received the status message. 
- Param addr:
- Address of the sender. 
- Param state:
- State value. 
 
 
- 
const struct bt_mesh_model *model
 
- 
BT_MESH_MODEL_OD_PRIV_PROXY_CLI(cli_data)