From af45eced2bc955cea8ddfc212b3c73735ba88c54 Mon Sep 17 00:00:00 2001 From: Tiago Medicci Serrano Date: Thu, 9 Mar 2023 15:33:59 -0300 Subject: [PATCH] docs/esp32s3: add documentation for Wi-Fi (STA + SoftAP) --- .../esp32s3/boards/esp32s3-devkit/index.rst | 5 ++- .../platforms/xtensa/esp32s3/index.rst | 43 ++++++++++++++++++- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst index 12ec1e8fe1..00f602fe1d 100644 --- a/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/boards/esp32s3-devkit/index.rst @@ -50,6 +50,9 @@ and USB activity. None of these are available for use by software. Configurations ============== +.. tip:: Please check commonly used configurations for + :ref:`ESP32-S3 Peripherals ` + nsh --- @@ -57,7 +60,7 @@ Basic NuttShell configuration (console enabled in UART0, exposed via USB connection by means of CP2102 converter, at 115200 bps). mcuboot_nsh ---- +----------- Similar configuration as nsh, except that it enables booting from MCUboot and the experimental features configuration. diff --git a/Documentation/platforms/xtensa/esp32s3/index.rst b/Documentation/platforms/xtensa/esp32s3/index.rst index 0b511e7d72..d8f054fd9c 100644 --- a/Documentation/platforms/xtensa/esp32s3/index.rst +++ b/Documentation/platforms/xtensa/esp32s3/index.rst @@ -78,7 +78,7 @@ Once you downloaded both binaries, you can flash them by adding an ``ESPTOOL_BIN .. note:: It is recommended that if this is the first time you are using the board with NuttX that you perform a complete SPI FLASH erase. .. code-block:: console - + $ esptool.py erase_flash Peripheral Support @@ -95,7 +95,7 @@ SPI Yes I2C No CAN/TWAI No DMA Yes -Wifi No +Wi-Fi Yes WPA3-SAE supported SPIFLASH Yes SPIRAM Yes Timers Yes @@ -121,6 +121,45 @@ USB SERIAL Yes USB OTG No ========== ======= ===== +.. _esp32s3_peripheral_support: + +Wi-Fi +----- + +.. tip:: Boards usually expose a ``wapi`` defconfig which enables Wi-Fi + +A standard network interface will be configured and can be initialized such as:: + + nsh> ifup wlan0 + nsh> wapi psk wlan0 mypasswd 3 + nsh> wapi essid wlan0 myssid 1 + nsh> renew wlan0 + +In this case a connection to AP with SSID ``myssid`` is done, using ``mypasswd`` as +password. IP address is obtained via DHCP using ``renew`` command. You can check +the result by running ``ifconfig`` afterwards. + +Wi-Fi SoftAP +------------ + +It is possible to use ESP32 as an Access Point (SoftAP). + +.. tip:: Boards usually expose a ``sta_softap`` defconfig which enables Wi-Fi + (STA + SoftAP) + +If you are using this board config profile you can run these commands to be able +to connect your smartphone or laptop to your board:: + + nsh> ifup wlan1 + nsh> dhcpd_start wlan1 + nsh> wapi psk wlan1 mypasswd 3 + nsh> wapi essid wlan1 nuttxap 1 + +In this case, you are creating the access point ``nuttxapp`` in your board and to +connect to it on your smartphone you will be required to type the password ``mypasswd`` +using WPA2. +The ``dhcpd_start`` is necessary to let your board to associate an IP to your smartphone. + Memory Map ==========