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

dsm_local_unicast_addresses_set() returns NRF_ERROR_FORBIDDEN

I am writing a combined beacon and mesh node using the mesh SDK v0.10.

When dsm_local_unicast_addresses_set() is called in mesh_evt_handler(), which can be found in nrf_mesh_node_config.c a NRF_ERROR_FORBIDDEN error is returned which results in an assert.

What can course this behavior?

This is how i initializes the mesh node:

void beacon_node_init(void)
{       
    static const uint8_t static_auth_data[NRF_MESH_KEY_SIZE] = STATIC_AUTH_DATA;

    static nrf_mesh_node_config_params_t config_params =
    {
        .company_id					= COMPANY_ID,
        .prov_caps.num_elements		= ACCESS_ELEMENT_COUNT,
        .prov_caps.algorithms		= NRF_MESH_PROV_ALGORITHM_FIPS_P256EC,
        .prov_caps.oob_static_types	= NRF_MESH_PROV_OOB_STATIC_TYPE_SUPPORTED,
        .p_static_data				= static_auth_data,
        .setup_callback				= configuration_setup_cb,
        .complete_callback			= configuration_complete_cb,
        .attention_cb				= NULL,
        .lf_clk_cfg.source			= NRF_CLOCK_LF_SRC_XTAL,
        .lf_clk_cfg.xtal_accuracy	= NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM
    };
    uint32_t err = nrf_mesh_node_config(&config_params);
    ERROR_CHECK(err);
}
Parents
  • Hi,

    As in the description of the dsm_local_unicast_addresses_set() function:

    * @retval NRF_ERROR_FORBIDDEN The unicast addresses have been set once before,
     * and the device state must be reset before they can be changed again.
    

    Could you check if the unicast address is already set ? If the device is not the provisioner, most likely the unicast address is already set when provisioning happens.

Reply
  • Hi,

    As in the description of the dsm_local_unicast_addresses_set() function:

    * @retval NRF_ERROR_FORBIDDEN The unicast addresses have been set once before,
     * and the device state must be reset before they can be changed again.
    

    Could you check if the unicast address is already set ? If the device is not the provisioner, most likely the unicast address is already set when provisioning happens.

Children
No Data
Related