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] 2  Send TopicPrint
Hot Topic (More than 8 Replies) OTA (Read 17812 times)
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
OTA
Aug 28th, 2016 at 10:11pm
Print Post  
Hi,

I am trying to use OTA to upload a project to an ESP8266 - this has worked for me before but something must have changed. I am using Arduino 1.6, Generic ESP8266, Core 2.3 and have a board.txt in the project folder.

The verbose output of the uploader shows the following :

Uploading 'ESPProj' to 'Generic ESP8266 Module' using '192.168.1.71'
Uploader started for board Generic ESP8266 Module
Upload method will be: bootloader
Uploading via Bootloader 
Port Properties (network)
python.exe 1.0/tools/espota.py -i "192.168.1.71" -p "8266" "--auth=" -f C:\Users\Neil\AppData\Local\Temp\VMICRO~1\ESPProj\ESP826~1/ESPPRO~1.BIN
The system cannot find the file specified

Looking through my Users folder, I see that espota.py is indeed not where the uploader expects it to be but seems to be in the location

ools\espota.py

Is this a change that came about with the upgrade to core 2.3 or am I doing something wrong here? 

Also, the uploader is looking for a file with a strange mix of / and \ in the path - is that OK?

Thanks

n

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #1 - Aug 28th, 2016 at 10:35pm
Print Post  
Hi,

Before I look into it I suggest you upgrade your arduino ide and make sure you run it once.

Then install the latest stable esp8266 hardware using the arduino ide boards manager

Then run visual studio and use tools > extensions & updates to ensure you have an up to date copy of visual micro.

All the software mentioned has been fast moving and if you mention the appData\Roaming folder it means you are on old software because it all moved after Arduino 1.6.6 to appData\Local

Thanks
  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #2 - Aug 29th, 2016 at 12:51am
Print Post  
Hi Tim,

Thanks for the quick reply.

I have updated the Arduino IDE from 1.6.5 to 1.6.11 and update VM to the latest version.

OTA now almost works as expected. The only small issue remaining is that despite the fact that my board.txt contains : 

# network.password=123
# network.auth_upload=yes
network.port=8266

and the OTA function within the sketch does not make a call to ArduinoOTA.setPassword, VisualMicro still prompts for a password during the OTA update. If I just press cancel then it seems to work but I suppose it shouldn't be like that?

Thanks

n
« Last Edit: Aug 29th, 2016 at 12:56am by n »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #3 - Aug 29th, 2016 at 1:01am
Print Post  
Interesting.

can you try adding this to the board.txt

network.auth_upload=no

  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #4 - Aug 29th, 2016 at 2:19am
Print Post  
Same thing again Tim - I still get the prompt for a password from Visual Micro.

If you are in the UK, you must be a real night owl!

Thanks

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #5 - Aug 29th, 2016 at 4:40pm
Print Post  
Yes thanks Smiley

Can you confirm the same problem exists after restarting the ide?

Also confirm that previously you had set "auto-upload=yes or true"?

And that you have not got Apple Bonjour service installed?

Finally switch on "vmicro>compiler>show build properties" then build and attach the output as .txt or email to info[at]visualmicro.com

Thanks

  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #6 - Aug 29th, 2016 at 6:51pm
Print Post  
Hi Tim,

Thanks for your help - when I came back to it this morning the problem was gone. I probably just needed to restart the IDE.

Although the "Build and Upload" option now works well in OTA mode, I still have an issue when I try to upload the last good build using the VM option "Project/Upload Last Build" - it works well when using a serial port but fails in OTA mode. The output from uploader says it is trying to use ESPTOOL.exe rather than ESPOTA.PY for the upload. Perhaps I am still doing something wrong??

Thanks

n

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #7 - Aug 29th, 2016 at 7:23pm
Print Post  
Thanks. There is a new release due later today that solves a cache issue in single project solutions. That probably was the cause of the settings not being refreshed when you altered board.txt

I'll try the upload last build when I get a mo thanks. It's quite old and esp makes use of everything new Smiley
  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #8 - Sep 15th, 2016 at 8:51am
Print Post  
Hi Tim,

I had OTA working nicely for a while but coming back to it again after a couple of weeks I can't get it to work - I must have changed something but I can't find what. The issue is that VM seems to want to use esptool rather than espota for the upload even though an ip is specified. Which parameter actually changes the upload mode? 

Here is the output of the uploader 

Compiling debug version of 'ESPEasy' for 'Generic ESP8266 Module'

Program size: 553,608 bytes (used 53% of a 1,044,464 byte maximum) (6.18 secs)
Minimum Memory Usage: 57900 bytes (71% of a 81920 byte maximum)
 
Uploading 'ESPEasy' to 'Generic ESP8266 Module' using '192.168.1.71'
Uploader started for board Generic ESP8266 Module
Upload method will be: bootloader
Uploading via Bootloader 
ol.exe -vv -cd nodemcu -cb 115200 -cp "192.168.1.71" -ca 0x00000 -cf C:\Users\Neil\AppData\Local\Temp\VMICRO~1\ESPEasy\ESP826~1/ESPEAS~1.BIN
The uploader returned an error
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
     setting board to nodemcu
     setting baudrate from 115200 to 115200
     setting port from COM1 to 192.168.1.71
     setting address from 0x00000000 to 0x00000000
     espcomm_upload_file
     espcomm_upload_mem
error: Failed to open 192.168.1.71
error: espcomm_open failed
error: espcomm_upload_mem failed

Thanks
n
« Last Edit: Sep 15th, 2016 at 8:52am by n »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #9 - Sep 15th, 2016 at 12:09pm
Print Post  
Did you manually enter ip address or select from list?
  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #10 - Sep 15th, 2016 at 8:37pm
