Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) OTA Weirdness / Wemos ESP8266 (Read 5653 times)
Boomalator
Junior Member
**
Offline


Posts: 16
Location: Calgary, Canada
Joined: Mar 9th, 2017
OTA Weirdness / Wemos ESP8266
Apr 9th, 2018 at 7:32am
Print Post  
I am having an oddity of some sort with OTA. I Pulled the BasicOTA Sample into the Arduino IDE and it works fine.

Code (C++)
Select All
Ȥ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).

Code (C++)
Select All
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:
Code (C++)
Select All
▒▒▒▒!▒▒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:
Code (C++)
Select All
  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?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA Weirdness / Wemos ESP8266
Reply #1 - Apr 9th, 2018 at 11:22am
Print Post  
Please switch off Debug by changing tool bar from Debug to Release

If you want debug with esp I suggest setting "vmicro>debugger>local port" to COMx then debug will use usb and leave the wifi alone.

Thanks
  
Back to top
IP Logged
 
Boomalator
Junior Member
**
Offline


Posts: 16
Location: Calgary, Canada
Joined: Mar 9th, 2017
Re: OTA Weirdness / Wemos ESP8266
Reply #2 - Apr 10th, 2018 at 1:44am
Print Post  
Don't care about debug, particularly.
Need OTA to work though. Release does the same thing.
I need to use Serial for a RFID reader and it's a pain to swap wires. .... and it worked before the last update. Something of some sort has changed. Sad


Ready
IP address: 172.16.0.24
Error[1]: Begin Failed

Compiling 'BasicOTA' for 'WEMOS D1 mini Lite'
Program size: 264,273 bytes (used 53% of a 499,696 byte maximum) (2.33 secs)
Minimum Memory Usage: 35104 bytes (43% 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_D1MINI
     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\Release/BASICO~1.BIN
19:43:32 [ERROR]: No response from device
The uploader process failed


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA Weirdness / Wemos ESP8266
Reply #3 - Apr 10th, 2018 at 10:49am
Print Post  
Have you got the serial monitor open or closed when you upload?

Is usb cable connected or disconnected?

  
Back to top
IP Logged
 
Boomalator
Junior Member
**
Offline


Posts: 16
Location: Calgary, Canada
Joined: Mar 9th, 2017
Re: OTA Weirdness / Wemos ESP8266
Reply #4 - Apr 10th, 2018 at 11:55pm
Print Post  
Tim@Visual Micro wrote on Apr 10th, 2018 at 10:49am:
Have you got the serial monitor open or closed when you upload?

I have tried both.
Quote:
Is usb cable connected or disconnected?

Connected for power,

With all due respect, and as much as I love Visual Micro.

1. It worked before. Something changed.

2. It works just like it's supposed to in the Arduino IDE.

3. The Basic OTA Sample is about as simple as it gets for OTA. It should be pretty close to "just works".

It would seem to me that if it works in Arduino but not in VM, there is either a bug or a configuration error in my Visual Micro setup.

I do kind of depend on being able to compile in Arduino for those who may take my code and don't have VM.


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA Weirdness / Wemos ESP8266
Reply #5 - Apr 11th, 2018 at 12:11pm
Print Post  
Can you confirm if you are using a board.txt to provide ip address or apple bonjour?

Is the RTS button on the serial monitor off?

After starting the ide, did you open the serial monitor before opening the project or after?

Thanks
« Last Edit: Apr 11th, 2018 at 12:24pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Boomalator
Junior Member
**
Offline


Posts: 16
Location: Calgary, Canada
Joined: Mar 9th, 2017
Re: OTA Weirdness / Wemos ESP8266
Reply #6 - Apr 11th, 2018 at 11:07pm
Print Post  
Tim@Visual Micro wrote on Apr 11th, 2018 at 12:11pm:
Can you confirm if you are using a board.txt to provide ip address or apple bonjour?

In the Basic OTA example it was bonjour and/or typing the IP address directly in the combobox.

For the production sketch it was bonjour/mDNS with the p/w in the board.txt.

The sample has no password. Is a password "neeeded" to work?

Quote:
Is the RTS button on the serial monitor off?

Yes. The sketch runs fine and puts the Serial.Print stuff to the serial window. Just OTA fails.
Quote:

After starting the ide, did you open the serial monitor before opening the project or after?

I have tried it with no serial monitor, using Putty as the serial monitor, and with the VM serial monitor. I don't recall the exact order when monitoring with VM, but I would guess serial is closed when the project opens. I can follow any steps you want.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA Weirdness / Wemos ESP8266
Reply #7 - Apr 12th, 2018 at 8:28pm
Print Post  
Thanks for the info.

1) question ...
When OTA fails is the board still working?

2) note...
If I recall it is important that if you enter an ip address without using mdns you must make sure you set authentication=no and port=8266 via board.txt. These two items are what we get from mdns but entering manual ip by passes mdns.

I can see in your example uploader output that athentication is not set to any value (yes/no). This might be the issue so please ensure the above is enforced.

  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA Weirdness / Wemos ESP8266
Reply #8 - May 10th, 2018 at 11:35pm
Print Post  
Sorry for the delay.

I think this is resolved in the next release. If the usb driver on the serial defaulted RTS on then visual micro was not switching it off.

We didn't hit the issue but the code was wrong and probably affected you.

There has been a lot of testing with wemos esp32 + OTA combined with the WebManager project and it's been very reliable.

USB debug support has also been added. 

Thanks for the report.

Next release is here
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint