From c0965be5381edeb5dbda29db8b8912b5031c07b2 Mon Sep 17 00:00:00 2001 From: Jamel Arbi Date: Thu, 10 Oct 2024 16:07:30 +0200 Subject: [PATCH] samples: net: sockets: Add OT RCP config for echo client, server Add OT RCP config for NXP RW612 platform Signed-off-by: Jamel Arbi --- .../echo_client/overlay-ot-rcp-host-nxp.conf | 57 +++++++++++++++++++ samples/net/sockets/echo_client/sample.yaml | 10 ++++ .../echo_server/overlay-ot-rcp-host-nxp.conf | 52 +++++++++++++++++ samples/net/sockets/echo_server/sample.yaml | 10 ++++ 4 files changed, 129 insertions(+) create mode 100644 samples/net/sockets/echo_client/overlay-ot-rcp-host-nxp.conf create mode 100644 samples/net/sockets/echo_server/overlay-ot-rcp-host-nxp.conf diff --git a/samples/net/sockets/echo_client/overlay-ot-rcp-host-nxp.conf b/samples/net/sockets/echo_client/overlay-ot-rcp-host-nxp.conf new file mode 100644 index 00000000000000..b1d03bd4583445 --- /dev/null +++ b/samples/net/sockets/echo_client/overlay-ot-rcp-host-nxp.conf @@ -0,0 +1,57 @@ +CONFIG_REQUIRES_FULL_LIBC=y + +# CPP library +CONFIG_CPP=y + +# Disable TCP and IPv4 (TCP disabled to avoid heavy traffic) +CONFIG_NET_TCP=n +CONFIG_NET_IPV4=n + +CONFIG_NET_IPV6_NBR_CACHE=n +CONFIG_NET_IPV6_MLD=n +CONFIG_NET_CONFIG_NEED_IPV4=n +CONFIG_NET_CONFIG_MY_IPV4_ADDR="" +CONFIG_NET_CONFIG_PEER_IPV4_ADDR="" + +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=4096 +CONFIG_INIT_STACKS=y + + +# Enable OpenThread shell +CONFIG_SHELL=y +CONFIG_OPENTHREAD_SHELL=y +CONFIG_SHELL_STACK_SIZE=3072 + +# IMU & FW loader +CONFIG_NXP_RF_IMU=y +CONFIG_NXP_FW_LOADER=y + +CONFIG_NET_L2_OPENTHREAD=y + +# Enable Openthread rcp host +CONFIG_HDLC_RCP_IF=y + +# Enable OpenThread features set +CONFIG_OPENTHREAD_THREAD_STACK_SIZE=4096 +CONFIG_OPENTHREAD_THREAD_VERSION_1_3=y +CONFIG_OPENTHREAD_DEBUG=y +CONFIG_OPENTHREAD_L2_DEBUG=y +CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y + +CONFIG_OPENTHREAD_CHANNEL=26 +CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff" + +CONFIG_NET_CONFIG_MY_IPV6_ADDR="fdde:ad00:beef::1" +CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::2" +CONFIG_NET_CONFIG_INIT_TIMEOUT=60 + +# mbedTLS tweaks +CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=768 + +# A sample configuration to enable Thread Joiner, uncomment if needed +#CONFIG_OPENTHREAD_JOINER=y +#CONFIG_OPENTHREAD_JOINER_AUTOSTART=y + +# Enable diagnostic module, uncomment if needed +#CONFIG_OPENTHREAD_DIAG=y diff --git a/samples/net/sockets/echo_client/sample.yaml b/samples/net/sockets/echo_client/sample.yaml index 9c4dce656044aa..47d0b6364a61e9 100644 --- a/samples/net/sockets/echo_client/sample.yaml +++ b/samples/net/sockets/echo_client/sample.yaml @@ -97,6 +97,16 @@ tests: - openthread platform_allow: frdm_kw41z filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC + sample.net.sockets.echo_client.rw612_openthread_rcp_host: + extra_args: OVERLAY_CONFIG="overlay-ot-rcp-host-nxp.conf" + slow: true + tags: + - net + - openthread + platform_allow: + - frdm_rw612 + - rd_rw612_bga + filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC sample.net.sockets.echo_client.userspace: extra_args: - CONFIG_USERSPACE=y diff --git a/samples/net/sockets/echo_server/overlay-ot-rcp-host-nxp.conf b/samples/net/sockets/echo_server/overlay-ot-rcp-host-nxp.conf new file mode 100644 index 00000000000000..ebd1e7f4102ae2 --- /dev/null +++ b/samples/net/sockets/echo_server/overlay-ot-rcp-host-nxp.conf @@ -0,0 +1,52 @@ +CONFIG_REQUIRES_FULL_LIBC=y + +# Disable TCP and IPv4 (TCP disabled to avoid heavy traffic) +CONFIG_NET_TCP=n +CONFIG_NET_IPV4=n + +CONFIG_NET_IPV6_NBR_CACHE=n +CONFIG_NET_IPV6_MLD=n +CONFIG_NET_CONFIG_NEED_IPV4=n +CONFIG_NET_CONFIG_MY_IPV4_ADDR="" +CONFIG_NET_CONFIG_PEER_IPV4_ADDR="" + +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 +CONFIG_MAIN_STACK_SIZE=4096 +CONFIG_INIT_STACKS=y + +# Enable OpenThread shell +CONFIG_SHELL=y +CONFIG_OPENTHREAD_SHELL=y +CONFIG_SHELL_STACK_SIZE=3072 + +# IMU & FW loader +CONFIG_NXP_RF_IMU=y +CONFIG_NXP_FW_LOADER=y + +CONFIG_NET_L2_OPENTHREAD=y + +# Enable Openthread rcp host +CONFIG_HDLC_RCP_IF=y + +# Enable OpenThread features set +CONFIG_OPENTHREAD_THREAD_VERSION_1_3=y +CONFIG_OPENTHREAD_THREAD_STACK_SIZE=4096 +CONFIG_OPENTHREAD_DEBUG=y +CONFIG_OPENTHREAD_L2_DEBUG=y +CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y + +CONFIG_OPENTHREAD_CHANNEL=26 +CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff" + +CONFIG_NET_CONFIG_MY_IPV6_ADDR="fdde:ad00:beef::2" +CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::1" +CONFIG_NET_CONFIG_INIT_TIMEOUT=60 + +# mbedTLS tweaks +CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=768 + +# A sample configuration to enable Thread Commissioner, uncomment if needed +#CONFIG_OPENTHREAD_COMMISSIONER=y + +# Enable diagnostic module, uncomment if needed +#CONFIG_OPENTHREAD_DIAG=y diff --git a/samples/net/sockets/echo_server/sample.yaml b/samples/net/sockets/echo_server/sample.yaml index 224221a4f8b53d..b0bcd2befe1176 100644 --- a/samples/net/sockets/echo_server/sample.yaml +++ b/samples/net/sockets/echo_server/sample.yaml @@ -112,6 +112,16 @@ tests: - openthread platform_allow: frdm_kw41z filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC + sample.net.sockets.echo_server.rw612_openthread_rcp_host: + extra_args: OVERLAY_CONFIG="overlay-ot-rcp-host-nxp.conf" + slow: true + tags: + - net + - openthread + platform_allow: + - frdm_rw612 + - rd_rw612_bga + filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC sample.net.sockets.echo_server.e1000: extra_args: EXTRA_CONF_FILE="overlay-e1000.conf" tags: net