Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/AutoConnect/commit/e0334635647f67170ad6dea75071e679b9a55eb5?style=unified&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
17 additions and
4 deletions
src/AutoConnect.cpp
src/AutoConnect.h
@ -79,10 +79,19 @@ bool AutoConnect::begin(const char* ssid, const char* passphrase, unsigned long
// Overwrite for the current timeout value.
_connectTimeout = timeout ;
if ( _apConfig . preserveAPMode & & ! _apConfig . autoRise ) {
// Captive portal will not be started on connection failure. Enable Station mode
// without disabling any current soft AP.
cs = WiFi . enableSTA ( true ) ;
AC_DBG ( PSTR ( " Enable WIFI_STA: %s \n " ) , cs ? " Ok " : " Failed " ) ;
}
else {
// Start WiFi connection with station mode.
WiFi . softAPdisconnect ( true ) ;
WiFi . mode ( WIFI_STA ) ;
cs = WiFi . mode ( WIFI_STA ) ;
delay ( 100 ) ;
AC_DBG ( PSTR ( " Switch to WIFI_STA: %s \n " ) , cs ? " Ok " : " Failed " ) ;
}
// Set host name
if ( _apConfig . hostName . length ( ) )
@ -70,6 +70,7 @@ class AutoConnectConfig {
autoReconnect ( false ) ,
immediateStart ( false ) ,
retainPortal ( false ) ,
preserveAPMode ( false ) ,
portalTimeout ( AUTOCONNECT_CAPTIVEPORTAL_TIMEOUT ) ,
menuItems ( AC_MENUITEM_CONFIGNEW | AC_MENUITEM_OPENSSIDS | AC_MENUITEM_DISCONNECT | AC_MENUITEM_RESET | AC_MENUITEM_UPDATE | AC_MENUITEM_HOME ) ,
ticker ( false ) ,
@ -110,6 +111,7 @@ class AutoConnectConfig {
autoReconnect ( false ) ,
immediateStart ( false ) ,
retainPortal ( false ) ,
preserveAPMode ( false ) ,
portalTimeout ( portalTimeout ) ,
menuItems ( AC_MENUITEM_CONFIGNEW | AC_MENUITEM_OPENSSIDS | AC_MENUITEM_DISCONNECT | AC_MENUITEM_RESET | AC_MENUITEM_UPDATE | AC_MENUITEM_HOME ) ,
ticker ( false ) ,
@ -150,6 +152,7 @@ class AutoConnectConfig {
autoReconnect = o . autoReconnect ;
immediateStart = o . immediateStart ;
retainPortal = o . retainPortal ;
preserveAPMode = o . preserveAPMode ;
portalTimeout = o . portalTimeout ;
menuItems = o . menuItems ;
ticker = o . ticker ;
@ -190,6 +193,7 @@ class AutoConnectConfig {
bool autoReconnect ; /**< Automatic reconnect with past SSID */
bool immediateStart ; /**< Skips WiFi.begin(), start portal immediately */
bool retainPortal ; /**< Even if the captive portal times out, it maintains the portal state. */
bool preserveAPMode ; /**< Keep existing AP WiFi mode if captive portal won't be started. */
unsigned long portalTimeout ; /**< Timeout value for stay in the captive portal */
uint16_t menuItems ; /**< A compound value of the menu items to be attached */
bool ticker ; /**< Drives LED flicker according to WiFi connection status. */