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

Mesh Assert on timeslot request

Hi everyone,

I have migrated my project from SDK for Mesh v2.1.1 to v3.0.0.

I am getting a Mesh Assert when the Mesh is trying to request a radio timeslot after the "NRF_EVT_RADIO_BLOCKED" event has been received.

I am getting the retun code 0x0f (Forbiden Operation) from sd_radio_request.

        /* Try to re-order a short one timeslot to avoid the block */
        case NRF_EVT_RADIO_BLOCKED:
            
            radio_request_params_reset();
            m_radio_request_earliest.params.earliest.length_us = TIMESLOT_BASE_LENGTH_SHORT_US;
            ret_code = sd_radio_request(&m_radio_request_earliest);
            NRF_MESH_ASSERT(ret_code == NRF_SUCCESS);
            //NRF_MESH_ASSERT(sd_radio_request(&m_radio_request_earliest) == NRF_SUCCESS);

            break;

  • Hi Fabian,

    You said you were using SDK for Mesh v3.0.0? Then you need to use nRF5 SDK 15.2 instead of 15.0. The right guide for integrating Mesh into nRF5 SDK examples will then be this one https://www.nordicsemi.com/en/DocLib/Content/SDK_Doc/Mesh_SDK/v3-0-0/md_doc_getting_started_how_to_nordicSDK

    Next time remember you can select the version of the SDK you are want to work with in the Documentation Library using the drop down menu in the top right.

    The forwarding of SoC events to the mesh stack is already taking care of in 'ble_softdevice_support.c' in Mesh SDK v3.0.0.

    static void on_sd_evt(uint32_t sd_evt, void * p_context)
    {
        UNUSED_VARIABLE(p_context);
    
        (void) nrf_mesh_on_sd_evt(sd_evt);
    }
    
        /* Register Mesh handler for SoC events. */
        NRF_SDH_SOC_OBSERVER(mesh_observer, NRF_SDH_BLE_STACK_OBSERVER_PRIO, on_sd_evt, NULL);
    }
    

    So if you already were adding this in your main.c then the SD event observer would have been registered twice and give you a timeslot assert. So now that's why the problem "was fixed" when you removed 'ble_softdevice_support.c'.

    I strongly recommend to follow the guide for Mesh SDK v3.0.0 and use SDK 15.2, since that's what the Mesh SDK v3.0.0 has been production tested with and can save you some troubles down on the road. Sorry for the inconvenience this time.

    Best Regards,


    Marjeris

Related