Skip to content

Commit

Permalink
samples: wifi: Switch BLE/IEEE802154 radio firmware to ipc_radio
Browse files Browse the repository at this point in the history
Swap hci_ipc and 802154_rpmsg to ipc_radio for supported wifi samples.

Jira: NCSDK-27659

Signed-off-by: Dominik Chat <[email protected]>
  • Loading branch information
dchat-nordic authored and anangl committed Jun 5, 2024
1 parent bf48387 commit 63935b1
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,8 @@ Zigbee samples that used :ref:`zephyr:nrf-ieee802154-rpmsg-sample` or :ref:`mult
Wi-Fi samples
-------------

Wi-Fi samples that used :ref:`zephyr:bluetooth-hci-ipc-sample` or :ref:`zephyr:nrf-ieee802154-rpmsg-sample` radio core firmware, now use the :ref:`ipc_radio`.

* Added the :ref:`softap_wifi_provision_sample` sample.
* Added the :ref:`wifi_thread_coex_sample` sample that demonstrates Wi-Fi and Thread coexistence.

Expand Down
10 changes: 10 additions & 0 deletions samples/wifi/ble_coex/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"

config NRF_DEFAULT_IPC_RADIO
default y
8 changes: 4 additions & 4 deletions samples/wifi/ble_coex/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ The following are examples of the CLI commands:

.. code-block:: console
west build -p -b nrf7002dk/nrf5340/cpuapp -- -DCONFIG_MPSL_CX=n -Dhci_ipc_CONFIG_MPSL_CX=n
west build -p -b nrf7002dk/nrf5340/cpuapp -- -DCONFIG_MPSL_CX=n -Dipc_radio_CONFIG_MPSL_CX=n
Use this command for Wi-Fi throughput only, Bluetooth LE throughput only, or concurrent Wi-Fi and Bluetooth LE throughput with coexistence disabled tests.

* Build with coexistence enabled:

.. code-block:: console
west build -p -b nrf7002dk/nrf5340/cpuapp -- -DCONFIG_MPSL_CX=y -Dhci_ipc_CONFIG_MPSL_CX=y
west build -p -b nrf7002dk/nrf5340/cpuapp -- -DCONFIG_MPSL_CX=y -Dipc_radio_CONFIG_MPSL_CX=y
Use this command for concurrent Wi-Fi and Bluetooth LE throughput with coexistence enabled test.

Expand All @@ -169,13 +169,13 @@ Add the following SHIELD options for the nRF7002 EK and nRF7001 EK.

.. code-block:: console
-DSHIELD=nrf7002ek -Dhci_ipc_SHIELD=nrf7002ek_coex
-DSHIELD=nrf7002ek -Dipc_radio_SHIELD=nrf7002ek_coex
* For nRF7001 EK:

.. code-block:: console
-DSHIELD=nrf7002ek_nrf7001 -Dhci_ipc_SHIELD=nrf7002ek_nrf7001_coex
-DSHIELD=nrf7002ek_nrf7001 -Dipc_radio_SHIELD=nrf7002ek_nrf7001_coex
The generated HEX file to be used is :file:`ble_coex/build/zephyr/merged_domains.hex`.

Expand Down
18 changes: 9 additions & 9 deletions samples/wifi/ble_coex/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tests:
build_only: true
integration_platforms:
- nrf7002dk/nrf5340/cpuapp
extra_args: CONFIG_MPSL_CX=y hci_ipc_CONFIG_MPSL_CX=y
extra_args: CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
platform_allow: nrf7002dk/nrf5340/cpuapp
tags: ci_build sysbuild
Expand All @@ -17,7 +17,7 @@ tests:
build_only: true
integration_platforms:
- nrf7002dk/nrf5340/cpuapp
extra_args: CONFIG_MPSL_CX=y hci_ipc_CONFIG_MPSL_CX=y
extra_args: CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=n
platform_allow: nrf7002dk/nrf5340/cpuapp
tags: ci_build sysbuild
Expand All @@ -26,7 +26,7 @@ tests:
build_only: true
integration_platforms:
- nrf7002dk/nrf5340/cpuapp/nrf7001
extra_args: CONFIG_MPSL_CX=y hci_ipc_CONFIG_MPSL_CX=y
extra_args: CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
platform_allow: nrf7002dk/nrf5340/cpuapp/nrf7001
tags: ci_build sysbuild
Expand All @@ -36,8 +36,8 @@ tests:
build_only: true
integration_platforms:
- nrf5340dk/nrf5340/cpuapp
extra_args: SHIELD=nrf7002ek hci_ipc_SHIELD=nrf7002ek_coex
CONFIG_MPSL_CX=y hci_ipc_CONFIG_MPSL_CX=y
extra_args: SHIELD=nrf7002ek ipc_radio_SHIELD=nrf7002ek_coex
CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
platform_allow: nrf5340dk/nrf5340/cpuapp
tags: ci_build sysbuild
Expand All @@ -46,16 +46,16 @@ tests:
build_only: true
integration_platforms:
- nrf5340dk/nrf5340/cpuapp
extra_args: SHIELD=nrf7002ek_nrf7001 hci_ipc_SHIELD=nrf7002ek_nrf7001_coex
CONFIG_MPSL_CX=y hci_ipc_CONFIG_MPSL_CX=y
extra_args: SHIELD=nrf7002ek_nrf7001 ipc_radio_SHIELD=nrf7002ek_nrf7001_coex
CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
platform_allow: nrf5340dk/nrf5340/cpuapp
tags: sysbuild
sample.nrf7002_eb.thingy53.ble_coex:
sysbuild: true
build_only: true
extra_args: ble_coex_SHIELD=nrf7002eb hci_ipc_SHIELD=nrf7002eb_coex
CONFIG_MPSL_CX=y hci_ipc_CONFIG_MPSL_CX=y
extra_args: ble_coex_SHIELD=nrf7002eb ipc_radio_SHIELD=nrf7002eb_coex
CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
integration_platforms:
- thingy53/nrf5340/cpuapp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
CONFIG_IPC_SERVICE=y
CONFIG_MBOX=y

CONFIG_HEAP_MEM_POOL_SIZE=8192

CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512

CONFIG_MBOX=y
CONFIG_IPC_SERVICE=y

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
#CONFIG_BT_MAX_CONN=16


# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
# Host number of completed commands does not follow normal flow control.
CONFIG_BT_BUF_CMD_TX_COUNT=10

# Enable and adjust the below value as necessary
# CONFIG_BT_BUF_EVT_RX_COUNT=16
# CONFIG_BT_BUF_EVT_RX_SIZE=255
Expand All @@ -29,3 +23,6 @@ CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_BUF_ACL_TX_SIZE=502

CONFIG_BT_MAX_CONN=2

CONFIG_IPC_RADIO_BT=y
CONFIG_IPC_RADIO_BT_HCI_IPC=y
3 changes: 0 additions & 3 deletions samples/wifi/provisioning/ble/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"

config NRF_DEFAULT_IPC_RADIO
default y

config NETCORE_IPC_RADIO_BT_HCI_IPC
default y
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
CONFIG_IPC_SERVICE=y
CONFIG_MBOX=y

CONFIG_HEAP_MEM_POOL_SIZE=8192

CONFIG_MAIN_STACK_SIZE=512
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512

CONFIG_MBOX=y
CONFIG_IPC_SERVICE=y

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
#CONFIG_BT_MAX_CONN=16


# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
# Host number of completed commands does not follow normal flow control.
CONFIG_BT_BUF_CMD_TX_COUNT=10

# Enable and adjust the below value as necessary
# CONFIG_BT_BUF_EVT_RX_COUNT=16
# CONFIG_BT_BUF_EVT_RX_SIZE=255
Expand All @@ -26,3 +20,6 @@ CONFIG_BT_BUF_ACL_TX_SIZE=151
CONFIG_BT_BUF_ACL_RX_SIZE=151
CONFIG_BT_CTLR_DATA_LENGTH_MAX=151
CONFIG_BT_MAX_CONN=2

CONFIG_IPC_RADIO_BT=y
CONFIG_IPC_RADIO_BT_HCI_IPC=y
10 changes: 10 additions & 0 deletions samples/wifi/thread_coex/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"

config NRF_DEFAULT_IPC_RADIO
default y
16 changes: 8 additions & 8 deletions samples/wifi/thread_coex/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tests:
build_only: true
integration_platforms:
- nrf7002dk/nrf5340/cpuapp
extra_args: CONFIG_MPSL_CX=y 802154_rpmsg_CONFIG_MPSL_CX=y
extra_args: CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
EXTRA_CONF_FILE="overlay-ot.conf;overlay-wifi-udp-client-thread-udp-client.conf"
platform_allow: nrf7002dk/nrf5340/cpuapp
Expand All @@ -18,7 +18,7 @@ tests:
build_only: true
integration_platforms:
- nrf7002dk/nrf5340/cpuapp/nrf7001
extra_args: CONFIG_MPSL_CX=y 802154_rpmsg_CONFIG_MPSL_CX=y
extra_args: CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
EXTRA_CONF_FILE="overlay-ot.conf;overlay-wifi-udp-client-thread-udp-client.conf"
platform_allow: nrf7002dk/nrf5340/cpuapp/nrf7001
Expand All @@ -28,8 +28,8 @@ tests:
build_only: true
integration_platforms:
- nrf5340dk/nrf5340/cpuapp
extra_args: SHIELD=nrf7002ek 802154_rpmsg_SHIELD=nrf7002ek_coex
CONFIG_MPSL_CX=y 802154_rpmsg_CONFIG_MPSL_CX=y
extra_args: SHIELD=nrf7002ek ipc_radio_SHIELD=nrf7002ek_coex
CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
EXTRA_CONF_FILE="overlay-ot.conf;overlay-wifi-udp-client-thread-udp-client.conf"
platform_allow: nrf5340dk/nrf5340/cpuapp
Expand All @@ -39,17 +39,17 @@ tests:
build_only: true
integration_platforms:
- nrf5340dk/nrf5340/cpuapp
extra_args: SHIELD=nrf7002ek_nrf7001 802154_rpmsg_SHIELD=nrf7002ek_nrf7001_coex
CONFIG_MPSL_CX=y 802154_rpmsg_CONFIG_MPSL_CX=y
extra_args: SHIELD=nrf7002ek_nrf7001 ipc_radio_SHIELD=nrf7002ek_nrf7001_coex
CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
EXTRA_CONF_FILE="overlay-ot.conf;overlay-wifi-udp-client-thread-udp-client.conf"
platform_allow: nrf5340dk/nrf5340/cpuapp
tags: ci_build sysbuild
sample.nrf7002_eb.thingy53.thread_coex:
sysbuild: true
build_only: true
extra_args: thread_coex_SHIELD=nrf7002eb 802154_rpmsg_SHIELD=nrf7002eb_coex
CONFIG_MPSL_CX=y 802154_rpmsg_CONFIG_MPSL_CX=y
extra_args: thread_coex_SHIELD=nrf7002eb ipc_radio_SHIELD=nrf7002eb_coex
CONFIG_MPSL_CX=y ipc_radio_CONFIG_MPSL_CX=y
CONFIG_COEX_SEP_ANTENNAS=y
EXTRA_CONF_FILE="overlay-ot.conf;overlay-wifi-udp-client-thread-udp-client.conf"
integration_platforms:
Expand Down
16 changes: 16 additions & 0 deletions samples/wifi/thread_coex/sysbuild/ipc_radio/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_LOG=n

CONFIG_NRF_802154_SER_RADIO=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2
CONFIG_NRF_802154_ENCRYPTION=y

CONFIG_IPC_RADIO_BT=y
CONFIG_IPC_RADIO_802154=y

0 comments on commit 63935b1

Please sign in to comment.