-
Notifications
You must be signed in to change notification settings - Fork 3k
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
thread link configuration bypass flag in mesh-api #3987
thread link configuration bypass flag in mesh-api #3987
Conversation
when false thread has empty link config must join the network by commissioning
NET_6LOWPAN_THREAD); | ||
void read_link_configuration() { | ||
|
||
memcpy(thread_tasklet_data_ptr->link_config.name, "Arm Powered Core", 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "Arm powered core mean"?
Should probably use sizeof() instead of an int for size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
Use "Thread network" or any other sensible name for network ID.
#define MBED_MESH_API_THREAD_STATIC_LINK_CONFIG MBED_CONF_MBED_MESH_API_THREAD_STATIC_LINK_CONFIG | ||
#else | ||
#define MBED_MESH_API_THREAD_STATIC_LINK_CONFIG 0X1 | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
You already have defined MBED_CONF_MBED_MESH_API_THREAD_STATIC_LINK_CONFIG
use it.
Don't redefine extra macro names.
NET_6LOWPAN_THREAD); | ||
void read_link_configuration() { | ||
|
||
memcpy(thread_tasklet_data_ptr->link_config.name, "Arm Powered Core", 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
Use "Thread network" or any other sensible name for network ID.
@mikter Review from Thread point of view. |
|
||
thread_management_node_init(thread_tasklet_data_ptr->nwk_if_id, | ||
|
||
bool is_static_config = MBED_MESH_API_THREAD_STATIC_LINK_CONFIG; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you make link configuration pointer and either set it to NULL or correct value based on flag
@0xc0170 This is now good to go in. |
/morph test-nightly |
Result: SUCCESSYour command has finished executing! Here's what you wrote!
OutputAll builds and test passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
This change causes a direct dependency on our tools to get the software working in any environment other than the mbed environment. The previous implementation of having a header that matches the config with default parameters allows anyone to grab blocks of source and plop them elsewhere and not get compile error dues to lack of symbols. I'm sure this is inconsistently implemented across mbed OS but would lean towards having default config values for every config option that is present. thoughts? |
I would like to object that thought. This module serves no other purpose than to be a link between Nanostack and mbed OS. Also, to get that code running on other platforms, getting all those Therefore I would like to propose that we will let this go in as it is. |
@SeppoTakalo We can let this go for now given there is no documentation or requirement of how to use or provide configuration but I'd expect this to change in the future. |
Description
The parameter thread-static-link-config defines weather to use static link configuration or not.
When the default parameter value is true, the static configuration is used (from .json)
When set to false thread has an empty link configuration and node starts sending network discovery requests. Requires commissioner in the thread network to accept connecting node.
Status
READY
Migrations
If this PR changes any APIs or behaviors, give a short description of what API users should do when this PR is merged.
NO
Related PRs
TBD: mesh-minimal
Todos
Deploy notes
Steps to test or reproduce
Currently manually tested with the thread-testapp-private application (as a border router).