Corrupt file stops boot
Posted: Fri Jul 19, 2019 6:49 am
I have two D1 minis running a lightswitch for me, one is the sender and one the receiver. The receiver runs picoweb, and waits on /on or /off http requests to turn the lights on or off
It stopped working recently, and when I went to investigate I saw that the program file had been corrupted, it looks like the first part of it is gone:
How it should look:
How it actually looks:
And when I reboot it, I see this:
I reloaded the original file to it, rebooted it and now it works fine.
My question is, what could have went wrong, and could it happen again? Is it bad flash, or a bad D1? Should I 'retire' it and try another one?
It stopped working recently, and when I went to investigate I saw that the program file had been corrupted, it looks like the first part of it is gone:
How it should look:
Code: Select all
import picoweb
import os
import network
gc.collect()
import uasyncio as asyncio
Code: Select all
os
import network
gc.collect()
import uasyncio as asyncio
Code: Select all
MPY: soft reboot
Traceback (most recent call last):
File "main.py", line 1, in <module>
File "<string>", line 2, in <module>
ImportError: no module named 'pcoweb'
MicroPython v1.11-72-g9cebead27-dirty on 2019-06-28; ESP module with ESP8266
Type "help()" for more information.
>>>
>>>
My question is, what could have went wrong, and could it happen again? Is it bad flash, or a bad D1? Should I 'retire' it and try another one?