Print Post  
I manually entered the ip - I do not have bonjour running
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #11 - Sep 15th, 2016 at 9:30pm
Print Post  
Ok if you are not using bonjour then you need to set the port using a local board.txt

See the end of the esp8266 page 
  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #12 - Sep 15th, 2016 at 9:44pm
Print Post  
As discussed earlier in this thread, I have board.txt in the project containing:

network.port=8266
network.auth_upload=no
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #13 - Sep 15th, 2016 at 10:04pm
Print Post  
Oh sorry didn't go back to the original discussion.

Are you clicking build and upload or just the "upload last build" option?

Someone reported a bug with ota and "upload last build" so currently you have to use the normal "build and upload"

If that's not the issue pls show screen image of the vMicro menu

  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #14 - Sep 15th, 2016 at 10:33pm
Print Post  
I was clicking build and upload - and it was me mentioning that 'upload previous' does not work.

Here is a screenshot of the vm menu - is this what you want?

http://derp.co.uk/cc3e1

Thanks

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #15 - Sep 15th, 2016 at 10:54pm
Print Post  
Yes thanks. The reset method has changed from ck to nodemcu
  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #16 - Sep 15th, 2016 at 11:27pm
Print Post  
Using reset=ck does not work for me at all. It gives me the same error message as in the previous post when trying OTA and when trying USB upload it gives me the following long error message:

Code
Select All
Compiling debug version of 'ESPEasy' for 'Generic ESP8266 Module'

Program size: 553,832 bytes (used 53% of a 1,044,464 byte maximum) (4.94 secs)
Minimum Memory Usage: 57900 bytes (71% of a 81920 byte maximum)

Uploading 'ESPEasy' to 'Generic ESP8266 Module' using 'COM3'
Uploader started for board Generic ESP8266 Module
Upload method will be: bootloader
Uploading via Bootloader
ol.exe -vv -cd ck -cb 115200 -cp "COM3" -ca 0x00000 -cf C:\Users\Neil\AppData\Local\Temp\VMICRO~1\ESPEasy\ESP826~1/ESPEAS~1.BIN
The uploader returned an error
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
	setting board to ck
	setting baudrate from 115200 to 115200
	setting port from COM1 to COM3
	setting address from 0x00000000 to 0x00000000
	espcomm_upload_file
	espcomm_upload_mem
	setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	read 0, requested 1
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	read 0, requested 1
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	serialport_receive_C0: 49 instead of C0
resetting board
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	read 0, requested 1
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	serialport_receive_C0: 56 instead of C0
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	serialport_receive_C0: 49 instead of C0
resetting board
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	read 0, requested 1
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	serialport_receive_C0: 56 instead of C0
trying to connect
	flush start
	setting serial port timeouts to 1 ms
	setting serial port timeouts to 1000 ms
	flush complete
	espcomm_send_command: sending command header
	espcomm_send_command: sending command payload
	serialport_receive_C0: 49 instead of C0
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed 



Using reset=nodemcu at least allows USB upload. I'm confused.

Thanks

n
« Last Edit: Sep 16th, 2016 at 7:49pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #17 - Sep 16th, 2016 at 7:56pm
Print Post  
I tried this and it is working fine however the file names in the upload command you posted look old.

Can you confirm which version of Visual Micro you are using in "tools>extensions and updates>arduino ide for vs"

You are right that you need to use nodemcu, I got the same error as you with ck

This thread is a bit confused by your original post prob best to open new threads for each question or issue.

I can't see that you have posted the error you are getting this time when you try ota upload.

Can you also confirm that your board.txt simply has only one or two entries in it, ip and auth?

  
Back to top
WWW  
IP Logged
 
n
Junior Member
**
Offline


Posts: 52
Joined: Mar 29th, 2016
Re: OTA
Reply #18 - Sep 16th, 2016 at 8:41pm
Print Post  
Hi,

1) I was previously using version 1609.4.3. However I have just updated to 1609.15.0 and the problem remains.

2) The error I get when trying OTA upload was given in reply #8 but repeated below for clarity. The problem is that esptool.exe is being selected for upload rather than espota.py 

Code
Select All
Compiling debug version of 'ESPEasy' for 'Generic ESP8266 Module'

Program size: 554,024 bytes (used 53% of a 1,044,464 byte maximum) (4.91 secs)
Minimum Memory Usage: 57948 bytes (71% of a 81920 byte maximum)

Uploading 'ESPEasy' to 'Generic ESP8266 Module' using '192.168.1.71'
Uploader started for board Generic ESP8266 Module
Upload method will be: bootloader
Uploading via Bootloader
ol.exe -vv -cd nodemcu -cb 115200 -cp "192.168.1.71" -ca 0x00000 -cf C:\Users\Neil\AppData\Local\Temp\VMICRO~1\ESPEasy\ESP826~1/ESPEAS~1.BIN
The uploader returned an error
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
	setting board to nodemcu
	setting baudrate from 115200 to 115200
	setting port from COM1 to 192.168.1.71
	setting address from 0x00000000 to 0x00000000
	espcomm_upload_file
	espcomm_upload_mem
error: Failed to open 192.168.1.71
error: espcomm_open failed
error: espcomm_upload_mem failed 



3) My board.txt file contains the following :

network.port=8266
network.auth_upload=no

Thanks

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: OTA
Reply #19 - Sep 16th, 2016 at 10:53pm
Print Post  
Okay can you confirm that upload works okay using esptool.exe with usb selected and not network?
« Last Edit: Sep 16th, 2016 at 10:53pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint