Commit Graph

2482 Commits

Author SHA1 Message Date
Jukka Rissanen
db098f5ae8 samples: net: common: Check that tunnel config options are valid
Make sure that we have always a default value for tunnel peer and
local addresses.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-02 10:29:29 +02:00
Jukka Rissanen
8d94245152 samples: net: echo-server: Refactor tunnel support
Move the common tunnel setup code to samples/net/common directory
so that other network samples can utilize that too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-04-02 05:29:57 +02:00
Benjamin Cabé
daacc8c297 samples: net: wifi: remove redundant options from esp32 conf overlays
A lot of the config options are already set in the prj.conf.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-04-01 11:51:59 +02:00
Chaitanya Tata
e33d9ee45c samples: net: zperf: Fine tune memory to align zero-copy
Now that nRF70 by default uses zero-copy fine-tune the configuration to
get optimal memory while getting peak throughputs.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-03-28 16:11:05 +01:00
Ravi Dondaputi
58591c6f2c net: wifi: shell: Fix alloc failures during cert validation
Memory allocation failures during certificate validation causes
connection termination. Increase MBEDTLS_HEAP_SIZE to fix this.

Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
2025-03-28 12:21:20 +01:00
Marek Matej
c9e1ff3876 samples: net: wifi: esp32: Enable config by driver
Move repeated config NET_L2_ETHERNET under the driver Kconfig.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-03-27 21:33:24 +01:00
Marek Matej
4d78218091 boards,samples: espressif: enable wifi by default
Enable wifi node in all procpu dts, so Wi-Fi could be enabled simply by
enabling the CONFIG_WIFI. In turn some sample code overlay files can be
dismissed.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2025-03-27 21:33:24 +01:00
Seppo Takalo
18b1af8b86 samples: net: lwm2m: Refactor to use NET_SAMPLE Kconfig prefix
It is easier to separate a sample application Kconfig
values from ones that configure something inside Zephyr.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-27 09:51:31 +01:00
Seppo Takalo
f9737e016f samples: net: lwm2m: Add support for nRF52840 on nRF9160DK
Add support for running LwM2M client on nRF52840 chip
using nRF9160 as a modem through serial port.
nRF9160 should run Serial LTE Modem application build
from nRF Connect SDK.

nRF9160DK board has two MCU, nRF9160 and nRF52840.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-27 09:51:31 +01:00
Chaitanya Tata
be4c79b01e samples: net: zperf: Optimize heap for nRF70 Series
Fine-tune the heap to get peak UDP (TX and RX) results but with minimal
heap consumption.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-03-26 21:56:14 +01:00
Jukka Rissanen
618ec363f2 samples: net: zperf: Add frdm-rw612 board
Set minimal set of options to enable running zperf with
NXP frdm-rw612 board.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-26 16:22:14 +01:00
Emil Gydesen
092367cc8a samples: net: Replace OVERLAY_CONFIG with EXTRA_CONF_FILE
OVERLAY_CONFIG has been deprecated and replaced by
EXTRA_CONF_FILE. Update samples to reflect that.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-26 16:20:36 +01:00
Robert Lubos
55e1c10894 net: mqtt: Add MQTT 5.0 support for DISCONNECT
Add support for DICONNECT message specified in MQTT 5.0.
As with MQTT 5.0, the disconnect can now also be initiated by the
broker, it was needed to add decoder support for the message.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Seppo Takalo
c78081e5cf modem: modem_cellular: Configurable MTU for CMUX
Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.

We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.

Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.

Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-24 19:33:07 +01:00
Lucas Tamborrino
c6f84d0ba2 boards: espressif: esp32c6: Add LP Core board support
Add ULP Coprocessor board support for C6.
This requires a change in the board qualifier depending on the build
target.
Update esp32c6 overlay and configuration files to the proper name.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2025-03-21 17:05:20 +01:00
Robert Lubos
a61287e876 net: lib: tls_credentials: Rename TLS_CREDENTIAL_SERVER_CERTIFICATE
TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.

Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-21 14:18:52 +01:00
Chaitanya Tata
8fe1df6f59 samples: net: zperf: Remove fixed size config for nRF70
nRF70 now by default uses variale buffers.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-03-20 21:58:36 +01:00
Chaitanya Tata
0b8601cfbe samples: net: zperf: Fix RAM overflow for nRF70
nRF70 driver now uses a separate heap, so, no need to explicitly
configure the kernel heap.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-03-20 21:58:36 +01:00
Jukka Rissanen
fceb30d935 samples: net: vlan: Refactor VLAN support
Move the common VLAN setup code to samples/net/common directory
so that other network samples can utilize that too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
Jukka Rissanen
6dd239098b samples: net: txtime: Refactor VLAN support
Move the common VLAN setup code to samples/net/common directory
so that other network samples can utilize that too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
Jukka Rissanen
f47c5a6c6d samples: net: mdns_responder: Refactor VLAN support
Move the common VLAN setup code to samples/net/common directory
so that other network samples can utilize that too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
Jukka Rissanen
723cbb6df3 samples: net: echo-client: Refactor VLAN support
Move the common VLAN setup code to samples/net/common directory
so that other network samples can utilize that too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
Jukka Rissanen
3c6d3ed6c2 samples: net: echo-server: Refactor VLAN support
Move the common VLAN setup code to samples/net/common directory
so that other network samples can utilize that too.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
TOKITA Hiroshi
dbd1449132 samples: net: http_server: add extra config for enable DHCPv4
Add `overlay-dhcpv4.conf` for using this sample with DHCPv4.

When the DHCPv4 client is enabled, we must have a large number
for `CONFIG_ZVFS_EVENTFD_MAX`.
This sample may be frequently used with the DHCPv4 client,
so we'll add the extra config file.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-20 07:21:15 +01:00
Jukka Rissanen
5ab95a7e09 samples: net: echo_service: Fix documentation
Clarify the documentation in the README.rst file. Also remove the
obsolete comment from main.c as it is no longer correct.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-18 19:58:53 +01:00
Marcin Niestroj
82b614062f samples: net: echo_server: add runtime test for NSOS net init
Expect that networking is properly setup, by expecting
NET_EVENT_L4_CONNECTED event and listening for TCP/UDP incoming traffic on
both IPv4 and IPv6.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2025-03-18 08:27:06 +01:00
Jukka Rissanen
ac3cb9dac0 net: Change the net_linkaddr struct to not use pointers
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
Alberto Escolar Piedras
b7970ccc5f samples/net sntp_client: Replace deprecated option
CONFIG_ETH_NATIVE_POSIX is deprecated in favor of
CONFIG_ETH_NATIVE_TAP, let's replace it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-12 19:05:12 +01:00
Chris Friedt
1cf4b1e423 samples: net: prometheus: do not use deprecated posix kconfig
Use CONFIG_ZVFS_OPEN_MAX instead of CONFIG_POSIX_MAX_FDS.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-03-12 19:03:52 +01:00
Etienne de Maricourt
b47a2836ff net: lwm2m: Test compilation with data cache enabled
This should allow an issue such as #86681 to be found earlier for a not
widely used config.

Signed-off-by: Etienne de Maricourt <edmecomemail@gmail.com>
2025-03-12 02:27:59 +01:00
Alberto Escolar Piedras
cb53e40ff9 drivers uart_native_posix: rename to native_pty and support N instances
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.

And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.

Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
  now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
  being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
  terminal to PTY instead of PTTY.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Anas Nashif
895d91169e tests/samples: use integration platforms where possible
When possible, add integration_platforms to samples/tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Alberto Escolar Piedras
1f7fe49378 samples/net: Misc native_posix naming cleanup
Replace a few references to native_posix / the native_posix ethernet
driver with native_sim, or native_tap.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 20:10:38 +01:00
Alberto Escolar Piedras
78f800642a drivers/ethernet/eth_native_posix: Rename to eth_native_tap
Rename this driver to eth_native_tap, including renaming all its
options.
The old options remain until v4.4, but as deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 20:10:38 +01:00
Jordan Yates
89c4902fb7 samples: net: sntp_client: demonstrate async SNTP
Demonstrate asynchronous SNTP querying in the sample.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-07 19:51:40 +01:00
Jordan Yates
1bc795f8ed samples: net: sntp_client: SNTP server lookup
Lookup the address of the SNTP server through DNS instead of requiring
a server to be running locally.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-07 19:51:40 +01:00
Jordan Yates
68b7c98e26 samples: net: sntp_client: native sockets
Add the option to use the native socket abstraction for the sample.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-07 19:51:40 +01:00
Jordan Yates
3c3256b1b1 samples: net: common: resend conn status
Networking events may have been triggered before `wait_for_network` was
called. Resend the status events after the callbacks have been
registered.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-07 19:51:40 +01:00
Alberto Escolar Piedras
500cdd9223 samples/net: Remove native_posix overlays
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.

So these overlays will not serve any purpose anymore.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Alberto Escolar Piedras
6c38bc8ec4 boards native_posix: Remove twister support
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.

Remove the twister support for native_posix[//64] and therefore all
references to them from the testcases and samples yamls, so twister
does not error out.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Declan Snyder
d46c382950 drivers: ethernet: Remove deprecated eth_mcux
This driver was deprecated and must be removed by Zephyr version
4.1 according to lifecycle/release guidelines.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-02-26 22:04:26 +00:00
Benjamin Cabé
848a461bbc samples: net: fix spelling of "Celsius"
Use correct spelling for celsius unit

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-19 18:51:13 +01:00
Declan Snyder
e76a5a8ed1 boards: mimxrt1050_evk: Fix test/sample conf names
Fix test/sample .conf names for this board, so they are actually pulled
into the build.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-02-18 18:38:51 +01:00
Robert Lubos
b8614607d4 samples: net: sockets: coap_download: Cancel requests before closing
Call coap_client_cancel_requests() before closing the client socket so
that all activities on that socket are ceased before close. This
prevents POLLNVAL error from being thrown by the coap_client thread and
error being printed in the sample output.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-18 13:31:15 +01:00
Ram Mahesh
c0d8bd17d1 doc: Fix the doc issue in samples/net/wifi/apsta_mode/README.rst
In the above file, Building,Flashing and Running section is using
:zephyr-app: as samples/boards/espressif/deep_sleep.
But it should be samples/net/wifi/apsta_mode.
Fixes: #85505

Signed-off-by: Ram Mahesh <rammaheshram1234@gmail.com>
2025-02-16 21:05:41 +01:00
Andrei Menzopol
17cc683c4e samples: echo_client echo_server: update tests
Group openthread tests under the same case and add frdm_mcxw71.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Andrei Menzopol
e6be77bc1d samples: echo_client echo_server: add frdm_mcxw7 board overlays
Add frdm_mcxw7 board conf and overlay files for echo_client and
echo_server sample applications.

Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
2025-02-14 03:08:48 +01:00
Fengming Ye
4ffa27568d wifi: nxp: kconfig: decouple dependency of soft AP
Decouple dependency of CONFIG_NXP_WIFI_SOFTAP_SUPPORT.
Add wifi defconfig to set default kconfig options when soft AP
enabled.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2025-02-12 09:40:38 +01:00
Jukka Rissanen
70c96b2642 samples: net: mdns_responder: Enable probing in CI
Make sure we have a compile test in CI for probing support.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-02-12 09:40:15 +01:00
Jérôme Pouiller
2deab04cfe tests: drivers: wifi: Enable board siwx917_rb4338a
Ensure nobdy break compatibility with SiWx91x chipsets.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-02-11 22:07:11 +01:00