-
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
Can't connect to esp8266 (ESPTOOL-941) #1020
Comments
Hello @radio-satellites! Most of the output is This is almost certainly not a SW issue, but rather a HW one. First of all, do you have the required pins in correct states when booting?
If yes, try to open serial monitor (e.g. python -m esp_idf_monitor -b 78400) with
|
Hi @Honza0297! Thanks for your reply! I just noticed it now. I'm not sure why GitHub isn't sending me emails anymore... Yes, both GPIO15 and GPIO2 are pulled LOW, or at least both have pull-down resistors placed on the PCB. I did check with a multimeter, and for some reason GPIO15 reads positive (although it is connected to a 10k pull-down?). I connected it to ground via a jumper and it still doesn't want to flash, unfortunately. GPIO15 is used as NSEL for the Si4432 SPI interface (which should be LOW anyways). Yes, the GPIO0 modes are as expected. GPIO0 to GND outputs the expected flash state but pulled up boots into the regular default firmware. |
Thanks for your answer!
GPIO02 should be pulled UP (see the table here: https://docs.espressif.com/projects/esptool/en/latest/esp8266/advanced-topics/boot-mode-selection.html#required-pins ). If it is pulled LOW, it may be the culprit we are looking for. |
@Honza0297 That was a typo on my part. I meant GPIO0. I'll double check GPIO2 in a sec... |
Not sure what happened... but...
|
Guess I'll have to reopen... Worked fine until all of a sudden: Serial port COM9
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.000 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.111 Timed out waiting for packet header
.TRACE +0.102 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.001 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.114 Timed out waiting for packet header
.TRACE +0.104 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.001 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.113 Timed out waiting for packet header
.TRACE +0.105 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.002 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.112 Timed out waiting for packet header
.TRACE +0.104 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.001 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.115 Timed out waiting for packet header
.TRACE +1.905 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.002 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.113 Timed out waiting for packet header
_TRACE +0.103 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.003 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.002 Read 1 bytes: c0
TRACE +0.004 Read 1 bytes: 01
TRACE +0.000 Read 10 bytes: 000200000000000105c0
TRACE +0.000 Received full packet: 01000200000000000105
A fatal esptool.py error occurred: Invalid (unsupported) command 0x8
C:\Users\sasha>C:\Users\sasha\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\sasha\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2/tools/upload.py --chip esp8266 --port COM9 --baud 78400 --before default_reset --after hard_reset write_flash 0x0 C:\Users\sasha\AppData\Local\Temp\arduino_build_939187/sketch_oct18a.ino.bin --trace
esptool.py v3.0
Serial port COM9
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.001 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.110 Timed out waiting for packet header
.TRACE +0.102 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.002 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.113 Timed out waiting for packet header
.TRACE +0.102 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.001 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.116 Timed out waiting for packet header
.TRACE +0.102 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.002 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.114 Timed out waiting for packet header
.TRACE +0.104 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.001 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.116 Timed out waiting for packet header
.TRACE +1.897 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.002 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.110 Timed out waiting for packet header
_TRACE +0.102 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
55555555 | UUUU
TRACE +0.002 Write 46 bytes:
c000082400000000 0007071220555555 | ...$........ UUU
5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
5555555555555555 5555555555c0 | UUUUUUUUUUUUU.
TRACE +0.003 Read 1 bytes: c0
TRACE +0.000 Read 11 bytes: 01000200000000000105c0
TRACE +0.001 Received full packet: 01000200000000000105
A fatal esptool.py error occurred: Invalid (unsupported) command 0x8 |
Let's debug further. Can you desolder the Si442 temporarily? I see you stated:
which may indicate an issue on the Si442 side. |
Another though: I see you are switching between esptool 4.8 and 3.0. Does the behavior differ (e.g. in the frequency of errors etc.) between those two versions? |
Nope, it looks about the same. I'm wondering at this point if it's the reliability of the UART connection - I've gotten it to flash sometimes, but other times it just inexplicably fails. |
UART is connected via 2.54mm headers into jumper wires, which I then plug into a USB to UART converter. |
You can try to switch cables to rule out possible issues with the wires, but generally speaking, jumper wires are good enough for UART communication, if no other issue is in play. I am still wondering how HIGH value got on GPIOI15 before you shorted it directly to GND. Please let me know if you are able to flash the ESP8266 without Si4432 soldered. |
Yes, the chip flashes equally sometimes with and without the Si4432. Sometimes, changing jumper wires helps, but not always. |
Another debug output from a failed flash:
|
If all the pins are in correct states, this is most likely a HW issue, not an issue with esptool. You can send your PCB design for free-of-charge review: https://www.espressif.com/en/contact-us/circuit-schematic-pcb-design-review , where our engineers will check if the PCB design is correct. We are closing the issue for now. |
@radio-satellites esptool requires a working serial connection to operate. Without it, there is not much we can do on the software side. Please try to inspect your serial chain again (e.g. use We'll close this in the meantime. Feel free to reopen if you get more information. |
@radimkarnis Yes, UART is definitely working and reliable. I'm consistently getting an output every time which indicates the boot mode and cause when GPIO0 is set to LOW and RST is triggered. |
I finally found the issue. It is incredibly simple: sometimes, the GPS (using UART0) would not shutdown before flashing, preventing the data from reaching the MCU. That's it! |
Operating System
Windows/Fedora Linux
Esptool Version
esptool.py v4.8.1 4.8.1
Python Version
Python 3.12.6
Chip Description
ESP8266
Device Description
My own PCB. I've double checked all strapping pins, they seem fine.
Hardware Configuration
GPIO16 - SDN
GPIO4 - NIRQ
GPIO15 - NSEL
GPIO14 - SCK
GPIO13 - MOSI
GPIO12 - MISO
All of these are connected to an Si4432.
How is Esptool Run
Terminal, arduino IDE
Full Esptool Command Line that Was Run
python esptool.py --chip esp8266 --port COM9 --trace --baud 78400 --before default_reset --after hard_reset write_flash 0x0 C:\Users\sasha\AppData\Local\Temp\arduino_build_160028/sketch_oct10a.ino.bin
Esptool Output
More Information
The boot mode is (1,6) - is this a problem? It appears that the command receives data, but it doesn't seem to process it.
Other Steps to Reproduce
No response
I Have Read the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: