I use the PlatformIO for programming the Arduino and ESP8266.
When I upload a sketch to the controller (for example ESP8266) it works fine. When I change the code and I want upload the new code I get the error:
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port…
error: Failed to open COM3
error: espcomm_open failed
error: espcomm_upload_mem failed
*** [upload] Error 2
======================================================================== [ERROR] Took 1.76 seconds ========================================================================
The terminal process terminated with exit code: 1
And so I have to connect the controller and reconnect them and than it works when upload the code.
For example when I use the Arduino IDE it works without reconnect.
It is possible possible to resolve the problem.