Instead of forcing use of NEWLIB_LIBC, select any available complete C
library implementation. Add CONFIG_REQUIRES_FLOAT_PRINTF and adjust
CONFIG_LIBC_MALLOC_ARENA_SIZE as needed.
Signed-off-by: Keith Packard <keithp@keithp.com>
The sample enables CONFIG_NET_IPV4_MAPPING_TO_IPV6 and then
turns off IPV6_V6ONLY option which allows it to support both
IPv6 and IPv4 using the same socket.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Fix the west invokation. "-t" is added automatically
to the run goal, otherwise we get a "-t -t" command.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add test script that uses same configuration that the
interoperability test.
This is only checking that unsecure client registers and
responds to a GET query.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The old Makefiles which can be used to build this samples
directly as Linux apps and the description in the READMEs
could be quite missleading.
Building this apps in this way has nothing to do with the
Zephyr native_posix/sim targets. This is about building
them as actual Linux applications without Zephyr or any
HW models.
So let's rename the Makefiles and change the description
in the docs to avoid confusion.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This application is no longer needed as we have removed
the automatic startup support which was used by this sample.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Add new configuration value CONFIG_LWM2M_UPDATE_PERIOD
that allows calculating update period from last update,
instead of calculating it from the lifetime.
In runtime, server is allowed to change the lifetime of the
registration which causes update perdiod to be effected.
When fixed update period is preferred, UPDATE_PERIOD
config is then used.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
rand32.h does not make much sense, since the random subsystem
provides more APIs than just getting a random 32 bits value.
Rename it to random.h and get consistently with other
subsystems.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The conn_mgr_monitor.h was not included so the compilation
gave warning for missing conn_mgr_ignore_iface() function.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
Added a new event for LWM2M_RD_CLIENT_EVENT_DEREGISTER for
indicate LwM2M client dereistartion.
Updated unit test and sample for new event type
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
mps2_an385 was excluded from networking tests, therefore can no longer
be used as an integration platform. Replace it with qemu_x86.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Update the TLS part of the big_http_download sample to reference the
currently used server used for file download.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The download server that the origin server redirects to seems now to
use different certificate (signed by a different root CA). Therefore
add the additional root CA to the certificate list and refactor the
sample code a bit to allow to easily extend/replace certificates in the
future.
Bump the mbed TLS heap size a bit to accommodate the extra registered
certificate.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Added functionality to change the syslog server's
ip address at runtime as well as sample for
syslog network backend
Signed-off-by: David Corbeil <david.corbeil@dynon.com>
Use the new code-sample directive and roles to document the networking
samples so that they show up as "Related samples" when browsing the
various relevant networking APIs.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This modification frees up around ~10kB of RAM and make sample code
working again.
1) Reduced net packet size and count.
2) Increase Wi-Fi heap to avoid memory allocation failure.
3) Keep log as minimal.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
cipher_list and sec_tag_list are used only with zsock_setsockopt
in MQTT. For that use, they can be const (and potentially kept
in flash memory).
Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
Google Cloud IoT Core has been retired on August 16, 2023.
Removed the sample and the link to it in a previous release note.
Added a redirect to other IoT cloud samples.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit adds a sample application which demonstrates how
to use the new driver and modules. The sample uses power
management to turn on the modem, uses network management
to wait for L4 connected, then uses DNS to get the IP
of the server running the python script found in the
server folder, which echoes back data recevied to it.
A packet containing psudo random data is then sent to
the server, which the echoes it back. To validate the
capability of the driver to restart the modem, the
modem is restarted, and the packet is sent again.
The server is hosted by linode, and uses the domain
name test-endpoint.com
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
The connectivity monitoring subfeature of conn_mgr is currently also
named conn_mgr, which is confusing.
This commit renames it to conn_mgr_monitor, or conn_mgr_mon for short,
for clarity.
Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
CONFIG_COVERAGE has been incorrectly used to
change other kconfig options (stack sizes, etc)
code defaults, as well as some samples behaviour,
which should not have dependend on it.
Instead those should have depended on COVERAGE_GCOV,
which, being the one which adds special code and
temporary RAM storage for embedded targets,
require changes to many features.
When building for the native targets, all this was
unnecessary.
=> Fix the dependency.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add simple TFTP client code using TFTP client library
Initiate connection (IPv4) with optional DNS resolution
Operate get operation then put operation in octet mode
Tested on native_posix
Issue/Discussion #60985
Signed-off-by: romain pelletant <romain.pelletant@fullfreqs.com>
Add `yd_esp32` board:
- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E
Signed-off-by: Julio Cesar <hi@jcsx.dev>
A sneaky whitespace was causing inconsistent rendering in the list of
available overlays.
Fixed by switching to a list table which is arguably now even easier to
read.
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This board has a single instance of EMAC connected to a NXP TJA1103
Ethernet PHY. Currently, there is no driver for this PHY and its
pin strapping configuration allows to use it without software
configuration, so EMAC is configured as fixed link.
Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
Use 64bit timestamps from k_uptime_get() so they don't
roll over during the expected device lifetime.
Fixes#60826
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Allow socket-loop to wake up immediately, if there are changes,
instead of waiting for zsock_poll() to timeout.
This change makes engine more reactive and removes
hard coded timeout from zsock_poll().
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The IEEE 802.15.4 API and networking subsystem were using several
inconsistent timestamp resolutions and types. This change defines all
timestamps with nanosecond resolution and reduces the number of
available types to represent timestamps to two:
* `struct net_ptp_time` for PTP timestamps
* `net_time_t` for all other high resolution timestamps
All timestamps (including PTP timestamps) are now referred to a
"virtual" local network subsystem clock source based on the well-defined
types above. It is the responsibility of network subsystem L2/driver
implementations (notably Ethernet and IEEE 802.15.4 L2 stacks) to ensure
consistency of all timestamps and radio timer values exposed by the
driver API to such a network subsystem uptime reference clock
independent of internal implementation details.
The "virtual" network clock source may be implemented based on arbitrary
hardware peripherals (e.g. a coarse low power RTC counter during sleep
time plus a high resolution/high precision radio timer while receiving
or sending). Such implementation details must be hidden from API
clients, as if the driver used a single high resolution clock source
instead.
For IEEE 802.15.4, whenever timestamps refer to packet send or receive
times, they are measured when the end of the IEEE 802.15.4 SFD (message
timestamp point) is present at the local antenna (reference plane).
Due to its limited range of ~290 years, net_time_t timestamps (and
therefore net_pkt timestamps and times) must not be used to represent
absolute points in time referred to an external epoch independent of
system uptime (e.g. UTC, TAI, PTP, NTP, ...).
Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
add one Ethernet twister test for nucleo_h563zi,
nucleo_h743zi, nucleo_f429zi, nucleo_f746zg.
remove the common: harnesses: net that are not supported
leave harnesses: net for all other test execpt the one we use
Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
This is no longer necessary, as this option is selected as a dependency
for class implementations where it is required.
Also remove redundant test cases.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
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>
New event LWM2M_RD_CLIENT_EVENT_REG_UPDATE to indicate
application that engine starts registration update.
Signed-off-by: Juha Ylinen <juha.ylinen@nordicsemi.no>
The source file for most single-file sample apps is usually
`main.c`. Rename this file to be consistent with other
samples.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
* use `read()` instead of `recv()`
* use `write()` instead of `send()`
* use `CONFIG_POSIX_API` and drop `<zephyr/posix/..>` prefix
* use `perror()`
* fix `Makefile.posix` to use `CC` instead of `CXX`
* fix race condition which caused an unhandled EOF
and infinite loop, by adding a readback / echo
* Updated the docs to reflect the expected stdout
* Improve doc clarity
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Recent Zephyr changes (IEEE 802.15.4 config moved from KConfig
to DeviceTree) left the TI CC1352r1_launchxl board's net examples in
a non-working state, mainly due to the fact that CC13x2 has two
IEEE802154 interfaces available (2.4GHz and sub-GHz) and none were
enabled.
This commit enables the 2.4GHz radio inside the board's DTS and also
introduces a new devicetree overlay inside the echo* samples:
'boards/boards/cc1352-enable-subg.overlay', enabling the sub-GHz
interface.
Signed-off-by: Stancu Florin <niflostancu@gmail.com>
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.
Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Allow endpoint name, PSK and TLS tag and server address
to be configured in Kconfig.
When endpoint name is not defined, use CONFIG_BOARD.
Also use endpoint name as a PSK ID instead of hard coded
"Client_identity" which would collide if more than one instance
is ran against same server. Now we could define different identity
for each endpoint.
Also, as a mininal refactor, allow DNS names to be used in
server address, instead of assuming IP address.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
By default, qemu_coxtex_m3 target selected SLIP driver as
a network backend. This requires some unstandard tool (tunslip6),
which are error prone and might not necessary work.
Ethernet backend work equally well as in native_posix so
use the same for both.
Change the default emulation platform from X86 to Cortex-M3
because it supports Ethernet by default.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
The sample documentation mentions that the sample can be built directly
on Linux, which was no longer the case. This commit fixes it.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The old link has expired, the file is no longer avaiable to download.
Update the download link, which now leads to a file in Ubuntu
repositories for the recent LTS release, hopefully making the link valid
for longer period.
As the server ceritficate is signed by a different root CA, update the
root CA as well.
Finally, cleanup how the URL is handled in the sample - for TLS variant
it'll always be provided with a Kconfig, hence no need to repeat it in
the sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
It's often the case with TLS file servers, that the download link does
not lead to downloaded file, but rather redirects to another server.
Therefore it makes sense to have a minimal support in the sample for
HTTP redirection, so that the file can still be downloaded.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This application uses the uart1 DT node, so it should enable it,
not assume that it will be enabled by default for a given board.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit updates all in-tree code to use `CONFIG_CPP` instead of
`CONFIG_CPLUSPLUS`, which is now deprecated.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Disables having USB enabled for boards that configure USB CDC for
console, shell or logging at bootup in applications that enable USB
to prevent a conflict arising whereby USB is registered from
multiple points and later calls fail.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Fix all line-length errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(line-length)'
Using a limit is set to 100 columns, not touching the commandlines in
GitHub workflows (at least for now).
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix all comments-indentation errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(comments-indentation)'
This checks that the comment is aligned with the content.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Fix all thruthy errors detected by yamllint:
yamllint -f parsable -c .yamllint $( find -regex '.*\.y[a]*ml' ) | \
grep '(truthy)'
This only accepts true/false for boolean properties. Seems like python
takes all sort of formats:
https://github.com/yaml/pyyaml/blob/master/lib/yaml/constructor.py#L224-L235
But the current specs only mention "true" or "false"
https://yaml.org/spec/1.2.2/#10212-boolean
Which is the standard yamllint config.
Excluding codeconv and workflow files, as some are using yes/no instead
in the respective documentation.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Now that we a proper API, shell is just optional, so, make the
dependency optional by refactoring the code.
Also, add a build test combination in twister.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Clean up occurrences of "#if IS_ENABLED(CONFIG_FOO)" an replace
with classical "#if defined(CONFIG_FOO)".
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
websocket_recv_msg() is reworked with using fsm. Now the function
return 0 when payload is empty, -ENOTCONN if socket close. Receiving
empty ping and sending empty pong were added in tests.
Fixes#52327
Signed-off-by: Grixa Yrev <grixayrev@yandex.ru>
Since 6c30c9ac47 (samples: net: zperf:
Rewrite upload part to use sockets), zperf uses SO_RCVTIMEO in UDP mode,
hence must depend on/enable support for it.
Without SO_RCVTIMEO support, zperf fails like this:
> nb_packets=47 delay=188964 adjust=-13
> setsockopt error (109)
> setsockopt error (109)
> -
> Upload completed!
> LAST PACKET NOT RECEIVED!!!
> Statistics: server (client)
> Duration: 0 us (10.19 s)
> Num packets: 0 (50)
> Num packets out order: 0
> Num packets lost: 0
> Jitter: 0 us
> Rate: 0 Kbps (9 Kbps)
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
The net_mgmt sample enables a lot of features, resulting in pretty large
image sizes for various platforms (~200k). At the same time, the
sample.yaml for the sample did not specify minimum flash requirement for
the sample, causing flash overflows during build in certain cases.
This commit fixes this by setting a reasonable flash requirement for the
sample.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
log_backend_activate() does not assign the backend id (backend->ctx->id),
which is required for runtime filtering.
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Remove Kconfig file samples/subsys/usb/usb_pid.Kconfig added in
the commit e5cbe6a9e7 ("usb: cdc: Add unique PIDs for each sample")
with the motivation to have a separate ID for each sample supposedly
to be recognizable by the host.
The new USB support does not use the options, VID/PID is set
directly in the application. As a note, it is not necessary to have
unique PID for each sample, especially for the well known USB classes.
Replace the individual Kconfig options in the documentation
by a table with the references to the samples and PIDs.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit excludes thingy53_nrf5340_cpuapp_ns platform from building
wpanusb and wpan_serial samples. The platform doesn't support TF-M yet
and therefore the build is bound to fail.
Due to limitations of the filter functionality, a more generic approach
where _ns platforms without TF-M support would be excluded from the
build, for example:
filter: dt_chosen_enabled("zephyr,ieee802154") and
CONFIG_NRF_SOC_SECURE_SUPPORTED
doesn't properly filter out the needed platforms. As a result,
platform_exclude syntax is used to specifically exclude the platform.
Signed-off-by: Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
This sample demonstrates the usage of the MQTT-SN library over UDP.
It connects to a gateway, publishes to the topic "/uptime" and also
subscribes to "/number".
Signed-off-by: René Beckmann <rene.beckmann@grandcentrix.net>
When read callbacks are used, it bypasses LwM2M engine data
handling and therefore LwM2M observation cannot work properly.
Read callbacks should be used only on special cases.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Skip all CAN controller tests utilizing CAN loopback mode for the
kvaser,pcican CAN controller card as emulated in QEMU.
QEMU emulation of the SJA1000 CAN controller backend does not yet support
the SJA1000 Self Reception Request command which is required for proper
loopback operation.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
The can_frame and can_filter structs support a number of different flags
(standard/extended CAN ID type, Remote Transmission Request, CAN-FD format,
Bit Rate Switch, ...). Each of these flags is represented as a discrete bit
in the given structure.
This design pattern requires every user of these structs to initialize all
of these flags to either 0 or 1, which does not scale well for future flag
additions.
Some of these flags have associated enumerations to be used for assignment,
some do not. CAN drivers and protocols tend to rely on the logical value of
the flag instead of using the enumeration, leading to a very fragile
API. The enumerations are used inconsistently between the can_frame and
can_filter structures, which further complicates the API.
Instead, convert these flags to bitfields with separate flag definitions
for the can_frame and can_filter structures. This API allows for future
extensions without having to revisit existing users of the two
structures. Furthermore, this allows driver to easily check for unsupported
flags in the respective API calls.
As this change leads to the "id_mask" field of the can_filter to be the
only mask present in that structure, rename it to "mask" for simplicity.
Fixes: #50776
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This is useful to profile networking stack using loopback interface, a
TX only option is also added but disabled by default.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Server might return the endpoint name in a registration reply. Default
max allowed endpoint name is only 12 characters.
Signed-off-by: Veijo Pesonen <veijo.pesonen@nordicsemi.no>
The WPAN-USB sample did not document endianness of some user space
variables. As the IEEE 802.15.4 stack uses attributes in several
different encodings, the endianness should be documented.
Signed-off-by: Florian Grandel <jerico.dev@gmail.com>
Some minor housekeeping prior to adding an http server
implementation. There are already a number of http headers
and that number will likely increase with subsequent work.
Moving them into a common directory cleans up the
`include/net` directory a bit.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Renamed LWM2M_RD_CLIENT_EVENT_REG_UPDATE_FAILURE to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT.
Changed reported event type for registration timeout to
LWM2M_RD_CLIENT_EVENT_REG_TIMEOUT from
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE.
LWM2M_RD_CLIENT_EVENT_REGISTRATION_FAILURE should be only
reported case when server reject by response registration.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
The .yaml file states that CAN is supported, but the basic sample
application samples/drivers/can/counter cannot be compiled without
additional configuration.
The loopback driver does not require any additional steps like the
linux SocketCAN driver, so it is safe to enable it by default and
get rid of the many overlay files in the tests.
ISO-TP tests and the counter sample are excluded via .yaml from
twister tests because of timing issues.
Signed-off-by: Martin Jäger <martin@libre.solar>
This commit replaces the outdated link to the Tridonic net4more Border
Router product page, which now reports 404, with a link to its
datasheet (it seems like this product is no longer available).
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Up until now, the Zephyr CAN controller drivers set a default bitrate (or
timing) specified via devicetree and start the CAN controller in their
respective driver initialization functions.
This is fine for CAN nodes using only one fixed bitrate, but if the bitrate
is set by the user (e.g. via a DIP-switch or other HMI which is very
common), the CAN driver will still initialise with the default
bitrate/timing at boot and use this until the application has determined
the requested bitrate/timing and set it using
can_set_bitrate()/can_set_timing().
During this period, the CAN node will potentially destroy valid CAN frames
on the CAN bus (which is using the soon-to-be-set-by-the-application
bitrate) by sending error frames. This causes interruptions to the ongoing
CAN bus traffic when a Zephyr-based CAN node connected to the bus is
(re-)booted.
Instead, require all configuration (setting bitrate, timing, or mode) to
take place when the CAN controller is stopped. This maps nicely to entering
"reset mode" (called "configuration mode" or "freeze mode" for some CAN
controller implementations) when stopping and exiting this mode when
starting the CAN controller.
Fixes: #45304
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
If a L2 link has been established, then the DHCP is taking too long as
it has to go through its capped exponential backoff timers to trigger
discover (The DHCP starts immediately during init, this is itself wrong,
it should start on a link UP notification) that delays the DHCP for
few seconds to a minute.
And if we do stop and start DHCP then also it goes through the initial
delays (though configurable), which is also not ideal.
Add support for restarting DHCP without any delay, i.e., release and
send discover immediately.
This is also useful in case L2 switches to a different subnet, in this
case Zephyr doesn't restart DHCP automatically, this API can be used by
L2 apps/drivers to restart DHCP to get new subnet IP.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Moved all MBEDTLS dependencies from prj.conf
to Kconfig as WiFi depends on it.
Update esp32 wifi driver to enable `samples/net/wifi`
to work. Commands as such as `wifi connect` and `wifi scan` are now
available.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>