Cannot upload to Wemos board in Arduino IDE

C:\flash>esptool -bz 1M -eo app.elf -bo app_00000.bin -bs .text -bs .data -bs .rodata -bc -ec -eo app.elf -es .irom0.text app_10000.bin -ec

C:\flash>esptool -cp COM5 -cd ck -cb 115200 -cf app_00000.bin -ca 0x10000 -cf app_10000.bin
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: Invalid argument or value after -cf (argument #8)

This is the thread that stated the 12S is a 1M device but from your WeMos link it appears they did have a 4M http://www.esp8266.com/viewtopic.php?f=13&t=11787

The last post in that thread states they were struggling to flash the device.

Maybe the 2.2.0 was retired as it was difficult to flash.

No my board looks like the regular D1 mini - it has the metal can and it’s labeled ESP-12S like the one in the regular D1 mini V2.2.0 photo:

https://wiki.wemos.cc/products:retired:d1_mini_v2.2.0

I have the can versions before the 2.2.0 and the “16M” Pro’s.

I suppose it could have a different amount of flash such as 512k?

The Ebay listing is for 4M and WeMos had a 12-S with 4M so we should assume that is what it is.

You could try erasing the flash in command line but I don’t think it has ever worked for me:

esptool -cp COM5 -cd nodemcu -ce

Presumably you have never been able to flash this device?

Ok, I tried all the 512 options anyway I got the same response. I don’t understand the error though, it says:

java.io.IOException: Cannot run program "C:\Program Files (x86)\Arduino\hardware\esp8266com\esp8266/tools/esptool/esptool.exe": CreateProcess error=2, The system cannot find the file specified

If I go to that directory there is no esptool.exe in the esptools directory I have this:

Here’s the erase:
C:\flash>esptool -cp COM5 -cd nodemcu -ce
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_sync failed
error: espcomm_open failed
error: Failed to open COM5
error: espcomm_reset: failed to open port
error: Invalid argument or value after -ce (argument #6)

As I said you have destroyed your IDE.

When you have time build a new portable version but use the easier url method not the GitHub method.

Ok well thanks anyway, I have to get some sleep soon.

Fails for me too but just argument error not all the espcomm stuff

c:\flash16m\esptool-0.4.11-5-ga3425f4-win32>esptool -cp COM6 -cd nodemcu -ce
error: Invalid argument or value after x↓} (argument #8)

If Python fails return to seller as faulty.

Ok well I tried esptool.py (for the first time) and I found it couldn’t connect for several commands. I tried:

C:\flash>esptool.py --port COM5 read_flash_status
esptool.py v2.0.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

C:\flash>esptool.py --port COM5 chip_id
esptool.py v2.0.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

esptool.py --port COM5 read_mac
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header


C:\flash>esptool.py --port COM5 flash_id
esptool.py v2.0.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header


C:\flash>esptool.py elf2image app.elf
esptool.py v2.0.1
Creating image for ESP8266...


C:\flash>esptool.py --port COM5 write_flash 0x00000 app.elf-0x00000.bin 0x40000 app.elf-0x01010.bin
esptool.py v2.0.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

C:\flash>esptool.py --port COM5 dump_mem 0x40000000 65536 iram0.bin
esptool.py v2.0.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

So off to the seller you go!

Your Ebay seller did a quick flash size check and sent me the details. Confirmed as 4M. Maybe you just have a rogue unit.

One of my Mini Pro’s has developed a fault on the USB port and the PC fails to recognise the device. Fortunately it had an OTA sketch on it so I can continue to flash whatever I want to it without the USB port.

This is one reason that the first thing you should do with a new ESP is flash an OTA sketch.

Update, I received another Wemos board from a different seller and I can upload to it with esptool just fine. The IDE gives the save error so I’m going to work on that.

1 Like

@perigalacticon glad you finally got a WeMos that you can Blynk with.

I have the same issuse, and I pull D3(gpio 0) pin on my wemos to GND, and it`s work.

I confirm the previous post. Just put a jump from D3 to ground.