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

Shelly2 "-12 Write failed" #9

Open
brainrecursion opened this issue Jun 7, 2021 · 4 comments
Open

Shelly2 "-12 Write failed" #9

brainrecursion opened this issue Jun 7, 2021 · 4 comments

Comments

@brainrecursion
Copy link

brainrecursion commented Jun 7, 2021

I have been having problems converting two shelly2 devices from tasmota v9.4.0 to stock Shelly firmware.
I successfully converted a few shelly1 devices but the shelly2 devices are not happy.

I have tried multiple power cycles and flashed back to tasmota via serial and gone round the loop a few times but no luck.

This is using the latest release of 0x1000 firmware.
I tried to get a boot log but it doesn't seem to output until initially. The log I have managed to capture is:

mgos_wifi.c:345         WiFi STA: Connect timeout
mgos_wifi.c:88          WiFi STA: Using config 0 (vtrust-flash)
esp_wifi.c:203          WiFi STA IP: 10.42.42.44/255.255.255.0 gw 10.42.42.1
mgos_wifi.c:270         WiFi STA: Connecting to vtrust-flash
mgos_net.c:86           WiFi STA: connecting
esp_main.c:145          SDK: scandone
mgos_wifi.c:118         WiFi STA: Disconnected, reason: 201
mgos_net.c:82           WiFi STA: disconnected
mgos_http_server.c:180  0x3fff0634 HTTP connection from 10.42.42.50:49252
mgos_mongoose.c:66      New heap free LWM: 43504
mgos_ota_core.c:252     Starting, timeout 600, commit timeout 0, mem 43852
mgos_mongoose.c:66      New heap free LWM: 42288
mgos_mongoose.c:66      New heap free LWM: 41344
mgos_mongoose.c:66      New heap free LWM: 40616
mgos_mongoose.c:66      New heap free LWM: 39784
mgos_ota_core.c:486     FW: switch esp8266 1.0 20210429-100513/v1.10.4-g3f94cd7
esp_ota_backend.c:185   Slot 1, FW: switch.bin -> 0x108000, FS fs.bin -> 0x1bb000
mgos_ota_core.c:504     0.20% total, esp_init_data_default_v08.bin 128 of 128
esp_ota_backend.c:205   Failed to read 64 bytes from 0x1bb000
esp_ota_backend.c:338   Start writing fs.bin (262144) @ 0x1bb000
mgos_mongoose.c:66      New heap free LWM: 38624
esp_flash_writer.c:77   Erase sector 443 (0x1bb000) -> 1
mgos_ota_core.c:811     Update finished, result -12 (Write failed)

Any idea what is wrong?

@travhoog
Copy link

I am also having this error. I was able to get further along by adding -H "Content-Type:application/zip"

% curl -i -H "Content-Type:application/zip" -F filedata=@/<path to file>/RGBW2.zip http://10.42.42.44/update

This seems to work to start the file upload, but after a short pause I get the following error...

curl: (56) Recv failure: Connection reset by peer

I'm using 0x7000 firmware in an attempt to restore an RGBW2 back to stock. Feedback is appreciated @yaourdt

@travhoog
Copy link

@yaourdt Disregard. I found the solution to my problem at this thread...
#3 (comment)

@brainrecursion Ultimately I needed to re-flash the 0x7000 firmware (0x1000 in your case) using a USB-to-Serial adapter and Tasmotizer software instead of the OTA method. (The wired flashing method vs wireless.) Something about OTA seems to break Mongooses curl abilities. I hope this steers you in the right path!

@Odiben123
Copy link

Odiben123 commented Mar 13, 2022

Hi,

i have the same issue. I have flashed a Shelly Duo RGBW and loaded the intermediate firmware. However flashing the end firmware give the write failed error. Not sure how to continue. Don't know how to get back or get to the original shelly firmware.

curl -i -F filedata=@./SHCB-1.zip http://10.42.42.44/update/
HTTP/1.1 500 Internal Server Error
Server: Mongoose/6.18
Content-Type: text/plain
Connection: close

-12 Write failed

@yaourdt do you what what has happened?

@hnykda
Copy link

hnykda commented Jan 29, 2024

Hey. Has anyone ever figure this out? I am still getting just:

[I] ❰dan❙~/Downloads❱✘≻ curl -i -F filedata=@./SHRGBW2.zip http://10.42.42.44/update
HTTP/1.1 500 Internal Server Error
Server: Mongoose/6.18
Content-Type: text/plain
Connection: close

-12 Write failed

[I] ❰dan❙~/Downloads❱✔≻ curl -i -H "Content-Type:application/zip" -F filedata=@./SHRGBW2.zip http://10.42.42.44/update
curl: (56) Recv failure: Connection reset by peer

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

No branches or pull requests

4 participants