Skip to content

modules: openthread: Implement radio_nrf5 OpenThread platform. #21882

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

ArekBalysNordic
Copy link
Contributor

@ArekBalysNordic ArekBalysNordic commented Apr 16, 2025

Introduce radio_nrf5 OpenThread radio platform which uses nRF radio driver directly. The Zephyr L2 layer, IEEE802.15.4 shim layer and net packets are not used in this implementation.

To build without Zephyr's L2 layer add:

-DCONFIG_OPENTHREAD=y -DCONFIG_NET_L2_OPENTHREAD=n -DCONFIG_NETWORKING=n

TODO:

  • Prepare radio_nrf5.c file.
  • Prepare Kconfig to switch between the legacy approach with Zephyr L2 and IEE802.15.4 shim layer and the new one.
  • Implement receiving and transmitting through nRF radio driver.
  • Implement threading to manage transmission.

Do not review while it is in draft.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Apr 16, 2025
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch from 4ddfba4 to 3f13949 Compare April 16, 2025 13:17
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 16, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 28

Inputs:

Sources:

more details

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (0)

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ❌ Toolchain
  • ❌ Build twister
  • ❌ Integration tests

Note: This message is automatically posted and updated by the CI

@ArekBalysNordic ArekBalysNordic changed the title modules: openthread: Prepare radio_nrf5.c file and Kconfigs modules: openthread: Implement radio_nrf5 OpenThread platform. Apr 16, 2025
To start working with a new implementation of the OpenThread radio
platform, we need to have the dedicated radio_nrf5.c file and
kconfig to switch between legacy Zephyr's IEEE802.15.4 shim layer
and direct nrf5 radio driver implementations.

Signed-off-by: Arkadiusz Balys <[email protected]>
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch from 3f13949 to 0a1013d Compare April 17, 2025 15:39
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Apr 17, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
nrfxlib nrfconnect/sdk-nrfxlib@1a6caa7 nrfconnect/sdk-nrfxlib#1732 nrfconnect/sdk-nrfxlib#1732/files
zephyr nrfconnect/sdk-zephyr@7607c65 nrfconnect/sdk-zephyr#2792 nrfconnect/sdk-zephyr#2792/files

DNM label due to: 2 projects with PR revision

Note: This message is automatically posted and updated by the Manifest GitHub Action.

Copy link

You can find the documentation preview for this PR here.

@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch 2 times, most recently from 7cab044 to 35b97ad Compare April 18, 2025 12:34
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch from 35b97ad to 82b5166 Compare April 18, 2025 12:39
Prepared build environment to support building OpenThread
without Zephyr's L2 and IEEE802.15.4 shim layers.
To do it, some of Kconfigs must be cloned into the new
Kconfig file (dedicated to nRF5-driver-based approach)
to meet all OpenThread requirements while NET_L2_OPENTHREAD
is disabled.

Signed-off-by: Arkadiusz Balys <[email protected]>
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch from 82b5166 to 42da834 Compare April 18, 2025 12:54
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch 5 times, most recently from bd28b58 to 140193d Compare April 29, 2025 14:23
@@ -0,0 +1,483 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

This file should be moved out of OpenThread platform, as it does not implement it. Would move it one level up.

@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch from 140193d to 2401932 Compare April 30, 2025 09:02
Updated modules/openthread/platform after latest changes in
Zephyr.

Aligned openthread implementation to the new approach.

Signed-off-by: Arkadiusz Balys <[email protected]>
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_radio_refactor branch from 2401932 to 0e3d1ae Compare April 30, 2025 09:03
Remove Zephyr L2 related code.

Signed-off-by: Adrian Gielniewski <[email protected]>
Add alternative radio implementation that does not use Zephyr L2.

Signed-off-by: Adrian Gielniewski <[email protected]>
@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Apr 30, 2025
Stop using L2 log level in platform files.

Signed-off-by: Arkadiusz Balys <[email protected]>
The new CONFIG_OPENTHREAD_SYS_INIT Kconfig option allows OpenThread
to be automatically initialised during the Zephyr POST_KERNEL
initialisation stage.

If Zephyr's L2 layer OpenThread implementation is enabled, the
IEEE802.15.4 shim layer initialises OpenThread in the POST_KERNEL
phase. However, since Openthread may work without Zephyr's L2
layer, in this case, no object can initialise it automatically.
This new Kconfig option may help start OpenThread automatically
if the L2 Layer is disabled.

Signed-off-by: Arkadiusz Balys <[email protected]>
Signed-off-by: Adrian Gielniewski <[email protected]>
@adigie adigie force-pushed the openthread_radio_refactor branch from 21d9e9a to 3e301f9 Compare May 7, 2025 09:26
adigie added 5 commits May 14, 2025 15:47
Add nrf5 radio implementation.

Signed-off-by: Adrian Gielniewski <[email protected]>
Signed-off-by: Adrian Gielniewski <[email protected]>
Signed-off-by: Adrian Gielniewski <[email protected]>
Signed-off-by: Adrian Gielniewski <[email protected]>
@adigie adigie force-pushed the openthread_radio_refactor branch from 1a51717 to b5a9dae Compare May 14, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. DNM doc-required PR must not be merged without tech writer approval. manifest manifest-nrfxlib manifest-zephyr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants