Flash command switches or config?


I’m trying to flash an ESP8266, 4MB Electrodragon board.
tried: mos flash
Opening /dev/cu.usbserial-1440 @ 115200…
Connecting to ESP8266 ROM, attempt 10 of 10…

I can’t find command switch documentation for the flash command.
ESPTools.py Flashes it fine with:
esptool --port /dev/cu.usbserial-1440 write_flash -fs 1MB -fm dout 0X0 foo.bin

Esptools responds with
Serial port /dev/cu.usbserial-1440
Detecting chip type… ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz

flash mode: QIO or DIO|
crystal frequency: 26mhz
flash frequency: 40mhz
CPU frequency: 80mhz
upload using: “serial”
flash size: 4MB / 32Mbit (3M SPIFSS)
upload speed: 115200 ~ 921600

Thinking some defaults may be different from mos flash and esptools… Installed Mogoose-Os on my Mac with Homebrew and I’m not sure where the yarml files live.


Did you check the ESP8266 datasheet ? Your board schematics ? This ?
mos tool just plays with DTR and RTS as several boards connect those lines to reset and GPIO0, so the board is reset with GPIO0 low and it then goes up again. If your board does not have something like this, you’ll have to do it manually,


Checked. out. Same requirements as esptools.py. I tried manually pulling GOIO15 low as well.
Out of ideas… Seems like it should work. The Electrodragon flashes just like a Sonoff.
Loaded app1/esp8266 version 1.0 (20210109-215229)
Opening /dev/cu.usbserial-1460 @ 115200…
Connecting to ESP8266 ROM, attempt 1 of 10…
Connected, chip: ESP8266EX
Running flasher @ 921600…
E0109 17:10:33.529743 98378 common.go:73] failed to run flasher @ 921600, falling back to ROM baud rate…
Opening /dev/cu.usbserial-1460 @ 115200…
Connecting to ESP8266 ROM, attempt 1 of 10…


The procedure is GPIO0 low while exiting reset state, GPIO0 up again.
There are other pins that need to be held at appropriate states as the document in the link I posted states. I’ve flashed Sonoffs countless times, you either are not connecting it properly or you have a problem with your serial.
Connect an oscilloscope and check the connection, pins that have to be steady at the proper level. and pins that have to change level when mos tool is retrying connection. If there’s no level change, then you are at the wrong serial. You should see activity at the TD pin (mos tool) too.
If you are doing it manually (that is how I flash Sonoffs), start mos tool, connect with GPIO0 low (usually that means “button pressed”), and release GPIO0 after one or two seconds.
If your board has a reset button, you can leave it connected (which is safer) and just press reset. Pay attention to keep GPIO0 low while you are releasing the reset button, and then leave GPIO0 alone.