So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By timg11
#68688 I'm followingthis guide to program a Sonoff module.

I have the USB Serial FTDI adapter connected, with a power switch.
If I plug the USB connector directly into the USB port, the Sonoff flashes its LED Green
If I turn off my switch (in the 3.3V Vcc line to the Sonoff) off and back on, the Sonoff then flashes its LED Green.
If I hold down the Sonoff switch while powering on the Vcc line. The Sonoff does nothing. The LED never blinks.

--------Edit------------Further update--------------
I think the module is entering flashing mode OK, and the normal behavior in flashing mode is no LED. I was expecting the mode where the flash memory can be programmed was also accompanied by a flashing LED.

If I entered flashing mode with a terminal active, I saw a bit of data sent by the module. I tried every normal baud rate, and it was still garbage. I searched a while and foundthis article, which indicates that the 'native' baud rate is 74880.
Setting that baud in PUTTY lets me see this text that is displayed when starting the module in flashing mode:
Code: Select all ets Jan  8 2013,rst cause:1, boot mode:(1,6)


That tells me that the serial communication is working.

I try to upload with Arduino IDE Sketch / Upload (Ctrl-U). It compiles OK, but then gives:

Code: Select allwarning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed


I thought about changing the Arduino IDE Upload Speed to 74880, but only specific values are allowed, and that's not one of them.
User avatar
By timg11
#68753 After further reading, there was some question about whether the switch was actually connected to D0. After carefully inspecting the board under a microscope and probing with an ohmmeter I confirmed it was connected. When trying again to flash, it worked properly, and I was able to load the Arduino sketch for a web server. I'm not sure why it did not flash properly before.