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

thread link configuration bypass flag in mesh-api #3987

Merged
merged 5 commits into from
Apr 10, 2017

Conversation

kseverinkangas-zg
Copy link

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

  • update mesh-minimal doc

Deploy notes

Steps to test or reproduce

Currently manually tested with the thread-testapp-private application (as a border router).

when false thread has empty link config
must join the network by commissioning
@kseverinkangas-zg
Copy link
Author

@artokin

NET_6LOWPAN_THREAD);
void read_link_configuration() {

memcpy(thread_tasklet_data_ptr->link_config.name, "Arm Powered Core", 16);
Copy link
Contributor

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

Copy link
Contributor

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.

@sg- sg- requested a review from SeppoTakalo March 22, 2017 10:45
#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
Copy link
Contributor

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);
Copy link
Contributor

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.

@SeppoTakalo SeppoTakalo requested a review from mikter March 22, 2017 11:42
@SeppoTakalo
Copy link
Contributor

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

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

@SeppoTakalo
Copy link
Contributor

@0xc0170 This is now good to go in.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 29, 2017

/morph test-nightly

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1784

All builds and test passed!

Copy link

@mikter mikter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@sg-
Copy link
Contributor

sg- commented Apr 6, 2017

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?

@SeppoTakalo
Copy link
Contributor

I would like to object that thought. This module serves no other purpose than to be a link between Nanostack and mbed OS.
It was my idea to get rid of all wrapping layers between mbed OS configuration systems and modules. I believe it is much cleaner now. All defaults are coming from mbed_lib.json and there can be no divergence between what is defined in header and what is in mbed_lib.json

Also, to get that code running on other platforms, getting all those #define lines from BUILD/<platform>/mbed_config.h after one build round is so easy that I don't think this as a obstacle to anyone.

Therefore I would like to propose that we will let this go in as it is.

@sg-
Copy link
Contributor

sg- commented Apr 10, 2017

@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.

@sg- sg- merged commit c776eaa into ARMmbed:master Apr 10, 2017
@adbridge adbridge mentioned this pull request May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants