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

NRF Mesh ad_listener handler NULL?

I'm trying to integrate mesh 4.0.0 into an existing project that uses sdk 16.0.0. I'm very close, but I'm getting an error when I try to run mesh_stack_start()

I traced the issue down to the input_param_check method in mesh/bearer/src/ad_listener.c

static uint32_t input_param_check(const ad_listener_t * p_adl)
{
    if (p_adl == NULL || p_adl->handler == NULL)
    {
        return NRF_ERROR_NULL;
    }


    if (p_adl->adv_packet_type > BLE_PACKET_TYPE_ADV_EXT && /*lint !e685 Relational operator '>' always evaluates to 'false' */
        p_adl->adv_packet_type != ADL_WILDCARD_ADV_TYPE)    /*lint !e650 Constant '255' out of range for operator '!=' */
    {
        return NRF_ERROR_INVALID_PARAM;
    }

    return NRF_SUCCESS;
}

On line 3, the p_adl->handler is NULL.

I'm a bit stumped on why this handler would be NULL and where exactly it is set.

I have added .nrf_mesh_flash and .nrf_mesh_ram sections to my linker file as follows:

  .nrf_mesh_flash :
  {
    PROVIDE(__start_nrf_mesh_flash = .);
    KEEP(*(SORT(.nrf_mesh_flash*)))
    PROVIDE(__stop_nrf_mesh_flash = .);
  } > FLASH

  .nrf_mesh_ram :
  {
    PROVIDE(__start_nrf_mesh_ram = .);
    KEEP(*(SORT(.nrf_mesh_ram*)))
    PROVIDE(__stop_nrf_mesh_ram = .);
  } > RAM

Any suggestions would be greatly appreciated!

Best

Parents Reply Children
No Data
Related