hi,
i am doing a project where i have to merge nrf mesh light switch server with mesh dfu example. i am using nrf mesh sdk v1.0.0 and nrf52832 mcu.
i have merged two programs by following this link. but now i am facing problems. rtt log is like below.
0> <t: 0>, main.c, 233, ----- BLE Mesh Light Switch Server Demo ----- 0> <t: 0>, main.c, 259, ----- Bluetooth Mesh DFU Example ----- 0> <t: 0>, serial_handler_prov.c, 212, Generating encryption keypair... 0> <t: 0>, main.c, 283, Enabling serial interface... 0> <t: 0>, nrf_mesh_sdk.c, 72, APP_ERROR: E:\ATOLL_WORK\zipfiles\dfu\1\examples\light_switch\server\src\main.c:292 code 4097
it says that app_error on line 292. on line 292 " ERROR_CHECK(nrf_mesh_node_config(&config_params));" is called.
and my main function looks like this.
int main(void) { __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS, LOG_LEVEL_INFO, LOG_CALLBACK_DEFAULT); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "----- BLE Mesh Light Switch Server Demo -----\n"); hal_leds_init(); static const uint8_t static_auth_data[NRF_MESH_KEY_SIZE] = STATIC_AUTH_DATA; static nrf_mesh_node_config_params_t config_params = {.prov_caps = NRF_MESH_PROV_OOB_CAPS_DEFAULT(ACCESS_ELEMENT_COUNT)}; config_params.p_static_data = static_auth_data; config_params.complete_callback = provisioning_complete; config_params.setup_callback = configuration_setup; config_params.irq_priority = NRF_MESH_IRQ_PRIORITY_LOWEST; #if defined(S110) config_params.lf_clk_cfg = NRF_CLOCK_LFCLKSRC_XTAL_20_PPM; #elif SD_BLE_API_VERSION >= 5 config_params.lf_clk_cfg.source = NRF_CLOCK_LF_SRC_XTAL; config_params.lf_clk_cfg.accuracy = NRF_CLOCK_LF_ACCURACY_20_PPM; #else config_params.lf_clk_cfg.source = NRF_CLOCK_LF_SRC_XTAL; config_params.lf_clk_cfg.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM; #endif __LOG_INIT(LOG_MSK_DEFAULT | LOG_SRC_DFU | LOG_SRC_APP | LOG_SRC_SERIAL, LOG_LEVEL_INFO, log_callback_rtt); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "----- Bluetooth Mesh DFU Example -----\n"); #if defined ( __CC_ARM ) rom_end = (uint32_t) rom_base + (uint32_t) rom_length; #elif defined ( __GNUC__ ) rom_length = (uint32_t) rom_end - rom_base; #endif /* Take the next available page address */ bank_addr = (uint32_t) (rom_end & FLASH_PAGE_MASK) + FLASH_PAGE_SIZE; __LOG(LOG_SRC_APP, LOG_LEVEL_DBG2, "rom_base %X\n", rom_base); __LOG(LOG_SRC_APP, LOG_LEVEL_DBG2, "rom_end %X\n", rom_end); __LOG(LOG_SRC_APP, LOG_LEVEL_DBG2, "rom_length %X\n", rom_length); __LOG(LOG_SRC_APP, LOG_LEVEL_DBG2, "bank_addr %X\n", bank_addr); // mesh_core_setup(); #if NRF_MESH_SERIAL_ENABLE ERROR_CHECK(nrf_mesh_serial_init(NULL)); #endif m_evt_handler.evt_cb = mesh_evt_handler; m_evt_handler.p_next = NULL; nrf_mesh_evt_handler_add(&m_evt_handler); #if NRF_MESH_SERIAL_ENABLE __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Enabling serial interface...\n"); ERROR_CHECK(nrf_mesh_serial_enable()); #endif // __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initialization complete!\n"); ERROR_CHECK(nrf_mesh_node_config(&config_params)); __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Initialization complete!\n"); while (true) { (void)sd_app_evt_wait(); } }
please help me out and let me know if any configuration changes need to be done in mesh.