Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sonoff Mini "bricking" after Full Firmware Update #6358

Closed
meingraham opened this issue Sep 5, 2019 · 38 comments
Closed

Sonoff Mini "bricking" after Full Firmware Update #6358

meingraham opened this issue Sep 5, 2019 · 38 comments
Labels
troubleshooting Type - Troubleshooting

Comments

@meingraham
Copy link
Collaborator

I cannot provide template information. I'm just reporting three instances in the past several days of seeing this from users.

A user uses Sonoff DIY to flash sonoff-basic and it completes successfully. However, when performing an update to sonoff.bin via web OTA, the device does not come back online. No AP is broadcasting. It cannot be reset with 40s button press. The only recovery is to flash via serial.

@ascillato
Copy link
Contributor

The problem seems that some incorrect data remains in the flash.

Should be recommendable to do a reset 5 to clean the flash BEFORE doing an OTA for the first time.

We should test that

@ascillato2 ascillato2 added the troubleshooting Type - Troubleshooting label Sep 5, 2019
@ascillato2
Copy link
Collaborator

Could you test that?

@effelle
Copy link
Contributor

effelle commented Sep 7, 2019

I asked to a friend of mine to try that. Will report as soon as I receive the feedback. In the meantime perhaps @digiblur can test it for us since he has a sonoff R3 too?

@effelle
Copy link
Contributor

effelle commented Sep 7, 2019

Got a reply right now: update to sonoff-basic using reset 5 DID NOT brick the device.

@digiblur
Copy link
Contributor

digiblur commented Sep 7, 2019

Had a Sonoff mini I did via DIY. Did a reset 5 command and it came back without issue. Then I flash http://thehackbox.org/tasmota/release/sonoff-basic.bin via the OTA URL method and it went through without issue. Any other tests?

@meingraham
Copy link
Collaborator Author

@digiblur

  1. Itead firmware >> Sonoff DIY sonoff-basic.bin
  2. Reset 5
  3. OTA update to sonoff.bin

Still works?

@digiblur
Copy link
Contributor

digiblur commented Sep 7, 2019

I won't be able to test that. No itead firmware anymore.

@meingraham
Copy link
Collaborator Author

Just buy another batch of your beloved Sonoff Minis 😉

@digiblur
Copy link
Contributor

digiblur commented Sep 8, 2019

Ha! Only reason I bought two was since they had a sale for $5 or so.

@paybuzz
Copy link

paybuzz commented Sep 10, 2019

Does anyone know if will there be a firmware update to resolve these Sonoff MINI DIY model so they will just work with standard firmware without the need to issue any further commands?

@Jason2866
Copy link
Collaborator

You can compile your own sonoff firmware. Disable all the features you do not need.
The firmware size has to be <500k. There will be no other solution, because there is the 500k limit. The sonoff-basic version can be used for daily use. It is not a intermediate version.

@meingraham
Copy link
Collaborator Author

Added this suggestion to the Sonoff DIY article.

@Vendo232
Copy link

Vendo232 commented Sep 15, 2019

Cap22222ture

Team

I followed usual DIY OTA on Sonoff Mini and all went well.

