Browse Source
- Possibility to create an access point on the ESP32 - Possibility to make the ESP32 try to connect to multiple access pointsmaster
Youen Toupin
3 years ago
2 changed files with 96 additions and 11 deletions
@ -1,7 +1,22 @@
|
||||
// To avoid saving your wifi credentials in the git repository, wifi-credentials.h.template is ignored by git |
||||
|
||||
// Copy this file and name it wifi-credentials.h |
||||
// Then edit your wifi SSID and password |
||||
// Then edit your wifi configuration |
||||
|
||||
const char* wifi_ssid = "REPLACE_WITH_YOUR_SSID"; |
||||
const char* wifi_password = "REPLACE_WITH_YOUR_PASSWORD"; |
||||
struct WifiCredentials |
||||
{ |
||||
const char* SSID; |
||||
const char* password; |
||||
}; |
||||
|
||||
// Station config: for making the ESP32 connect to an existing remote access point |
||||
// You can add one or more SSID/password pairs here |
||||
// To disable station mode, add a single entry { NULL, NULL } |
||||
WifiCredentials wifi_STA_credentials[] = { |
||||
{ "REPLACE_WITH_YOUR_SSID", "REPLACE_WITH_YOUR_PASSWORD" } |
||||
}; |
||||
|
||||
// Access point config: for turning the ESP32 into an access point (the ESP32 can work in both modes at the same time) |
||||
// Note that if you connect a smartphone to this AP, it will detect it has no internet access, and then won't send requests to it (which will result in a timeout). A workaround is to turn off mobile data to force the phone use the access point (but then you effectively don't have internet on the phone). A more practical setup is to create an access point on your phone, and have the ESP32 connect to it (in "station" mode) |
||||
const char* wifi_AP_ssid = "REPLACE_WITH_YOUR_SSID"; // set to NULL to disable access point mode |
||||
const char* wifi_AP_password = "REPLACE_WITH_YOUR_PASSWORD"; // set to NULL for an open access point (not recommended) |
||||
|
Loading…
Reference in new issue