Chat freely about anything...

User avatar
By buteomont
#95568 I've been a fan of the ESP8266 for quite a while, but somehow missed learning about the ESP8266-01S until now. I've been very successful in programming other ESPs (D1 mini, ESP32, etc) in platformIO, but I can't seem to get the code to download to an ESP8266-01S. I'm using an Open-Smart USB to ESP-01 Adapter (the red one with the switch on the side).
I can send AT commands to it and get responses, so I think it's safe to assume that the device and USB board are OK. But if I slide the switch to "prog" and try to download a Blink program to it, I get the dreaded time out message:

Code: Select allAuto-detected: /dev/ttyUSB7
Uploading .pio/build/esp01_1m/firmware.bin
esptool.py v3.0
Serial port /dev/ttyUSB7
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
*** [upload] Error 2


My platformio.ini file has the following contents:

Code: Select all[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = arduino
upload_protocol = esptool
monitor_speed = 115200
board_build.flash_mode = dout


Can someone that has done this tell me what I'm doing wrong? :?
Thanks.
User avatar
By buteomont
#95569 Many times, explaining a problem to someone else is a good first step to solving it. It helps you think of the problem from a different perspective.

In this case, it turned out that I had so many other processes running on my laptop that the constant swapping was starving PlatformIO of processor cycles. So much, in fact, that it couldn't keep up with the data stream requirements to the ESP8266. I killed most of the other applications that were running and I can now program the ESP with ease.

I'm leaving this here in case someone else has a similar problem.