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

BLE MESH3.0 Merge Cilent and Provisioner Firmware.

Hello ,

Que 1 :I want to Merge Client and Provisioner Firmware is possible..?

Que 2:Multiple provisioner can i define in same moudle.

Que 3:BLE MESH Network ,How many Provisioner work in same network..?

Regard's

Nikunj  

Parents
  • Hi,

    Q1: Yes, it is possible to merge the client and provisioner example. This was done in earlier version of the Mesh SDK. Have a look at the light switch client example in Mesh SDK v1.0.1, it will give you an idea on how to do it.

    Q2: I'm not sure what you mean by this. Can you elaborate?

    Q3: Multiple Provisioners may be used, but the method to share cached data and coordinate across multiple Provisioners is implementation specific. There aren't a specific number for how many provisioner you can have in a network. The limitation lies in the coordination between the Provisioners, so it is dependent on your implementation. 

  • i have seen BLE MESH V1.1 Example code but i can't understand can you give me guidance. How to client add in network .i have add custom_data_client_Init successfully in Provisioner firmware,but i dont know how to assign address 

     I have seen In Provisioner Firmware check_network_state(); this function is start waiting for incoming beacon request and send invitation to client. 

    I seen in client Firmware mesh_provisionee_prov_start() this function send Beacon request Provisioner.

    I want  both Provisonee and Provisionor Functionality in Provisioner Firmware so Please healp me which API to change And How to do that if you have document then suggest me.

    void models_init_cb(void)
    {
      uint8_t status;
    
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initializing and adding models\n");
        m_dev_handles.m_netkey_handle = DSM_HANDLE_INVALID;
        m_dev_handles.m_appkey_handle = DSM_HANDLE_INVALID;
        m_dev_handles.m_self_devkey_handle = DSM_HANDLE_INVALID;
    
        /* This app requires following models :
         * config client : To be able to configure other devices
         * health client : To be able to interact with other health servers */
        ERROR_CHECK(config_client_init(app_config_client_event_cb));
        ERROR_CHECK(health_client_init(&m_dev_handles.m_health_client_instance, 0, app_health_event_cb));
    
        m_clients.settings.p_callbacks = &client_cbs;
        m_clients.settings.timeout = 0;
        m_clients.settings.force_segmented = APP_CONFIG_FORCE_SEGMENTATION;
        m_clients.settings.transmic_size = APP_CONFIG_MIC_SIZE;
    
        ERROR_CHECK(custom_data_client_init(&m_clients,1));
        
    }
      

    Thanks,

    Nikunj

Reply
  • i have seen BLE MESH V1.1 Example code but i can't understand can you give me guidance. How to client add in network .i have add custom_data_client_Init successfully in Provisioner firmware,but i dont know how to assign address 

     I have seen In Provisioner Firmware check_network_state(); this function is start waiting for incoming beacon request and send invitation to client. 

    I seen in client Firmware mesh_provisionee_prov_start() this function send Beacon request Provisioner.

    I want  both Provisonee and Provisionor Functionality in Provisioner Firmware so Please healp me which API to change And How to do that if you have document then suggest me.

    void models_init_cb(void)
    {
      uint8_t status;
    
        __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initializing and adding models\n");
        m_dev_handles.m_netkey_handle = DSM_HANDLE_INVALID;
        m_dev_handles.m_appkey_handle = DSM_HANDLE_INVALID;
        m_dev_handles.m_self_devkey_handle = DSM_HANDLE_INVALID;
    
        /* This app requires following models :
         * config client : To be able to configure other devices
         * health client : To be able to interact with other health servers */
        ERROR_CHECK(config_client_init(app_config_client_event_cb));
        ERROR_CHECK(health_client_init(&m_dev_handles.m_health_client_instance, 0, app_health_event_cb));
    
        m_clients.settings.p_callbacks = &client_cbs;
        m_clients.settings.timeout = 0;
        m_clients.settings.force_segmented = APP_CONFIG_FORCE_SEGMENTATION;
        m_clients.settings.transmic_size = APP_CONFIG_MIC_SIZE;
    
        ERROR_CHECK(custom_data_client_init(&m_clients,1));
        
    }
      

    Thanks,

    Nikunj

Children
  • Hello

    Reply me ASAP.. i Add Provisionor Functionality in Client Firmware ..?

  • Hi,

    You can either add provisioner functionality to client firmware or the other way around. I suggest you have a look at the access_setup() function in the main file.

  • Hello Mttrinh,

    I have add client functionality in  provisioner FW. Device Successfully Configure in Mesh network But when I send Msg to the server function return Error Code 7(NRF_ERROR_INVALID_PARAM )

    I have seen in MESH_SDK_1.1

    if (access_flash_config_load())  //Recover access layer configuration from flash.//All models have to be added before this function is called.  
        {                               
            m_configured_devices = configured_devices_count_get();
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "m_configured_devices:%d\n",m_configured_devices);
        }
        else
        {
            /* Bind the keys to the health client. */
            ERROR_CHECK(access_model_application_bind(m_health_client.model_handle, m_appkey_handle));
            ERROR_CHECK(access_model_publish_application_set(m_health_client.model_handle, m_appkey_handle));//health client
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "access_model_publish_application_set\n");
    
            /* Bind the keys to the Simple OnOff clients. */
            for (uint32_t i = 0; i < SERVER_COUNT; ++i)
            {
                ERROR_CHECK(access_model_application_bind(m_clients[i].model_handle, m_appkey_handle));//Bind appkey with Model Handle
                ERROR_CHECK(access_model_publish_application_set(m_clients[i].model_handle, m_appkey_handle));//publish Appkey With model
            }
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "access_model_publish_application_set All Server\n");
            ERROR_CHECK(access_model_application_bind(m_clients[GROUP_CLIENT_INDEX].model_handle, m_appkey_handle));
            ERROR_CHECK(access_model_publish_application_set(m_clients[GROUP_CLIENT_INDEX].model_handle, m_appkey_handle));//Client Group
    
            ERROR_CHECK(access_model_publish_address_set(m_clients[GROUP_CLIENT_INDEX].model_handle, m_group_handle));
            access_flash_config_store();//Store the current state of access layer - information related to element and model configuration - in non volatile memory. 
             __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "access_flash_config_store current state\n");
        }

    In BLE MESH_3.0

    /* Binds the local models correctly with the desired keys */
    void app_default_models_bind_setup(void)
    {
        /* Bind health client to App key, and configure publication key */
        ERROR_CHECK(access_model_application_bind(m_dev_handles.m_health_client_instance.model_handle, m_dev_handles.m_appkey_handle));
        ERROR_CHECK(access_model_publish_application_set(m_dev_handles.m_health_client_instance.model_handle, m_dev_handles.m_appkey_handle));
    
    
        /* Bind self-config server to the self device key */
        ERROR_CHECK(config_server_bind(m_dev_handles.m_self_devkey_handle));
    }

    Can you help me figure out what i am doing wrong?

    Thanks

    Nikunj

  • m_model_pool[handle].model_info.publish_appkey_handle  = 0xFFFF
    m_model_pool[handle].model_info.publish_address_handle = 0xFFFF so I got an error 7 how to resolve this Error.

    Please reply me ASAP

  • Hi,

    I assume you get this error code from access_model_reliable_publish() function? You will get this error code(NRF_ERROR_INVALID_PARAM) as a return code if your model is not bound to an application key, publish address not set or wrong opcode. Can you check that your parameters are correct?

Related