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

OpenThread with FDS not persisting data

Hi,

I am doing OOB commissioning with OpenThread. According to section 10.12 of Thread 1.1.1 specification, Active / Pending Operational Datasets need to be persisted to NVM. OpenThread has a otDatasetSetActive function for that.

From what I understand, if FDS is enabled, the nRF stack should use it to persist data. The "ble_thread_dyn_template" example seems to be set up for that. If I call otDatasetSetActive with my own dataset in that example, it succeeds. However, once I reset the device, these changes are not reflected.

Here's my test function:

static void thread_set_active_dataset(otInstance * openthread)
{
    otOperationalDataset dataset = {0};

    dataset.mIsNetworkNameSet = 1;
    strcpy(dataset.mNetworkName.m8, "foobar");

    dataset.mIsActiveTimestampSet = 1;
    dataset.mActiveTimestamp = 0;

    otError err = otDatasetSetActive(openthread, &dataset);
    APP_ERROR_CHECK(err);
}

Is this an nRF bug, or am I not using the OT API properly?

I also tried using FDS without relying on these datasets, and that seems to be working okay. I can save / update / retrieve data successfully.

Thanks.

Parents Reply Children
No Data
Related