mirror of
https://github.com/espressif/openthread.git
synced 2026-07-26 05:53:45 +00:00
[unit-test] properly configure operational dataset (#9203)
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "test_platform.h"
|
||||
#include "test_util.hpp"
|
||||
|
||||
#include <openthread/dataset_ftd.h>
|
||||
#include <openthread/srp_client.h>
|
||||
#include <openthread/srp_server.h>
|
||||
#include <openthread/thread.h>
|
||||
@@ -200,7 +201,13 @@ void InitTest(void)
|
||||
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
// Initialize Border Router and start Thread operation.
|
||||
|
||||
SuccessOrQuit(otLinkSetPanId(sInstance, 0x1234));
|
||||
otOperationalDataset dataset;
|
||||
otOperationalDatasetTlvs datasetTlvs;
|
||||
|
||||
SuccessOrQuit(otDatasetCreateNewNetwork(sInstance, &dataset));
|
||||
SuccessOrQuit(otDatasetConvertToTlvs(&dataset, &datasetTlvs));
|
||||
SuccessOrQuit(otDatasetSetActiveTlvs(sInstance, &datasetTlvs));
|
||||
|
||||
SuccessOrQuit(otIp6SetEnabled(sInstance, true));
|
||||
SuccessOrQuit(otThreadSetEnabled(sInstance, true));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user