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

mbed-mesh-api: Add new API for Wi-SUN configuration #11181

Merged
merged 3 commits into from Aug 28, 2019

Conversation

@artokin
Copy link
Contributor

commented Aug 7, 2019

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

[ ] Fix
[ ] Refactor
[ ] Target update
[x] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@mikter , @mikaleppanen

Release Notes

Add new APIs to Wi-SUN network certificate handling and network configuration. This includes:

  • network name
  • regulatory domain, operating mode and operating class
  • setting own and trusted certificate
  • removing own and trusted certificates
@ciarmcom ciarmcom requested review from mikaleppanen, mikter and ARMmbed/mbed-os-maintainers Aug 7, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

* \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);

This comment has been minimized.

Copy link
@VeijoPesonen

VeijoPesonen Aug 8, 2019

Contributor

With each of the parameters 0xFF means what, an invalid value?

This comment has been minimized.

Copy link
@artokin

artokin Aug 8, 2019

Author Contributor

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.

This comment has been minimized.

Copy link
@teetak01

teetak01 Aug 8, 2019

Contributor

All fails are Unknown?

@artokin artokin added the needs: work label Aug 8, 2019
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;

This comment has been minimized.

Copy link
@VeijoPesonen

VeijoPesonen Aug 8, 2019

Contributor

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) {

This comment has been minimized.

Copy link
@mikter

mikter Aug 8, 2019

Contributor

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

@0xc0170 0xc0170 removed the needs: review label Aug 8, 2019
@artokin artokin force-pushed the artokin:mbed_wisun_api_update branch from 661b312 to 631532c Aug 8, 2019
@mikter
mikter approved these changes Aug 12, 2019
@artokin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 20, 2019

This PR requires uses a new Nanostack API that is not available in Mbed OS yet.
Once the new Nanostack is available then this PR can proceed.

artokin added 3 commits Aug 6, 2019
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
@artokin artokin force-pushed the artokin:mbed_wisun_api_update branch from 5b9ee9b to f8289ec Aug 28, 2019
@artokin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

PR rebased as #11335 is already in.
Please re-review.

@mikter
mikter approved these changes Aug 28, 2019
@artokin

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2019

One approval received, CI started

@0xc0170 0xc0170 removed the needs: review label Aug 28, 2019
@0xc0170 0xc0170 added the needs: CI label Aug 28, 2019
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

Add new API for setting Wi-SUN:

This is not fix but functionality change, please add Release notes with details about this new API.

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 28, 2019

Test run: FAILED

Summary: 2 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

CI restarted (timeout, should be fixed now in CI)

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 28, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Aug 28, 2019
@0xc0170 0xc0170 merged commit d6304e3 into ARMmbed:master Aug 28, 2019
25 checks passed
25 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(-72 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8614 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8464B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
@0xc0170

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

I updated the release note to extend what we are adding.

@artokin artokin deleted the artokin:mbed_wisun_api_update branch Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.