Sonoff ifan02 flashing issues

I am having trouble flashing (maybe) my new ifan02 sonoff fan controller. This is my first sonoff so the entire process is new to me. I am using an Arduino to flash, and I am successful flashing it, problem is it never starts up. I have flashed it several times. After the last couple I removed the 3v supply from the Arduino and hard wired the sonoff to AC power. I see a bunch of what looks like watch dog resets? In the serial output. I am assuming it’s just boot looping but I am not sure why.

Can someone help me figure this out? Anyone else use an Arduino to get theirs flashed?


Do not connect the sonnoff to AC power when flashing. This is a very good way to kill your com port and possibly other things including you.

Actually I just read the wiki for the ifan02, seems this one is isolated so you should be ok. And in fact you probably need to as the USB adapter can not supply enough current.

1 Like

I never successfully got it to flash using the ArduinoIDE.

I used visual studio code and platformio.

Now I use ESPeasy/sonoff.bin/termite per the video from @DrZzs (search on his youtube channel). It’s super easy to do it that way.

1 Like

I wasn’t flashing with it power via AC. Just powered via AC to check it was booting.

1 Like

Can I still use an Arduino as my FDTI and I don’t have access to a windows computer Mac and Linux only is that okay?

I really don’t know. I’ve never tried doing that way.

The wiki page says you should be able to:

Switched over to using and flashed the .bin and got it working. Thanks for the help.

For anyone that runs in to the same issue. I used the following command. --port /dev/ttyUSB2 write_flash -fs 1MB -fm dout 0x0 sonoff.bin

Ditto to this. Just could not get ArduinoIDE to work but Visual Studio Code with PlatformIO has never failed me.