-
Notifications
You must be signed in to change notification settings - Fork 3k
mbed-mesh-api: Add new API for Wi-SUN configuration #11181
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
Conversation
@artokin, thank you for your changes. |
* \return MESH_ERROR_NONE on success. | ||
* \return MESH_ERROR_UNKNOWN in case of failure. | ||
* */ | ||
mesh_error_t network_regulatory_domain_set(uint8_t regulatory_domain = 0xff, uint8_t operating_class = 0xff, uint8_t operating_mode = 0xff); |
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.
With each of the parameters 0xFF means what, an invalid value?
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.
yes, a comment added to explain 0xff.
* | ||
* \param network_name Network name as NUL terminated string. Can't exceed 32 characters and can't be NULL. | ||
* \return MESH_ERROR_NONE on success. | ||
* \return MESH_ERROR_UNKNOWN in case of failure. |
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.
All fails are Unknown?
int wisun_network_name_len = sizeof(MBED_CONF_MBED_MESH_API_WISUN_NETWORK_NAME); | ||
wisun_settings_str.network_name = (char *)ns_dyn_mem_alloc(wisun_network_name_len); | ||
if (!wisun_settings_str.network_name) { | ||
return -3; |
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.
Magic number.
|
||
strcpy(wisun_settings_str.network_name, network_name_ptr); | ||
|
||
if (wisun_tasklet_data_ptr && wisun_tasklet_data_ptr->tasklet_state == TASKLET_STATE_BOOTSTRAP_READY) { |
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.
this can be called any time after interface up even during bootstrap. I think in here you should have flexibility for it even before bootstrap is ready
661b312
to
631532c
Compare
This PR requires uses a new Nanostack API that is not available in Mbed OS yet. |
Add new API for setting Wi-SUN: -network name -regulatory domain, operating mode and operating class
Add new API for setting Wi-SUN: -Setting own/trusted certificates -Removing own/trusted certificates
5b9ee9b
to
f8289ec
Compare
PR rebased as #11335 is already in. |
One approval received, CI started |
This is not fix but functionality change, please add Release notes with details about this new API. |
Test run: FAILEDSummary: 2 of 4 test jobs failed Failed test jobs:
|
CI restarted (timeout, should be fixed now in CI) |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
I updated the release note to extend what we are adding. |
Description
Add new API for setting Wi-SUN:
network name
regulatory domain, operating mode and operating class
setting own and trusted certificate
removing own and trusted certificates
Pull request type
Reviewers
@mikter , @mikaleppanen
Release Notes
Add new APIs to Wi-SUN network certificate handling and network configuration. This includes: