Skip to content

2.1.1 - Error 2 on flashing the firmware (Wemos D1) #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
owah opened this issue May 21, 2019 · 3 comments
Closed

2.1.1 - Error 2 on flashing the firmware (Wemos D1) #153

owah opened this issue May 21, 2019 · 3 comments
Labels

Comments

@owah
Copy link

owah commented May 21, 2019

Hello,

I have an issue similar to #149, namely that I can't upload firmware to a Wemos D1 mini anymore, after upgrading.

Checking size .pioenvs/d1_mini/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [==== ] 35.9% (used 29436 bytes from 81920 bytes)
PROGRAM: [==== ] 38.4% (used 401576 bytes from 1044464 bytes)
Creating BIN file ".pioenvs/d1_mini/firmware.bin" using ".pioenvs/d1_mini/firmware.elf"
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: /dev/cu.usbserial-1460
Uploading .pioenvs/d1_mini/firmware.bin
esptool.py v2.6
Serial port /dev/cu.usbserial-1460
Connecting....
Chip is ESP8266EX
Features: WiFi
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...

A fatal error occurred: Invalid head of packet (0xE0)
*** [upload] Error 2

If I manually change the upload_speed in platformio.ini to: upload_speed = 115200 then I get a successful upload:

Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 405728 bytes to 294493...
Wrote 405728 bytes (294493 compressed) at 0x00000000 in 28.6 seconds (effective 113.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

My toolchain is the current toolchain (2.1.1)

@owah
Copy link
Author

owah commented May 21, 2019

So I just noticed there was an update released a few minutes ago. I have updated my toolchain:

Updating espressif8266 @ 2.2.0 [Up-to-date]
Updating tool-esptoolpy @ 1.20600.0 [Up-to-date]
Updating tool-mkspiffs @ 1.200.0 [Up-to-date]
Updating tool-esptool @ 1.413.0 [Up-to-date]
Updating framework-arduinoespressif8266 @ 2.20502.0 [Up-to-date]
Updating toolchain-xtensa @ 2.40802.190218 [Up-to-date]

But the firmware uploading issue persists

@pfeerick
Copy link

pfeerick commented Jul 28, 2019

Can I ask why 115200 was picked? As noted in both the arduino-esp8266 PR changing to esptool.py, and the esptool repo, 460800 seemed to be a reliable default, until they can work out why 921600 doesn't work (but 1000000 does).

@Orel-A
Copy link

Orel-A commented Dec 29, 2020

115200 is too slow! minimum should be 460800 as in line with Arduino library. esp-tool is already in version 3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants