ESPEasy flash fails

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
peecee
New user
Posts: 4
Joined: 16 Mar 2022, 15:52

ESPEasy flash fails

#1 Post by peecee » 16 Mar 2022, 16:20

I am attempting to flash a ESP-WROOM-32 and I get the following error:

######2022-03-16######
#######0.04.007#######
######FLASH INFO######
BIN file: ESPEasy_2step_UploaderMega_1024.bin
COM port: (COM6) Silicon Labs CP210x USB to UART Bridge (Port_#0001.Hub_#0001)
Baud rate: 115200
######POST FLASH######
No post flash information entered...
######FLASH LOG######
[esptool.exe -vv -cd nodemcu -cb 115200 -cp COM6 -ca 0x00000 -cf "C:\ESPEasy_dist\bin\ESPEasy_2step_UploaderMega_1024.bin"]
[3/16/2022 11:10:32 AM] esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
[3/16/2022 11:10:32 AM] setting board to nodemcu
[3/16/2022 11:10:32 AM] setting baudrate from 115200 to 115200
[3/16/2022 11:10:32 AM] setting port from to COM6
[3/16/2022 11:10:32 AM] setting address from 0x00000000 to 0x00000000
[3/16/2022 11:10:32 AM] espcomm_upload_file
[3/16/2022 11:10:32 AM] espcomm_upload_mem
[3/16/2022 11:10:32 AM] error: Failed to open COM6
[3/16/2022 11:10:32 AM] error: espcomm_open failed
[3/16/2022 11:10:32 AM] error: espcomm_upload_mem failed
[2022-03-16 11:10:32] STOPPED due to 3 errors! (try reset on the unit, then start a new flash attempt)

I have two buttons on the unit - EN and Boot. I followed the troubleshooting to put the device into flash mode by holding boot and pressing EN. I've also held Boot down while connecting power (USB via PC) to it. Neither one works. Any help to get this flashed would be greatly appreciated!

User avatar
Ath
Normal user
Posts: 3513
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy flash fails

#2 Post by Ath » 16 Mar 2022, 17:22

A few remarks:
- You should not use the 2-step uploader as initial binary
- Only 1 ESP should be connected to your computer when uploading, to avoid selecting the wrong COM port

And a few questions:
- What type of ESP (ESP32 or ESP8266) are you using, and what flash-size is installed?
- Your COM6 seems not to be recognized, are you selecting the correct port?

If all else fails, you can use the Espressif_flash_download_tool that is included in the .zip file you have downloaded from https://github.com/letscontrolit/ESPEasy/releases
That tool is a bit more tolerant on selecting the correct COM port, but doesn't have the post-flash features of the ESPEasy flash tool (that you not seem to have used, so would be fine)
/Ton (PayPal.me)

peecee
New user
Posts: 4
Joined: 16 Mar 2022, 15:52

Re: ESPEasy flash fails

#3 Post by peecee » 16 Mar 2022, 18:20

Thank you for the thoughts and tips.

I changed to the blank_4mb.bin, which I think is the correct match for the board I'm using. I have this one:

https://www.ebay.com/itm/114980602476

I only have 1 esp32 connected.

ESP Easy auto-detects it correctly as Silicon Labs CP210x USB to UART Bridge. To double check, I ran NodeMCU PyFlasher and it detected it as well - on the same com port (which I guess is a good sign).

It's an ESP32 with 4mb of ram.
Com6 is recognized, as the drop down only shows the esp32 if it's plugged into my laptop. When it's unplugged, the drop down shows nothing.

I tried the Espressif_flash_download_tool as you suggested, but when I select the ESP32 mode and the blank_4mb bin, it highlights the box to the right in red. There's nothing that I can find to indicate what to put in that box. com6 and 115200 are selected for connection options.

Yes, I used ESP Easy. Tried with the blank_4mb and still fails.

peecee
New user
Posts: 4
Joined: 16 Mar 2022, 15:52

Re: ESPEasy flash fails

#4 Post by peecee » 16 Mar 2022, 18:57

After a few more attempts, this is where I am. While holding down boot, I plugged in the unit. While still holding down boot, I pressed and released EN, then stopped pressing boot.

Then I started ESP Easy, loaded the blank_4mb.bin (com6 was already selected). I pressed refresh, and I reported back with com6 - seemed like a good sign.

Made sure that any other setting (specifically wifi info) was correct, and proceeded to flash. This time was different. It didn't fail right away. I got this in the log.

######FLASH LOG######
[esptool.exe -vv -bm dout -cd nodemcu -cb 115200 -cp COM6 -ca 0x00000 -cf "C:\ESPEasy_dist\bin\blank_4MB.bin"]
[3/16/2022 1:24:08 PM] esptool v0.4.12 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
[3/16/2022 1:24:08 PM] setting flash mode from qio to dout
[3/16/2022 1:24:08 PM] setting board to nodemcu
[3/16/2022 1:24:08 PM] setting baudrate from 115200 to 115200
[3/16/2022 1:24:08 PM] setting port from to COM6
[3/16/2022 1:24:08 PM] setting address from 0x00000000 to 0x00000000
[3/16/2022 1:24:08 PM] espcomm_upload_file
[3/16/2022 1:24:08 PM] espcomm_upload_mem
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] opening bootloader
[3/16/2022 1:24:08 PM] resetting board
[3/16/2022 1:24:08 PM] trying to connect
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] read 0, requested 1
[3/16/2022 1:24:08 PM] trying to connect
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] read 0, requested 1
[3/16/2022 1:24:08 PM] trying to connect
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] resetting board
[3/16/2022 1:24:08 PM] trying to connect
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] read 0, requested 1
[3/16/2022 1:24:08 PM] trying to connect
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] trying to connect
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] espcomm_send_command: receiving 4 bytes of data
[3/16/2022 1:24:08 PM] Uploading 4194304 bytes from C:\ESPEasy_dist\bin\blank_4MB.bin to flash at 0x00000000
[3/16/2022 1:24:08 PM] erasing flash
[3/16/2022 1:24:08 PM] size: 400000 address: 000000
[3/16/2022 1:24:08 PM] first_sector_index: 0
[3/16/2022 1:24:08 PM] total_sector_count: 1024
[3/16/2022 1:24:08 PM] head_sector_count: 16
[3/16/2022 1:24:08 PM] adjusted_sector_count: 1008
[3/16/2022 1:24:08 PM] erase_size: 3f0000
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command header
[3/16/2022 1:24:08 PM] espcomm_send_command: sending command payload
[3/16/2022 1:24:08 PM] setting serial port timeouts to 33224 ms
[3/16/2022 1:24:08 PM] read 0, requested 1
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] warning: espcomm_send_command: didn't receive command response
[3/16/2022 1:24:08 PM] warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
[3/16/2022 1:24:08 PM] closing bootloader
[3/16/2022 1:24:08 PM] flush start
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1 ms
[3/16/2022 1:24:08 PM] setting serial port timeouts to 1000 ms
[3/16/2022 1:24:08 PM] flush complete
[3/16/2022 1:24:08 PM] error: espcomm_upload_mem failed
[2022-03-16 13:24:08] DONE! BUT WITH (1) ERRORS!
############################
[2022-03-16 13:24:08] The COM port was already in use... the post-flash did not complete.
[2022-03-16 13:24:08] JOB COMPLETED, over and out!



