The first time I tried to install my code, it displayed my text on the OLED screen, but it complained about slow response times. Now it's complaining about **Failed to connect to ESP32: Invalid head of packet (0xE0)**
My log looks like this:
INFO ESPHome 2023.12.7`
INFO Reading configuration /config/esp32-oled-96-test.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esp32-oled-96-test (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.0.1
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.1.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.4
|-- Wire @ 2.0.0
RAM: [= ] 12.5% (used 40952 bytes from 327680 bytes)
Flash: [===== ] 50.8% (used 932073 bytes from 1835008 bytes)
========================= [SUCCESS] Took 6.80 seconds =========================
INFO Successfully compiled program.
esptool.py v4.6.2
Serial port /dev/ttyUSB1
Connecting......................................
ERROR Running command failed: Failed to connect to ESP32: Invalid head of packet (0xE0): Possible serial noise or corruption.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
ERROR Please try running esptool.py --before default_reset --after hard_reset --baud 460800 --port /dev/ttyUSB1 --chip esp32 write_flash -z --flash_size detect 0x10000 /data/build/esp32-oled-96-test/.pioenvs/esp32-oled-96-test/firmware.bin 0x1000 /data/build/esp32-oled-96-test/.pioenvs/esp32-oled-96-test/bootloader.bin 0x8000 /data/build/esp32-oled-96-test/.pioenvs/esp32-oled-96-test/partitions.bin 0xe000 /cache/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin locally.
INFO Upload with baud rate 460800 failed. Trying again with baud rate 115200.
esptool.py v4.6.2
Serial port /dev/ttyUSB1
Connecting......................................
ERROR Running command failed: Failed to connect to ESP32: Invalid head of packet (0xE0): Possible serial noise or corruption.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
ERROR Please try running esptool.py --before default_reset --after hard_reset --baud 115200 --port /dev/ttyUSB1 --chip esp32 write_flash -z --flash_size detect 0x10000 /data/build/esp32-oled-96-test/.pioenvs/esp32-oled-96-test/firmware.bin 0x1000 /data/build/esp32-oled-96-test/.pioenvs/esp32-oled-96-test/bootloader.bin 0x8000 /data/build/esp32-oled-96-test/.pioenvs/esp32-oled-96-test/partitions.bin 0xe000 /cache/platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin locally.
I'm flying a little blind because there were no docs, other than what I could scrounge from the TEMU website.
I was able to install a regular ESP32 WROOM without too much difficulty. I have a second ESP 32 OLED board, so I'm tempted to flash it to see what happens.
That’s simply a warning - it does that for lots of components and you can ignore it.
Why are you mixing GPIO style and D style pin numbering? For ESP32 use GPIO only - much simpler.
This can be caused by selecting the wrong board type.
Finally - please fix your post. Logs and yaml are supposed to be inside preformatted text tags - not your comments. It’s next to unreadable and I reckon no-one else will look twice at your post unless you fix it…
Thanks, I did preformat the code sections, but it did not turn out as expected.
The Reset Pin is commented out, as it is not in the documentation I found. I tried GPIO15, but got a warning about using input pins and it did not make a difference anyway.
The odd thing is that the original code worked, except for the response time warning. I got the error when I tried to install the same code again. Of course the display no longer updates.
It’s possible the module is wrong, but the info I downloaded indicated this is an SSD 1306 128x64. Although the TEMU documentation is not the best.
I already tried holding down the boot button during install, but it didn’t help. I think I need to reset it to factory, but I don’t know how to do that.
I might try installing on my second device, so I can have two devices that don’t work. LOL.
I might see if the Arduino IDE helps, but I doubt it. The Arduino docs say it’s a U8G2_SSD1306_128X64_NONAME_F_SW_I2C, not sure how that translates to ESPHOME. I noticed the docs say the upload speed is 921600.
I flashed the original using the USB Port mapped to my ESP Home Docker. This seemed to work OK, except for the complaint about the delay. I tried to flash the SAME code with new display text and got the connect error. I can only assume the original install caused some kind of issue?
Yes, I believe OTA is enabled, as it connected during the first install. I will try an OTA update, but I’m wondering if my USB Port Docker mapping is messed up. The ESP Home Docker got updated and the OS also had an update, so I will check the Docker settings tomorrow. (today). Should not be, but ZNFI.