khoih-prog / ESPAsync_WiFiManager

This is an ESP32 (including ESP32-S2 and ESP32-C3) / ESP8266 WiFi Connection Manager, using ESPAsyncWebServer, with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- . Using AsyncDNSServer instead of DNSServer now.
MIT License
291 stars 73 forks source link

Single SSID instead of multiple SSIDs #8

Closed geosys123 closed 4 years ago

geosys123 commented 4 years ago

Is it possible to show only single SSID on config portal instead of SSID1 and SSID2 on config portal? Is there any to disable it or we need to make change in src files?

khoih-prog commented 4 years ago

Hi @geosys123

Thanks for using this new ESPAsync_WiFiManager Library.

Currently, it's not designed to have the single SSID feature configurable from sketch. If there are mrde demands, I'll consider to add the feature in future releases.

You can either

  1. Use the previous version ESPAsync_WiFiManager v1.0.11, which uses only single SSID without the MultiWiFi feature.
  2. Just ignore the extra SSID or make them duplicated.
  3. Change in the src files of newer Releases v1.1.1+
geosys123 commented 4 years ago

Thanks for your quick reply. I may go with v1.0.11. But is there any major bug in v1.0.11 besides single SSID feature which I should take care else I will go with newer version and modify source files.

khoih-prog commented 4 years ago

No known bug in v1.0.11. Just single SSID feature.

You can read the releases history in its twin library

ESP_WiFiManager

geosys123 commented 4 years ago

Thanks for your quick reply.

ghost commented 1 year ago

Sorry to bump this thread. I'm interested too in single credential pairs. After 2 years it seems there's no way to configure the numbers of credentials from the user sketch. I think it should be enough to make the inputs hidden if there is a define for a single credential pairs:

#if SINGLE_CREDENTIALS
  #if DISPLAY_STORED_CREDENTIALS_IN_CP
  const char WM_HTTP_FORM_START[] PROGMEM = "<form method='get' action='wifisave'><fieldset><div><label>SSID</label><input value='[[ssid]]' id='s' name='s' length=32 placeholder='SSID'><div></div></div><div><label>Password</label><input value='[[pwd]]' id='p' name='p' length=64 placeholder='password'><div></div></div><input type='hidden' value='[[ssid1]]' id='s1' name='s1' length=32 placeholder='SSID1'></div></div><input type='hidden' value='[[pwd1]]' id='p1' name='p1' length=64 placeholder='password1'></div></div></fieldset>";
  #else
  const char WM_HTTP_FORM_START[] PROGMEM = "<form method='get' action='wifisave'><fieldset><div><label>SSID</label><input id='s' name='s' length=32 placeholder='SSID'><div></div></div><div><label>Password</label><input id='p' name='p' length=64 placeholder='password'><div></div></div><input type='hidden' id='s1' name='s1' length=32 placeholder='SSID1'></div></div><input type='hidden' id='p1' name='p1' length=64 placeholder='password1'><div></div></div></fieldset>";
  #endif
#else
#if DISPLAY_STORED_CREDENTIALS_IN_CP
  const char WM_HTTP_FORM_START[] PROGMEM = "<form method='get' action='wifisave'><fieldset><div><label>SSID</label><input value='[[ssid]]' id='s' name='s' length=32 placeholder='SSID'><div></div></div><div><label>Password</label><input value='[[pwd]]' id='p' name='p' length=64 placeholder='password'><div></div></div><div><label>SSID1</label><input value='[[ssid1]]' id='s1' name='s1' length=32 placeholder='SSID1'><div></div></div><div><label>Password</label><input value='[[pwd1]]' id='p1' name='p1' length=64 placeholder='password1'><div></div></div></fieldset>";
  #else
  const char WM_HTTP_FORM_START[] PROGMEM = "<form method='get' action='wifisave'><fieldset><div><label>SSID</label><input id='s' name='s' length=32 placeholder='SSID'><div></div></div><div><label>Password</label><input id='p' name='p' length=64 placeholder='password'><div></div></div><div><label>SSID1</label><input id='s1' name='s1' length=32 placeholder='SSID1'><div></div></div><div><label>Password</label><input id='p1' name='p1' length=64 placeholder='password1'><div></div></div></fieldset>";
  #endif
#endif

If you think this is worth to embed in the next commit I'll be glad to find it in the library, instead of hacking it every time I download it :-)

khoih-prog commented 1 year ago

This is so easy way to read and do

  1. Just ignore the extra SSID or make them duplicated.

I have no time to waste and interest in going backward.

ghost commented 1 year ago

Thank, very kind. Got it.