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

RSSI Value of the client from server

Hi,

I am trying to get the rssi value of the client from servers. I added health client model to server and added app_health_event_cb() funtion from provisioner in server. Also called it in here.

static void models_init_cb(void)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initializing and adding models\n");
    m_server.get_cb = on_off_server_get_cb;
    m_server.set_cb = on_off_server_set_cb;
    ERROR_CHECK(simple_on_off_server_init(&m_server, 0));
    ERROR_CHECK(access_model_subscription_list_alloc(m_server.model_handle));
    //----added code----//
    /* This app requires following models :
    * health client : To be able to interact with other health servers */
    ERROR_CHECK(health_client_init(&m_dev_handles.m_health_client_instance, 0, app_health_event_cb));

    //----added code----//
}

But it is not working as it is working in provisioner.  No errors are coming.

1. Can we access rssi of client from servers?

2. Can I add Health client model in server?

3. Why this is not working as in provisioner?

Parents
  • Hi Arya, 

     

    If you have a look at the node_setup.c you can find that when the provisioner configure a node, it will set the publication address of the health server to the provisioner address. So they will only send health message to the provisioner. If you want to have other node to be able to receive health message you need to configure the publication address to the node or to a group address. And then you configure the health client to subscribe to that address. 

    Also you would need to bind the app key of the health client to the app key that the provisioner assign to the health server. 

    But for your purpose, I would suggest to use HeartBeat to detect RSSI and the TTL to other node. Please read more about that in the mesh spec (section 3.6.7). 

  • Hi Hung Bui,

    I have one doubt, if we make one node as health client other than provisioner, will it also acts as health server to send its health status?

  • Hi , 
    Health server and health client are independent. You can have them both on one device, but they need to be on different elements. 

  • Hi Hung Bui, hi aditya,

    Continue aditya's question, as I understand, the provisioner configures the health servers to publish to its health client model. In case I use the nRF Mesh and my cellphone as the provisioner, I can also do the same: bind the same app key for both health client and health servers, then set the health servers to publish to the health client. 

    I tested with the nRF Mesh app but it didn't work. There was no event to the health client. You have any idea to check whether there is a misconfiguration in the firmware or it's because of the mobile app? 

    Thank you

  • Hi Duy,

    I'm not possible to test it right now. But have you configured the publication period ? Also there is a special thing about the health model is that both the source and the destination need to match as I mentioned in the last reply above. Maybe it's the reason why you can't configure it as a normal model. 

  • Hi Hung Bui,

    Thank you for your reminding, I checked back and I discovered that I have to increase the period to 1s for the health server to publish (the default is 100ms, but it works when using with the on/off model and level model). The health model works when using with cell phone but the smallest period is 1s which I still haven't known why...  

Reply
  • Hi Hung Bui,

    Thank you for your reminding, I checked back and I discovered that I have to increase the period to 1s for the health server to publish (the default is 100ms, but it works when using with the on/off model and level model). The health model works when using with cell phone but the smallest period is 1s which I still haven't known why...  

Children
No Data
Related