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?

  • 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...  

Related