Skip to content

Commit a669ba5

Browse files
ArekBalysNordickartben
authored andcommitted
doc: releases: Add release note entry for OpenThread update
Add an entry to the release note to inform about the new CONFIG_OPENTHREAD_SYS_INIT Kconfig option. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
1 parent ca40f41 commit a669ba5

File tree

2 files changed

+70
-5
lines changed

2 files changed

+70
-5
lines changed

doc/connectivity/networking/api/thread.rst

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,69 @@ Zephyr's OpenThread L2 platform adaptation layer glues the external OpenThread
6464
stack together with Zephyr's IEEE 802.15.4 protocol agnostic driver API. This
6565
API is of interest to OpenThread L2 **subsystem contributors** only.
6666

67+
OpenThread Platform API
68+
=======================
69+
70+
The OpenThread platform API is defined by the OpenThread stack and implemented in Zephyr as an
71+
OpenThread module. Applications can use this implementation directly, or access it through the
72+
OpenThread L2 adaptation layer.
73+
74+
Using the OpenThread L2 Adaptation Layer API
75+
--------------------------------------------
76+
77+
To use the OpenThread platform API via the OpenThread L2 adaptation layer, enable both the
78+
:kconfig:option:`CONFIG_NET_L2_OPENTHREAD` and :kconfig:option:`CONFIG_NETWORKING` Kconfig options
79+
by setting them to ``y``. The adaptation layer will use the OpenThread radio API implementation
80+
found in :file:`modules/openthread/platform/radio.c`. In this setup, the OpenThread stack is
81+
initialized and managed by the adaptation layer.
82+
83+
Using the OpenThread Platform API Directly
84+
------------------------------------------
85+
86+
You can also use the OpenThread platform API directly, bypassing the OpenThread L2 adaptation
87+
layer. However, this approach requires you to provide your own implementation of the OpenThread
88+
radio API that is compatible with your specific radio driver.
89+
90+
To use the OpenThread platform API directly, set the :kconfig:option:`CONFIG_OPENTHREAD` Kconfig
91+
option to ``y``, and do **not** set :kconfig:option:`CONFIG_NET_L2_OPENTHREAD`. In this case, you
92+
must implement the following functions from the `OpenThread radio API
93+
<https://openthread.io/reference/group/radio-config>`_ using your own radio driver:
94+
95+
* ``otPlatRadioGetPromiscuous``
96+
* ``otPlatRadioGetCcaEnergyDetectThreshold``
97+
* ``otPlatRadioGetTransmitPower``
98+
* ``otPlatRadioGetIeeeEui64``
99+
* ``otPlatRadioSetPromiscuous``
100+
* ``otPlatRadioGetCaps``
101+
* ``otPlatRadioGetTransmitBuffer``
102+
* ``otPlatRadioSetPanId``
103+
* ``otPlatRadioEnable``
104+
* ``otPlatRadioDisable``
105+
* ``otPlatRadioReceive``
106+
* ``otPlatRadioGetRssi``
107+
* ``otPlatRadioGetReceiveSensitivity``
108+
* ``otPlatRadioEnergyScan``
109+
* ``otPlatRadioSetExtendedAddress``
110+
* ``otPlatRadioSetShortAddress``
111+
* ``otPlatRadioAddSrcMatchExtEntry``
112+
* ``otPlatRadioTransmit``
113+
* ``otPlatRadioClearSrcMatchShortEntries``
114+
* ``otPlatRadioClearSrcMatchExtEntries``
115+
* ``otPlatRadioEnableSrcMatch``
116+
* ``otPlatRadioAddSrcMatchShortEntry``
117+
* ``otPlatRadioClearSrcMatchShortEntry``
118+
* ``otPlatRadioClearSrcMatchExtEntry``
119+
120+
Additionally, you must implement the following functions from the OpenThread radio API (see
121+
:zephyr_file:`include/zephyr/net/openthread.h`) to handle radio initialization and event processing:
122+
123+
* :c:func:`platformRadioInit`
124+
* :c:func:`platformRadioProcess`
125+
126+
To initialize the OpenThread stack in this approach, either call the :c:func:`ot_platform_init`
127+
function in your application, or enable the :kconfig:option:`CONFIG_OPENTHREAD_SYS_INIT` Kconfig
128+
option to automatically initialize OpenThread during system startup. You can set the
129+
initialization priority using the :kconfig:option:`CONFIG_OPENTHREAD_SYS_INIT_PRIORITY` Kconfig
130+
option.
131+
67132
.. doxygengroup:: openthread

doc/releases/release-notes-4.2.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ New APIs and options
175175

176176
* OpenThread
177177

178-
* Moved OpenThread-related Kconfig options from ``subsys/net/l2/openthread/Kconfig`` to
179-
``modules/openthread/Kconfig``.
180-
* OpenThread has been refactored into a standalone module, decoupled from Zephyr's networking
181-
stack. Most old APIs have been deprecated and the new APIs are used by the Zephyr L2 layer to
182-
maintain backward compatibility. For migration steps and details, see the
178+
* Moved OpenThread-related Kconfig options from :zephyr_file:`subsys/net/l2/openthread/Kconfig`
179+
to :zephyr_file:`modules/openthread/Kconfig`.
180+
* Refactored OpenThread networking API, see the OpenThread section of the
183181
:ref:`migration guide <migration_4.2>`.
182+
* :kconfig:option:`CONFIG_OPENTHREAD_SYS_INIT`
183+
* :kconfig:option:`CONFIG_OPENTHREAD_SYS_INIT_PRIORITY`
184184

185185
* zperf
186186

0 commit comments

Comments
 (0)