app_error_weak.c, 105, Mesh assert at 0x0002D7B4 (:0)

Dear All:

  We run a simple message model in light_switch_client and light_switch_server code.

After provisioning the two nodes via nRFmesh app and set pubilsh in clent and subscribe in the server using the app.

Then we can use the button1/2 in the client as a interrupt to control the light on/off in the server.

Now we hope to test the command "status = generic_onoff_client_set(&m_clients[0], &set_params, &transition_params)" once ", when some flag is true in the while loop.

but then I receive the message of app_error_weak.c,  105, Mesh assert at 0x0002D7B4 (:0)

How can we fixed the error?

Best regards,

ShengHua

Parents Reply Children
  • Dear Elfving:

    Thanks your help. We use mesh sdk 5.0 to develop the mesh project.

    The mesh api command "status = generic_onoff_client_set" seem that it can succeed in interrupt routine(external interrupt or uart interrupt) but fail in the while loop.

    Best regards,

    ShengHua

  • Hi Shenghua, 

    I'm taking over your case from Håkon. 
    Could you let me know which  .core.irq_priority  level you selected when you call mesh_stack_init() ? 
    Please have a look here. If you configure the irq_priority to NRF_MESH_IRQ_PRIORITY_LOWEST then you should call mesh API from an interrupt routine. 
    If you configure it with NRF_MESH_IRQ_PRIORITY_THREAD then you should call the API in main context. 

  • Please have a look at this case, you can find where the error occurs by using addr2line.exe tool .

  • Dear Hung Bui:

    Thanks your help.

     The parameter of .core.irq_priority level is set NRF_MESH_IRQ_PRIORITY_LOWEST and we can call the mesh API successfully in an interrupt routine. 

    //.core.irq_priority level is set NRF_MESH_IRQ_PRIORITY_LOWEST

    // datalog for mesh API successfully in an interrupt routine. 

    Then we modify the .core.irq_priority level as NRF_MESH_IRQ_PRIORITY_THREAD and test the mesh api function .When the flag is set as true,the mesh api will run and get a error message of "app_error_weak.c,  115, Mesh error 15 at 0x00027AF3".

    // modifying .core.irq_priority level as NRF_MESH_IRQ_PRIORITY_THREAD 

    //When the flag is set as true,the mesh api will run

    The error message is as followed.

    The mesh mesh_api_test()

    Best Regards,

    ShengHua

  • Hi ShengHua, 

    If you configure your mesh with NRF_MESH_IRQ_PRIORITY_LOWEST you should always call Mesh API in an interrupt (like you have already figured out). 

    If you configure your mesh with NRF_MESH_IRQ_PRIORITY_THREAD , then you should check your application and make sure no API is called inside a interrupt handler. 

    If you have an error, please use addr2line tool to find where the error is. Error 15 is NRF_ERROR_FORBIDDEN, most likely the function was called from an interrupt handler which is forbidden when you configure your mesh with NRF_MESH_IRQ_PRIORITY_THREAD 

Related