VS Arduino
>> >> esp8266/esp12x wifi debugging
https://www.visualmicro.com/forums/YaBB.pl?num=1593626518

Message started by GeirG on Jul 1st, 2020 at 6:01pm

Title: esp8266/esp12x wifi debugging
Post by GeirG on Jul 1st, 2020 at 6:01pm
I have been trying to get debugging over wifi to
work on my esp12x(esp8266) chip.
But i am not able to get this working.
Is it possible to do this on this chip?
and how do i solve this?

Hope someone can help me on this one.
Just started with Visual Micro.


Title: Re: esp8266/esp12x wifi debugging
Post by Simon Hopkinson on Jul 2nd, 2020 at 6:22pm
Thanks for the report.  We have identified the issue with the ESP8266 and UDP debugging, which we will resolve in an upcoming release, and update this thread when it is available.

When the update is available, the setup instructions are the same as for the ESP32, which can be seen in this video, and we will publish further separate instructions in the coming days for ESP8266 specifically so it is clear.

Title: Re: esp8266/esp12x wifi debugging
Post by Simon Hopkinson on Jul 2nd, 2020 at 7:53pm
The latest release 20.06.30.1 contains the update to resolve the issue, which is the latest release at the top of the below board:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

If you have trouble installing this release please see this Video Guide for this process.


Title: Re: esp8266/esp12x wifi debugging
Post by GeirG on Jul 2nd, 2020 at 8:39pm
"sweet dreams are made of this"

Title: Re: esp8266/esp12x wifi debugging
Post by CSC on Nov 11th, 2020 at 12:16pm
Essentially the same problem. I am unable to OTA upload or debug on an ESP-12E.

I have updated to the latest vMicro release (2020.910.14).

I am testing using the example code from the link below:

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

I have bonjour installed on Windows 10 and the IP of the chip shows up in Visual Studio.

I also have a local boards.txt file. Initially I was having authentication issues so added authentication to boards.txt and set OTA password in the example code. Contents of boards.txt:

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

That got me past the auth issue, but now I get the following output:

Compiling debug version of 'OTAdebugTest' for 'NodeMCU 1.0 (ESP-12E Module)'
Creating BIN file "C:\Users\admin\AppData\Local\Temp\VMBuilds\OTAdebugTest\esp8266_nodemcuv2\Debug/OTAdebugTest.ino.bin" using "C:\Users\admin\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.4/bootloaders/eboot/eboot.elf" and "C:\Users\admin\AppData\Local\Temp\VMBuilds\OTAdebugTest\esp8266_nodemcuv2\Debug/OTAdebugTest.ino.elf"
   Executable segment sizes
IROM   *: 286588          - code in flash         (default or ICACHE_FLASH_ATTR)
IRAM   *: 28664   \ 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...)
DATA   *: 1276  )         - initialized variables (global, static) in RAM\HEAP
RODATA *: 1516  ) \ 81920 - constants             (global, static) in RAM\HEAP
BSS    *: 25880 )         - zeroed variables      (global, static) in RAM\HEAP
Program size: 318,044 bytes (used 30% of a 1,044,464 byte maximum) (16.23 secs)
Minimum Memory Usage: 28672 bytes (35% of a 81920 byte maximum)

Uploading 'OTAdebugTest' to 'NodeMCU 1.0 (ESP-12E Module)' using '192.168.1.108'
Authenticating...OK
The uploader process failed
07:04:48 [ERROR]: No response from device


I can successfully upload and debug over serial interface. I uploaded the example app initially over serial before attempting other OTA operations.

Shot of my project properties page attached.


VMClipboard01_001.jpg ( 121 KB | 7 Downloads )

Title: Re: esp8266/esp12x wifi debugging
Post by Simon@Visual Micro on Nov 11th, 2020 at 1:07pm
Thanks for the report, and the detailed information.

There may be additional information on the failure in the Serial Monitor:
1) Re-upload the sketch via Serial, and ensure no breakpoints are set.
2) Then open the Serial Port in Visual Micro from the General > Monitor Alternative, at 115200 baud.
3) Then re-try the OTA Upload, and abserve the Serial Monitor


