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
Normal Topic ESP32 and ESP8266 OTA, visual micro does not display ip address (Read 3125 times)
fyrewurx
Newbies
*
Offline


Posts: 4
Joined: Oct 1st, 2019
ESP32 and ESP8266 OTA, visual micro does not display ip address
Oct 1st, 2019 at 4:09pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #1 - Oct 1st, 2019 at 4:15pm
Print Post  
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
Select All
  network.password=123
  network.auth_upload=yes
  network.port=8266 



Board.txt password not required example:-

# local project board.txt overrides
 
Code
Select All
 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

« Last Edit: Oct 1st, 2019 at 4:22pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
WWW  
IP Logged
 
fyrewurx
Newbies
*
Offline


Posts: 4
Joined: Oct 1st, 2019
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #2 - Oct 1st, 2019 at 4:39pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #3 - Oct 1st, 2019 at 4:45pm
Print Post  
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.
« Last Edit: Oct 1st, 2019 at 4:46pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
fyrewurx
Newbies
*
Offline


Posts: 4
Joined: Oct 1st, 2019
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #4 - Oct 1st, 2019 at 4:49pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #5 - Oct 1st, 2019 at 4:56pm
Print Post  
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
Joined: Oct 1st, 2019
Re: ESP32 and ESP8266 OTA, visual micro does not display ip address
Reply #6 - Oct 1st, 2019 at 5:07pm
Print Post  
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.
« Last Edit: Oct 1st, 2019 at 5:08pm by fyrewurx »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint