{"action":"created","issue":{"url":"https://api.github.com/repos/tzapu/WiFiManager/issues/191","repository_url":"https://api.github.com/repos/tzapu/WiFiManager","labels_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/191/comments","events_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/191/events","html_url":"https://github.com/tzapu/WiFiManager/issues/191","id":164372266,"number":191,"title":"On Demand Portal issue ... no longer saving new settings?","user":{"login":"Humancell","id":952763,"avatar_url":"https://avatars.githubusercontent.com/u/952763?v=3","gravatar_id":"","url":"https://api.github.com/users/Humancell","html_url":"https://github.com/Humancell","followers_url":"https://api.github.com/users/Humancell/followers","following_url":"https://api.github.com/users/Humancell/following{/other_user}","gists_url":"https://api.github.com/users/Humancell/gists{/gist_id}","starred_url":"https://api.github.com/users/Humancell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Humancell/subscriptions","organizations_url":"https://api.github.com/users/Humancell/orgs","repos_url":"https://api.github.com/users/Humancell/repos","events_url":"https://api.github.com/users/Humancell/events{/privacy}","received_events_url":"https://api.github.com/users/Humancell/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-07T18:08:00Z","updated_at":"2016-07-15T20:13:56Z","closed_at":null,"body":"I recently updated all of my code to the latest libraries.  I'm seeing an issue that I can't resolve.  This was all working fine with an older version of WiFiManager, but now with the latest I'm getting a failure.  Here is my code:\r\n\r\n>       WiFiManager wifiManager;\r\n> \r\n>       // The extra parameters to be configured (can be either global or just in the setup)\r\n>       // After connecting, parameter.getValue() will get you the configured value\r\n>       // id/name placeholder/prompt default length\r\n>       WiFiManagerParameter customEndpointHost(\"endpoint\", \"endpoint hostname\", endpointHost, 40);\r\n>       WiFiManagerParameter customEndpointPort(\"port\", \"endpoint port\", endpointPort, 5);\r\n>       WiFiManagerParameter customEndpointURL(\"path\", \"endpoint path\", endpointURL, 128);\r\n> \r\n>       //set config save notify callback\r\n>       wifiManager.setSaveConfigCallback(saveConfigCallback);\r\n> \r\n>       //add all your parameters here\r\n>       wifiManager.addParameter(&customEndpointHost);\r\n>       wifiManager.addParameter(&customEndpointPort);\r\n>       wifiManager.addParameter(&customEndpointURL);\r\n> \r\n>       // sets timeout until configuration portal gets turned off\r\n>       wifiManager.setTimeout(wifiManagerTimeout);\r\n>   \r\n>       //it starts an access point with the specified name\r\n>       //here  \"AutoConnectAP\"\r\n>       //and goes into a blocking loop awaiting configuration\r\n>   \r\n>       //WITHOUT THIS THE AP DOES NOT SEEM TO WORK PROPERLY WITH SDK 1.5 , update to at least 1.5.1\r\n>       //WiFi.mode(WIFI_STA);\r\n>       \r\n>       // we don't want it to connect after being configured ... just reset.\r\n>       wifiManager.setBreakAfterConfig(true);\r\n> \r\n>       // now it's time to run the config portal\r\n>       sprintf(captivePortalSSID, \"Wovyn_%06X\", GUID);\r\n>       Serial.print(\"Captive Portal SSID: \");\r\n>       Serial.println(captivePortalSSID);\r\n>       wifiManager.startConfigPortal(captivePortalSSID);\r\n> \r\n>       //if you get here you have connected to the WiFi\r\n>       //read updated parameters\r\n>       strcpy(endpointHost, customEndpointHost.getValue());\r\n>       strcpy(endpointPort, customEndpointPort.getValue());\r\n>       strcpy(endpointURL, customEndpointURL.getValue());\r\n> \r\n>       //save the custom parameters to FS\r\n>       if (shouldSaveConfig) {\r\n>         Serial.print(\"Saving config ... \");\r\n>         if (saveConfig()) {\r\n>           Serial.println(\"Config saved\");\r\n>         } else {\r\n>           Serial.println(\"Failed to save config\");\r\n>         }\r\n>       }\r\n>   \r\n>       //reset and allow the loop to perform the connect ...\r\n>       delay(3000);\r\n>       //ESP.wdtDisable();\r\n>       ESP.reset();\r\n>       delay(5000);\r\n> \r\n\r\nThe issue is that now - after the update - when I click the save button in my browser to save the Wifi settings I see the following on my debug log:\r\n\r\n> *WM: Adding parameter\r\n> *WM: endpoint\r\n> *WM: Adding parameter\r\n> *WM: port\r\n> *WM: Adding parameter\r\n> *WM: path\r\n> Captive Portal SSID: Wovyn_D80E88\r\n> *WM: SET AP STA\r\n> *WM: \r\n> *WM: Configuring access point... \r\n> *WM: Wovyn_D80E88\r\n> *WM: AP IP address: \r\n> *WM: 192.168.4.1\r\n> *WM: HTTP server started\r\n> *WM: Request redirected to captive portal\r\n> *WM: Handle root\r\n> *WM: Request redirected to captive portal\r\n> *WM: Handle root\r\n> *WM: Request redirected to captive portal\r\n> *WM: Handle root\r\n> *WM: Request redirected to captive portal\r\n> *WM: Scan done\r\n> *WM: Wovyn-x20131130\r\n> *WM: -54\r\n> *WM: http://80211.net\r\n> *WM: -56\r\n> *WM: http://80211.net-HVCHHE\r\n> *WM: -74\r\n> *WM: http://80211.net-HVCH\r\n> *WM: -80\r\n> *WM: myqwest6487\r\n> *WM: -90\r\n> *WM: Sent config page\r\n> *WM: Handle root\r\n> *WM: Request redirected to captive portal\r\n> *WM: Handle root\r\n> *WM: Request redirected to captive portal\r\n> *WM: Handle root\r\n> *WM: Request redirected to captive portal\r\n> *WM: WiFi save\r\n> *WM: Parameter\r\n> *WM: endpoint\r\n> *WM: host.domain.com\r\n> *WM: Parameter\r\n> *WM: port\r\n> *WM: 8880\r\n> *WM: Parameter\r\n> *WM: path\r\n> *WM: /emitter/test2\r\n> *WM: Sent wifi save page\r\n> *WM: Connecting to new AP\r\n> *WM: Connecting as wifi client...\r\n> *WM: Already connected. Bailing out.\r\n> Should save config\r\n> Saving config ... Config saved\r\n> \r\n>  ets Jan  8 2013,rst cause:2, boot mode:(3,6)\r\n> \r\n> load 0x4010f000, len 1384, room 16 \r\n> tail 8\r\n> chksum 0x2d\r\n> csum 0x2d\r\n> v3de0c112\r\n> ~ld\r\n> \r\n\r\nWhy am I see this:  *WM: Already connected. Bailing out.  ??\r\n\r\nIt acts like it's about to try the new settings, and then it aborts with that error.  and now it's no longer saving the new settings ... it restarts and tries to connect to the old WiFi settings?"},"comment":{"url":"https://api.github.com/repos/tzapu/WiFiManager/issues/comments/233058520","html_url":"https://github.com/tzapu/WiFiManager/issues/191#issuecomment-233058520","issue_url":"https://api.github.com/repos/tzapu/WiFiManager/issues/191","id":233058520,"user":{"login":"fvpalha","id":2786212,"avatar_url":"https://avatars.githubusercontent.com/u/2786212?v=3","gravatar_id":"","url":"https://api.github.com/users/fvpalha","html_url":"https://github.com/fvpalha","followers_url":"https://api.github.com/users/fvpalha/followers","following_url":"https://api.github.com/users/fvpalha/following{/other_user}","gists_url":"https://api.github.com/users/fvpalha/gists{/gist_id}","starred_url":"https://api.github.com/users/fvpalha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fvpalha/subscriptions","organizations_url":"https://api.github.com/users/fvpalha/orgs","repos_url":"https://api.github.com/users/fvpalha/repos","events_url":"https://api.github.com/users/fvpalha/events{/privacy}","received_events_url":"https://api.github.com/users/fvpalha/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T20:13:56Z","updated_at":"2016-07-15T20:13:56Z","body":"I have the same problem. The new SDK (1.5.4) does not change the SSID and PASSWORD in STATION mode."}}
{"actor":{"display_login":"fvpalha"}}