I have an application using mesh SDK 2.1.1 that is working. I am migrating to V2.2.0. In my current code I use nrf_mesh_opt_set() to enable and disable a relay feature. I read the migration guide :
and it indicates that mesh_opt_core_adv_set() is the new way to set options. Using this new API I consistently get an assertion:
app_error_weak.c, 95, Mesh assert at 0x0002A384 (:0)
I looked at the code in config_server.c for an example. I tried something very simple:
mesh_opt_core_adv_get(CORE_TX_ROLE_RELAY,&relay_state);
relay_state.enable = false;
mesh_opt_core_adv_set(CORE_TX_ROLE_RELAY,&relay_state);
This always results in the app_error_weak assertion. The "get" operation returns data in the struct that looks OK. The assertion happens in the set operation. The code that handles internal storage is quite complex so I am trying to get to the bottom of where this assertion is being thrown.
Also, when I use the old API:
param_value.opt.val = 0;
nrf_mesh_opt_set(NRF_MESH_OPT_NET_RELAY_ENABLE, ¶m_value)
I get the same result. The only solution now is to go back to V2.1.1
I tried performing a full chip erase to clear the persistent data but have not had any success.