Hello, i am quite new to ESP8266 and i face the os.listdir() problem generating pages of \x00 on my ESP12F
[code]
>>> 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\]
[/code]
I understand it comes from filesystem being corrupted.
I get this despite doing all combinations of those this week-end:
- I always erase flash first. I even tried to do it with --baud 115200 instead of default (i.e. no speed provided in command line)
- After erase, i always remove power and put it back to ensure clean start.
- I tried flashing several non-OTA versions. I did it also at a speed of 115200 and 460800.
- I used flash size of 'detect', '4MB' and even '32m', even if i understand that latest esptool should be fine with 'detect'.
- I used the '--verify' flag when flashing, concluding ok
- I tried with and without '-fm dio' (i understood that i should have to use it on ESP12F)
- After flashing, i always remove power and put it back to ensure clean start.
- Once flashing is over, i use the esp.check_fw() and it returns ok
And i did all those first with Python 3 and latest esptool, and with Python 2.7 and esptool 1.0.1. Just in case. BTW, the erase flash time with esptool 1.0.1 is suspiciously super fast. So i will return to Python 3 later on.
I even tried flashing the binary image with the nodeMCU flasher.
But, i get the \x00 always. Right now, i am pulling my hair frenetically...
I power from USB port of my lenovo laptop (same i use to power my arduino and raspberry pi). I use a LD1117 voltage regulator to generate the 3.3V from USB. I also tried from an external powerbank, but does not change anything. And the ESP works fine when flashing the Arduino IDE example of the basic webserver, attaching to my wifi router. So i consider it is not defective.
My last hope next week-end is to try this (i.e. formatting it after flashing) that i found this morning:
viewtopic.php?f=16&t=3102&p=18335&hilit=listdir#p18335
Anybody has a clue?
Thx.