Skip to content

Add the setting to use the mbed-os-example-client #2386

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

Closed
wants to merge 3 commits into from
Closed

Add the setting to use the mbed-os-example-client #2386

wants to merge 3 commits into from

Conversation

TomoYamanaka
Copy link
Contributor

By default, mbed-os-example-client can't be built for Renesas GR-PEACH, and This is the workaround for the issue.

There is no device unique ID to the GR-PEACH. Therefore, we implimented the following function.

  • The value read by the Timer is set to a random seed.
  • Put a random number into the entropy poll, and returns it.

Regards,
Tomo Yamanaka

By default, mbed-os-example-client can't be built for Renesas GR-PEACH, and This is the workaround for the issue.
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 8, 2016

Can you please fix the formatting in the hal implementation to be compatible with mbed coding style?

Why did you decide to use Timer (c++ file) , not to use us ticker HAL functions?

@@ -1628,6 +1628,7 @@
"extra_labels": ["RENESAS", "MBRZA1H"],
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
"inherits": ["Target"],
"macros": [" MBEDTLS_ENTROPY_HARDWARE_ALT "],
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit pick: Is there a reason the extra "space" characters ( ) are needed on both sides ofMBEDTLS_ENTROPY_HARDWARE_ALT? Could the line be changed from:

        "macros": [" MBEDTLS_ENTROPY_HARDWARE_ALT "],

to

        "macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT"],

