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

Mesh SDK 2.2.0 Bug in mesh_opt_core_adv_set

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 :

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v2.0.1%2Findex.html

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, &param_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.

Parents
  • Just an update:

    This project is based up the light switch proxy client.  Most of my application is run from the main loop which uses:

    bool done = nrf_mesh_process();

    if (done)
    {
    sd_app_evt_wait();
    }

    if I change the mesh stack init params to:

     .core.irq_priority       = NRF_MESH_IRQ_PRIORITY_THREAD,

    The options api works BUT the proxy subsystem not throws  an assertion when I try to provision the device from the NRFMesh android app:

    app_error_weak.c,   95, Mesh assert at 0x0002A3C6

    which appears to check

    bearer_event_in_correct_irq_priority()

    What is the correct settings for using the proxy and running mesh api from the main application loop?

Reply
  • Just an update:

    This project is based up the light switch proxy client.  Most of my application is run from the main loop which uses:

    bool done = nrf_mesh_process();

    if (done)
    {
    sd_app_evt_wait();
    }

    if I change the mesh stack init params to:

     .core.irq_priority       = NRF_MESH_IRQ_PRIORITY_THREAD,

    The options api works BUT the proxy subsystem not throws  an assertion when I try to provision the device from the NRFMesh android app:

    app_error_weak.c,   95, Mesh assert at 0x0002A3C6

    which appears to check

    bearer_event_in_correct_irq_priority()

    What is the correct settings for using the proxy and running mesh api from the main application loop?

Children
No Data
Related