Bluetooth Mesh Profile¶
API Reference¶
Mesh Profile¶
-
group
bt_mesh
Bluetooth Mesh.
Defines
-
BT_MESH_NET_PRIMARY
¶
-
BT_MESH_RELAY_DISABLED
¶
-
BT_MESH_RELAY_ENABLED
¶
-
BT_MESH_RELAY_NOT_SUPPORTED
¶
-
BT_MESH_BEACON_DISABLED
¶
-
BT_MESH_BEACON_ENABLED
¶
-
BT_MESH_GATT_PROXY_DISABLED
¶
-
BT_MESH_GATT_PROXY_ENABLED
¶
-
BT_MESH_GATT_PROXY_NOT_SUPPORTED
¶
-
BT_MESH_FRIEND_DISABLED
¶
-
BT_MESH_FRIEND_ENABLED
¶
-
BT_MESH_FRIEND_NOT_SUPPORTED
¶
-
BT_MESH_NODE_IDENTITY_STOPPED
¶
-
BT_MESH_NODE_IDENTITY_RUNNING
¶
-
BT_MESH_NODE_IDENTITY_NOT_SUPPORTED
¶
-
BT_MESH_FEAT_RELAY
¶
-
BT_MESH_FEAT_PROXY
¶
-
BT_MESH_FEAT_FRIEND
¶
-
BT_MESH_FEAT_LOW_POWER
¶
-
BT_MESH_FEAT_SUPPORTED
¶
Functions
-
int
bt_mesh_init
(const struct bt_mesh_prov *prov, const struct bt_mesh_comp *comp)¶ Initialize Mesh support.
After calling this API, the node will not automatically advertise as unprovisioned, rather the bt_mesh_prov_enable() API needs to be called to enable unprovisioned advertising on one or more provisioning bearers.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
prov
: Node provisioning information.comp
: Node Composition.
-
void
bt_mesh_reset
(void)¶ Reset the state of the local Mesh node.
Resets the state of the node, which means that it needs to be reprovisioned to become an active node in a Mesh network again.
After calling this API, the node will not automatically advertise as unprovisioned, rather the bt_mesh_prov_enable() API needs to be called to enable unprovisioned advertising on one or more provisioning bearers.
-
int
bt_mesh_suspend
(void)¶ Suspend the Mesh network temporarily.
This API can be used for power saving purposes, but the user should be aware that leaving the local node suspended for a long period of time may cause it to become permanently disconnected from the Mesh network. If at all possible, the Friendship feature should be used instead, to make the node into a Low Power Node.
- Return
- 0 on success, or (negative) error code on failure.
-
int
bt_mesh_resume
(void)¶ Resume a suspended Mesh network.
This API resumes the local node, after it has been suspended using the bt_mesh_suspend() API.
- Return
- 0 on success, or (negative) error code on failure.
-
int
bt_mesh_provision
(const u8_t net_key[16], u16_t net_idx, u8_t flags, u32_t iv_index, u16_t addr, const u8_t dev_key[16])¶ Provision the local Mesh Node.
This API should normally not be used directly by the application. The only exception is for testing purposes where manual provisioning is desired without an actual external provisioner.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
net_key
: Network Keynet_idx
: Network Key Indexflags
: Provisioning Flagsiv_index
: IV Indexaddr
: Primary element addressdev_key
: Device Key
-
bool
bt_mesh_is_provisioned
(void)¶ Check if the local node has been provisioned.
This API can be used to check if the local node has been provisioned or not. It can e.g. be helpful to determine if there was a stored network in flash, i.e. if the network was restored after calling settings_load().
- Return
- True if the node is provisioned. False otherwise.
-
void
bt_mesh_iv_update_test
(bool enable)¶ Toggle the IV Update test mode.
This API is only available if the IV Update test mode has been enabled in Kconfig. It is needed for passing most of the IV Update qualification test cases.
- Parameters
enable
: true to enable IV Update test mode, false to disable it.
-
bool
bt_mesh_iv_update
(void)¶ Toggle the IV Update state.
This API is only available if the IV Update test mode has been enabled in Kconfig. It is needed for passing most of the IV Update qualification test cases.
- Return
- true if IV Update In Progress state was entered, false otherwise.
-
int
bt_mesh_lpn_set
(bool enable)¶ Toggle the Low Power feature of the local device.
Enables or disables the Low Power feature of the local device. This is exposed as a run-time feature, since the device might want to change this e.g. based on being plugged into a stable power source or running from a battery power source.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
enable
: true to enable LPN functionality, false to disable it.
-
int
bt_mesh_lpn_poll
(void)¶ Send out a Friend Poll message.
Send a Friend Poll message to the Friend of this node. If there is no established Friendship the function will return an error.
- Return
- Zero on success or (negative) error code otherwise.
-
void
bt_mesh_lpn_set_cb
(void (*cb)(u16_t friend_addr, bool established))¶ Register a callback for Friendship changes.
Registers a callback that will be called whenever Friendship gets established or is lost.
- Parameters
cb
: Function to call when the Friendship status changes.
-
Bluetooth Mesh Access Layer¶
-
group
bt_mesh_access
Bluetooth Mesh Access Layer.
Defines
-
BT_MESH_ADDR_UNASSIGNED
¶
-
BT_MESH_ADDR_ALL_NODES
¶
-
BT_MESH_ADDR_PROXIES
¶
-
BT_MESH_ADDR_FRIENDS
¶
-
BT_MESH_ADDR_RELAYS
¶
-
BT_MESH_KEY_UNUSED
¶
-
BT_MESH_KEY_DEV
¶
-
BT_MESH_ELEM
(_loc, _mods, _vnd_mods)¶ Helper to define a mesh element within an array.
In case the element has no SIG or Vendor models the helper macro BT_MESH_MODEL_NONE can be given instead.
- Parameters
_loc
: Location Descriptor._mods
: Array of models._vnd_mods
: Array of vendor models.
-
BT_MESH_MODEL_ID_CFG_SRV
¶
-
BT_MESH_MODEL_ID_CFG_CLI
¶
-
BT_MESH_MODEL_ID_HEALTH_SRV
¶
-
BT_MESH_MODEL_ID_HEALTH_CLI
¶
-
BT_MESH_MODEL_ID_GEN_ONOFF_SRV
¶
-
BT_MESH_MODEL_ID_GEN_ONOFF_CLI
¶
-
BT_MESH_MODEL_ID_GEN_LEVEL_SRV
¶
-
BT_MESH_MODEL_ID_GEN_LEVEL_CLI
¶
-
BT_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_SRV
¶
-
BT_MESH_MODEL_ID_GEN_DEF_TRANS_TIME_CLI
¶
-
BT_MESH_MODEL_ID_GEN_POWER_ONOFF_SRV
¶
-
BT_MESH_MODEL_ID_GEN_POWER_ONOFF_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_GEN_POWER_ONOFF_CLI
¶
-
BT_MESH_MODEL_ID_GEN_POWER_LEVEL_SRV
¶
-
BT_MESH_MODEL_ID_GEN_POWER_LEVEL_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_GEN_POWER_LEVEL_CLI
¶
-
BT_MESH_MODEL_ID_GEN_BATTERY_SRV
¶
-
BT_MESH_MODEL_ID_GEN_BATTERY_CLI
¶
-
BT_MESH_MODEL_ID_GEN_LOCATION_SRV
¶
-
BT_MESH_MODEL_ID_GEN_LOCATION_SETUPSRV
¶
-
BT_MESH_MODEL_ID_GEN_LOCATION_CLI
¶
-
BT_MESH_MODEL_ID_GEN_ADMIN_PROP_SRV
¶
-
BT_MESH_MODEL_ID_GEN_MANUFACTURER_PROP_SRV
¶
-
BT_MESH_MODEL_ID_GEN_USER_PROP_SRV
¶
-
BT_MESH_MODEL_ID_GEN_CLIENT_PROP_SRV
¶
-
BT_MESH_MODEL_ID_GEN_PROP_CLI
¶
-
BT_MESH_MODEL_ID_SENSOR_SRV
¶
-
BT_MESH_MODEL_ID_SENSOR_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_SENSOR_CLI
¶
-
BT_MESH_MODEL_ID_TIME_SRV
¶
-
BT_MESH_MODEL_ID_TIME_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_TIME_CLI
¶
-
BT_MESH_MODEL_ID_SCENE_SRV
¶
-
BT_MESH_MODEL_ID_SCENE_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_SCENE_CLI
¶
-
BT_MESH_MODEL_ID_SCHEDULER_SRV
¶
-
BT_MESH_MODEL_ID_SCHEDULER_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_SCHEDULER_CLI
¶
-
BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_LIGHTNESS_CLI
¶
-
BT_MESH_MODEL_ID_LIGHT_CTL_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_CTL_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_CTL_CLI
¶
-
BT_MESH_MODEL_ID_LIGHT_CTL_TEMP_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_HSL_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_HSL_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_HSL_CLI
¶
-
BT_MESH_MODEL_ID_LIGHT_HSL_HUE_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_HSL_SAT_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_XYL_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_XYL_SETUP_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_XYL_CLI
¶
-
BT_MESH_MODEL_ID_LIGHT_LC_SRV
¶
-
BT_MESH_MODEL_ID_LIGHT_LC_SETUPSRV
¶
-
BT_MESH_MODEL_ID_LIGHT_LC_CLI
¶
-
BT_MESH_MODEL_OP_1
(b0)¶
-
BT_MESH_MODEL_OP_2
(b0, b1)¶
-
BT_MESH_MODEL_OP_3
(b0, cid)¶
-
BT_MESH_MODEL_OP_END
¶
-
BT_MESH_MODEL_NO_OPS
¶
-
BT_MESH_MODEL_NONE
¶ Helper to define an empty model array
-
BT_MESH_MODEL
(_id, _op, _pub, _user_data)¶
-
BT_MESH_MODEL_VND
(_company, _id, _op, _pub, _user_data)¶
-
BT_MESH_TRANSMIT
(count, int_ms)¶ Encode transmission count & interval steps.
- Return
- Mesh transmit value that can be used e.g. for the default values of the configuration model data.
- Parameters
count
: Number of retransmissions (first transmission is excluded).int_ms
: Interval steps in milliseconds. Must be greater than 0, less than or equal to 320, and a multiple of 10.
-
BT_MESH_TRANSMIT_COUNT
(transmit)¶ Decode transmit count from a transmit value.
- Return
- Transmission count (actual transmissions is N + 1).
- Parameters
transmit
: Encoded transmit count & interval value.
-
BT_MESH_TRANSMIT_INT
(transmit)¶ Decode transmit interval from a transmit value.
- Return
- Transmission interval in milliseconds.
- Parameters
transmit
: Encoded transmit count & interval value.
-
BT_MESH_PUB_TRANSMIT
(count, int_ms)¶ Encode Publish Retransmit count & interval steps.
- Return
- Mesh transmit value that can be used e.g. for the default values of the configuration model data.
- Parameters
count
: Number of retransmissions (first transmission is excluded).int_ms
: Interval steps in milliseconds. Must be greater than 0 and a multiple of 50.
-
BT_MESH_PUB_TRANSMIT_COUNT
(transmit)¶ Decode Publish Retransmit count from a given value.
- Return
- Retransmission count (actual transmissions is N + 1).
- Parameters
transmit
: Encoded Publish Retransmit count & interval value.
-
BT_MESH_PUB_TRANSMIT_INT
(transmit)¶ Decode Publish Retransmit interval from a given value.
- Return
- Transmission interval in milliseconds.
- Parameters
transmit
: Encoded Publish Retransmit count & interval value.
-
BT_MESH_MODEL_PUB_DEFINE
(_name, _update, _msg_len)¶ Define a model publication context.
- Parameters
_name
: Variable name given to the context._update
: Optional message update callback (may be NULL)._msg_len
: Length of the publication message.
-
BT_MESH_TTL_DEFAULT
¶ Special TTL value to request using configured default TTL
-
BT_MESH_TTL_MAX
¶ Maximum allowed TTL value
Functions
-
void
bt_mesh_model_msg_init
(struct net_buf_simple *msg, u32_t opcode)¶
-
int
bt_mesh_model_send
(struct bt_mesh_model *model, struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *msg, const struct bt_mesh_send_cb *cb, void *cb_data)¶ Send an Access Layer message.
- Return
- 0 on success, or (negative) error code on failure.
- Parameters
model
: Mesh (client) Model that the message belongs to.ctx
: Message context, includes keys, TTL, etc.msg
: Access Layer payload (the actual message to be sent).cb
: Optional “message sent” callback.cb_data
: User data to be passed to the callback.
-
int
bt_mesh_model_publish
(struct bt_mesh_model *model)¶ Send a model publication message.
Before calling this function, the user needs to ensure that the model publication message (bt_mesh_model_pub::msg) contains a valid message to be sent. Note that this API is only to be used for non-period publishing. For periodic publishing the app only needs to make sure that bt_mesh_model_pub::msg contains a valid message whenever the bt_mesh_model_pub::update callback is called.
- Return
- 0 on success, or (negative) error code on failure.
- Parameters
model
: Mesh (client) Model that’s publishing the message.
-
struct bt_mesh_elem *
bt_mesh_model_elem
(struct bt_mesh_model *mod)¶ Get the element that a model belongs to.
- Return
- Pointer to the element that the given model belongs to.
- Parameters
mod
: Mesh model.
-
struct
bt_mesh_elem
¶ - #include <access.h>
Abstraction that describes a Mesh Element
-
struct
bt_mesh_msg_ctx
¶ - #include <access.h>
Message sending context.
-
struct
bt_mesh_model_pub
¶ - #include <access.h>
Model publication context.
The context should primarily be created using the BT_MESH_MODEL_PUB_DEFINE macro.
-
struct
bt_mesh_model
¶ - #include <access.h>
Abstraction that describes a Mesh Model instance
-
struct
bt_mesh_comp
¶ - #include <access.h>
Node Composition
-
Bluetooth Mesh Configuration Client Model¶
-
group
bt_mesh_cfg_cli
Bluetooth Mesh.
Defines
-
BT_MESH_MODEL_CFG_CLI
(cli_data)¶
-
BT_MESH_PUB_PERIOD_100MS
(steps)¶ Helper macro to encode model publication period in units of 100ms.
- Return
- Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period
- Parameters
steps
: Number of 100ms steps.
-
BT_MESH_PUB_PERIOD_SEC
(steps)¶ Helper macro to encode model publication period in units of 1 second.
- Return
- Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period
- Parameters
steps
: Number of 1 second steps.
-
BT_MESH_PUB_PERIOD_10SEC
(steps)¶ Helper macro to encode model publication period in units of 10 seconds.
- Return
- Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period
- Parameters
steps
: Number of 10 second steps.
-
BT_MESH_PUB_PERIOD_10MIN
(steps)¶ Helper macro to encode model publication period in units of 10 minutes.
- Return
- Encoded value that can be assigned to bt_mesh_cfg_mod_pub.period
- Parameters
steps
: Number of 10 minute steps.
Functions
-
int
bt_mesh_cfg_comp_data_get
(u16_t net_idx, u16_t addr, u8_t page, u8_t *status, struct net_buf_simple *comp)¶
-
int
bt_mesh_cfg_beacon_get
(u16_t net_idx, u16_t addr, u8_t *status)¶
-
int
bt_mesh_cfg_beacon_set
(u16_t net_idx, u16_t addr, u8_t val, u8_t *status)¶
-
int
bt_mesh_cfg_ttl_get
(u16_t net_idx, u16_t addr, u8_t *ttl)¶
-
int
bt_mesh_cfg_ttl_set
(u16_t net_idx, u16_t addr, u8_t val, u8_t *ttl)¶
-
int
bt_mesh_cfg_friend_get
(u16_t net_idx, u16_t addr, u8_t *status)¶
-
int
bt_mesh_cfg_friend_set
(u16_t net_idx, u16_t addr, u8_t val, u8_t *status)¶
-
int
bt_mesh_cfg_gatt_proxy_get
(u16_t net_idx, u16_t addr, u8_t *status)¶
-
int
bt_mesh_cfg_gatt_proxy_set
(u16_t net_idx, u16_t addr, u8_t val, u8_t *status)¶
-
int
bt_mesh_cfg_relay_get
(u16_t net_idx, u16_t addr, u8_t *status, u8_t *transmit)¶
-
int
bt_mesh_cfg_relay_set
(u16_t net_idx, u16_t addr, u8_t new_relay, u8_t new_transmit, u8_t *status, u8_t *transmit)¶
-
int
bt_mesh_cfg_net_key_add
(u16_t net_idx, u16_t addr, u16_t key_net_idx, const u8_t net_key[16], u8_t *status)¶
-
int
bt_mesh_cfg_app_key_add
(u16_t net_idx, u16_t addr, u16_t key_net_idx, u16_t key_app_idx, const u8_t app_key[16], u8_t *status)¶
-
int
bt_mesh_cfg_mod_app_bind
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t mod_app_idx, u16_t mod_id, u8_t *status)¶
-
int
bt_mesh_cfg_mod_app_bind_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t mod_app_idx, u16_t mod_id, u16_t cid, u8_t *status)¶
-
int
bt_mesh_cfg_mod_pub_get
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t mod_id, struct bt_mesh_cfg_mod_pub *pub, u8_t *status)¶
-
int
bt_mesh_cfg_mod_pub_get_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t mod_id, u16_t cid, struct bt_mesh_cfg_mod_pub *pub, u8_t *status)¶
-
int
bt_mesh_cfg_mod_pub_set
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t mod_id, struct bt_mesh_cfg_mod_pub *pub, u8_t *status)¶
-
int
bt_mesh_cfg_mod_pub_set_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t mod_id, u16_t cid, struct bt_mesh_cfg_mod_pub *pub, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_add
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t sub_addr, u16_t mod_id, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_add_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t sub_addr, u16_t mod_id, u16_t cid, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_del
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t sub_addr, u16_t mod_id, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_del_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t sub_addr, u16_t mod_id, u16_t cid, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_overwrite
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t sub_addr, u16_t mod_id, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_overwrite_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, u16_t sub_addr, u16_t mod_id, u16_t cid, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_va_add
(u16_t net_idx, u16_t addr, u16_t elem_addr, const u8_t label[16], u16_t mod_id, u16_t *virt_addr, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_va_add_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, const u8_t label[16], u16_t mod_id, u16_t cid, u16_t *virt_addr, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_va_del
(u16_t net_idx, u16_t addr, u16_t elem_addr, const u8_t label[16], u16_t mod_id, u16_t *virt_addr, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_va_del_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, const u8_t label[16], u16_t mod_id, u16_t cid, u16_t *virt_addr, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_va_overwrite
(u16_t net_idx, u16_t addr, u16_t elem_addr, const u8_t label[16], u16_t mod_id, u16_t *virt_addr, u8_t *status)¶
-
int
bt_mesh_cfg_mod_sub_va_overwrite_vnd
(u16_t net_idx, u16_t addr, u16_t elem_addr, const u8_t label[16], u16_t mod_id, u16_t cid, u16_t *virt_addr, u8_t *status)¶
-
int
bt_mesh_cfg_hb_sub_set
(u16_t net_idx, u16_t addr, struct bt_mesh_cfg_hb_sub *sub, u8_t *status)¶
-
int
bt_mesh_cfg_hb_sub_get
(u16_t net_idx, u16_t addr, struct bt_mesh_cfg_hb_sub *sub, u8_t *status)¶
-
int
bt_mesh_cfg_hb_pub_set
(u16_t net_idx, u16_t addr, const struct bt_mesh_cfg_hb_pub *pub, u8_t *status)¶
-
int
bt_mesh_cfg_hb_pub_get
(u16_t net_idx, u16_t addr, struct bt_mesh_cfg_hb_pub *pub, u8_t *status)¶
-
s32_t
bt_mesh_cfg_cli_timeout_get
(void)¶
-
void
bt_mesh_cfg_cli_timeout_set
(s32_t timeout)¶
Variables
-
const struct bt_mesh_model_op
bt_mesh_cfg_cli_op
[]¶
-
struct
bt_mesh_cfg_cli
¶ - #include <cfg_cli.h>
Mesh Configuration Client Model Context
-
Bluetooth Mesh Configuration Server Model¶
Bluetooth Mesh Health Client Model¶
-
group
bt_mesh_health_cli
Bluetooth Mesh.
Defines
-
BT_MESH_MODEL_HEALTH_CLI
(cli_data)¶
Functions
-
int
bt_mesh_health_cli_set
(struct bt_mesh_model *model)¶
-
int
bt_mesh_health_fault_get
(u16_t net_idx, u16_t addr, u16_t app_idx, u16_t cid, u8_t *test_id, u8_t *faults, size_t *fault_count)¶
-
int
bt_mesh_health_fault_clear
(u16_t net_idx, u16_t addr, u16_t app_idx, u16_t cid, u8_t *test_id, u8_t *faults, size_t *fault_count)¶
-
int
bt_mesh_health_fault_test
(u16_t net_idx, u16_t addr, u16_t app_idx, u16_t cid, u8_t test_id, u8_t *faults, size_t *fault_count)¶
-
int
bt_mesh_health_period_get
(u16_t net_idx, u16_t addr, u16_t app_idx, u8_t *divisor)¶
-
int
bt_mesh_health_period_set
(u16_t net_idx, u16_t addr, u16_t app_idx, u8_t divisor, u8_t *updated_divisor)¶
-
int
bt_mesh_health_attention_get
(u16_t net_idx, u16_t addr, u16_t app_idx, u8_t *attention)¶
-
int
bt_mesh_health_attention_set
(u16_t net_idx, u16_t addr, u16_t app_idx, u8_t attention, u8_t *updated_attention)¶
-
s32_t
bt_mesh_health_cli_timeout_get
(void)¶
-
void
bt_mesh_health_cli_timeout_set
(s32_t timeout)¶
Variables
-
const struct bt_mesh_model_op
bt_mesh_health_cli_op
[]¶
-
struct
bt_mesh_health_cli
¶ - #include <health_cli.h>
Mesh Health Client Model Context
-
Bluetooth Mesh Health Server Model¶
-
group
bt_mesh_health_srv
Bluetooth Mesh Health Server Model.
Defines
-
BT_MESH_HEALTH_PUB_DEFINE
(_name, _max_faults)¶ A helper to define a health publication context
- Parameters
_name
: Name given to the publication context variable._max_faults
: Maximum number of faults the element can have.
-
BT_MESH_MODEL_HEALTH_SRV
(srv, pub)¶ Define a new health server model. Note that this API needs to be repeated for each element that the application wants to have a health server model on. Each instance also needs a unique bt_mesh_health_srv and bt_mesh_model_pub context.
- Return
- New mesh model instance.
- Parameters
srv
: Pointer to a unique struct bt_mesh_health_srv.pub
: Pointer to a unique struct bt_mesh_model_pub.
Functions
-
int
bt_mesh_fault_update
(struct bt_mesh_elem *elem)¶
Variables
-
const struct bt_mesh_model_op
bt_mesh_health_srv_op
[]¶
-
struct
bt_mesh_health_srv
¶ - #include <health_srv.h>
Mesh Health Server Model Context
-
Bluetooth Mesh Provisioning¶
-
group
bt_mesh_prov
Bluetooth Mesh Provisioning.
Enums
-
enum
bt_mesh_output_action_t
¶ Values:
-
BT_MESH_NO_OUTPUT
= 0¶
-
BT_MESH_BLINK
= BIT(0)¶
-
BT_MESH_BEEP
= BIT(1)¶
-
BT_MESH_VIBRATE
= BIT(2)¶
-
BT_MESH_DISPLAY_NUMBER
= BIT(3)¶
-
BT_MESH_DISPLAY_STRING
= BIT(4)¶
-
-
enum
bt_mesh_input_action_t
¶ Values:
-
BT_MESH_NO_INPUT
= 0¶
-
BT_MESH_PUSH
= BIT(0)¶
-
BT_MESH_TWIST
= BIT(1)¶
-
BT_MESH_ENTER_NUMBER
= BIT(2)¶
-
BT_MESH_ENTER_STRING
= BIT(3)¶
-
-
enum
bt_mesh_prov_oob_info_t
¶ Values:
-
BT_MESH_PROV_OOB_OTHER
= BIT(0)¶
-
BT_MESH_PROV_OOB_URI
= BIT(1)¶
-
BT_MESH_PROV_OOB_2D_CODE
= BIT(2)¶
-
BT_MESH_PROV_OOB_BAR_CODE
= BIT(3)¶
-
BT_MESH_PROV_OOB_NFC
= BIT(4)¶
-
BT_MESH_PROV_OOB_NUMBER
= BIT(5)¶
-
BT_MESH_PROV_OOB_STRING
= BIT(6)¶
-
BT_MESH_PROV_OOB_ON_BOX
= BIT(11)¶
-
BT_MESH_PROV_OOB_IN_BOX
= BIT(12)¶
-
BT_MESH_PROV_OOB_ON_PAPER
= BIT(13)¶
-
BT_MESH_PROV_OOB_IN_MANUAL
= BIT(14)¶
-
BT_MESH_PROV_OOB_ON_DEV
= BIT(15)¶
-
Functions
-
int
bt_mesh_input_string
(const char *str)¶ Provide provisioning input OOB string.
This is intended to be called after the bt_mesh_prov input callback has been called with BT_MESH_ENTER_STRING as the action.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
str
: String.
-
int
bt_mesh_input_number
(u32_t num)¶ Provide provisioning input OOB number.
This is intended to be called after the bt_mesh_prov input callback has been called with BT_MESH_ENTER_NUMBER as the action.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
num
: Number.
-
int
bt_mesh_prov_enable
(bt_mesh_prov_bearer_t bearers)¶ Enable specific provisioning bearers.
Enable one or more provisioning bearers.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
bearers
: Bit-wise or of provisioning bearers.
-
int
bt_mesh_prov_disable
(bt_mesh_prov_bearer_t bearers)¶ Disable specific provisioning bearers.
Disable one or more provisioning bearers.
- Return
- Zero on success or (negative) error code otherwise.
- Parameters
bearers
: Bit-wise or of provisioning bearers.
-
struct
bt_mesh_prov
¶ - #include <main.h>
Provisioning properties & capabilities.
-
enum
Bluetooth Mesh Proxy¶
-
group
bt_mesh_proxy
Bluetooth Mesh Proxy.
Functions
-
int
bt_mesh_proxy_identity_enable
(void)¶ Enable advertising with Node Identity.
This API requires that GATT Proxy support has been enabled. Once called each subnet will start advertising using Node Identity for the next 60 seconds.
- Return
- 0 on success, or (negative) error code on failure.
-
int