I deleted the unnecessary space.
@@ -1628,6 +1628,7 @@
"extra_labels": ["RENESAS", "MBRZA1H"],
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
"inherits": ["Target"],
"macros": ["MBEDTLS_ENTROPY_HARDWARE_ALT"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you your comments.

I deleted the unnecessary space.

@TomoYamanaka
Copy link
Contributor Author

@0xc0170

Thank you for your comments.

Can you please fix the formatting in the hal implementation to be compatible with mbed coding style?

Do you mean the current etropy_hardware_poll.cpp can't follow the following points in mbed OS 5.0 coding rules?

  • Space after statements of type if, while, for, switch.
  • Unix line endings are default option for files.
  • Empty lines should have no trailing spaces.

Please let me confirm your intention, just in case.

Why did you decide to use Timer (c++ file) , not to use us ticker HAL functions?

My understanding on your feedback is that the API declared in us_ticker_api.h is preferred in this case. Can I get it right?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 9, 2016

Do you mean the current etropy_hardware_poll.cpp can't follow the following points in mbed OS 5.0 coding rules?

Yes it should, mainly around if where { are on the same line, for instance.

My understanding on your feedback is that the API declared in us_ticker_api.h is preferred in this case. Can I get it right?

Yes, it's HAL implementation and I don't see why that file needs t obe c++ file (using C++ API). What do you think?

@TomoYamanaka
Copy link
Contributor Author

TomoYamanaka commented Aug 10, 2016

@0xc0170

Thank you for your explanation.
I understood very well.

I'll fix again by feedback the contents.

In "etropy_hardware_poll" function, I modified to reference the API declared in us_ticker_api.h.
And along the mbed OS 5.0 coding rules, I modified the code.
@TomoYamanaka
Copy link
Contributor Author

@0xc0170

I fixed the code by feedback your contents.
In "etropy_hardware_poll" function, I modified to reference the API declared in us_ticker_api.h.
And along the mbed OS 5.0 coding rules, I modified the code.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 25, 2016

/morph test

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 25, 2016

The code looks good, thanks for updating it. we'll wait for CI results

@mbed-bot
Copy link

Result: SUCCESS

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

/morph test

Output

mbed Build Number: 713

All builds and test passed!

@sg-
Copy link
Contributor

sg- commented Aug 26, 2016

@TomoYamanaka This is meant to be inplemented by an TRNG. If the device doesn't have one you can provide a storage driver and we'll be adding a NV_SEED based implementation for mbed OS 5.2.

Alternatively, until later this year you can use no entropy by adding the following define to an application. https://github.com/ARMmbed/mbed-os-example-client#requirements-for-non-k64f-board

@sbutcher-arm

@TomoYamanaka
Copy link
Contributor Author

@sg-

Thank you for your clarification.
Could you inform me of a little more detail schedule for "mbed OS 5.2" ?

I have the opportunity in which mbed Client is must-have function.
If I would enable "MBEDTLS_TEST_NULL_ENTROPY", it might be impact to it.
So, I would like to clarify the schedule for "mbed OS 5.2" for further consideration.

Also, I'm not sure what the "storage driver" is.
Could you inform me of the supplementary information on it?

@Osamu-Nakamura
Copy link

@sg-

I have a question on the usage of no entropy. When I tried no entropy in accordance with https://github.com/ARMmbed/mbed-os-example-client#requirements-for-non-k64f-board, I faced a compiling error. It seems that MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES isn't defined in mbed_config.h in the problem case and it caused an error. Instead, if I added MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES and MBEDTLS_TEST_NULL_ENTROPY to targets.json, I could successfully build the program.

Is any additional procedure needed when modifying mbed_app.json?

@sg-
Copy link
Contributor

sg- commented Sep 8, 2016

Both macros MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES and MBEDTLS_TEST_NULL_ENTROPY should be added to the mbed_app.json file

@toyowata
Copy link
Contributor

@sg-
I think current example of mbed_app.json for the K64F boards is not correct and created the ticket here: ARMmbed/mbed-os-example-client#84

@sg-
Copy link
Contributor

sg- commented Sep 28, 2016

The mbed TLS entropy integration is done via TRNG HAL. If the device supports TRNG that is the way to enable.

@sg- sg- closed this Sep 28, 2016
@sg-
Copy link
Contributor

sg- commented Nov 11, 2016

NV_SEED didn't make it into mbed OS 5.2 Will provide more updates when available.

@Osamu-Nakamura
Copy link

We Renesas strongly hope NV_SEED is supported in the near future update (i.e. mbed OS 5.3 or mbed OS 5.4). Otherwise, we cannot help providing users with poor security. It should be disadvantage for both you and us. Please take this point into consideration. Thank you for your understanding.

artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 8, 2020
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 8, 2020
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers
9a21668 Merge branch 'release_internal' into release_external
8e72b80 MAC CCA thr: Check if channel out of range (ARMmbed#2363)
146a0a3 Corrected trace on authenticator
d04a96d Merge pull request ARMmbed#2361 from ARMmbed/sync_with_mbedos
2c2b915 Added empty function for ns time callback
76ac0de Remove NCS36510 target
0258ac3 Remove KW24D target
788f01b Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2fbc7a1 Corrected invalid memory read on access revoke
941b9b4 Updates to stagger/latency (ARMmbed#2358)
c2abaaa Corrected defects
1811194 Corrected warning trace, validations and ut stubs
69e2d19 Added NS filesystem and interface to application
c5b6993 refactored packet ingress
a05605e Unsecured packets will be acked by default automatically.
36dfb29 MAC: Implemented automatic CCA threshold (ARMmbed#2353)
0396b97 Revert EAPOL simplify failure handling and focus this problem later on.
b2fe3d4 Ignoring authentication failure if security protocol already started
11de56d Added info API for Wi-SUN border router
87a4f69 Added EAPOL key storage to authenticator and unified GTK storage (ARMmbed#2345)
ff1ca25 EAPOL failure simplify and EAPOL relay agent add trace when eapol temp pool is empty
6667b31 Update NA trace
34cdafe Temporary EAPOL neighbour entry Update and MAC MLME update
d092f83 Iotthd 3995 (ARMmbed#2347)
e2ea4e4 Disabled BR (TLS server) EC calculation queue
5759851 Changed the rate limiting function to calculate the values runtime
899e755 Make it possible to update tr51 table to larger dynamically
8436669 Added configuration for DHCP lifetime value
da732bc When network name or PAN ID is changed authenticator updates MAC keys

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
artokin pushed a commit to artokin/mbed-os that referenced this pull request Jun 8, 2020
…..b3fe574

b3fe574 Remove test files from the release
b2bf24c Merge branch 'release_internal' into release_external
0ed25a7 Fix errors found from coverity scan (ARMmbed#2386)
7a138f7 Added IID for border router info structure
4021b0c LLC secure data duplicate check update and EAPOL relay duplicate fix
b190a97 Remove Thread-protocol from README (ARMmbed#2383)
ae8ae32 EAPOL relay agent rx filter from joiner side
0d4eb7a Removed dead code part
fc644f5 RPL new parent accept update and NUD operation
f5920e2 ETX API update and RPL ETX threshold callback update.
1fdee20 Wi-sun keep all candidates alive by NUD.
bd746da Key storage settings are no longer cleared on delete
bd388fc Changed EAPOL initial-Key retries from 2 to 4 on large NW
a3d80a3 WS bootstrap: Default CCA threshold to -60dBm (ARMmbed#2377)
72b26a7 Created extra large network setup for Wi-SUN
38dd4a6 Corrected PTK and PMK lifetime handling
64f2a77 Cleared EAPOL temporary trace print's.
02ec23f Timed parent selection is now imim-imin*2 earlier there was just 5 seconds randomize.
3b2d906 Added check for network name and DODAG ID IID (EUI-64) (ARMmbed#2373)
ee45f4b Updated initial key trickles
184425b Fixed parent target address set.
07ec237 Updated Discovery and RPL setup large & medium size network
a94d8f2 RPL version num update
9e2ac1d Double default eapol entry size for test purpose.
6b8beef Clear all neighbors only on eapol next target check
faa19e1 Corrected next address set
8a917fb Continue trickle on initial EAPOL-key TX failure
cfdb193 Merge pull request ARMmbed#2368 from ARMmbed/sync_with_mbedos
f7a15fa (via MbedOS) ws: added support for brazilian regulatory domain
c397edb Changed large network initial-key trickle parameters
758f534 Added maximum frame counter storing interval
b0ea148 Corrected key storage configuration setting
be3c94e WS RPL paret soft filter update
8b1d537 Adjusted EAPOL limits and timers
9a21668 Merge branch 'release_internal' into release_external
8e72b80 MAC CCA thr: Check if channel out of range (ARMmbed#2363)
146a0a3 Corrected trace on authenticator
d04a96d Merge pull request ARMmbed#2361 from ARMmbed/sync_with_mbedos
2c2b915 Added empty function for ns time callback
76ac0de Remove NCS36510 target
0258ac3 Remove KW24D target
788f01b Netsocket/lwIP Stack: Remove support for ARM Compiler 5
2fbc7a1 Corrected invalid memory read on access revoke
941b9b4 Updates to stagger/latency (ARMmbed#2358)
c2abaaa Corrected defects
1811194 Corrected warning trace, validations and ut stubs
69e2d19 Added NS filesystem and interface to application
c5b6993 refactored packet ingress
a05605e Unsecured packets will be acked by default automatically.
36dfb29 MAC: Implemented automatic CCA threshold (ARMmbed#2353)
0396b97 Revert EAPOL simplify failure handling and focus this problem later on.
b2fe3d4 Ignoring authentication failure if security protocol already started
11de56d Added info API for Wi-SUN border router
87a4f69 Added EAPOL key storage to authenticator and unified GTK storage (ARMmbed#2345)
ff1ca25 EAPOL failure simplify and EAPOL relay agent add trace when eapol temp pool is empty
6667b31 Update NA trace
34cdafe Temporary EAPOL neighbour entry Update and MAC MLME update
d092f83 Iotthd 3995 (ARMmbed#2347)
e2ea4e4 Disabled BR (TLS server) EC calculation queue
5759851 Changed the rate limiting function to calculate the values runtime
899e755 Make it possible to update tr51 table to larger dynamically
8436669 Added configuration for DHCP lifetime value
da732bc When network name or PAN ID is changed authenticator updates MAC keys

git-subtree-dir: features/nanostack/sal-stack-nanostack
git-subtree-split: b3fe574
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.

7 participants