Skip to content

ESP-IDF Example to connect to a WiFI Network and reconnect in case the connection is lost

License

Notifications You must be signed in to change notification settings

antusystem/ESPIDF_WiFi_Reconnection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiFi station with reconnection

This example shows how to use the Wi-Fi Station functionality of the Wi-Fi driver of ESP for connecting to an Access Point and also implementing a reconnetion and adding a LED to show the connection status.

Note: Take in consideration the ways to reconnect indicated in the docs, where it is stated that: "the reconnection may not connect the same AP if there are more than one APs with the same SSID. The reconnection always select current best APs to connect".

How to use example

Configure the project

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

In the WiFi station with reconnection menu:

  • Set the Wi-Fi configuration.
    • Set WiFi SSID.
    • Set WiFi Password.
  • Set LED GPIO:
    • Indicate the GPIO that is connected to the LED. Default 2.

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

Hardware Required

You need a ESP32 basic Devboard, this was tested with a NodeMCU.

Pin Assignment:

To use the LED to show the connection status you must indicate the GPIO, in the case of the Devboard used in this example the GPIO is 2.

ESP32 DESCRIPTION
GPIO2 LED

Log

  • Last compile: 07 November 2023.
  • Last test: 07 November 2023.
  • Last compile espidf version: v 5.1.1.
  • VSCode ESP-IDF Visual Studio Code Extension v 1.6.5.

License

Apache License, Version 2.0, January 2004.

Version

v 1.2.1

About

ESP-IDF Example to connect to a WiFI Network and reconnect in case the connection is lost

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published