Re: BT Mesh Health Server FaultPeriodicPublication#bluetoothmesh #zephyrbluetoothmesh

Johan Hedberg

Hi Billy,

On 9 Apr 2019, at 18.16, William Fish <> wrote:
I have looked into the health_svr.h and found that the “helper” does not have an update callback. Maybe in might be worth adding to allow periodic updates. I will change my app to use the generic define rather than the “helper”

* A helper to define a health publication context
* @param _name Name given to the publication context variable.
* @param _max_faults Maximum number of faults the element can have.
#define BT_MESH_HEALTH_PUB_DEFINE(_name, _max_faults) \
BT_MESH_MODEL_PUB_DEFINE(_name, NULL, (1 + 3 + (_max_faults)))
Actually, I think I missed the fact in the earlier emails that this was specifically about the health server and not just any model publishing. The health server is a special case and does support periodic publishing. It’ll set its own update callback in health_srv.c (health_pub_update function), i.e. that would override anything your application sets if you were to try it. So the main thing you were probably missing with your earlier code was the message buffer for the publication message.


Join to automatically receive all group messages.