I am having an oddity of some sort with OTA. I Pulled the BasicOTA Sample into the Arduino IDE and it works fine.
Ȥl▒▒▒l$▒lb8I▒▒Booting
Ready
IP address: 172.16.0.24
Ȥl▒▒`▒ld▒4C8Y▒▒Booting
Ready
IP address: 172.16.0.24
Start
[...]
Progress: 99%
Progress: 100%
End
H▒▒ԅ▒▒D▒J▒▒Booting
Ready
IP address: 172.16.0.24
Then I close the IDE and open it is VS2017 with VM, and the same code fails....
Sometimes, occasionally, it will work once, but usually just fails. It's never worked a second time in VS, today.
This worked fine previously... (Well, OTA can be a bit finicky, but worked as fine as ever).
Compiling debug version of 'BasicOTA' for 'WEMOS D1 mini Lite'
Program size: 266,889 bytes (used 53% of a 499,696 byte maximum) (6.27 secs)
Minimum Memory Usage: 35744 bytes (44% of a 81920 byte maximum)
Uploading 'BasicOTA' to 'WEMOS D1 mini Lite' using '172.16.0.24'
Uploader started for board WEMOS D1 mini Lite
Upload method will be: bootloader
Uploading via Bootloader
Port Properties (network)
Name=esp8266-82874a
HostName=esp8266-82874a.local.
Address=172.16.0.24
port=8266
Protocol=Any
tcp_check=no
ssh_upload=no
board=ESP8266_WEMOS_D1MINILITE
auth_upload=no
python.exe d:\GOOGLE~1\Arduino\hardware\ESP826~1\esp8266/tools/espota.py -i "172.16.0.24" -p "8266" "--auth=" -f C:\Users\bph\AppData\Local\Temp\VMBuilds\BasicOTA\ESP826~1\Debug/BASICO~1.BIN
01:26:09 [ERROR]: No response from device
The uploader process failed
Serial output:
▒▒▒▒!▒▒DH▒▒Booting
Ready
IP address: 172.16.0.24
2dO,4`lME▒H<▒▒▒▒▒닥▒▒5
Ready
IP address: 172.16.0.24
Error[1]: Begin Failed
I assume this is the code catching the error:
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");
});
Any hints? Is there a simple way to reload the ESP toolchains and utilities?