Skip to content

vonnieda/esp32-example-wifi-softap-and-sta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 WiFi SoftAP + Station Example

This example shows how to use Wi-Fi SoftAP and Station at the same time.

How to use example

Use menuconfig to set Example configuration SSID and password for each of STA and AP.

Configure the project

Open the project configuration menu (idf.py menuconfig).

In the Example Configuration menu:

  • Set the Wi-Fi configuration.
    • Set WiFi AP SSID.
    • Set WiFi AP Password.
    • Set WiFi STA SSID.
    • Set WiFi STA Password.

Optional: If you need, change the other options according to your requirements.

Build and Flash

Build the project and flash it to the board, then run the monitor tool to view the serial output:

Run idf.py -p PORT flash monitor to build, flash and monitor the project.

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for all the steps to configure and use the ESP-IDF to build projects.

Example Output

Note that the output, in particular the order of the output, may vary depending on the environment.

Console output shows connection to AP and connection from client to ESP32 SoftAP.

I (1543) wifi-softap+sta: Station connected with IP: 192.168.1.168, GW: 192.168.1.1, Mask: 255.255.255.0.
I (15363) wifi-softap+sta: SoftAP client connected with IP: 192.168.4.2.

Troubleshooting

For any technical queries, please open an issue on GitHub.

About

Demonstrates SoftAP + STA mode on the ESP32 with ESP-IDF.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published