KmanOz / KmanSonoff

Firmware for ESP8266 based itead Sonoff switches for use with HomeAssistant / mqtt
MIT License
282 stars 39 forks source link

Cannot get TH10 to work after flash #4

Closed saroberts closed 6 years ago

saroberts commented 6 years ago

I have a TH10 that I am trying to reprogram with your code following the README. The TH10 seems to be functioning prior to starting the process (lights blinking, etc). I have modified the config_sc.h script to include my WiFi and MQTT information. I then use the Arduino IDE (v1.8.5) to compile and upload the firmware. I have tried a variety of settings for the board, and they seem to work. If I use verbose upload logging I see the flash happening. The final log is for "closing bootloader" and I see "flush complete".

The issue is after that I try to boot up the switch again (either using power from the USB or separately from mains) and nothing seems to happen. No lights blinking. I don't see the switch connected to my WiFi network. I can put the TH10 back into flash mode and re-flash, so it's not like the device is totally bricked or something. It just doesn't seem to be taking the new firmware.

Can you provide any additional guidance? I would happily provide log file output, but I'm not sure how to get anything from the switch itself.

KmanOz commented 6 years ago

What Flash type are you setting in the Arduino IDE for the TH10. Is it a recent one or old one?

saroberts commented 6 years ago

Are you referring to the "Flash Mode"? I'm using DIO. Other Arduino IDE settings attached.
capture

KmanOz commented 6 years ago

New devices use a different flash chip and need to be programmed using DOUT. If you have purchased this recently then I'd say that's your issue. Try that.

saroberts commented 6 years ago

Ha, I had tried messing with about every other setting. Using DOUT seems to work file (lights come on, manual switch works, connects to WiFi). I think I have an issue with my MQTT broker now, but that's a separate issue for me. Thanks for the help!