I did Tasmota OTA on 6.6.0.12 sonoff-basic and I can not wake up the device. i can flash via serial successfully but the unit will cycle in Serial monitor and won`t broadcast SSID, what can I do?
can I clear the memory in serial flash mode?

32333Capture

@meingraham
Copy link
Collaborator Author

When you flashed serial did you erase flash first?

@Vendo232
Copy link

Vendo232 commented Sep 15, 2019

yes I did. is there any other way to erase flash?

I have 2 dead units Sonoff Mini, no LED after flashing FW, tried minimal, basic and even itead.bin, all flash successfully but after reboot nothing, no LED , no SSID

C12145454apture

@meingraham
Copy link
Collaborator Author

When it first boots, does it stay booted long enough so you can enter Reset 5?

Are you using a pre-compiled binary?

Does the device go into this reboot cycle upon a "fresh" flash or after attempting to configure the device?

@Vendo232
Copy link

Vendo232 commented Sep 15, 2019

HALLELUJAH!!!!

I flashed blank_1MB.bin from ESP EASY FLASHER

then flashed tasmota and they are BACK!!!

also tested Tasmota OTA and they are fine. So yeah we should RESET 5 after eWeLink OTA

I was so happy that the eWeLink DIY OTA worked for me after 2 hours of try and failed than ended up soldering anyway. Second time in the row. Next time I solder right a way. :-)

@meingraham
Copy link
Collaborator Author

We have suspected the NodeMCU PyFlasher "wipe" may not be as thorough as it sometimes needs to be. When using esptool.py we can make the erase explicit and as a matter of fact, we sometimes recommend doing it twice (each one performs a "write" to flash and also calibrates Wi-Fi. In other words, it's much more thorough an erase. Plus, when using esptool, we also recommend a power cycle between erase and upload. PyFlasher obviously doesn't do that either. Nevertheless, PyFlasher is still a great tool for a huge majority of users.

@Jason2866
Copy link
Collaborator

Jason2866 commented Sep 16, 2019

@Vendo232 You didnt follow wiki howto flash ;-)
You used DIO as flash mode. It is written on many places in Tasmota github and wiki
(for example https://github.com/arendst/Sonoff-Tasmota#important-user-compilation-information or https://github.com/arendst/Sonoff-Tasmota/wiki/Flashing#nodemcu-pyflasher) that the one and only flash mode is DOUT

@meingraham
Copy link
Collaborator Author

Wiki refined to provide detailed guidance. Nothing to be done beyond that I'm afraid.

@fdsailer
Copy link

Did update as described in the wiki

  1. Itead firmware >> Sonoff DIY sonoff-basic.bin
  2. Reset 5 -> 3 times as someone suggested that it my be helping
  3. OTA update to sonoff.bin

Now the device is not respondig. It seems that as soon as connected to the Wifi it will reboot again.
40s button and also the 4 times power on cycle for 3s did not help so far.

Any other sugestions then flashing via the serial way ?

@Vendo232
Copy link

Flash 1MB empty bin file, Google it

@fernajuf
Copy link

3 Sonoffs minis bricking. One of them I see on the network "sonoffDiy" but I can not access it. The other 2 don't even see them on the net.

@Vendo232
Copy link

Solder serial and flash with empty 1MB bin than flash tasmota. Good luck, you are almost there

@fernajuf
Copy link

fernajuf commented Dec 18, 2019

In the first Sonoff Mini: I soldered the wires.. I connect it and the LED flashes. I have run "esptool.py flash_id" and it doesn't connect.
In the second Sonoff Mini, I have also soldered the wires but the LED does not flash.

@JackyX2k
Copy link

JackyX2k commented Dec 30, 2019

I have the same issue, 4 Mini's flashed, 3 out of 4 bricked, flashed all with tasmota-wifiman.bin, one worked just fine and manged to connect to my WiFi Network then updated with Sonoff basic worked flawlessly. The other 3 flashed the same way, all of them are showing on My DNS server but I can't connect to them, any suggestions? Its really frustrating!

@ChefsSlaad
Copy link

same for me. bricked my second mini today.

those pads are tiny. any tips to solder the serial connectors?

@Vendo232
Copy link

Solder serial and flash with empty 1MB bin than flash tasmota. Good luck, you are almost there

http://www.pratikpanda.com/wp-content/uploads/2016/05/blank_1MB.zip

@sbeneme
Copy link

sbeneme commented Jan 9, 2020

Hi,
I'm in a similar situation. I've flashed 2 sonoff mini with tasmota-wifiman.bin(maybe wrong) now are death.
help

@sredni
Copy link

sredni commented Jan 11, 2020

@Vendo232 got right but may be more detailed.

  1. Solder 4 wires to mini board
    1FCF5367-097B-4788-85BC-985D16CC4FDE
  2. Connect it to your uart/ftdi but do not connect it to your computer yet (make sure that your adapter uses 3v3 not 5v).
  3. Download/install esptool.py
  4. Download empty flash image (http://www.pratikpanda.com/wp-content/uploads/2016/05/blank_1MB.zip)
  5. Download latest tasmota (i suggest to use lite version - after all it may be easy updated via ota)
  6. Hold button on your sonoff mini and connect uart/ftdi to computer
  7. Burn empty image:
esptool.py --port <path_to_port_which_sonoff_is_connected>  --chip esp8266 write_flash -fs 1MB -fm dout 0x0 <path_to_blank_image>/blank_1MB.bin

Output should looks like:

esptool.py v2.8
Serial port <path_to_port_which_sonoff_is_connected>
Connecting....
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 26MHz
MAC: dd:ff:bb:11:33:dd
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Warning: Image file at 0x0 doesn't look like an image file, so not changing any flash settings.
Compressed 1048576 bytes to 1039...
Wrote 1048576 bytes (1039 compressed) at 0x00000000 in 0.1 seconds (effective 88756.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
  1. Disconnect uart/ftdi from computer
  2. Hold button on your sonoff mini and connect uart/ftdi to computer
  3. Burn tasmota:
esptool.py --port <path_to_port_which_sonoff_is_connected>  --chip esp8266 write_flash -fs 1MB -fm dout 0x0 <path_to_tasmota_image>/tasmota-lite.bin 

Output should looks like:

esptool.py v2.8
Serial port <path_to_port_which_sonoff_is_connected>
Connecting....
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 26MHz
MAC: dd:ff:bb:11:33:dd
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Compressed 474576 bytes to 328553...
Wrote 474576 bytes (328553 compressed) at 0x00000000 in 29.0 seconds (effective 130.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
  1. Sonoff led should start blinking and you can be happy now because you just bring back your sonoff to life :)

@JackyX2k
Copy link

JackyX2k commented Jan 29, 2020 via email

@mf-1
Copy link

mf-1 commented Jan 31, 2020

I'm at another project but have also this message.

Warning: Image file at 0x0 doesn't look like an image file, so not changing any flash settings.

Is this an issue or should the firmware run as expected?

@sredni
Copy link

sredni commented Feb 4, 2020

@mf01 Depends on what you are doing. If you trying to upload non empty image esptool try’s to check what is in the image and adjust some flashing settings. But when the image is empty this warning can be ignored.

@georgelza
Copy link

... 4 units, 3 is dead,
#1 and #2, tried to solder.. well guess if you end damaging the components next to this damm small pins it won't work again. to even see the place to solder i use a magnifying glass, and still battle.

Tried the OTA, first battle to get it into DIY mode... eventually lucky and get it (these are new units without the jumper).
then assign wifi credentials, At this point I can do curl's and node-red command push'es. get responses. nw try and flash, originally used the pythin Simpllehttpserver, always end with broken pipe during download, so tried the npn one, well that works, file is transferred and then it complains about a POST api/devices/otaFlash and now it's dead/bricked, nothing works.
at times i get it to present a wifi, called ESP_**** but thats of no help,

working on a MAC.

i have 1 unit left, would love a step by step that will work from a MAC.

G

@DSew20
Copy link

DSew20 commented Mar 22, 2021

I had the same issue. Flashing minimal bricked the mini r2. But, you can recover by soldering to the header pins (which are tiny on the R2) and I got the first one running.

I had better luck with my 2nd mini r2. My OTA sequence was:

  1. Connect the Mini R2 to Sonoff eWeLink mobile app. Use the "Compatible mode" for initial connection
  2. Go to 10.10.7.1 and add the same wifi SSID as the PC you are going to use to flash via DIY tool
  3. Download the Sonoff DIY tool. It should detect the Mini as its on the same network
  4. Flash tasmota-lite via the DIY tool
  5. Log-in to the SSID provided by the flashed tasmota on your mobile and go to 192.168.4.1 on the same device
  6. Update the wifi settings so that the tasmota can connect to your network
  7. Log-in to the tasmota once restarted. Flash to tasmota-minimal
  8. Once restarted, flash to full tasmota

Its a bit of a pain doing all of these steps, but worth trying before heating up your soldering iron.

Hope this helps others.

@tonygh77
Copy link

@Vendo232 got right but may be more detailed.

  1. Download empty flash image (http://www.pratikpanda.com/wp-content/uploads/2016/05/blank_1MB.zip)

Hello, how to download empty flash?

@Vendo232
Copy link

This app has it included

https://github.com/letscontrolit/ESPEasy/releases

@ramanraja
Copy link

I got many devices bricked after doing an OTA upgrade. The firmware was a custom build.
Problem: I had chosen board = esp8266_4M2M in platformio.ini. But my device was actually a 1MB device.
The OTA uploads were successful, but the device never came back alive again -I had to flash through serial port all over again.
Solution: choose the correct board type esp8266_1M and build again. After this change, my OTAs never failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
troubleshooting Type - Troubleshooting
Projects
None yet
Development

No branches or pull requests