From c005997a0dc7d8ef27a8fbd3438a1c6411ffb3c6 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 30 Oct 2024 17:33:37 +0200 Subject: [PATCH] samples: net: wifi: Update the AP-STA mode sample Update the AP/STA mode README file to make it more generic. Signed-off-by: Jukka Rissanen --- boards/ti/cc3220sf_launchxl/doc/index.rst | 2 +- boards/ti/cc3235sf_launchxl/doc/index.rst | 2 +- doc/_scripts/redirects.py | 3 ++- samples/net/wifi/README.rst | 5 +++++ samples/net/wifi/apsta_mode/README.rst | 8 ++++---- samples/net/wifi/shell/README.rst | 6 +++--- 6 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 samples/net/wifi/README.rst diff --git a/boards/ti/cc3220sf_launchxl/doc/index.rst b/boards/ti/cc3220sf_launchxl/doc/index.rst index 63952bd4351..6ff33afb88b 100644 --- a/boards/ti/cc3220sf_launchxl/doc/index.rst +++ b/boards/ti/cc3220sf_launchxl/doc/index.rst @@ -215,7 +215,7 @@ Usage: Set :kconfig:option:`CONFIG_WIFI_SIMPLELINK` and :kconfig:option:`CONFIG_WIFI` to ``y`` to enable Wi-Fi. -See :zephyr_file:`samples/net/wifi/boards/cc3220sf_launchxl.conf`. +See :zephyr_file:`samples/net/wifi/shell/boards/cc3220sf_launchxl.conf`. Provisioning: ============= diff --git a/boards/ti/cc3235sf_launchxl/doc/index.rst b/boards/ti/cc3235sf_launchxl/doc/index.rst index 5ddf5930d0d..7602a3b2712 100644 --- a/boards/ti/cc3235sf_launchxl/doc/index.rst +++ b/boards/ti/cc3235sf_launchxl/doc/index.rst @@ -215,7 +215,7 @@ Usage: Set :kconfig:option:`CONFIG_WIFI_SIMPLELINK` and :kconfig:option:`CONFIG_WIFI` to ``y`` to enable Wi-Fi. -See :zephyr_file:`samples/net/wifi/boards/cc3235sf_launchxl.conf`. +See :zephyr_file:`samples/net/wifi/shell/boards/cc3235sf_launchxl.conf`. Provisioning: ============= diff --git a/doc/_scripts/redirects.py b/doc/_scripts/redirects.py index 31e7a3b0d19..d7c3d1d7337 100644 --- a/doc/_scripts/redirects.py +++ b/doc/_scripts/redirects.py @@ -231,8 +231,9 @@ REDIRECTS = [ ('samples/boards/esp32/flash_memory_mapped/README', 'samples/boards/espressif/flash_memory_mapped/README'), ('samples/boards/esp32/light_sleep/README', 'samples/boards/espressif/light_sleep/README'), ('samples/boards/esp32/spiram_test/README', 'samples/boards/espressif/spiram_test/README'), - ('samples/boards/esp32/wifi_apsta_mode/README', 'samples/boards/espressif/wifi_apsta_mode/README'), + ('samples/boards/esp32/wifi_apsta_mode/README', 'samples/net/wifi/apsta_mode/README'), ('samples/boards/esp32/xt_wdt/README', 'samples/boards/espressif/xt_wdt/README'), + ('samples/boards/espressif/wifi_apsta_mode/README', 'samples/net/wifi/apsta_mode/README'), ('samples/boards/google_twinkie_v2_pda/README', 'samples/boards/google/twinkie_v2/pda/README'), ('samples/boards/intel_adsp/code_relocation/README', 'samples/boards/intel/adsp/code_relocation/README'), ('samples/boards/litex/i2s/README', 'samples/boards/enjoydigital/litex/i2s/README'), diff --git a/samples/net/wifi/README.rst b/samples/net/wifi/README.rst new file mode 100644 index 00000000000..b876e8b01dc --- /dev/null +++ b/samples/net/wifi/README.rst @@ -0,0 +1,5 @@ +.. zephyr:code-sample-category:: wifi + :name: Wi-Fi + :show-listing: + + These samples demonstrate various Wi-Fi use cases for boards that support it. diff --git a/samples/net/wifi/apsta_mode/README.rst b/samples/net/wifi/apsta_mode/README.rst index e6c8ff65f35..38f5c1c2e7c 100644 --- a/samples/net/wifi/apsta_mode/README.rst +++ b/samples/net/wifi/apsta_mode/README.rst @@ -1,13 +1,13 @@ -.. zephyr:code-sample:: esp32-wifi-ap-sta-mode +.. zephyr:code-sample:: wifi-ap-sta-mode :name: Wi-Fi AP-STA mode :relevant-api: wifi_mgmt dhcpv4_server - Setup ESP32 to function as both an Access Point (AP) and a Station (STA) simultaneously. + Configure a Wi-Fi board to operate as both an Access Point (AP) and a Station (STA). Overview ******** -The Wi-Fi AP-STA mode of the ESP32 allows it to function as both +The Wi-Fi AP-STA mode of a Wi-Fi board allows it to function as both an Access Point (AP) and a Station (STA) simultaneously. This sample demonstrates how to configure and utilize AP-STA mode. @@ -21,7 +21,7 @@ In this demo, AP-STA mode is enabled using :kconfig:option:`CONFIG_ESP32_WIFI_AP An additional Wi-Fi node is added in the ``.overlay`` file. The ``net_if``. In the sample code, initially, the AP mode is enabled, followed by enabling the STA mode. The driver checks if AP mode was previously enabled. If so, it transitions -the ESP32 into AP-STA mode to support both modes and attempts to connect to the +the board into AP-STA mode to support both modes and attempts to connect to the AP specified by the provided SSID and PSK. Requirements diff --git a/samples/net/wifi/shell/README.rst b/samples/net/wifi/shell/README.rst index 81aaa61a729..74d77e63c04 100644 --- a/samples/net/wifi/shell/README.rst +++ b/samples/net/wifi/shell/README.rst @@ -17,11 +17,11 @@ Building and Running Verify the board and chip you are targeting provide Wi-Fi support. -For instance you can use TI's CC3220 by selecting the cc3220sf_launchxl board. +For instance you can use Nordic's nrf7002dk by selecting the nrf7002dk/nrf5340/cpuapp board. .. zephyr-app-commands:: - :zephyr-app: samples/net/wifi - :board: cc3220sf_launchxl + :zephyr-app: samples/net/wifi/shell + :board: nrf7002dk/nrf5340/cpuapp :goals: build :compact: