Skip to content

Commit

Permalink
samples: net: sockets: Add OT RCP config for echo client, server
Browse files Browse the repository at this point in the history
Add OT RCP config for NXP RW612 platform

Signed-off-by: Jamel Arbi <[email protected]>
  • Loading branch information
JA-NXP committed Nov 5, 2024
1 parent 6748906 commit c0965be
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 0 deletions.
57 changes: 57 additions & 0 deletions samples/net/sockets/echo_client/overlay-ot-rcp-host-nxp.conf
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions samples/net/sockets/echo_client/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
52 changes: 52 additions & 0 deletions samples/net/sockets/echo_server/overlay-ot-rcp-host-nxp.conf
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions samples/net/sockets/echo_server/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0965be

Please sign in to comment.