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
Very Hot Topic (More than 25 Replies) ESP8266 OTA Upload (Read 36419 times)
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: ESP8266 OTA Upload
Reply #20 - Apr 8th, 2016 at 10:15am
Print Post  
yes it work by manual adding the IP in the property page.

I also installed the Apple sw and VisualMicro discover the port and correctly using it.

I think it is important that VisualMicro start to use the same method of the esp gui for discover the mDNS ip. One of the milestone of VisualMicro is that you have all the Arduino Standard IDE functionalities whithout change library or core or java sw, etc. , instead in this case a people that work whit mDNS port and have an ArduinoIDE system working, must separately install Apple sw for VisualMicro on Windows and, in the rare case that an VisualMicro user need use VisualMicro on Linux (by Wine and VisualStudio installed in linux ?  Grin) it need a third sw Avahi  Smiley

« Last Edit: Apr 8th, 2016 at 10:18am by testato »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #21 - Apr 8th, 2016 at 12:22pm
Print Post  
I don't understand your comments but can say this ...

Visual micro used the same system as the arduino ide for port discovery. It is arduino.cc that selected the apple bonjour service.

Since then esp8266 has found a different way to do this using python, it will be considered.

I will look to see if the arduino ide has changed what it recommends for its own wifi board called the Yun. I think it makes sense to use one system if possible.
  
Back to top
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: ESP8266 OTA Upload
Reply #22 - Apr 8th, 2016 at 4:39pm
Print Post  
Tim@Visual Micro wrote on Apr 8th, 2016 at 12:22pm:
I think it makes sense to use one system if possible.


this is what i mean  Smiley

sorry for my english  Grin

Maybe the best things should be discover the mDNS IP without use of bonjour nor phyton, but by implementing the Avahi open source in the Arduino IDE itself.
It will work on all OS, but i understand that this must be implemented by Arduino Team.

  
Back to top
 
IP Logged
 
testato
Junior Member
**
Offline


Posts: 48
Joined: Feb 11th, 2014
Re: ESP8266 OTA Upload
Reply #23 - May 2nd, 2016 at 9:28am
Print Post  
is there problem on Win10 ?

I have the last visualmicro extension installed on VS2015 and the Apple Bonjour, the network port is discovered but the OTA do not work.
On Arduino IDE 1.6.8 it work.

Code
Select All
Compiling 'OTA_test1' for 'Generic ESP8266 Module'
Program size: 238,302 bytes (used 25% of a 958,448 byte maximum) (6.23 secs)
Minimum Memory Usage: 32608 bytes (40% of a 81920 byte maximum)

Uploading to I/O board using '192.168.2.105'
The uploader returned an error
error: Failed to open 192.168.2.105
error: espcomm_open failed
error: espcomm_upload_mem failed
 


« Last Edit: May 2nd, 2016 at 9:34am by testato »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #24 - May 2nd, 2016 at 12:00pm
Print Post  
Hi,

Apple Bonjour is only used to discover ip addresses for the port list. You can also specify the ip address manually in the "project properties > last upload port" which then does not require the apple bonjour software.

1)
So this issue is related to upload because the correct ip address is being used?

2)
Please switch on verbose in visual micro and then post or email the result of an upload attempt

3)
Then do the same in the arduino ide after switching on "file>preferences>verbose upload"

Thanks

  
Back to top
IP Logged
 
paolo48
Junior Member
**
Offline


Posts: 69
Joined: Dec 22nd, 2015
Re: ESP8266 OTA Upload
Reply #25 - May 4th, 2016 at 4:09pm
Print Post  
I have the same problem ith OTA upload.
The IP address is shown correctely but:
....failed to open xxx.xxx.xxx.xxx.....

Im my ccase configuration is :
IDE 1.6.8
VM last upgrade
ESP core staging 2.2.0

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #26 - May 4th, 2016 at 5:42pm
Print Post  
Did you read the requests in my last post?
  
Back to top
IP Logged
 
paolo48
Junior Member
**
Offline


Posts: 69
Joined: Dec 22nd, 2015
Re: ESP8266 OTA Upload
Reply #27 - May 4th, 2016 at 10:07pm
Print Post  
This is what i get:

ARDUINO IDE:

Lo sketch usa 238.154 byte (22%) dello spazio disponibile per i programmi. Il massimo è 1.044.464 byte.
Le variabili globali usano 32.592 byte (39%) di memoria dinamica, lasciando altri 49.328 byte liberi per le variabili locali. Il massimo è 81.920 byte.
python.exe c1/tools/espota.py -i 192.168.1.7 -p 8266 --auth= -f cOTA.ino.bin 
...............
 
Visual Micro:

