mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #236] Wifimanager and ArduinoOTA are not compatible #196
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @HamedRoshanfekr on GitHub (Oct 12, 2016).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/236
This is my code, it seems that arduinoOTA clears saved data from wifimanager and always starting in ap mode.
`#include <WiFiManager.h>
include <ESP8266WiFi.h>
include <DNSServer.h>
include <ESP8266WebServer.h>
include <ESP8266mDNS.h>
include <WiFiUdp.h>
include <ArduinoOTA.h>
void setup() {
Serial.begin(9600);
delay(10);
WiFiManager wifiManager;
wifiManager.autoConnect("Hamed");
Serial.print("\nConnect\n");
// Port defaults to 8266
// ArduinoOTA.setPort(8266);
// Hostname defaults to esp8266-[ChipID]
ArduinoOTA.setHostname("myesp8266");
// No authentication by default
// ArduinoOTA.setPassword((const char *)"123");
ArduinoOTA.onStart( {
Serial.println("Start");
});
ArduinoOTA.onEnd( {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.begin();
Serial.println("Ready");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
ArduinoOTA.handle();
}`
@tzapu commented on GitHub (Oct 12, 2016):
hi,
here s one of my sketches, with both wifimanger and arduinoota, maybe you can use as inspiration.
has worked fine for me over and over again.
cheers
@malinengineer commented on GitHub (Oct 13, 2016):
@tzapu Hi! You forgot to provide a link..
@tzapu commented on GitHub (Oct 13, 2016):
sorry about that
https://github.com/tzapu/SonoffBoilerplate/blob/master/SonoffBoilerplate.ino
good luck
@drelephant commented on GitHub (Jul 5, 2017):
Came across this via a search.
This gist is the most basic example that I could find that uses WifiManager and ArduinoOTA. I tried it and it worked perfectly.
https://gist.github.com/e857be405e4c77bdfec7b950c34f1b3f
@KiLLeRRaT commented on GitHub (Jun 6, 2018):
The above works, but when specifying a password using ArduinoOTA.setPassword("MyPassword"); things stop working.
@tablatronix commented on GitHub (Jun 7, 2018):
Since this issue contains no information of use please open a new one