Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
ESP32 and ESP8266 OTA, visual micro does not display ip address (Read 140 times)
fyrewurx
Newbies
*
Offline



Posts: 4
ESP32 and ESP8266 OTA, visual micro does not display ip address
Oct 1st, 2019 at 5:09pm
 
Hey everyone,

I have an issue with the OTA for esp8266 and the esp32 using arduino core with VS2019.
In visual micro I can't see the ip in the dropdown.
The ip is shown in the Arduino IDE and the MDNS packets are visible in Wireshark.
If I type the address manually I get espota.exe: error: option -p: invalid integer value: '{network.port}'

Sketches used:
https://github.com/espressif/arduino-esp32/blob/master/libraries/ArduinoOTA/exam...
https://github.com/esp8266/Arduino/blob/master/libraries/ArduinoOTA/examples/Bas...

Versions:
Win10
Visual studio community 2019 16.3.1
Visual Micro 19.0
Arduino 1.8.10
Python 2.7.16

I am using the evaluation version of the Visual Micro, any help/suggestions are welcome.

Regards,

Alex
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #1 - Oct 1st, 2019 at 5:15pm
 
If you have not installed apple bonjour then the IP address will not automatically show. However you can just type or paste the IP address into the port drop down list and press ENTER.

To set the port and auth (if needed) add a board.txt to the current project. There is an "Add Code>Board.txt" workflow if you don't know how to add files to a project.

tip: Click save after making changes to the board.txt. Visual studio auto saves after a build/upload but you need it saved before the build.

Here are two examples for the contents of board.txt

Board.txt password required example:-

# local project board.txt overrides
Code:
  network.password=123
  network.auth_upload=yes
  network.port=8266 



Board.txt password not required example:-

# local project board.txt overrides
  Code:
 network.port=8266 



More info here if you scroll down to the lower parts of these pages

https://www.visualmicro.com/page/How-to-install-Esp32-for-Arduino-and-Visual-Mic...

https://www.visualmicro.com/page/esp8266.aspx

Back to top
« Last Edit: Oct 1st, 2019 at 5:22pm by Visual Micro »  
WWW  
IP Logged
 
fyrewurx
Newbies
*
Offline



Posts: 4
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #2 - Oct 1st, 2019 at 5:39pm
 
Hi Tim,

Thank you for the very quick response.

Issue solved, thread can be closed.

Solutions:

1. Using the "Add Code>Board.txt", network.port=8266 and manually entering the ip address
2. Installing bonjour service from: https://support.apple.com/kb/DL999?viewlocale=en_US&locale=en_US

I wrongly assumed that win10 already has bonjour.
It actually has something, software like http://hobbyistsoftware.com/bonjourbrowser and the Arduino IDE can see the ESP without installing the apple service.

Thank you again for your help,

Alex
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #3 - Oct 1st, 2019 at 5:45pm
 
Great thanks. You should not need the board.txt if the IP is auto discovered via bonjour because the port and auth are obtained via mdns.

Aruino used to use bonjour i guess they have switched to some java api.
Back to top
« Last Edit: Oct 1st, 2019 at 5:46pm by Visual Micro »  
WWW  
IP Logged
 
fyrewurx
Newbies
*
Offline



Posts: 4
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #4 - Oct 1st, 2019 at 5:49pm
 
Yes, just uploaded both code and SPIFFS without board.txt.
It is a bit weird that is actually slower than serial upload but I am sure that it has nothing to do with visual micro.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #5 - Oct 1st, 2019 at 5:56pm
 
Yes I would expect it to be quick but we do just call the esp toolchain which uses python.

The esp has a setting for serial upload speed which can be set to 900k+ so if you have that set I guess it is similar to network.

I might be wrong but the OTA allows for 50% of program size so it can upload and only apply the change if the upload has worked. Not sure if that then means some extra processing after upload. It's a bit hazy because it was a couple of years ago that I last tried ota myself.
Back to top
 
WWW  
IP Logged
 
fyrewurx
Newbies
*
Offline



Posts: 4
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #6 - Oct 1st, 2019 at 6:07pm
 
Indeed, I cranked up the serial speed to 921600, rarely fails.

The speed difference might be because of compression. When I use serial it says in the console Compressed 762912 bytes to 430316. Maybe using OTA it does not.

Using OTA uses 50% for safe uploads. It makes sense to be slower, I guess it has to copy the whole data from the temporary location to the main. For this I assume it uses the internal OS copy functions and those might not be optimized. Or maybe the flash chips are just slow  Smiley.
Back to top
« Last Edit: Oct 1st, 2019 at 6:08pm by fyrewurx »  
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print