Suddenly cannot flash NodeMCU ESP8266

I’m not sure about the details, but from what I gathered it’s either just the debug messages that get printed at 74880 baud, or that it’s not a limitation of Linux itself, but rather of most serial utilities.

Apparently, using some hacking, it is possible to get a baud rate of 74880 working on Linux, but it’s not trivial. See:

http://sensornodeinfo.rockingdlabs.com/blog/2016/01/19/baud74880/
http://cholla.mmto.org/esp8266/weird_baud/

It seems that screen just fails silently and falls back to a default baud rate (which is stupid, of course), but in for example minicom it is clear that it doesn’t switch to 74880 baud when you ask it to. Similarly, in the Arduino IDE’s serial monitor, it fails (with the error message Error while setting serial port parameters: 74,880 N 8 1) when you try to select 74880 baud.

Nevertheless, I think I’ve found the root of the flashing issue. I found this issue on esptool’s GitHub: Automatic reset not working. Only able to connect with --before no_reset (ESPTOOL-300) · Issue #656 · espressif/esptool · GitHub

And indeed, when passing --before no_reset to esptool.py, it works! Well, after resetting the board manually by holding FLASH and pressing RST, that is.

Now, is there a way to set this option in platformio.ini so it passes it to esptool when I do a pio run?