Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mmt-10 opened this issue Mar 7, 2024 · 4 comments
Closed

Comments

@mmt-10
Copy link

mmt-10 commented Mar 7, 2024

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?

@github-actions github-actions bot changed the title [Question] Auto Start Thread network with specified hex value [Question] Auto Start Thread network with specified hex value (TZ-676) Mar 7, 2024
@zwx1995esp
Copy link
Collaborator

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.

@mmt-10
Copy link
Author

mmt-10 commented Mar 8, 2024

@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
Copy link
Collaborator

@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

@mmt-10
Copy link
Author

mmt-10 commented Mar 8, 2024

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

@mmt-10 mmt-10 closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants