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
srv_data
: Pointer to a Bluetooth Mesh Configuration Server Model instance.
-
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.
-
u8_t
net_transmit
¶ Network Transmit state
-
u8_t
relay
¶ Relay Mode state
-
u8_t
relay_retransmit
¶ Relay Retransmit state
-
u8_t
beacon
¶ Secure Network Beacon state
-
u8_t
gatt_proxy
¶ GATT Proxy state
-
u8_t
frnd
¶ Friend state
-
u8_t
default_ttl
¶ Default TTL
-
struct
bt_mesh_hb_pub
¶ - #include <cfg_srv.h>
Heartbeat Publication parameters
Public Members
-
u16_t
dst
¶ Destination address.
-
u16_t
count
¶ Remaining publish count.
-
u8_t
period
¶ Logarithmic publish interval in seconds.
-
u8_t
ttl
¶ Time To Live value.
-
u16_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.
-
u16_t
net_idx
¶ Network index used for publishing.
-
u16_t
-
struct
bt_mesh_hb_sub
¶ - #include <cfg_srv.h>
Heartbeat Subscription parameters.
Public Members
-
s64_t
expiry
¶ Subscription period exipration timestamp.
-
u16_t
src
¶ Source address to receive Heartbeats from.
-
u16_t
dst
¶ Destination address to received Heartbeats on.
-
u16_t
count
¶ The number of received Heartbeat messages so far.
-
u8_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.
-
u8_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
)(u8_t hops, u16_t feat)¶ Optional Heartbeat subscription tracking callback.
Gets called on every received Heartbeat.
- Parameters
hops
: The number of hops the Heartbeat was received with.feat
: The feature set of the publishing node. The value is a bitmap of BT_MESH_FEAT_RELAY, BT_MESH_FEAT_PROXY, BT_MESH_FEAT_FRIEND and BT_MESH_FEAT_LOW_POWER.
-
s64_t
-
struct bt_mesh_model *
-