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

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

Children
Related