Skip to content

Openthread separate L2 configs #2792

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 3,022 commits into
base: main
Choose a base branch
from

Conversation

ArekBalysNordic
Copy link
Contributor

Please see commit messages.

Do not review while it is in draft.

alxelax and others added 30 commits April 1, 2025 07:48
… valid yet

Commit sets valid state when mesh is actualy provisioned.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit 928208c)
Signed-off-by: Pavel Vasilyev <[email protected]>
Previously, PB-GATT unprovisioned advs would continue being sent if a
device is provisioned or in the process of being provisioned (an active
provisioning link) over PB-ADV.

This commit introduces the `link_cancel` callback for the `prov_bearer`
struct. When a provisioning link is established over a prov bearer, all
other (active) prov bearers will be suspended through this callback, and
re-enabled when the link is closed. An exception is made for PB-REMOTE,
which can utilize the other bearers.

The call to `bt_mesh_pb_gatt_srv_disable` in settings.c is removed. This
is called in `mesh_commit`, and is not needed as this is only used
during boot, at which point the Mesh provisioning service has not yet
been enabled/registered, meaning the function does nothing.

Signed-off-by: Håvard Reierstad <[email protected]>
(cherry picked from commit 200628e)
Signed-off-by: Pavel Vasilyev <[email protected]>
Changes Brearer --> Bearer.

Signed-off-by: Håvard Reierstad <[email protected]>
(cherry picked from commit 062fdc3)
Signed-off-by: Pavel Vasilyev <[email protected]>
Adds a provision test to check that provisioning bearers are cancelled
when a provisioning link is opened. Modifies the functionality for
receiving unprovisioned beacons to fail the test if a unprovisioned
beacon is received from the current provisionee after a threshold.

Signed-off-by: Håvard Reierstad <[email protected]>
(cherry picked from commit acccd46)
Signed-off-by: Pavel Vasilyev <[email protected]>
When the board has been provisioned and the board is rebooted
it was not possible to connect to the board through the proxy
servcie. This fixes that the Mesh Proxy servive is restarted
after the board is rebooted.

Signed-off-by: Ingar Kulbrandstad <[email protected]>
(cherry picked from commit db84181)
Signed-off-by: Pavel Vasilyev <[email protected]>
Commit removes device key candidate if provisionee failed
during device key refresh procedure or mesh reset has been
called in between. Otherwise, device key candidate gets
stuck in the internal trusted storage of crypto library.

Signed-off-by: Aleksandr Khromykh <[email protected]>
(cherry picked from commit bf22fa6)
Signed-off-by: Pavel Vasilyev <[email protected]>
The TMP435 is a remote temperature sensor monitor
with a built-in local temperature sensor.

Signed-off-by: Jaakko Rautiainen <[email protected]>
(cherry picked from commit 516e5d6)
This Introduces a driver for the i2c interface of Phosense XBR818.
XBR818 is a 10.525Ghz Radar chip with builtin detection algorithm.

Signed-off-by: Camille BAUD <[email protected]>
(cherry picked from commit 6376866)
- add driver for Vishay VEML6031 High Accuracy Ambient Light Sensor.
- add new compatible "vishay,veml6031".
- read and write consecutive 8 bit registers as bulk operation.
- add driver to build all test of sensors.
- support fetch and get.
- triggered mode and interrupt is not yet supported.

Signed-off-by: Andreas Klinger <[email protected]>
(cherry picked from commit 72b2f01)
Add driver for Bosch BMM350 magnetometer sensor.

Signed-off-by: Maximilian Deubel <[email protected]>
(cherry picked from commit 878ab53)
The simple backend returns the size of the credential,
even if it is too big.
The secure backend should do the same,
our libraries depend on this behaviour.

Signed-off-by: Maximilian Deubel <[email protected]>
(cherry picked from commit 916897f)
This is needed for next generation Secure Domain firmware.

Upstream PR #: 87749

Signed-off-by: Håkon Amundsen <[email protected]>
The check for index out of bound is missing, It turns into a crash
for input channel more than WIFI_MGMT_SCAN_CHAN_MAX_MANUAL.

Signed-off-by: Kapil Bhatt <[email protected]>
(cherry picked from commit 6f9dbbd)
Fixes some oddities with CMake code

Signed-off-by: Jamie McCrae <[email protected]>
(cherry picked from commit 4fa91b5)
…rnal memory

