This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mesh Health Model send Where ?

Hello

Im trying to figure out where the health model client sends the health messages. Ive tried doing prints in all of the send methods in health_model_client.c but not getting anything(except for init method..) and Ive set the frequency to 100MS so there should be alot of messages..

I cant tell where the actual sending gets done, could anyone explain?=)

BR Mike

Parents
  • If you take a look at health_client.c in the light switch client example in the Mesh SDK v1.0.1, most of the interface functions include a call to either access_model_publish() or reliable_send(). This means that most of these functions can send messages in the mesh access layer.

    Have you tried setting the health period of the client via a call to the health_client_period_set() function in main.c & see if you can see any messages being transferred?

    I believe the problem could be that none of the health client interface functions get called in main.c for example & therefore you are not seeing any messages in your prints.

  • Hello Im using SDK_FOR_MESH_2.0.1

    I actually can see the health messages being returned to the provisioner with the __LOG print in the "app_health_event_cb"

    And I set the period in node_setup.c under the case : NODE_SETUP_CONFIG_PUBLICATION_HEALTH

    So, I can see that alot of messages are going out and get returned. My question is where does the messages get sent(from the provsioner) As I said I have put out print in all of the methods in health_client.c but I dont get any prints()even tho clearly I can see alot of messages getting returned from the client/servers.

    Or have I misunderstood the process and the provisioner dont send out any requests for the healthdata at all?

  • I just tested the latest Mesh SDK, added some prints like you have & also noticed the same behavior you did. To figure out where the messages were sent, I added logging to these three functions in health_server.c: 

    send_fault_status(), send_attention_status() & send_period_status()

    To enable RTT & logging, I included these header files at the top of health_server.c:

    /* Logging and RTT */
    #include "rtt_input.h"
    #include "log.h"

    With one provisioner, one client & one server, I noticed that send_fault_status() was called right before: "Node 0x0105 alive with 0 active fault(s), RSSI: -27"

    From my understanding, send_fault_status() is called in both the client & server & then handled inside handle_fault_status() in health_client.c of the provisioner. This function then sets the event type HEALTH_CLIENT_EVT_TYPE_CURRENT_STATUS_RECEIVED & the callback function app_health_event_cb() inside main.c of the provisioner prints the message: "Node 0x%04x alive with %u active fault(s), RSSI: %d\n".

     

     

  • so then, the provisioner sets the period of how often the client and servers should send their health_messages right in the beginning(in the node setup), in the configuration stage? and then the provisioner never actually request the data?

  • Hi Bjorn ,

    Is there some methods to get health status via client instead of provisioner ?I have tryied it and replaced health_server.c as health_client.c in client demo. I added the  app_health_event_cb()  in client's main.c until there is no error when I built it .But it can't finish the process of configuration ,it is failing.Can you help me?

    Best weshes.

    Zhengrui.

Reply Children
No Data
Related