Error writing config.dat

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
hans65
Normal user
Posts: 38
Joined: 19 Mar 2018, 17:01

Error writing config.dat

#1 Post by hans65 » 01 Apr 2018, 09:19

Hi
I flashed my Sonoff with the 20180306 firmware and when I configure the device I get this error message:

FS : Error while reading/writing config.dat in 794

Is there anything I could do?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Error writing config.dat

#2 Post by grovkillen » 01 Apr 2018, 09:21

Flash write count has hit Max.

You can reset it by using the command ResetFlashWriteCounter
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

hans65
Normal user
Posts: 38
Joined: 19 Mar 2018, 17:01

Re: Error writing config.dat

#3 Post by hans65 » 01 Apr 2018, 09:31

Thanks for your quick response. I executed this command - made a reboot but still same error

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Error writing config.dat

#4 Post by grovkillen » 01 Apr 2018, 09:38

If you use the command you don't need to reboot, a reboot will reset the count as well.

If that didn't help I can't think of something else to try right now.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

hans65
Normal user
Posts: 38
Joined: 19 Mar 2018, 17:01

Re: Error writing config.dat

#5 Post by hans65 » 01 Apr 2018, 10:44

It is very strange, I found an old config.dat file on my laptop, I've imported this and everything worked fine, the error was gone.
Then I restarted my device and now I don't have any connection to it. I think, there is something wrong with this device.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Error writing config.dat

#6 Post by grovkillen » 01 Apr 2018, 11:21

Sounds like it... :?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#7 Post by Oxyandy » 01 Apr 2018, 11:56

I have no time to go into detail or even pay attention, but I had this & there is nothing wrong with your sonoff,
roll back to an earlier firmware & you will see the error is gone

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Error writing config.dat

#8 Post by grovkillen » 01 Apr 2018, 12:05

Could be a corrupt config file. Rxx releases are not compatible with mega releases when it comes to the config file. A lot has been moved within the file.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#9 Post by Oxyandy » 01 Apr 2018, 13:41

After I had troubles I did a full erase, manually setup everything again & it still happened, it was suspected my device was failing..
I rolled back to older firmware, the issue was gone, upgraded again, the issue returned,
even with the minimal latest firmware !
I attempt to edit something like rules, click Submit, no error message, but now the whole rule is blank...
3 or 4 times in a row
Went back to older firmware again, no more issues..
I am back tracking issues that are current & stepping back on firmware releases, one issue has gone back to Dev 13, it was not there in Dev 6
Takes time, and a full report is coming, including me finding the exact source change that caused the issue & undoing it..
Bit blown away no-one else has reported or seen it / them..
New Bitmap Ie (4).jpg
New Bitmap Ie (4).jpg (70.86 KiB) Viewed 12147 times
Like this hans65

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Error writing config.dat

#10 Post by grovkillen » 01 Apr 2018, 15:00

I've updated 50+ units having no problem with this when I do a clean mega flash. I did get errors like that when upgrading from Rxx to mega. It's considered bad practice to downgrade from mega to Rxx and when I read that the unit start to work as expected when reverted I get the feeling that the device was not completely clean. A reset command might help?
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

hans65
Normal user
Posts: 38
Joined: 19 Mar 2018, 17:01

Re: Error writing config.dat

#11 Post by hans65 » 01 Apr 2018, 15:24

Have had the same problem with build 20180304b so I went back to build 20180221 now it works fine like before.

But before I could install the build 20180221 I've had to install the R148 version because when I tried to flash direct from 20180304b to 20180221 I could not see the device in my wifi enviroment.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#12 Post by Oxyandy » 02 Apr 2018, 01:17

Hi Grovkillen
grovkillen wrote: 01 Apr 2018, 15:00 I've updated 50+ units
is this with the absolute most recent releases ?
Has only every happened to me with the last few releases..
I can not say if it has been resolved (the writing config error) with most recent release as I am still back tracking bugs.
I am not flashing most recent firmwares anymore, until I get this done..

