khoih-prog / ESP_WiFiManager_Lite

Light-Weight MultiWiFi/Credentials Manager for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards boards. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters. paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32/ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested.
MIT License
49 stars 15 forks source link

Custom AP settings #3

Closed Pius171 closed 3 years ago

Pius171 commented 3 years ago

Cannot change esp8266 decice ap name and password

I can really find an function to call to change this

khoih-prog commented 3 years ago

The functions are:

void setConfigPortalIP(IPAddress portalIP = IPAddress(192, 168, 4, 1));
void setConfigPortal(String ssid = "", String pass = "");

For example, use in your code

...

  ESP_WiFiManager = new ESP_WiFiManager_Lite();

  // Set customized AP IP
  ESP_WiFiManager->setConfigPortalIP(IPAddress(192, 168, 100, 1));

  String AP_SSID = "your_customized_ssid";
  String AP_PWD  = "your_customized_pwd";

  // Set customized AP SSID and PWD
  ESP_WiFiManager->setConfigPortal(AP_SSID, AP_PWD);

...