1.. _bluetooth_mesh_models_health_srv:
2
3Health Server
4#############
5
6The Health Server model provides attention callbacks and node diagnostics for
7:ref:`bluetooth_mesh_models_health_cli` models. It is primarily used to report
8faults in the mesh node and map the mesh nodes to their physical location.
9
10If present, the Health Server model must be instantiated on the primary element.
11
12Faults
13******
14
15The Health Server model may report a list of faults that have occurred in the
16device's lifetime. Typically, the faults are events or conditions that may
17alter the behavior of the node, like power outages or faulty peripherals.
18Faults are split into warnings and errors. Warnings indicate conditions that
19are close to the limits of what the node is designed to withstand, but not
20necessarily damaging to the device. Errors indicate conditions that are
21outside of the node's design limits, and may have caused invalid behavior or
22permanent damage to the device.
23
24Fault values ``0x01`` to ``0x7f`` are reserved for the Bluetooth Mesh
25specification, and the full list of specification defined faults are available
26in :ref:`bluetooth_mesh_health_faults`. Fault values ``0x80`` to ``0xff`` are
27vendor specific. The list of faults are always reported with a company ID to
28help interpreting the vendor specific faults.
29
30.. _bluetooth_mesh_models_health_srv_attention:
31
32Attention state
33***************
34
35The attention state is used to make the device call attention to itself
36through some physical behavior like blinking, playing a sound or vibrating.
37The attention state may be used during provisioning to let the user know which
38device they're provisioning, as well as through the Health models at runtime.
39
40The attention state is always assigned a timeout in the range of one to 255
41seconds when enabled. The Health Server API provides two callbacks for the
42application to run their attention calling behavior:
43:c:member:`bt_mesh_health_srv_cb.attn_on` is called at the beginning of the
44attention period, :c:member:`bt_mesh_health_srv_cb.attn_off` is called at
45the end.
46
47The remaining time for the attention period may be queried through
48:c:member:`bt_mesh_health_srv.attn_timer`.
49
50API reference
51*************
52
53.. doxygengroup:: bt_mesh_health_srv
54
55.. _bluetooth_mesh_health_faults:
56
57Health faults
58=============
59
60Fault values defined by the Bluetooth Mesh specification.
61
62.. doxygengroup:: bt_mesh_health_faults
63