I recently purchased a M5Stack Atom Lite ESP32 module to use with ESPHome. It wouldn't flash with the browser, so I downloaded the binary and attempted to upload it with esphomeflasher, but it failed with the error "Error: Reading chip details failed: Timed out waiting for packet header" on every attempt.
Fortunatly I found a work-around.
Searching around found this Github Issue which sounded a lot like the problem I was experiencing, except it says it was fixed in v1.3.0. I'm running v1.3.0 and still having the issue, but it gives us a clue that we might need to slow down the baud rate.
This isn't possible via the GUI but can be done via the CLI tool with the following command:
And boom, it succesfully flashed. Future updates will be over OTA so hopefully I can avoid this step in future. I've also raised an issue on Github.