Both backends supported as runners for nRF ICs, nrfjprog and nrfutil,
support erasing external memory as part of the programming operation.
Before this patch, and when the firmware was detected to be partially or
fully placed in external flash by inspecting the .hex address range, the
runner would instruct the backend tool to fully erase the external
flash (but the nrfjprog runner would ignore that, always erasing only
the sectors required). Instead, correctly default to erasing only the
sectors that are required to program the new firmware image in both tools,
and erase it completely only when the --erase flag is provided by the user.

Signed-off-by: Carles Cufi <[email protected]>
(cherry picked from commit f20168f)
…onfig param

This acts in a similar way to nrfjprog's --qspiini parameter introduced
in 7eb364b, but works slightly differently in nrfutil: it requires a
config file in JSON format instead of .ini, and it is passed along to
the `execute-batch` command instead of providing it together with the
`program` command.

Signed-off-by: Carles Cufi <[email protected]>
(cherry picked from commit 2effae5)
Adds a configuration file which is used with nrfutil to allow
programming the SPI flash on the device

Upstream PR #: 86985

Signed-off-by: Jamie McCrae <[email protected]>
Adds a configuration file which is used with nrfutil to allow
programming QSPI on the device

Upstream PR #: 86985

Signed-off-by: Jamie McCrae <[email protected]>
Non-secure variants for nRF7002 DK were removed from upstream
in commit 10d4973. Revert these
changes downstream, so that the NS variants are still available.

Signed-off-by: Andrzej Głąbek <[email protected]>
…ls header

Fix all docstrings in header to ensure compliance
with Zephyr's documentation guidelines.

Signed-off-by: Triveni Danda <[email protected]>
(cherry picked from commit c9821ff)
…network options

Use getopt API to process arguments for `cred add` command.

Signed-off-by: Triveni Danda <[email protected]>
(cherry picked from commit 7b6f257)
…nfiguration

On nrf54h20 there are additional analog pins (AIN8+). When differential
mode is used they must not be mixed with AIN0-AIN7. Add build time
validation which detects if configuration is invalid.

Upstream PR #: 87405

Signed-off-by: Krzysztof Chruściński <[email protected]>
…vref_mv

Sample is reading vref-mv property to get reference voltage and then if
reference source is set to ADC_REF_INTERNAL this value is overwritten.
If vref-mv property is provided then it should not be overwritten.

Upstream PR #: 87405

Signed-off-by: Krzysztof Chruściński <[email protected]>
…nfiguration

AIN9 source needs special handling (all from AIN8-AIN14). Conversion
result needs to be scaled up by 3.6 additionally to gain and reference
voltage. In order to achieve correct value in the sample vref-mv is
used as reference voltage instead of predefined internal reference
source.

Upstream PR #: 87405

Signed-off-by: Krzysztof Chruściński <[email protected]>
…F54L20 cpuapp

Add Overlay required to run the test on
nrf54l20pdk/nrf54l20/cpuapp.

Signed-off-by: Sebastian Głąb <[email protected]>
(cherry picked from commit f2cf266)
Add number of channels implemented by the local DPPIC instances.

Upstream PR #: 85853

Signed-off-by: Adam Kondraciuk <[email protected]>
… for DPPIC

The `owned-channels` property specifies which channels are assigned to
a given target. Additionally, the `source-channels` or `sink-channels`
property defines channels that can be used to forward an event outside
the DPPI domain, otherwise they can only be used within it.

Upstream PR #: 85853

Signed-off-by: Adam Kondraciuk <[email protected]>
Add pin control support for the sy1xx soc.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit 804e3f6)
Signed-off-by: Sven Ginka <[email protected]>
Add pin ctrl to the sy1xx device tree.

Signed-off-by: Adam Kondraciuk <[email protected]>
(cherry picked from commit fb53ea0)
Signed-off-by: Sven Ginka <[email protected]>
krish2718 and others added 13 commits April 16, 2025 13:16
For enterprise mode we need to install multiple certs to the TLS
credentials store, so, add a helper script in python to make it work
cross-platforms.

Upstream PR #: 88682

Signed-off-by: Chaitanya Tata <[email protected]>
Commit 6a2cbc7 ("boards: nrf53*: add L|HFXO configurations") missed
the fix for nRF7002DK which is also based on nRF53 SoC.

Upstream PR #: 88680

Signed-off-by: Chaitanya Tata <[email protected]>
Signed-off-by: Aleksandar Stanoev <[email protected]>
Change wifi_cred to wifi cred.

Upstream PR #: 88674

Signed-off-by: Kapil Bhatt <[email protected]>
… credentials"

This reverts commit 8e325a5.

