-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
esptool.FatalError: Timed out waiting for packet header #407
Comments
Below is a section of my code. After introducing the line
|
I also encountered the same Timeout fatal error during the .slip_reader() function when the .write_flash() function is executed. May I know what is causing the Timeout error and how to overcome it? Below is a printout from the .write_flash() function prior to the error.
|
A shortcoming of the Python API (to add to notes in in #208) is that the class itself doesn't track the connection state, so there's no software-side indication that it won't respond to the caller at all. (Although I suppose in some cases it may be desirable to do this from code, for example if you know for a fact that some other piece of code has established bootloader mode already, and you just need to pass control a new ESPLoader new object instance.)
Without seeing that code that you're calling to make this printout I really can't tell anything. |
@projectgus I have just uploaded my code here. Appreciate your advice on what is causing the timeout fatal error. Summarising my issue, I was running esptool.py write_flash() method and encountered the fatal Timeout error. To understand the matter, I replicated the |
@projectgus May i know the meaning of the following byte value:
Update: |
@sunbearc22 SLIP is https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol
The As a next step, I suggest you try to enable the equivalent of the |
@projectgus After activating the equivalent of However, when access the device via
|
Hi @sunbearc22 , Glad you sorted out the code. Flashing the bootloader image with the QIO flash mode set doesn't work, they need to be flashed in DIO mode. The clue is here:
The second load address and length are garbage, because of QIO mode. A general guide to the messages printed by the bootloader during a (normal) boot can be found here: https://github.com/espressif/esptool/wiki/ESP32-Boot-Mode-Selection#later-boot-messages |
@projectgus Thank you. Flashing in DIO mode worked. Questions:
|
There are some operations which are only supported by the stub loader. But you can write flash with or without using the stub loader. The stub loader is faster, though.
I'm actually not sure what the first 4 bytes signify, I think the chip will echo them back (although I think esptool doesn't actually check what gets echoed back). The 0x55s are useful for auto-bauding (the sync packets are dual purpose: the ROM in the chip will use the chip UART auto-baud feature to sync with whatever the incoming baud rate is, and then after this happens it will try to receive a sync packet). 0x55 is close to a square wave in terms of alternating bits. Yes.
Yes, this is sloppy terminology. The bootloader mode is implemented in mask ROM and communicates using the UART, so it gets called both things.
Yes.
Yes.
These are from the point of view of the computer's serial interface. Input = bytes received on serial interface (sent from the ESP32, we hope). Output = bytes sent on the serial interface (received by the ESP32, we hope). Hope this helps clarify some things. :) |
@projectgus Thank you for your advices. Here is the link to the GUI application that I have developed. I have mentioned you in my acknowledgement. Can you try it and share with me your comments? Cheers. |
@sunbearc22 Hello, hey friend I figured out the solution. http://arduinoamuete.blogspot.com/2015/12/reiniciar-nodemcu-en-windows.html on this link you can see the solve problem it worked for me, just remember while is started flash you need to press down flash button and keep it down until the program finish. and then your board is gonna work |
Hello, hey friend I figured out the solution. http://arduinoamuete.blogspot.com/2015/12/reiniciar-nodemcu-en-windows.html on this link you can see the solve problem it worked for me, just remember while is started flash you need to press down flash button and keep it down until the program finish. and then your board is gonna work |
@sunbearc22 read my answer above |
D:\Arduino Apps\Arduino\arduino-builder -dump-prefs -logger=machine -hardware D:\Arduino Apps\Arduino\hardware -hardware C:\Users\Asus\AppData\Local\Arduino15\packages -tools D:\Arduino Apps\Arduino\tools-builder -tools D:\Arduino Apps\Arduino\hardware\tools\avr -tools C:\Users\Asus\AppData\Local\Arduino15\packages -built-in-libraries D:\Arduino Apps\Arduino\libraries -libraries C:\Users\Asus\Documents\Arduino\libraries -fqbn=esp8266:esp8266:espresso_lite_v2:xtal=80,vt=flash,exception=disabled,ssl=all,eesz=4M,ResetMethod=ck,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -ide-version=10805 -build-path C:\Users\Asus\AppData\Local\Temp\arduino_build_624871 -warnings=none -build-cache C:\Users\Asus\AppData\Local\Temp\arduino_cache_332387 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=C:\Users\Asus\AppData\Local\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-3-20ed2b9 -prefs=runtime.tools.python.path=C:\Users\Asus\AppData\Local\Arduino15\packages\esp8266\tools\python\3.7.2-post1 -prefs=runtime.tools.mkspiffs.path=C:\Users\Asus\AppData\Local\Arduino15\packages\esp8266\tools\mkspiffs\2.5.0-3-20ed2b9 -verbose D:\Iot_Workshop\Iot_Workshop.ino "C:\Users\Asus\AppData\Local\Arduino15\packages\esp8266\tools\python\3.7.2-post1/python" "C:\Users\Asus\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/signing.py" --mode sign --privatekey "D:\Iot_Workshop/private.key" --bin "C:\Users\Asus\AppData\Local\Temp\arduino_build_624871/Iot_Workshop.ino.bin" --out "C:\Users\Asus\AppData\Local\Temp\arduino_build_624871/Iot_Workshop.ino.bin.signed" |
At the "esptool.FatalError: Timed out waiting for packet header" error. |
#441 (comment). esptool fatal error solved through this method. |
I tried all the things I saw on the Internet. The only solution that worked was this.
I hope someone will use it! |
esptool.py v2.8 |
Hi! how to solve this problem? thank you :) An error occurred while uploading the sketch |
Hi, I have this error, how can I fix it? Arduino: 1.8.12 (Mac OS X), Board: "Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200" /Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/nazanin/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/nazanin/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/nazanin/Documents/Arduino/libraries -fqbn=esp8266:esp8266:generic:xtal=80,vt=flash,exception=legacy,ssl=all,ResetMethod=nodemcu,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=1M64,led=2,sdk=nonosdk_190703,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200 -vid-pid=0X2341_0X0043 -ide-version=10812 -build-path /var/folders/11/fjrxwd413yl0rhm04vsfnj7c0000gn/T/arduino_build_295774 -warnings=none -build-cache /var/folders/11/fjrxwd413yl0rhm04vsfnj7c0000gn/T/arduino_cache_186496 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.mkspiffs.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/mkspiffs/2.5.0-4-b40a506 -prefs=runtime.tools.mkspiffs-2.5.0-4-b40a506.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/mkspiffs/2.5.0-4-b40a506 -prefs=runtime.tools.mklittlefs.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/mklittlefs/2.5.0-4-69bd9e6 -prefs=runtime.tools.mklittlefs-2.5.0-4-69bd9e6.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/mklittlefs/2.5.0-4-69bd9e6 -prefs=runtime.tools.xtensa-lx106-elf-gcc.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506 -prefs=runtime.tools.xtensa-lx106-elf-gcc-2.5.0-4-b40a506.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506 -prefs=runtime.tools.python3.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1 -prefs=runtime.tools.python3-3.7.2-post1.path=/Users/nazanin/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1 -verbose /Users/nazanin/Library/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/libraries/ESP8266WiFi/examples/WiFiScan/WiFiScan.ino _ Thank you. |
hi all, _ |
I encountered this issue
esptool.FatalError: Timed out waiting for packet header
while using theget_chip_description()
method from the classesptool.ESP32ROM
.The strange part of this issue is that the same device is detectable via terminal command (see below). I have tested my code with the
get_chip_description()
method. It is able to get the description for another similar device. But it constantly fails to work on the same device. How can I overcome this issue?The text was updated successfully, but these errors were encountered: