Commit graph

2413 commits

Author SHA1 Message Date
Jacob Wienecke
7f08b54d8b samples: net: zperf: Add correct .conf file name for mimxrt1060_evk
Change the name of the mimxrt1060_evk conf file (mimxrt1060_evk.conf) to
the correct name, "mimxrt1060_evk_mimxrt1062_qspi.conf". This change
causes net related code to be placed into ITCM on mimxrt1060_evk boards

Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
2025-01-22 05:41:33 +01:00
Alexandre Bailon
aaa9a8777f samples: net: openthread: coap: Add shell commands
This adds shell commands to easily get or set LED.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2025-01-21 19:27:07 +01:00
Alexandre Bailon
dc898b47c8 samples: net: openthread: Add a sample using OpenThread CoAP API
In order to show how to use OpenThread and CoAP, add an application.
This example could be build to run a client or server.
The server could expose LEDs and buttons and client could get their
state and set the LEDs state.

The network is created automatically using the network key predefined
in the config. The goal is to make the example simple by removing
the commisionning and joinning process.

If a client application has a button, it could use it to toggle the first
LED on any boards running the server application.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2025-01-21 19:27:07 +01:00
Benjamin Cabé
c49f220ce2 samples: net: http_get: restore original google.com hostname
This sample is expected to hit google.com so that the reply
(a redirect) is minimal and can easily be visualized. This is also
what sample.yaml expects to see (checks for "The document has
moved").

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-01-20 16:25:41 +01:00
Ryan Erickson
27eb8eb40b samples: net: aws_iot_mqtt: Add support for hl7800 based boards
Add support for the pinnacle_100_dvk and mg100.
With these boards, wait to get on the network before trying
to connect to AWS.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
b91c7418f1 samples: net: http_get: add support for hl7800 modem
Add overlay and small adjustments for using the hl7800 modem.
Works out of the box with pinnacle_100_dvk and mg100.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
490e67528a samples: net: http_get: fixes for fetching google.com
Minor fixes to ensure GET google.com is successful.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
1674114fd2 samples: net: lwm2m: add support for hl7800 modem
Add an overlay for hl7800 modem configuration.
Adjust the client to wait until the network is ready before
trying to connect to the lwm2m server.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Ryan Erickson
78943ddd6e samples: net: lwm2m: Add debug options for DTLS
Add commented kconfig options for debugging DTLS connections.

Signed-off-by: Ryan Erickson <ryan.erickson@ezurio.com>
2025-01-20 11:15:57 +01:00
Maochen Wang
0ec0b3cd86 samples: net: wifi: nxp: update net related configurations
Using NET_TCP_MAX_SEND_WINDOW_SIZE and NET_TCP_MAX_RECV_WINDOW_SIZE
for TCP case.
Reduce net_buf count to save memory.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-20 02:58:55 +00:00
Robert Lubos
7736314dbe samples: net: echo_server: Disable vt100 commands in websocket console
Disable vt100 commands too in websocket console,  not only the coloring.
This allows to prevent printing artifacts in websocket shell backend
logging.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-01-13 20:23:07 +01:00
Raffael Rostagno
8048a6ab67 samples: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Matt Rodgers
549e5de277 net: websocket: pass HTTP upgrade request context to user callback
Passing HTTP upgrade request context to the user callback allows the
user to decide whether to accept or reject the websocket connection
based on the HTTP headers in the request. The primary reason for this is
to enable authentication of the websocket connection (e.g. via cookies
or Authorization header).

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2025-01-08 21:02:02 +01:00
Lukasz Majewski
ae20a6aa91 samples: echo_client: OpenThread RCP set CONFIG_SETTINGS_NVS=y
By default OpenThread uses storage API to store configuration options.

On for example mimxrt1020_evk the enabled by default is
CONFIG_SETTINGS_NONE when CONFIG_SETTINGS is enabled. Fix this problem by
using the CONFIG_SETTINGS_NVS=y.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2025-01-08 09:33:40 +01:00
Chris Friedt
7ebb5938de samples: net: syslog_net: add missing dep of net log backend
The network log backend had the POSIX_C_LANG_SUPPORT_R
dependency added in a previous commit, but the dependency was
never added to the sample.

Add the dpeendency of LOG_BACKEND_NET to the
samples/net/syslog_net/prj.conf

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-04 10:56:12 +01:00
Martin Jäger
17cde7d574 samples: net: openthread: create category in docs
Add higher-level category for OpenThread in docs to avoid orphaned
sample documentation.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-03 19:39:13 +01:00
Martin Jäger
8eff86229e samples: net: openthread: shell: add sample application
Add simple application to test Thread and IEEE 802.15.4 using the
OpenThread shell.

Signed-off-by: Martin Jäger <martin@libre.solar>
2025-01-03 19:39:13 +01:00
Chaitanya Tata
c456d913dc samples: net: zperf: Use highest frequency for nRF5340
When running Wi-Fi benchmarks on nRF7002DK use the highest CPU
frequency 128MHz.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-03 11:39:13 +01:00
Chaitanya Tata
fc35130330 samples: net: zperf: Add nRF7002DK support
Add settings to get peak throughputs for nRF7002DK, this relies on the
overlay-wifi-nm-hostap.conf.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-01-03 11:39:13 +01:00
Marc Lasch
3e9addfd96 samples: net: sockets: echo_service: Use ZVFS default settings
This sample works without increasing ZVFS_OPEN_MAX and ZVFS_POLL_MAX to
some arbitrary number. This also removes a duplicate entry for
ZVFS_OPEN_MAX.

ZVFS_OPEN_MAX already defaults to a reasonably large value of 16 if
POSIX_API is enabled, which is the case for the echo_service sample.

Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
2025-01-02 21:34:49 +01:00
Seppo Takalo
4a7ef5c010 net: lwm2m: Convert tickeless to use eventfd()
For waking up the poll() use eventfd() instead of socketpair()
so we save some buffer space and one file descriptor.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-12-24 13:54:39 +01:00
Seppo Takalo
341f78102a net: lwm2m: Need heap for native_sim
When using tickless mode, the socketpair()
seem to use heap by default on native_sim, so
add some space for it.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2024-12-20 16:09:13 +01:00
Lukasz Majewski
d2f37d06ba net: Extend echo_client README.rst file to setup OTBR based echo_server
This description provides information about setting up RCP (nRF21540-DK)
and OT HOST (mimxrt1020_evk) to communicate with HOST PC's echo_server
via OpenThread Border Router (OTBR).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-12-20 16:06:33 +01:00
Lukasz Majewski
5b1a2e740d net: samples: Add mimxrt1020_evk overlay for OT's RCP Host support (UART)
This overlay configures the imxrt1020 EVK board to use its lpuart2 serial
port to communicate with other board (in this case nRF21540-DK), which
is the RCP for OpenThread protocol.

The nRF Zephyr RCP is the one from Nordic (v2.7.0):
west build -p always -b nrf21540dk/nrf52840 -S logging
		nrf/samples/openthread/coprocessor

The same UART (on nRF) can be used for testing/debugging purposes with
using the ot-cli's SPINEL communication program:
sudo ./build/posix/src/posix/ot-cli 'spinel+hdlc+uart:///dev/ttyACM1?u
art-baudrate=1000000' --verbose

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-12-20 16:06:33 +01:00
Lukasz Majewski
6ecc8e88d8 net: samples: ot: Add configuration file for echo_client OT RCP HOST (UART)
This config allows setting up the echo_client program with
RCP HOST UART (via SPINEL protocol) communication.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2024-12-20 16:06:33 +01:00
Sylvio Alves
5958994897 samples: net: wifi: add esp32 platform
Allow espressif platform to be properly tested in CI.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-18 18:17:16 +01:00
Sylvio Alves
74d4008cc1 drivers: wifi: make WIFI_BUILD_ONLY_MODE global symbol
Convert vendor specific **_WIFI_BUILD_ONLY_MODE symbol as global
in order to provide common build flag to enable CI with no blobs.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-12-18 18:17:16 +01:00
Gerard Marull-Paretas
123c00aa10 samples: fix zephyr/drivers/gpio.h usage
Only include the header if using any of the GPIO API calls/
struct/defines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-18 18:15:15 +01:00
Maochen Wang
7989a7bcce drivers: wifi: nxp: default select supplicant roaming
Default select WIFI_NM_WPA_SUPPLICANT_ROAMING in Kconfig.nxp, no need
to add it in .conf.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 13:08:59 +01:00
Maochen Wang
00e8cdcc9b samples: wifi: shell: use MBEDTLS_ENABLE_HEAP for RW612
For the latest upstream, if MBEDTLS_ENABLE_HEAP is not enabled, it will
default select MBEDTLS_PSA_STATIC_KEY_SLOTS, and consume extra SRAM for
about 35KB. Therefore, default enable MBEDTLS_ENABLE_HEAP.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 10:53:21 +01:00
Maochen Wang
77235f0575 samples: wifi: shell: remove CONFIG_HEAP_MEM_POOL_SIZE for RW612
Remove CONFIG_HEAP_MEM_POOL_SIZE for RW612, it will use
HEAP_MEM_POOL_ADD_SIZE_ way to add all module's heap size
together, to better control heap size for different case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2024-12-16 10:53:21 +01:00
Fengming Ye
d77fb49ac3 samples: wifi: nxp: separate wifi example user config file
Separate wifi example user config file to wifi network configurations
and hostap configurations.
User can set EXTRA_CONF_FILE as overlay-hostap.conf file to get
external hostap support.
Without overlay-hostap.conf, we will have embedded hostap.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Valerio Setti
7c4abb1eb9 samples: sockets: exclude nrf5340dk with TF-M from http_server
When the sample is built for this platform a build error is generated
due to ROM being overflowed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Matt Rodgers
8f07784e9f tests: http_server: fix failing TLS tests due to moved certificates
Testcase uses certificates from the sample application at
samples/net/sockets/http_server. These were modified and moved into a
different folder by a previous commit, causing a build failure in the
test.

Testcase updated to:
- use new path to certificates
- update available cipher suites, since certificates now use ECDSA
- update expected hostname in certificate

The CA certificate in the sample app is also converted to .der format
for inclusion in the test (the content is exactly the same as the PEM
version, just converted to DER).

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-11 06:32:53 -05:00
Benjamin Cabé
1441436a92 samples: echo_server: fix rw612_openthread_rcp_host build in CI
MONOLITHIC_NXP_NBU cannot be used in CI as it relies on firmware blobs
to be fetched.
Disabling the feature so the CI can pass.
Also tagging this test as build_only.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-11 07:57:06 +01:00
Axel Le Bourhis
9fb546f85e samples: echo_client: fix rw612_openthread_rcp_host build in CI
MONOLITHIC_NXP_NBU cannot be used in CI as it relies on firmware blobs
to be fetched.
Disabling the feature so the CI can pass.
Also tagging this test as build_only.

Signed-off-by: Axel Le Bourhis <axel.lebourhis@nxp.com>
2024-12-10 20:37:03 +01:00
Matt Rodgers
6ebac0bd4e samples: http_server: document process to use HTTP/2 with web browser
Using HTTP/2 to communicate with the sample application using a web
browser requires some additional steps. Add documentation describing
this to the sample README file.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
f9b685d3fe samples: http_server: add option to use ALPN for HTTP2 support
Add application level Kconfig option to enable ALPN usage for
negotiating HTTP/2 connection with web browsers.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
bd83c19cc7 samples: http_server: update cipher suites and certificates
Existing cipher suites and certificates used by HTTP server sample are
included in RFC9113 Appendix A: Prohibited TLS 1.2 Cipher Suites. The
RFC specifies that when using HTTP/2, these cipher suites may be treated
as an error of type INADEQUATE_SECURITY, and in practice it seems that
Chrome and Firefox do implement this.

The certificates have been updated to use ECDSA-P265 signatures, and
supported cipher suites updated to include ECDH key exchange and AES GCM
and CCM modes.

Some scripts are included to allow users to generate their own
certificates if desired.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Matt Rodgers
45c6553567 samples: http_server: consolidate certificate options
Remove the CONFIG_NET_SAMPLE_CERTS_WITH_SC option and make the CA-signed
certificate the only option - there is no real downside to this over
using the unsigned certificate.

Remove adding of CA certificate as a TLS credential on the server, since
this credential is not used by the server. It may be useful to include
in any client code used to communicate with the server, so the
certificate itself is retained.

After this, some TLS tag enumerations are unused so have been removed.

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-10 10:43:38 -05:00
Krzysztof Chruściński
384e940c66 drivers: serial: nrfx_uarte: Deprecate CONFIG_UART_x_NRF_HW_ASYNC
Deprecate mode which is using TIMER+(D)PPI for reliable byte counting.
Recently a new approach is added (CONFIG_UART_NRFX_UARTE_ENHANCED_RX)
which supports reliable byte counting without additional HW resource.
This mode is planned to be the only supported RX path mode.

Enhanced RX has slightly different behavior. There are no partial RX
packets (events with non-zero offset). There is UART_RX_BUF_RELEASED
after each UART_RX_RDY event.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-06 12:14:02 +01:00
Duy Nguyen
689d1f2ca9 sample: net: Add initialize for dup_flag when publish
When publish message, the dup_flag is not intialize
causing it to have random value and making the AWS MQTT
broker to reject the message
Add initialize dup_flag as 0

Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
2024-12-05 07:45:19 +01:00
Gerard Marull-Paretas
d4a67e321b samples, tests: remove usage of space-separated lists
Convert them to native YAML lists. Support for space-separated
lists was deprecated in Twister a long time ago.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-04 14:14:53 -05:00
Matt Rodgers
ddaeb1379a net: http_server: fix header capture on concurrent http2 streams
Concurrent HTTP POST requests on different HTTP2 concurrent streams
require that the client's header_capture_context is re-used to capture
headers on a second stream before all of the body data has been received
(and sent to the application) on the first stream.

As a result, any captured headers must be sent to the application
callback before any headers can be received on a different stream. In
practice this means that for HTTP2 the application callback is called
for the first time on receiving a headers frame, before any data frames
are received. All subsequent application callbacks will not include the
request header data.

While this mechanism is not necessary for HTTP1, it is also updated to
only send headers in the first application callback for consistency.

Fixes #82273

Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
2024-12-04 14:13:24 -05:00
Arkadiusz Balys
6464ea88fe net: openthread: Allow a platform to select a Settings backend.
Removed implying of NVS by the NET_L2_OPENTHREAD, and from now a
platform can choose between ZMS and NVS as a settings backend.
NET_L2_OPENTHREAD still requires NVS or ZMS backend so the config
depends on one of those.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2024-12-02 18:18:20 +01:00
Patryk Koscik
3efa3506c1 samples: dumb_http_server: Fix dead "Zephyr About page" href
Update href for 'Zephyr About page' in the `dumb_http_server` sample to the
correct URL.

Signed-off-by: Patryk Koscik <pkoscik@antmicro.com>
2024-12-02 14:23:43 +01:00
Jamel Arbi
a017304f78 samples: net: sockets: Add OT RCP config for echo client, server
Add OT RCP config for NXP RW612 platform

Signed-off-by: Jamel Arbi <jamel.arbi@nxp.com>
2024-11-27 10:37:21 -05:00
Jukka Rissanen
2bc7b07f5c samples: net: prometheus: Add support for network statistics
Add separate URL handling for network statistics.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Jukka Rissanen
c7989b5747 net: prometheus: Add more parameters to metric macros
Add collector parameter to metric creation macros so that it
is possible to bind the metric to collector already at built
time.

Also add optional user_data to metric macro calls so that user
can add optional data there. This will be used by network statistics
Prometheus support in subsequent commits.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00
Jukka Rissanen
d3efcbd316 net: prometheus: Remove need to have separate metric struct
Embed "struct prometheus_metric" to individual metric like
counter, gauge, histogram and summary. This way we avoid having
a separate base pointer in specific metrict struct. We also do
not need to search the specific metric from base metric as
we can simply use CONTAINER_OF() macro to get the base metric.

This embedding means that the counter, gauge, histogram and summary
metric define macros are changed as user does not need to create a
separate "struct prometheus_metric".

Convert the tests and sample to use the new macros.

Remove also the static from metric creation macros so that user
can decide whether it needs collector to be static or not.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-11-26 15:42:40 -05:00