-->
Page 1 of 1

BASIC FILE GOT DESTROYED

PostPosted: Wed Aug 10, 2016 5:17 pm
by raintime
I just flashed Rev 3 Alpha 33.

When I pressed RESET on my nodemcu I noticed that it no longer wrote the familiar ESP BASIC header with version and MAC address, just two <HR>s followed by the word “Done…”

Anyway, I tried the Load command and it said “Load Failed” on the serial terminal. But worse, to make a long story short, when, after the device spontaneously reset and produced a dump on the serial terminal, I then went to edit my program, called AAA.bas, but only the last 8 lines of that file remained intact.

The rest of the file has vanished, & has not come back after trying different strategies, like unplugging and plugging in the nodemcu. (I didn’t have a copy of that program…. I should know better!)

I’m pretty sure there is a bug in the initial way things come up after a new flash. And the Load command appears to have a glitch in it too. I’ll try the Load command again with a simple test program when I get my courage back.

It might be great, after flashing a chip, to do a checksum or crc check, and then say, "Flash Successful!" - I know it shows that 100% has been flashed, but it isn't perfectly clear (to me) that this 100% flash has been successful or not.

For some reason, now, the ESP BASIC header and MAC address now shows in its familiar form after RESET nodemcu and going to 192.168.4.1. Trials and tribulations of development.. One day we will laugh about this.

Re: BASIC FILE GOT DESTROYED

PostPosted: Wed Aug 10, 2016 6:54 pm
by Mmiscool
The mac address only shows up on serial terminal after boot. Not in browser.

As to the losing of data. I do not understand how this could be possible. There has been no changes in any of the file system libraries as of late. The underlying technology for the spiffs has not changed at all. The mechanics of reading and writing files has not changed.

Any time a "file read error" is encountered this simply means that a file dose not exist and that the value returned for that data element is a blank string.
Can you post the serial output of the modules boot up ?

Re: BASIC FILE GOT DESTROYED

PostPosted: Thu Aug 11, 2016 7:04 pm
by raintime
1. MAC Address shows both on serial terminal and on my Chrome browser:

Whenever I reset the nodemcu, then wait, then open a new Chrome tab and go to 192.168.4.1, my browser always shows the opening screen with MAC address:

[VARS] [EDIT] [RUN] [DEBUG] [SETTINGS ][FILE MANAGER]
__________________________________________________
__________________________________________________
ESP Basic 3.0 Alpha 33
__________________________________________________
Device MAC: 5E:CF:7F:86:94:91


2. Loss of data. This has not been the only time I have lost portions or entire files. It is pretty rare, but it has happened to me about 4 times in the last few months. Part of the problem might be that I tend to sometimes do things pretty quickly with the mouse, so timing may be involved.

3. Below is a printout of the serial terminal's output on bootup:

0‚~?–4û!ƒ“’…[14]OCAZþû
Server listening Port: 80
ESP Basic 3.0.Alpha 33
Device MAC: 5E:CF:7F:86:94:91
1
2
3
4
5
6
7
8
9
10
11
12

Failed Wifi Connect
Creating WIFI access point
ESP5E:CF:7F:86:94:91
APname
APpass


This loss of data is tricky to duplicate, I'm not sure what I did that caused it. There's no question that it did happen, this time right after reflashing, which is always an iffy time for me. It is usually harder for me to get the system up and running happily right after reflashing. It usually takes some "tinkering".

If I can duplicate file data loss reliably, I'll certainly let you know.