Title: Re: esp8266/esp12x wifi debugging
Post by CSC on Nov 11th, 2020 at 2:24pm
Thanks for the quick response. Will do.


Title: Re: esp8266/esp12x wifi debugging
Post by CSC on Nov 11th, 2020 at 2:48pm
I set Monitor Alternative to "COM3" (the com for the board), then set the BPS rate to 115200 using the serial window menu item (I did not see any way to set that under General). IP Address in tool bar set to IP for the board. Below are the results:

Build and attempted upload over OTA:

Compiling debug version of 'OTAdebugTest' for 'NodeMCU 1.0 (ESP-12E Module)'
Creating BIN file "C:\Users\admin\AppData\Local\Temp\VMBuilds\OTAdebugTest\esp8266_nodemcuv2\Debug/OTAdebugTest.ino.bin" using "C:\Users\admin\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.4/bootloaders/eboot/eboot.elf" and "C:\Users\admin\AppData\Local\Temp\VMBuilds\OTAdebugTest\esp8266_nodemcuv2\Debug/OTAdebugTest.ino.elf"
   Executable segment sizes
IROM   *: 286108          - code in flash         (default or ICACHE_FLASH_ATTR)
IRAM   *: 28664   \ 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...)
DATA   *: 1276  )         - initialized variables (global, static) in RAM\HEAP
RODATA *: 1516  ) \ 81920 - constants             (global, static) in RAM\HEAP
Program size: 317,564 bytes (used 30% of a 1,044,464 byte maximum) (15.86 secs)
Minimum Memory Usage: 28672 bytes (35% of a 81920 byte maximum)
BSS    *: 25880 )         - zeroed variables      (global, static) in RAM\HEAP

Uploading 'OTAdebugTest' to 'NodeMCU 1.0 (ESP-12E Module)' using '192.168.1.108'
Authenticating...OK
The uploader process failed
09:30:32 [ERROR]: No response from device

COM3 output:

Opening port
Port open
sleep disable
OTA Start
Progress: 0%
Error[2]: Connect Failed
Error[4]: End Failed


Title: Re: esp8266/esp12x wifi debugging
Post by Simon@Visual Micro on Nov 11th, 2020 at 3:12pm
Thanks for the detail.

Do you have a firewall enabled on your machine, and if so have you added the port as an exception to the list?

If its the standard Windows Defender Firewall, you can add an exception for Python3 on your Private Networks to resolve this.
(The path to the Python3.exe can be grabbed from the output, if you enable vMicro > Uploader > Verbose and try the upload again)


Title: Re: esp8266/esp12x wifi debugging
Post by CSC on Nov 11th, 2020 at 6:27pm
I dont think a firewall is enabled on this machine, but will check...and retry upload.

Title: Re: esp8266/esp12x wifi debugging
Post by GeirG on Nov 11th, 2020 at 6:55pm
Hi.
Make sure you have "Erase Flash: All flash contents",
so you don't have any "left overs".
Did not change anything else in project properties.
I tested on a ESP12(ESP8266).
pc og ESP12 on same network.
this sketch worked for me:

#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
const char* ssid = "SSID";
const char* password = "PASSWORD";
void setup()
{
    Serial.begin(115200);
    Serial.println();
    Serial.println("Booting");   
    WiFi.begin(ssid, password);
    while (WiFi.waitForConnectResult() != WL_CONNECTED)
    {
        Serial.println("Connection Failed! Rebooting...");
        delay(5000);
        ESP.restart();
    }       
    ArduinoOTA.begin();
    Serial.println("Ready");
    Serial.print("IP address: ");
    Serial.println(WiFi.localIP());
}
void loop()
{
    ArduinoOTA.handle();
}

Title: Re: esp8266/esp12x wifi debugging
Post by CSC on Nov 11th, 2020 at 8:37pm
Turns out Windows Defender was enabled on this new-to-me machine.

I added port 8266 and python3.exe program exceptions and now OTA Upload works!

I also enabled blocking notifications on Windows Defender so next time I should know what its up to.

Next up...test OTA debugging...

Thanks much for the help! [smiley=thumbsup.gif]


VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.