Fix compilation error when the DIAG module is enabled.
All core functionalities are provided.
Signed-off-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
In case OPENTHREAD_NCP option is disabled, uart.c platform driver should
not be compiled as it misses dependencies.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
OpenThread settings implementation built on top of Zepyhr settings
submodule.
With this solution, OpenThread settings are identified with keys of
the following format: `ot/id/instance`, where `id` is assigned by
OpenThread stack, and `instance` is a 32-bit random number, both in
hex. The implementation makes use of `settings_load_subtree_direct`
function to iterate over settings instances. This allows the
OpenThread settings layer to be a fully transparent shim layer between
OpenThread/Zephyr APIs.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
OpenThread recently introduced CMake build system into its repostiory
so we no longer need autotools to build OpenThread libraries and can
integrate them natively.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use the newest version of the OpenThread project, as updated in
https://github.com/zephyrproject-rtos/openthread/pull/2.
Introduce the following fixes along with the update (they're squashed to
retain bisectability of OT samples):
* Update configs and flags used
Some OT configs were renamed, some new were introduced that Zephyr port
needs to set.
* Add entropy platform driver
OpenThreads `random` platform subsystem was replaced with `entropy`
subsystem which is supposed to serve as an entropy source for the
generic OpenThread's random generator.
* Halt OT thread when OT command is processed
OpenThread can currently be processed from two threads - a
genuine OpenThread thread and shell thread, which processes CLI
commands. This could cause trouble, when context was switched
during OT command processing (i.e. switched to process an incomming OT
message, while still in unfinished command handler).
In result, it was not possible to turn the commissioner role on via
CLI, as the commissioner petition response was handled before the
Commissioner::Start function finished its execution (if the
petitioner is also the network leader, all messages are passed
internally within the stack).
Fix this by suspending the OT thread for the time of an OT command
processing.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier. Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.
By default all files without license information are under the default
license of Zephyr, which is Apache version 2.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
OpenThread requires platform definition with standarized API
so we have to add wrappers to make it compatible with Zephyr.
OpenThread is based on autoconf, this requires
more specific CMakeLists.txt which allows to clone specific
commit or point to local copy of openthread.
Signed-off-by: Kamil Sroka <kamil.sroka@nordicsemi.no>