Good day folks. A friend of mine told me his Sonoff 4CH light switch recently stopped working. It wouldn't respond to any commands and would appear as offline. Not having done any major work on these home automation devices before, we both concluded the firmware got corrupted, so we set about to find a way to reprogram it.
It turns out these things have got a STM32 inside of it and an ESP32, so given the open-source nature of these components, there's a variety of different firmware and interfaces you can upload to them......in theory. Ideally, we wanted to use the original one it came with, but as it turns out this is not easy to get hold of: if you haven't made a backup of the original contents of the thing, you can't simply download the dump from somewhere (at least we were unable to).....
The way you flash it to the device is also pretty difficult to pull off: you first connect it to the PC with a serial to USB adapter, which we have (a CH341). I can assume this works because if I open a terminal window, I DO get some info from the Sonoff when powering it on. Then, you have to pull a GPIO pin of the ESP to GND to go into download mode and then use a piece of software to actually flash it with the firmware you want - official or third party. I tried doing this with a "Tasmota" firmware which seems to be very common, just to check if I can do this AT ALL and it didn't work. Granted, I was in a bit of hurry and probably didn't dig deep enough, but now all it does is it has 3 of the 4 "CH" LEDs come on in red when you turn it on, so I assume it DID wipe the flash somehow but didn't write anything back to it....
If someone happens to have one of these and are willing to share a backup of their original flash so I can try again, it would be greatly appreciated. My buddy really likes this device and he tailored his whole house around it, so he really needs it
It turns out these things have got a STM32 inside of it and an ESP32, so given the open-source nature of these components, there's a variety of different firmware and interfaces you can upload to them......in theory. Ideally, we wanted to use the original one it came with, but as it turns out this is not easy to get hold of: if you haven't made a backup of the original contents of the thing, you can't simply download the dump from somewhere (at least we were unable to).....
The way you flash it to the device is also pretty difficult to pull off: you first connect it to the PC with a serial to USB adapter, which we have (a CH341). I can assume this works because if I open a terminal window, I DO get some info from the Sonoff when powering it on. Then, you have to pull a GPIO pin of the ESP to GND to go into download mode and then use a piece of software to actually flash it with the firmware you want - official or third party. I tried doing this with a "Tasmota" firmware which seems to be very common, just to check if I can do this AT ALL and it didn't work. Granted, I was in a bit of hurry and probably didn't dig deep enough, but now all it does is it has 3 of the 4 "CH" LEDs come on in red when you turn it on, so I assume it DID wipe the flash somehow but didn't write anything back to it....
If someone happens to have one of these and are willing to share a backup of their original flash so I can try again, it would be greatly appreciated. My buddy really likes this device and he tailored his whole house around it, so he really needs it

Comment