It seems like after all this, it still failed.

User avatar
Ath
Normal user
Posts: 3513
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy flash fails

#5 Post by Ath » 16 Mar 2022, 19:31

The red box on the Espressif flash tool might be the required field for address the bin file is to be flashed at. For the Blank*.bin files that should always be 0.

On an ESP32 you will have to install an ESP32 build. (The 2-step uploader is for ESP8266 only.)
Depending on what sensors you want to use, you may need to select a NORMAL build, one of the TEST_A..TEST_E builds, the ENERGY (for measuring energy) or DISPLAY (for controlling display related devices) build. When using an ESP32 with 16 MB Flash you can install a MAX build that contains (nearly) all available plugins. A complete overview can be found on this page.
The first size indicator (1M, 2M, 4M, 16M denotes the total flash size available on the ESP, the second size 1M, 2M, 316K, 8M, denotes the size of the local file system, reserved in the flash (used for storing the settings and some other stuff). For the 1M flash size units, the file system is ~110 KB, and not visible in the file name.

When flashing for the first time with ESPEasy, an ESP32 needs to be flashed using a -factory.bin file, that includes the bootloader and partitioning data. That should also be flashed at address 0 (or 0x0 as it is often written). When updating the same .bin file can be used but without the factory part in the name (and a newer date, most likely), and it can be updated via the Update Firmware button on the Tools page of the web interface. When updating the ESP using the Flash tool, the -factory.bin can be used again, at address 0, or the .bin file without -factory, at address 0x10000.
NB: The flash tool probably rejects the ESP8266 bin files on ESP32 units, as AFAIK, it checks some 'magic signature' in the bin file to match.

If flashing still fails, be sure to check the power supply to the ESP. Many USB cables have too high internal impedance, and many USB ports have insufficient power delivery capabilities, so often you can't reliably power the ESP that way, with wonky behavior like this as a result. Better use a separate 5V 1A DC power supply on the ESP, and possibly add a 100 nF capacitor and a 10 to 47 uF electrolitic capacitor (elco) between 5V and GND close to the ESP pins (check the polarity of the elco, + to 5V and - to GND, or it might explode!) to stabilize the power.
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3513
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESPEasy flash fails

#6 Post by Ath » 16 Mar 2022, 19:38

peecee wrote: 16 Mar 2022, 18:57 After a few more attempts, this is where I am. While holding down boot, I plugged in the unit. While still holding down boot, I pressed and released EN, then stopped pressing boot.
That sounds about right, press and holding the 'boot' button, then pressing 'en' button while the unit is powered should give the same result.
peecee wrote: 16 Mar 2022, 18:57 Made sure that any other setting (specifically wifi info) was correct, and proceeded to flash. This time was different. It didn't fail right away. I got this in the log.
Euhm, the Blank .bin file is exactly that... blank (all 0xFF bytes), to thoroughly clear out any remaining garbage from the flash. It will not result in a working ESPEasy unit, and that is required to be able to set the WiFi parameters... :o
peecee wrote: 16 Mar 2022, 18:57 [3/16/2022 1:24:08 PM] error: espcomm_upload_mem failed
[2022-03-16 13:24:08] DONE! BUT WITH (1) ERRORS!
############################
[2022-03-16 13:24:08] The COM port was already in use... the post-flash did not complete.
[2022-03-16 13:24:08] JOB COMPLETED, over and out!

It seems like after all this, it still failed.
That may be an issue with that flash tool, for ESP32, the usual way to go when having flashing issues is to use the Espressif tool.
/Ton (PayPal.me)

peecee
New user
Posts: 4
Joined: 16 Mar 2022, 15:52

Re: ESPEasy flash fails

#7 Post by peecee » 17 Mar 2022, 02:28

The blank designation is so painfully obvious. I am an idiot for not realizing that. lol Sounds like I need to find a factory bin file for this board.

Checked the power coming out of the USB cable - it's a solid 3.3v and 5v, so power isn't a concern for the connection. Good to know, as I wasn't aware that could be an issue. Glad I confirmed it's stable.

I have to do some more digging into this whole setup. I have a few other boards to test, and this one is frustrating beyond belief right now. So for now, I really appreciate the help, but I'm moving on to another model board. I may come back to this to see if I can get it working in a few days after I've gotten past this frustration. :D

Post Reply

Who is online

Users browsing this forum: No registered users and 102 guests