Hi All:
We are using nRF52840 SDK with BLE Mesh sdk5.0 to develop bluetooth mesh and we can use light_sw_client to control the LED1 state on the light_sw_sever via BLE Mesh APP and nRF52840_DK.
Now we hope to integrated the ight_sw_client and light_sw_sever to implement bi-direction data transfer between two nRF52840_DK.
The integrated light_sw client and server can be compliled successfully,but executing the mesh_stack_init function has a error message( Mesh error 5 at 0x00027B49) from the function of "ERROR_CHECK(generic_onoff_client_init(&m_clients[i], i + 1))".
How to debug the issue? Thanks a lot.
/***************************************************************************
static void mesh_init(void)
{
/* Initialize the application storage for models */
model_config_file_init();
mesh_stack_init_params_t init_params =Post
{
.core.irq_priority = NRF_MESH_IRQ_PRIORITY_LOWEST,
.core.lfclksrc = DEV_BOARD_LF_CLK_CFG,
.core.p_uuid = NULL,
.models.models_init_cb = models_init_cb,
.models.config_server_cb = config_server_evt_cb
};
uint32_t status = mesh_stack_init(&init_params, &m_device_provisioned);
*************************************************************************************/
static void models_init_cb(void)
{
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initializing and adding models\n");
app_model_init();
// ..... adding client models ....
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initializing and adding client models\n");
for (uint32_t i = 0; 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));
}
Best Regards,
Sheng-Hua
