Is the Sonoff Pow R2 supported?

If you are asking a question, please follow this template:

  1. My goal is: Flash demo app as per quick start to Sonoff Pow R2

  2. My actions are: Successfully built and flashed the demo to NodeMCU ESP8266 via usb cable, failed to flash Sonoff Pow R2 via FTDI cable (same cable successfully flashes an alternative firmware via platformio)

  3. The result I see is:
    $ mos build --platform esp8266
    Connecting to https://mongoose.cloud, user test
    Uploading sources (2583 bytes)
    Firmware saved to /home/---------/mongoose/app1/build/fw.zip
    Command completed.
    $ mos flash
    Loaded app1/esp8266 version 1.0 (20190821-082808)
    Opening /dev/ttyUSB0 @ 115200…
    Connecting to ESP8266 ROM, attempt 1 of 10…
    Connected, chip: ESP8266EX
    Running flasher @ 921600…
    Flasher is running
    Flash size: 4194304, params: 0x024f (dio,32m,80m)
    Deduping…
    4096 @ 0x7000 -> 0
    262144 @ 0x8000 -> 32768
    824368 @ 0x100000 -> 648240
    4096 @ 0x3fb000 -> 0
    Writing…
    4096 @ 0x0
    8192 @ 0x9000
    24576 @ 0x1a000
    24576 @ 0x104000
    Error: /build/mos-UgAneL/mos-2.15.0+b14a864~bionic0/go/src/github.com/mongoose-os/mos/mos/flash/esp/flasher/flasher_client.go:264: flasher did not respond
    /build/mos-UgAneL/mos-2.15.0+b14a864~bionic0/go/src/github.com/mongoose-os/mos/mos/flash/esp/flasher/flash.go:218: lost connection with the flasher
    /build/mos-UgAneL/mos-2.15.0+b14a864~bionic0/go/src/github.com/mongoose-os/mos/mos/flash.go:223:
    /build/mos-UgAneL/mos-2.15.0+b14a864~bionic0/go/src/github.com/mongoose-os/mos/mos/main.go:196: flash failed
    exit status 1

  4. My expectation & question is: Is the Sonoff Pow R2 supported? Is it a matter of changing
    flash params “dio,32m,80m” or how flashing is initiated?

Try to lower the speed during flashing --esp-baud-rate 115200.

2 Likes

Spot on, first try at 115200 didn’t work, went to 38400 and it worked. Thanks!

@nliviu We’ve found the flashing to be very intermittent since the initial success. 74880 seems to be the most consistent. It’s a genuine FTDI cable, 75mA max current, so I don’t think it is the cable.

On a positive note, it is impressive how easy it is to implement features in mongoose.

Do you mean 75mA on 3.3V to supply the Sonoff? Maybe it’s not enough for stable operation.

D’oh! VCC on a 3.3V FTDI cable is 5V not 3.3V. I’ll fix this and try again.
Thanks for the quick response.