How to use the health model of Bluetooth mesh

I am trying to use Health SRV and Health CLI to check if there are any errors in the nodes. I have successfully transmitted the fault codes, but there are still many questions that I cannot find answers to. For example, Health SRV has a function to periodically upload fault codes, but I have not successfully implemented this function and have not found any helpful information or examples.Or, there are 4 callbacks about error codes in bt_mesh_health_srv_cb, but I can't trigger fault_get_cur no matter what. I don't know if it's a problem with my usage or if this callback has no meaning in the first place? Because it seems similar to fault_get_reg

Is there any detailed example code to demonstrate the various details of the entire health model?
Parents Reply Children
  • Thank you for your prompt reply. Additionally, I am using ncs2.9.1

  • Hi SwRa

    I have browsed through the code and now found the method to trigger fault_get_cur, and have implemented the function of reporting fault codes periodically in the health srv model.

    On a node that has implemented the health cli model, use bt_mesh_cfg_cli_mod_pub_set to set the node's reporting period and other parameters. Then, it will start reporting fault codes at regular intervals, and the fault_get_cur will be automatically called.And fault_get_reg is triggered when nodes implementing the health cli model actively read fault codes.So these two callback functions are basically the same, just one active and one passive

    However, I still think that if NCS can provide a complete example code about the health model, it will be of great help to development

Related