Page 2 of 2

Re: Corrupted filesystem

Posted: Fri May 06, 2016 5:21 am
by PinkInk
I'm having what appears to be a related problem with 12e modules, after writing boot.py, main.py and an updated neopixel.py I noticed an increasing number of "0x00 * x" files in the filesystem. This is what os.listdir() says, shortly before the module reboots with memory issues;

Code: Select all

>>> import os
>>> os.listdir()
['\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', '\x00\x00\x00\x00\x00\x00\x00\x00.\x00\x00\x00', etc. etc.
esptool erase_flash (or ESP8266Flasher with INTERNAL://BLANK), and a re-flash, don't clear this content from the filesystem (although they do clear the files I specifically created). Tried various combinations of flash-size etc.

Re: Corrupted filesystem

Posted: Fri May 06, 2016 10:03 am
by Damien
Try resetting the filesystem using:

Code: Select all

import uos
import flashbdev
uos.VfsFat.mkfs(flashbdev.bdev)

Re: Corrupted filesystem

Posted: Fri May 06, 2016 3:54 pm
by PinkInk
Damien; thanks - you're a star; yes, that's cleared the filesystem.

Something funny is going on; some combination of trying to open to write 'neopixel.py' and/or 'neoxpixel_.py' occasionally re-corrupts the filesystem, but I've not yet been able to find a test case that does so consistently.

Re: Corrupted filesystem

Posted: Fri May 06, 2016 7:22 pm
by deshipu
How are you powering the board? While the esp8266 chip itself is quite robust to power fluctuations, the flash memory chips usually are not.

Re: Corrupted filesystem

Posted: Sat May 07, 2016 1:24 am
by PinkInk
Ahhh, that's probably it ... at the moment 2x(new)AA and 100uf across the rails - but I do run these until the module bulks at them, hence the flash may already be having less obvious issues.

I've been caught by surprise by how power sensitive the bare modules are, melted a breadboard psu in the process, but more refined options (aka adafruit huzzah) are not an option where I live.

I was planning to ask for a recommendation for a novice for for small ebay power solution for embedding into permanent esp8266 projects, as far as I can work out the options are;

- 3.7v lipo and matched usb charger
- higher voltage battery pack and;
--- buck step-down regulator
--- ld1117v33 (can fortunately get these here, so will start with this)
- boost step-up regulator

The last option seems attractive for embedded projects, due to (potentially) small size, but difficult to tell which modules are going to maximize battery utilization with the esp8266's 300ma peak requirement.

Re: Corrupted filesystem

Posted: Sat May 07, 2016 2:58 pm
by PinkInk
Stability generally much improved with a jury-rigged 3xAA battery pack ... thanks.