Remove virtual esp32 board and replace it with the
real word boards:
- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)
Signed-off-by: Marek Matej <marek.matej@espressif.com>
There is some ambiguity with the DHCPv4 handling in the dns_resolve
sample. On one hand, the sample uses net_config library, which does
initiate the DHCPv4 on the interface (if enabled) and may block the
initialization until the address is assigned (in case there is no other
statically assigned IPv4 addresses.) On the other hand, the sample
registers for NET_EVENT_IPV4_ADDR_ADD in case DHCPv4 is in use, delaying
the DNS queries until address is assigned.
In case net_config delayed the initialization however, this will not
work, as the event handler will be registered only after DHCPv4 address
is assigned, so the callback will not get executed.
Fix this, by checking if DHCPv4 assigned address already exists on an
interface - if so, schedule DNS queries immediately. Otherwise (for
example in case when net_config was not configured to wait for address)
register an event callback, and schedule queries from there.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
If the default which is set to CONFIG_BOARD is used, then the lwm2m
client fails to set the client identity as the default maximum length
allowed is only 16 and for some boards this exceeds.
So, increase the default length to accomodate almost all boards. Also
add a build assert for the length validation.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
In case UDP is disabled, init_udp() is not compiled and the build
fails. Fix this, by providing dummy implementations for UDP functions,
in case UDP is disabled.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
All application level TLS operations should be guarded with
"#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)" and not mbed TLS configs
only. Otherwise, in case mbed TLS is enabled, but the sample is not
configured to use TLS (hence TLS credential library is not available
for example), the build may fail or produce spurious warnings.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Add support for using X509 certificates.
Default settings use ECDSA certificates with SHA256 hash.
When different settings are required clients should overwrite
struct lwm2m_ctx->load_credentials() and
struct lwm2m_ctx->set_socketoptions()
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
websocket_disconnect api does not closes user tcp socket, so tcp socket
must be closed after done.
Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
The method ieee802154_radio_handle_ack() does not belong to the
PHY/radio layer but to the L2 layer. It is a callback called from the
radio layer into the L2 layer and to be implemented by all L2 stacks.
This is the same pattern as is used for ieee802154_init(). The
'_radio_' infix in this function is therefore confusing and
conceptually wrong.
This change fixes the naming inconsistency and extensively documents
its rationale.
It is assumed that the change can be made without prior deprecation of the
existing method as in the rare cases where users have implemented custom
radio drivers these will break in obvious ways and can easily be fixed.
Nevertheless such a rename would not be justified on its own if it were
not for an important conceptual reason:
The renamed function represents a generic "inversion-of-control" pattern
which will become important in the TSCH context: It allows for clean
separation of concerns between the PHY/radio driver layer and the
MAC/L2 layer even in situations where the radio driver needs to be
involved for performance or deterministic timing reasons. This
"inversion-of-control" pattern can be applied to negotiate timing
sensitive reception and transmission windows, it let's the L2 layer
deterministically timestamp information elements just-in-time with
internal radio timer counter values, etc.
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This commit replaces the workarounds spread around the
drivers and subsystems with the updated PPP L2
interface.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
running samples/net/cloud/mqtt_azure in QEMU with default
configuration crashes with exception. This PR change doubles
the default workqueue stack size in a attempt to fix the issue
reported in: GH#58930.
Signed-off-by: Andrei Hutanu <andrei.hutanu.i@gmail.com>
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove usage of Kconfig symbol `CONFIG_BT_DEBUG_LOG` from samples. It
has been deprecated since this PR:
https://github.com/zephyrproject-rtos/zephyr/pull/56183
The Kconfig symbols has been replaced by `CONFIG_LOG=y` on most of the
cases. Or it has been removed when not needed anymore.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
send_simple_coap_request needs to return a result from previous functions
instead of success at the end of the function. Without doing so the example
may wait for a response from a coap sever when a message failed to send.
Signed-off-by: Matthew Bradbury <matt-bradbury@live.co.uk>
Extend the DHCPv4 sample to make use of the option callback functionality.
This serves as a reference of how to register and use a custom option
callback.
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Clarify the comment in the code so people looking to use mDNS don't
think that interaction with Zephyr is necessary for mDNS support to
work, its in fact built into the networking stack when the mDNS
feature is enabled.
Signed-off-by: Chris Morgan <chmorgan@gmail.com>
conn_mgr now allows applications to request that ifaces be ignored.
This commit changes the echo_server sample to use this feature to
filter out the tunnel iface, instead of manually filtering events
generated by it.
This will allow the echo_server sample to remain compatible with
planned changes to conn_mgr, namely a switch from events being
fired for every individual iface that goes up or down, to only
being fired when connectivity is gained or completely lost.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Since conn_mgr is a subsystem rather than a library, relocate it
directly into subsys/net rather than subsys/net/lib/
Rename header files to better match their function.
Remove net_ prefix from conn_mgr types, API, and files, since it is
unnecessary.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
Add DT and Kconfig overlay for new experimental CDC ECM
implementation. USB device support configuration and
initialization can be done through shell by following
commands:
uart:~$ usbd config add 1
uart:~$ usbd class add cdc_ecm_0 1
uart:~$ usbd defaults
uart:~$ usbd init
uart:~$ usbd enable
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This sample application demonstrates the implementation of an
MQTT client that can publish messages to AWS IoT Core using
the MQTT protocol.
Fixes#22866
Signed-off-by: Lucas Dietrich <ld.adecy@gmail.com>
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Now that the nrf52 HW models support it,
let's use their flash model instead of falling back
to the openthread RAM settings backend.
Note that the flash model defaults to just keeping the
flash content in the Linux process heap.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
With the minimal C library malloc implementation moving to libc/common, all
of the related Kconfig variables have also changed. Update uses within the
tree.
Signed-off-by: Keith Packard <keithp@keithp.com>
Extend the sample to be built with native_posix
prevent issues like #57133 in the future. Also extends the qemu
build to build a "raw" configurationw without POSIX_API or
NET_SOCKETS_POSIX_NAMES.
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Fixes the compiler error that occurs when attempting to build
the SNTP library with CONFIG_NET_SOCKETS_POSIX_NAMES=n, while
using native_posix.
Closes#57133
Co-authored-by: Chris Friedt <cfriedt@meta.com>
Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
MISRA Rule 5.7 requires uniqueness of tag identifiers. Shell is
frequently problematic because many code uses `const struct shell
*shell`. This causes CI noise every time one of these shell files is
edited, so let's update all of them with `const struct shell *sh`
instead.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.
Most of these changes were automated using coccinelle with the following
script:
@@
@@
- void
+ int
main(...) {
...
- return;
+ return 0;
...
}
Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add config file and devicetree overlay for the fvp_base_revc_2xaemv8a
board, so that this sample can run on this board.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Add config file and devicetree overlay for the fvp_base_revc_2xaemv8a
board, so that this sample can run on this board.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
Add config file and devicetree overlay for the fvp_baser_aemv8r board,
so that this sample can run on this board.
Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
To disable the flash by default so the openthread RAM
settings backend is used instead.
This allows using this samples with the overlay-ot.conf
directly in the simulated nrf52_bsim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
k_work_* APIs cannot be used from user threads, hence it has to be
replaced with some other solution to retain userspace functionality in
the sample.
This commit reworks the sample as follows:
* Replace delayed work items with combination of k_timer and a
dedicated thread to send UDP packets. k_poll_signal is used for
communication between k_timer callback and UDP thread.
* As kernel objects should not be placed in a memory modifiable from
user threads, declare a separate structure for them, and link it
with the client context structure with a pointer.
* k_timer_init() is not a system call, therefore it has to be called
from supervisor thread. Therefore, add an additional function to
initialize UDP, and use it to initialize kernel objects used by the
UDP module and grant access for the main thread before it becomes an
user thread. UDP thread inherits permissions from the parent (main
thread).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Not all toolchains support newlib so tests that require newlib need
to have a filter to we don't try and build those tests on those
testcases. Add the following to samples.yaml to handle the issue:
filter: TOOLCHAIN_HAS_NEWLIB == 1
Signed-off-by: Kumar Gala <kumar.gala@intel.com>
Current stack size is making build fail due to ram overflow.
So, decresase total heap available to make room for the application.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
1. `zsock_socket()` gets the right packet familiy.
2. `inet_pton()` returns 1 on success.
This should address #55193.
Signed-off-by: Sebastian Arnd <sebastianarnd@gmail.com>
Allow to register a callback function which is called when a firmware
update is canceled by the cancel command.
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
k_work_* API cannot not be used from the user threads as the APIs are
not syscalls. Doing so leads to a crash when userspace is enabled.
As the current use of delayed work API from user threads is merely
scheduling of the initial work execution, it can be moved into the main
thread context. The time difference from the former and current approach
should be marginal, as the start_tcp/udp_proto() calls are not blocking
calls.
Another issue was usage of k_mem_domain_add_thread() on uninitialized
TCP threads. This lead to another crash, as assigning thread to a memory
domain also involves removing it from the previous domain, which lead to
NULL pointer dereference if thread was not initialized yet. As, by
default, newly spawned threads inherit memory domain assignment from
their parent, it's not really needed to assign the same domain
explicitly, hence, it can be safely removed.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Some features like IP fragmenting are default disabled to keep the network
stack compact for small devices.
In bigger applications as well as for the Maxwell Pro tests it required
to have the full functionality enabled. This can also work as example for
new projects.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>