Tracking bugs..... which exist in the most recent releases, but did not exist very early in V2 versions
Several bugs, not just one.. I should soon know exactly when they were introduced
(example between Dev5 & Dev6, 'this change' happened, it resulted in the following undesirable changes such as.....)
I am very close, but the tests need to be repeated over & over to be confirmed, then hardware swapped & confirmed again..
I want the report to be exact, no random mistakes on my behalf..
The stuck GPIO14 bug (not necessarily just GPIO14, could be others ???- but that is what I am testing with at the moment) - you know about this bug...
I know when it did not exist, but still not 100% when it was introduced, still stepping through firmware release until I 'exactly' pin point when.
Results are... Coming, coming.. I have been working on it almost non-stop..

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#13 Post by Oxyandy » 02 Apr 2018, 01:21

hans65 wrote: 01 Apr 2018, 15:24 But before I could install the build 20180221 I've had to install the R148 version
I expect firmware saw this change from pre-V2 to above V2 and the firmware issued a reset command,
wiping out all settings, that is possibly the difference.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#14 Post by Oxyandy » 02 Apr 2018, 01:47

hans65 wrote: 01 Apr 2018, 09:19 I flashed my Sonoff with the 20180306 firmware and when I configure the device I get this error message:
FS : Error while reading/writing config.dat in 794
I know this might be painful for you Hans65, but if you no longer see this bug....
Could you please... Reflash the 20180306 firmware & confirm the 'error writing config' returns ?
Confirming it returns would be so, so helpful..
I would do it myself, but already very busy back tracking some long standing bugs..
Million thanks in advance..

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#15 Post by Oxyandy » 02 Apr 2018, 01:52

It could be done via OTA Firmware updating...
Just a few clicks, to change from firmware you are using now to the one you had the problem with.
this way, after you have possibly confirmed bug has returned, you could very quickly restore the working release without losing any settings.
And again: Just a few clicks, to return to the firmware you are using now that works.
If you haven't done OTA before or had it fail, I could help resolve & teach you how to do it successfully 100% of the time..
Cheers
Andy

hans65
Normal user
Posts: 38
Joined: 19 Mar 2018, 17:01

Re: Error writing config.dat

#16 Post by hans65 » 02 Apr 2018, 08:21

Hi Andy,

Yes I can do dat, but I'm not sure, if I could do it today. I'll let you know about the result, in the past, I was never able to do an update via OTA I always got a failed.

I'll try first OTA and if no success, then by USB

Hans

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#17 Post by Oxyandy » 02 Apr 2018, 08:41

Me too, OTA failed time after time..
Some help here, I made an initial uploader
https://github.com/letscontrolit/ESPEasy/issues/1190
Any questions welcome before you try...
I want it to be quick & painless for you ;)
On the page above you are looking for

Initial_Firmware_Uploader_Sonoff_1M.zip

Initial uploader first, then will work with newer firmwares, older ones need modifying.

hans65
Normal user
Posts: 38
Joined: 19 Mar 2018, 17:01

Re: Error writing config.dat

#18 Post by hans65 » 02 Apr 2018, 08:59

Hey Andy,

This was quick and easy and guess what, everything works fine the read/write error is gone :D

Thanks a lot for your help

Hans

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: Error writing config.dat

#19 Post by Oxyandy » 02 Apr 2018, 09:14

Great your first successful OTA update ?
awesome..
To test the error you do need to try & change something tiny in the config...
Then click Submit, it is at this point you 'may' see the error writing config again..
(Actually changing nothing, but simply click "Submit" should work too)

At the moment it maybe running completely on existing settings ;)
So after OTA, all your settings were intact ?
They should have been..
Which firmware are you running now ?
Cheers & sorry for all the questions..
OTA can be used to downgrade firmware the same way you just upgraded,
just do not forget the 'Initial' first otherwise settings might be lost & you'll need to start over..

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests