Probleme beim flsheb von ESP8266 Nodemcu german and english version

So langsam bin ich am verzweifeln. Im Herbst habe ich ein Projekt mit Arduino Nano gemacht alles paletti. Früher habe ich diverse Projekte mit Arduino, Nodemcu 12.E und -01 noch mi der Arduino IDE gemacht alles paletti. Vor zwei Tagen habe ich auf einen Sonoff ne Tasmota Firware geflashed sowohl mit esptool als, bin mir nicht ganz sicher auch via platformio. Auch habe ich schon mal im Herbst mit Platformio ein ESP8266 Nodemcu Projekt gemacht, leider gelöscht aber war auch gut.
Nun hab eich heute ein kleine Projekt (BME280 auslesen und auf Webseite anzeigen) gemacht und wollte diese auf eine Nodemcu flashen und bekomme Timeouts nach 20, 50 90%, Das auf 7 verschiedenen, die eigentlich alle OK sein sollten. Auch die simple Blink via Arduino IDE timeout, nach unterschiedlicher Zeit. Dann habe ich noch eine nagelneuen WMOS d1 mini genommen, selbes Spiel. Mit dem ESPTOOL.PY kann ich die Chips auslesen und auch löschen aber nicht flashen
Rechner 27" iMAC 16GB RAM OS X 10.14.6

Danke für jeden Tip
P.S. ich habe das selbe USB Kabel mit dem ich den SONOF via USB seriell Adapter geflashed habe

Had done server Project with Arduino IDE an since about 5 month with platformio, I used Arduino nanao and esp 8266 Nodemcu from Lolin and similar. Yesterda I flashed a Sonoff basic succesfully with ESPTOOL. To I made a new project for nodemcu but flashing stop random at 20, 40, 50 even 90% with timeout but never finished. Even on a complete new WMOS D1 mini.

No more idea what to do, Google did not help

Thanks for any hint Rainer

Verstehe ich das richtig, dass du einen ESP8266 in Form eines Wemos D1 mini hast, der wenn du ihn mit der Arduino-IDE und der Blink-Sketch flashen willst, einen Timeout Fehler beim Uploaden gibt?

Welche Einstellungen sind in der Arduino-IDE bzgl. board und Flash-größe und Upload-geschwindigkeit eingestellt?

Was gibt esptool.py aus wenn du ausführst

esptool.py flash_id

Ja genau. esptool.py flash_id gibt sinniges aus. gleich Problem auf 7 verschidenen NODEMCUs egal ob Arduino IDE oder PlatformIO.
Izwischen bin ich soweit, dass wenn ich aus …/.pio.build./esp12e/ mit esptool.py --port /dev/cu.wchusbserial14240 write_flash 0x00000 firwar.bin flashe ist alles OK
Über PlatformIO mit den selben Einstellungen bekomme ich Timeouts
Danke für die schnelle Antwort. Ok so kann man arbeiten aber Sin der Sache ist es nicht.

Total verrückt nachdem ich einmal erfolgreich aus der Konsole mit dem ESPTOOL geflashed habe geht es auch via PlatformIO, Habe es allerdings noch nicht mit anderen verifiziert. Tu da jetzt schon fas 4 Stunden rum.

Totaly crazy after flashing once from Terminal vie ESPTOOL out of …/.pio.build./esp12e/ mit esptool.py --port /dev/cu.wchusbserial14240 write_flash 0x00000 firmware.bin what worked I can flash with PlatformIO too, Did not change any settings. Not verified with other MCUs Costs me about 4 hours now

Rainer

Okay, switching completely to english then.

Possible problem sources may be:

  • you are flashing an image that is bigger than the physical flash installed on the ESP8266 module
    • hence esptool.py flash_id to see what the flash size is in the e.g. “Detected flash size: 4MB” output
  • you are flashing an image with the wrong flash settings
    • regarding flash size
    • flash conenction mode (DIO/QIO/DOUT/QOUT)
    • flash frequency
  • Mac OS driver problems
    • the drivers for the CH340G serial converter (which I can see is your converter chip due to the cu.wchusbserial14240 name) is notorious for having buggy drivers or breaking when updating Mac OS. Did you do any modifications to the serial driver or did a Mac OS update?
    • the CH340 chips don’t like higher baud rates. When using esptool.py, add a --baud 115200 after esptool.py to choose a safer, slower upload speed. (or in platformio.ini: upload_speed = 115200)

Yes normaly these are teh problems. Programm too big, just the blink example shurely not, and my small test with BME280 has about 300K, that a lot less than 4M
Freqency I did not touch default
the CH340G driver is used by me sinsce years always latest version, did not make problems at least last two years
Speed I use 115200 since years I tried 9600 this afternoon after problems began, got no connection at all.
flshing connection I did not touch eithe I thin DOUT ist default
At least it works now, I am now neary 50 years in the IT industriy, started prgramming Z80 did a lot with Netware from 2.0a to 6.5 and a lot with linux SuSE and Debian and in the last years prgramming microcontrollers as a hobby. It is not the first time things went false and then worked fine and nobody knows why. These are the funny an crazy thing in IT.
Good evening, stay healthy in this Corona times
Rainer

tried an other boars, old problem, count not even fix with command lein, but found this:

I spent lots of time trying to get my ESP32-WROOM to reliably load code from VSCode/PlatformIO. Most of the web discussion focuses on hardware changes: more bulk capacitance, timing on EN line, but none of that helped. What ultimately made flashing 100% reliable was simply downgrading from the esptoolpy version 2.6 that is the default to 2.1 by adding the following to my platformio.ini in the upload section:

platform_packages = tool-esptoolpy@1.20100.0

With that change, every download was fast and reliable at speeds up to 430kbps."

To flash my Sonoff switch (esp8266 inside9 I installed latest esptool.py version 3.0, these days mybe this ones faulty but PlatformIO uses it, as its in the path?
Rainer

Actually, in its current version PlatformIO uses esptool.py 2.8

At the start of compilation you should see

PLATFORM: Espressif 8266 (2.6.2) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.20800.0 (2.8.0)
 - tool-mklittlefs 1.203.200522 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)

tool-esptoolpy 1.20800.0 (2.8.0).

If that is not the case I suggest updating the PlatformIO core and platform. From a PlatformIO CLI that can be e.g. done with pio upgrade then pio platform update espressif8266. The next “Upload” should then show these versions above.

A globally installed version of esptool.py should not interfere in any way. If you do a “Verbose Upload” you see that it uses the full filepath

“c:\users\max\appdata\local\programs\python\python38\python.exe” “C:\Users\Max.platformio\packages\tool-esptoolpy\esptool.py” --before default_reset --after hard_reset --chip esp8266 --port “COM13” --baud 400000 write_flash 0x0 .pio\build\nodemcuv2\firmware.bin

So no confusion is possible.

If the currently used version 2.8 is also not stable then indeed adding platform_packages = tool-esptoolpy@1.20100.0 to the platformio.ini of your project is the right solution.

If it’s also not working with the very-latest development version of esptool.py (per GitHub - espressif/esptool: Espressif SoC serial bootloader utility), but with older versions it works, you should file an issue at Issues · espressif/esptool · GitHub.

Hello Max,

seam that was it, after doing the update/upgrade tested two other boards, could flash them on first try. As I wrote I’m working with PlatformIO only sind about 5 month, did, beside some small test projects just one bigger home automation project based on Arduino NANO and CAN Bus.
So I did not get yet very deep into PlatformIO, but I think should, it seams its really great stuff.
Thanks again for help. I learned a lot.
Rainer