Simple On Off model not working along with Generic on off model [NRF MESH SDK5]

Hi , 

 I have added simple on off mode in my previous application which was based on Generic ON OFF model. Code for simple on off model is added in both server and client side and compiling without errors. When I provision my devices it only provision for Generic On Off model not the simple on off model and my clients can send data to servers without issue on generic on off model but same is not working on simple on off model 

I have made following changes in server code for the addition of simple on off model 

1- Increased ACCESS_MODEL_COUNT by one in nrf_mesh_config_app.h

2 - Changed ACCESS_ELEMENT_COUNT to 2 from 1 .

3-  Called simple_on_off_server_init(&m_simple_server_0, 1)) just before  app_onoff_init(&m_onoff_server_0, APP_ONOFF_ELEMENT_INDEX)); in model_init function.

and following changes in client code for the addition of simple on off model 

1- Increased ACCESS_MODEL_COUNT by one in nrf_mesh_config_app.h

2 - Changed ACCESS_ELEMENT_COUNT to 2 from 1 .

3-

static void models_init_cb(void)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initializing and adding models\n");

     // these 2 lines are added
     m_simple_clients[0].status_cb = simple_status_cb;
     ERROR_CHECK(simple_on_off_client_init(&m_simple_clients[0],1));


    
    for (uint32_t i = 1; i < CLIENT_MODEL_INSTANCE_COUNT; ++i)
    {
        m_clients[i].settings.p_callbacks = &client_cbs;
        m_clients[i].settings.timeout = 0;
        m_clients[i].settings.force_segmented = APP_FORCE_SEGMENTATION;
        m_clients[i].settings.transmic_size = APP_MIC_SIZE;

        ERROR_CHECK(generic_onoff_client_init(&m_clients[i], i + 1));
    }
        
}

4- Called simple_on_off_client_set( &m_simple_clients[0], true) from button event handler. 

The issue is only generic on off model is working but simple on off is not. Please guide about the issues of model not being setup during provisioning as the logs from the client shows only model id of health server and generic on off .

Following are the logs generated on client side. 

00> <t: 118984>, main.c, 143, Successfully provisioned
00> <t: 118989>, main.c, 138, Node Address: 0x010C
00> <t: 131718>, config_server.c, 630, dsm_appkey_add(appkey_handle:0 appkey_index:0)
00> <t: 135302>, config_server.c, 2553, Access Info:
00> element_index=0 model_id = 2-FFFF model_handle=1
00> <t: 177734>, config_server.c, 2553, Access Info:
00> element_index=1 model_id = 1001-FFFF model_handle=65535
00> <t: 2080463>, proxy.c, 713, Adv timeout
00> <t: 0>, main.c, 432, ----- BLE Mesh Light Switch Client Demo -----
00> <t: 13262>, main.c, 382, Initializing and adding models
00> <t: 18034>, mesh_app_utils.c, 66, Device UUID (raw): 7ECEA3F464944E48A9AA80298C4384E4
00> <t: 18037>, mesh_app_utils.c, 67, Device UUID : 7ECEA3F4-6494-4E48-A9AA-80298C4384E4
00> <t: 18050>, main.c, 479,

Regards ,

Ahmed

Parents
  • Hi , 

    I have done fair amount of debugging which reveled that provisioner code was not assigning app keys to the vendor model (simple on off).

    FYI I am using provisioner example provided with the mesh sdk5 . In other to check my assumption I have provisioned my setup with the Mesh Andriod app provided by Nordic on play store. Within that app I had to first assign the app keys to both client and server models to be able to communicate data. The issue here is that we our requirement is to provision without mobile apps and there is no official guide in my knowledge which guides about assigning app keys to vendor models. Please provide guidelines to extend the provisioner code to be able to assign app keys to vendor models.

    Regards , 

    Ahmed 

Reply
  • Hi , 

    I have done fair amount of debugging which reveled that provisioner code was not assigning app keys to the vendor model (simple on off).

    FYI I am using provisioner example provided with the mesh sdk5 . In other to check my assumption I have provisioned my setup with the Mesh Andriod app provided by Nordic on play store. Within that app I had to first assign the app keys to both client and server models to be able to communicate data. The issue here is that we our requirement is to provision without mobile apps and there is no official guide in my knowledge which guides about assigning app keys to vendor models. Please provide guidelines to extend the provisioner code to be able to assign app keys to vendor models.

    Regards , 

    Ahmed 

Children
Related