Uploading 'BasicOTA' to 'NodeMCU 1.0 (ESP-12E Module)' using '192.168.1.7'
Uploader started for board NodeMCU 1.0 (ESP-12E Module)
Upload method will be: bootloader
Uploading via Bootloader 
ool.exe -vv -cd nodemcu -cb 115200 -cp "192.168.1.7" -ca 0x00000 -cf OTA.ino.bin"
The uploader returned an error
esptool v0.4.8 - (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.7
     setting address from 0x00000000 to 0x00000000
     espcomm_upload_file
     espcomm_upload_mem
error: Failed to open 192.168.1.7
error: espcomm_open failed
error: espcomm_upload_mem failed


Could the error be related to Windows 10 user permission to access the network? 
First upload with Arduino IDE windows was asking Administrator password!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #28 - May 4th, 2016 at 10:15pm
Print Post  
No the difference is that the arduino ide is running an esp python command (.py) and in your output visual micro shows it is attempting to use esptool.exe

In my test visual micro is correctly using the python. I looked at my board manager can can see that I had esp 1.6.5 tool chain installed and that there have been a number of releases since.

I will install and test with esp 2.2.0, update to follow.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #29 - May 4th, 2016 at 11:21pm
Print Post  
I have lost OTA for both nocemcu and esp8266 with the latest tool chains. they have changed the system again Smiley

I have been reading this guide. Is this how you have configured your project and ide?

http://esp8266.github.io/Arduino/versions/2.0.0/doc/ota_updates/ota_updates.html...
« Last Edit: May 4th, 2016 at 11:43pm by Tim@Visual Micro »  
Back to top
IP Logged
 
paolo48
Junior Member
**
Offline


Posts: 69
Joined: Dec 22nd, 2015
Re: ESP8266 OTA Upload
Reply #30 - May 5th, 2016 at 5:18am
Print Post  
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #31 - May 5th, 2016 at 12:15pm
Print Post  
Thanks, I will take a look. Your doc looks better because it doesn't show the older classic OTA which is described in the other docs. It falls more in line with what we see on the menus.

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


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #32 - May 6th, 2016 at 4:10am
Print Post  
Oh they have done a great job with the OTA this time around. It fits well with the original arduino design for the Yun but has significant improvements and also is VERY fast (as you know)

The latest release supports the new system. More info in the release notes

Thanks for the report(s). 

tip:
The serial monitor still needs some work as a wifi terminal and/or debug but hopefully you have found that you can use "View>Other windows>Arduino serial" to open a debug COM port without switching the upload port.
« Last Edit: May 6th, 2016 at 4:12am by Tim@Visual Micro »  
Back to top
IP Logged
 
paolo48
Junior Member
**
Offline


Posts: 69
Joined: Dec 22nd, 2015
Re: ESP8266 OTA Upload
Reply #33 - May 7th, 2016 at 10:07am
Print Post  
Thanks for the update!!

The example works but there are still few problems:

-the new ESP8266 often don't get discovered (allways when there is more then one ESP)
-and if I give IP with the menu than I get this error:

Uploading 'OpenSprinkler_ESP8266_V_2_1_6' to 'NodeMCU 1.0 (ESP-12E Module)' using '192.168.1.7'
Uploader started for board NodeMCU 1.0 (ESP-12E Module)
Upload method will be: bootloader
Uploading via Bootloader 
Port Properties (network)
python.exe rc1/tools/espota.py" -i "192.168.1.7" -p "{network.port}" "--auth=" -f p8266_nodemcuv2/OpenSprinkler_ESP8266_V_2_1_6.ino.bin"
Usage: espota.py [options]
espota.py: error: option -p: invalid integer value: '{network.port}'
Upload failed

« Last Edit: May 7th, 2016 at 4:12pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #34 - May 7th, 2016 at 1:58pm
Print Post  
Hi,

Thanks for the update. I will test two esp at the same time with the Bonjour system.

When you enter the IP manually it is correct that you see the error you report. The code you upload to the esp sets the ArduinoOTA tcp port to port number 8266. Normally, the bonjour service obtains the port information and makes it available to visual micro.

Alternative to Bonjour

If you are using the pro version you will read in the release notes how to set any of the options, such as port, manually

Quote:
Full/pro users can avoid using Apple Bonjour auto discovery and use the local project board.txt to provide missing network upload properties. For example:-
  network.port=8266
  # network.auth_upload=yes
  # network.password=123


So for clarity:- You need to, at least, add the following to the board.txt where 8266 is the port number assigned in the OTA code on the esp. (8266 is the default if you have not changed it)

Code
Select All
# board.txt
network.port=8266 



NOTE: The network.port= is always required for esp without bonjour, however the auth_upload and password are both optional and relate to the code you have uploaded to your esp. If you have set an OTA password then you need network.auth_upload=yes so remove the # to make that property active. If you are using authentication and do not set a password you will be prompted.
« Last Edit: May 7th, 2016 at 4:13pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP8266 OTA Upload
Reply #35 - May 7th, 2016 at 4:20pm
Print Post  
Hi,

I have tested multiple esp's and automatic ip discovery (using apple bonjour for windows) without problem. 

At one stage the bonjour service stopped reporting the ip addresses so I restarted the Bonjour Service via "control panel>local services" then restarted the Ide. The Arduino Ide demonstrated the same until it was restarted.

So I am keen to understand the issue, if you restarted the ide at anytime and if the arduino ide had the same problem.

I also found that it can take a minute or two for the ip address to appear after connecting the esp8266 to a  power supply.

I am not sure if any of this info will help.

I have updated this page with a summary of this thread: http://www.visualmicro.com/page/esp8266.aspx
« Last Edit: May 7th, 2016 at 5:14pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint