Configuration Server

Configuration Server model is a foundation model defined by the Bluetooth Mesh specification. The Configuration Server model controls most parameters of the mesh node. It does not have an API of its own, but relies on a Configuration Client to control it.

The application can configure the initial parameters of the Configuration Server model through the bt_mesh_cfg_srv instance passed to BT_MESH_MODEL_CFG_SRV. Note that if the mesh node stored changes to this configuration in the settings subsystem, the initial values may be overwritten upon loading.

The Configuration Server model is mandatory on all Bluetooth Mesh nodes, and should be instantiated in the first element.

API reference

group bt_mesh_cfg_srv

Bluetooth Mesh.

Defines

BT_MESH_MODEL_CFG_SRV(srv_data)

Generic Configuration Server model composition data entry.

Parameters

struct bt_mesh_cfg_srv
#include <cfg_srv.h>

Mesh Configuration Server Model Context

Public Members

struct bt_mesh_model *model

Composition data model entry pointer.

uint8_t net_transmit

Network Transmit state

uint8_t relay

Relay Mode state

uint8_t relay_retransmit

Relay Retransmit state

uint8_t beacon

Secure Network Beacon state

uint8_t gatt_proxy

GATT Proxy state

uint8_t frnd

Friend state

uint8_t default_ttl

Default TTL

struct bt_mesh_hb_pub
#include <cfg_srv.h>

Heartbeat Publication parameters

Public Members

uint16_t dst

Destination address.

uint16_t count

Remaining publish count.

uint8_t period

Logarithmic publish interval in seconds.

uint8_t ttl

Time To Live value.

uint16_t feat

Bitmap of features that trigger a Heartbeat publication if they change. Legal values are BT_MESH_FEAT_RELAY, BT_MESH_FEAT_PROXY, BT_MESH_FEAT_FRIEND and BT_MESH_FEAT_LOW_POWER.

uint16_t net_idx

Network index used for publishing.

struct bt_mesh_hb_sub
#include <cfg_srv.h>

Heartbeat Subscription parameters.

Public Members

int64_t expiry

Subscription period exipration timestamp.

uint16_t src

Source address to receive Heartbeats from.

uint16_t dst

Destination address to received Heartbeats on.

uint16_t count

The number of received Heartbeat messages so far.

uint8_t min_hops

Minimum hops in received messages, ie the shortest registered path from the publishing node to the subscribing node. A Heartbeat received from an immediate neighbor has hop count = 1.

uint8_t max_hops

Maximum hops in received messages, ie the longest registered path from the publishing node to the subscribing node. A Heartbeat received from an immediate neighbor has hop count = 1.

void (*func)(uint8_t hops, uint16_t feat)

Optional Heartbeat subscription tracking callback.

Gets called on every received Heartbeat.

Parameters