2023-01-09 07:58:27 -05:00
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
2022-05-20 05:50:08 -04:00
2021-02-05 12:49:28 -05:00
# Wi-Fi SoftAP Example
2018-08-29 22:11:21 -04:00
(See the README.md file in the upper level 'examples' directory for more information about examples.)
2021-02-05 12:49:28 -05:00
This example shows how to use the Wi-Fi SoftAP functionality of the Wi-Fi driver of ESP for serving as an Access Point.
2018-08-29 22:11:21 -04:00
## How to use example
2022-01-04 23:52:04 -05:00
SoftAP supports Protected Management Frames(PMF). Necessary configurations can be set using pmf flags. Please refer [Wifi-Security ](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi-security.html ) for more info.
2018-08-29 22:11:21 -04:00
### Configure the project
2022-05-20 05:50:08 -04:00
Open the project configuration menu (`idf.py menuconfig`).
2021-02-05 12:49:28 -05:00
In the `Example Configuration` menu:
2018-08-29 22:11:21 -04:00
2021-02-05 12:49:28 -05:00
* Set the Wi-Fi configuration.
* Set `WiFi SSID` .
* Set `WiFi Password` .
Optional: If you need, change the other options according to your requirements.
2018-08-29 22:11:21 -04:00
### Build and Flash
2021-02-05 12:49:28 -05:00
Build the project and flash it to the board, then run the monitor tool to view the serial output:
2018-08-29 22:11:21 -04:00
2021-02-05 12:49:28 -05:00
Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
2018-08-29 22:11:21 -04:00
(To exit the serial monitor, type ``Ctrl-]``.)
2021-02-05 12:49:28 -05:00
See the Getting Started Guide for all the steps to configure and use the ESP-IDF to build projects.
* [ESP-IDF Getting Started Guide on ESP32 ](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html )
* [ESP-IDF Getting Started Guide on ESP32-S2 ](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html )
* [ESP-IDF Getting Started Guide on ESP32-C3 ](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html )
2018-08-29 22:11:21 -04:00
## Example Output
There is the console output for this example:
```
I (917) phy: phy_version: 3960, 5211945, Jul 18 2018, 10:40:07, 0, 0
I (917) wifi: mode : softAP (30:ae:a4:80:45:69)
I (917) wifi softAP: wifi_init_softap finished.SSID:myssid password:mypassword
I (26457) wifi: n:1 0, o:1 0, ap:1 1, sta:255 255, prof:1
I (26457) wifi: station: 70:ef:00:43:96:67 join, AID=1, bg, 20
I (26467) wifi softAP: station:70:ef:00:43:96:67 join, AID=1
2022-02-08 11:08:04 -05:00
I (27657) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2
2018-08-29 22:11:21 -04:00
```
2021-02-05 12:49:28 -05:00
## Troubleshooting
For any technical queries, please open an [issue ](https://github.com/espressif/esp-idf/issues ) on GitHub. We will get back to you soon.