vehicle-monitor/ESP32/wifi-credentials.h.template

23 lines
1.3 KiB
Plaintext
Raw Normal View History

// 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 configuration
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)