Corrupted SD card (resolved)

I took the SD card out of my device, and it looks interesting.

there is this file: tables.TP
dated: 8/22/2082 7:20PM PDT

There is another one: EFIV.HTM
from: 8/22/2034 (also at 7:20PM PDT)

I was unable to delete the tables.TP* file, so I copied all the content from the SD card and then slow formatted the SD card. It is a very slow card (Kingston, class 4) with a write speed of ~5MB/sec, so that took a long time.

And putting the card back in and booted and get red-red-red.

Looks like the problem is this:

** Restart **

SD initialized.
10/07/19 06:32:59z Real Time Clock is running. Unix time 1570429979
10/07/19 06:32:59z Reset reason: External System
10/07/19 06:32:59z Trace: 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 11:0
10/07/19 06:32:59z ESP8266 ChipID: 2222239
10/07/19 06:32:59z IoTaWatt 4.x, Firmware version 02_05_00
10/07/19 06:32:59z SPIFFS mounted.
10/06/19 23:33:00 Local time zone: -8:00
10/06/19 23:33:00 Using Daylight Saving Time (BST) when in effect.
10/06/19 23:33:00 device name: IotaWatt
10/06/19 23:33:00 MDNS responder started for hostname IotaWatt
10/06/19 23:33:00 LLMNR responder started for hostname IotaWatt
10/06/19 23:33:00 HTTP server started
10/06/19 23:33:00 timeSync: service started.
10/06/19 23:33:00 statService: started.
10/06/19 23:33:00 dataLog: service started.
mkdir failed: iotawatt
10/06/19 23:33:00 dataLog: Log file open failed. 2
10/06/19 23:33:00 Program halted.

I guess it doesn’t like the format of the SD card now

Problem is now resolved. I reformatted the SD card with the official SD card formatter from here:

The 5.0 version I used does not appear to give any options for the filesystem type and it chose FAT32 (which is what I used when I formatted it from Windows). I know that some libraries are picky about some details for the formatting and work better when using the SD cards formatted by the official formatter.

I removed the file with the unusual name and also the one from the future. The File Manager and Editor is much happier now and is showing me all the files.

2 Likes

I am experiencing the same problem. I have formatted a new Micro-SD card using the official SD Card formatter, but without success. I still get log file open failed.

The SD card should be formatted as a fat32 volume. In my experience, reformatting with a windows machine achieves that. Also, all new SDcards that I have bought are pre-initialized to fat32 and work fine in IoTaWatt.

For the benefit of those who may feel they are having similar problems, it would be preferable to report the original problem that precipitates the drastic action of reformatting the SDcard. The write activity of IoTaWatt is trivial compared to something like an Rpi, and in my experience the incidence of SDcard damage is extremely low. Most of the cases reported are, like this one, undocumented as to the original issues.

So the message is, please give a shout out with the initial problem before resorting to SDcard reformat or firmware upload or any other drastic measure.

1 Like