Signed-off-by: Chaitanya Tata <[email protected]>
Instead of having an overlay move the Enterprise configurations to a
dedicated snippet so that it can be enabled with any sample.

Can be used along with Wi-Fi snippet e.g., `-S
"wifi-ipv4;wifi-enterprise"`.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
…ials

Enable TLS credentials shell to manager Wi-Fi enterprise certs.

Upstream PR #: 87656

Signed-off-by: Chaitanya Tata <[email protected]>
Add locally generated info for deauth process. If deauthentication
frame is coming from AP it will be set, in other cases
(Beacon loss, New connection from user in connected state,
disconnection from user) flag will not be set.

Upstream PR #: 88489

Signed-off-by: Kapil Bhatt <[email protected]>
This helps install certificates to the TLS credentials store using TLS
credentials shell.

Upstream PR #: 88553

Signed-off-by: Chaitanya Tata <[email protected]>
Adds missing qualifiers for grouping flash runner configuration

Upstream PR #: 88699

Signed-off-by: Jamie McCrae <[email protected]>
Cache was not enabled when s2ram did not completed which
lead to system malfunction. Always power up cache when
returning from s2ram function.

Upstream PR #: 88709

Signed-off-by: Krzysztof Chruściński <[email protected]>
- Add possibility to choose implementation of OpenThread L2 and
set it to Zephyr's by default
- Remove unused `OPENTHREAD_SECURITY_INTERNAL` Kconfig
- Add missing choice names for logging and coprocessor

Signed-off-by: Maciej Baczmanski <[email protected]>
(cherry picked from commit 6636adc)
The current mapping gets the network interface into dormant state when
Thread is not attached. While the node is not capable of doing multi-hop
communication when it's not attached, it should be able to do link-local
communication. This commit changes the mapping to look at OpenThread's
own network interface state instead without further checking Thread's
device role, so that link-local communication is supported when a node
in detached state.

Signed-off-by: Yakun Xu <[email protected]>
(cherry picked from commit eddb1af)
@ArekBalysNordic ArekBalysNordic changed the title Openthread separate l2 cp Openthread separate L2 configs Apr 18, 2025
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_separate_l2_cp branch 6 times, most recently from e258eaf to a98cb40 Compare April 30, 2025 09:00
Moved OpenThread-related Kconfigs from L2 layer to
modules/openthread. All of those configs were not strictly related
to the L2 layer, so they fits better to OpenThread module.
This operation allows using OpenThread Kconfigs even if L2 layer is
disabled.

Enabling NET_L2_OPENTHREAD also configures those configs by
selecting the OPENTHREAD kconfig, so there is no change regarding
backwards compatibility. The only change is that the Kconfigs
related to Thread were moved to the modules space, so their
location in the menuconfig also changed.

Once it is done, a choice for setting different L2 implementations
seems to be redundant.

Signed-off-by: Arkadiusz Balys <[email protected]>
(cherry picked from commit 66e78e0)
… modules

Move OpenThread-related code from
zephyr/subsys/net/l2/openthread/openthread.c to
zephyr/modules/openthread/platform/openthread.c.

The primary goal of this refactor is to enable the use
of OpenThread as an independent module, without the necessity
of Zephyr's networking layer.

This change is particularly beneficial for simple applications
that have their own implementation of the IEEE802.15.4 driver
and do not require a networking layer. These applications can
now disable Zephyr's L2 and IEEE802.15.4 shim layers and
directly use the OpenThread module, saving valuable kilobytes
of memory.

In this approach if the CONFIG_NET_L2_OPENTHREAD
Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layers
will be used, and everything will function as before.
The main difference is the Zephyr's L2 layer now uses
the OpenThread module, no longer implementing it.

While most of the functions in include/net/openthread.h
have been deprecated, they are still available for use to
maintain backwards compatibility.

Signed-off-by: Arkadiusz Balys <[email protected]>
(cherry picked from commit 596844a2cb80a5f8ea4d17b37214c3363e92ab01)
…n POST_KERNEL

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]>
(cherry picked from commit 9a5f4b97bd37b0327d3b6e8800998937cdc01418)
… platform

Stop using L2 log level in OpenThread platform files.

Signed-off-by: Arkadiusz Balys <[email protected]>
(cherry picked from commit ca40f410ac583f81d1b820ff1de2070ad9dfcc73)
@ArekBalysNordic ArekBalysNordic force-pushed the openthread_separate_l2_cp branch from a98cb40 to 164efb6 Compare May 9, 2025 10:20
Copy link

sonarqubecloud bot commented May 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.