espressif/esp-thread-br

[Question] Auto Start Thread network with specified hex value (TZ-676)

mmt-10 opened this issue · 4 comments

Hi,

As my understanding, WiFi SSID/PASS can set menuconfig.
I would like to use the specified hex value which dataset active -x generates with auto start.
How can I set hex value in menuconfig?

Hi, we do not support setting the whole hex dataset in auto start mode. You can have a try with this API to set your dataset otDatasetSetActiveTlvs, for details of this api, you can refer to openthread source code.

@zwx1995esp
Thank you for your reply.
I check source code of esp-thread-br.
I will write hex dataset to below line, it must be overwrite dataset.
otOperationalDatasetTlvs dataset;

BTW, I would like to add hex dataset option in menuconfig.
how do I add uint8_t array option in menuconfig?
otOperationalDatasetTlvs

@zwx1995esp Thank you for your reply. I check source code of esp-thread-br. I will write hex dataset to below line, it must be overwrite dataset. otOperationalDatasetTlvs dataset;

BTW, I would like to add hex dataset option in menuconfig. how do I add uint8_t array option in menuconfig? otOperationalDatasetTlvs

How about just add it in your program directly? I mean that you can define a macro in your program, for example:

#define OPENTHREAD_ACTIVE_DATASET_MANUAL "0e080000000000010000000300001835060004001fffe002081ed74143359b24030708fd721e9dfc4af9d605107ca397ebdbe65f37b510c9ff037d39bd030f4f70656e5468726561642d36333738010263780410a88354f3e63c96d227d694d7dc9030f80c0402a0f7f8"

And you can parse this string macro in some C codes, also you can refer this API in our ESP idf.

Also some logics are the same as parsing the active dataset, you can refer to these

Thank you for your reply and advice.
I will try it.