Hand recording the ESP8266.

Place your projects here
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Hand recording the ESP8266.

Post by Fernando Perez »

As a farewell to new versions of Annex for the ESP8266, I have prepared a small recording system for these modules with all the versions that I have been able to recover.
Note: Thank goodness I always save everything on my hard drives, like a kleptomaniac magpie, because Google's latest idea is to prevent downloading the old Annex files [Local Link Removed for Guests] claiming they have viruses. See http://www.google.com/url?q=http%3A%2F% ... pA6xhuj6yj

My project does not use the Toolkit or any graphical tools. It is as minimalist as possible.
It is a folder of files, which we can save anywhere, since it does not require installation, and which includes:

* Two tools: esptool.exe and mkspiffs.exe, both extracted from the Cicciocb Toolkit.
* A data folder, which contains a _root subfolder that contains a config.ini file. We must edit this file with our data, being careful not to insert blank spaces or strange characters. I advise using an editor that allows you to see special characters, PsPad for example, or if you simply use Notepad, be careful.
* A versions folder, with all the binaries that I have recovered.
* Three cmd executable files: config.cmd, flashAnnex.cmd and flashConfig.cmd. The only thing you will need to edit is flashAnnex.cmd to change the binary version. Right-click and choose Edit from the context menu.

USE: Save your data in config.ini, write the desired version in flashAnnex.cmd and successively execute the three files config.cmd, flashAnnex.cmd and flashConfig.cmd.

Please let me know if this whole mess works for you.
You do not have the required permissions to view the files attached to this post.
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

Thanks Fernando for the initiative even if I fear that it will be too complicate to use for the typical Annex users. :roll:
BeanieBots
Posts: 361
Joined: Tue Jun 21, 2022 2:17 pm
Location: South coast UK
Has thanked: 197 times
Been thanked: 115 times

Re: Hand recording the ESP8266.

Post by BeanieBots »

Thanks Fernando for your diligence in keeping and nameing all the old binaries and your complete instructions for the cmd files.
An excellent archive which in itself just goes to show how much things have progressed and the work that cicciocb has put into it.
Though, I'll probably still use the latest GUI toolkit for uploading.

As for reliability, I have several ESP8266's which have been running 24/7 for over a year without any reliability issues whatsoever :D
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

Fernando, one of the difficulty is the management of modules with different flash size.
In your case, the scripts are adapted only for modules with 4MB.
I suppose that many people continue to use modules with 1MB (sonoff modules, for example).

(I have myself some with 1MB that work well 24h/24)
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Re: Hand recording the ESP8266.

Post by Fernando Perez »

Francesco, I know that the data in these files is prepared for modules with ESP8266 and 4 MB of memory. But I think they can be adapted for those who only have 1MB of memory.
In fact, a more rational design would be to include all three files config.cmd, flashAnnex.cmd and flashConfig.cmd in one. If I separated them into three it is because for me it is more practical if I want to modify only the version or the configuration of a module.

My proposal:

FILE: flash_1M.cmd

Code: [Local Link Removed for Guests]

mkspiffs -c data -p 256 -b 4096 -s 262144 annex-data.bin
esptool write_flash 0x00000 versions/annex8266V144_3.bin
esptool write_flash 0xbb000 annex-data.bin
FILE: flash_4M.cmd

Code: [Local Link Removed for Guests]

mkspiffs -c data -p 256 -b 8192 -s 3125248 annex-data.bin
esptool write_flash 0x00000 versions/annex8266V144_3.bin
esptool write_flash 0x100000 annex-data.bin
My request:
Tell me if my design and my data are correct and if, in theory, this system can work without subsequent problems.
Someone put it into practice and tell me if it works for you.

My opinion:
The ESP8266 micros have had their place in history. And very important. They still have some role, especially in basic applications and, I repeat, that they are not in continuous use 24 hours a day, because perhaps my bad luck or my stinginess for buying very cheap modules, mine end up failing and becoming unstable.
Modules with 4MB of memory, for example the Wemos D1 Mini, are certainly more usable and easier to load the Annex into.
On the ones of only 1MB, for example, the ESP-01, from a version of Annex that I can't remember, it is impossible to load Annex on them with the typical programming motherboard, since the DTR pin is required. I mentioned it in my message [Local Link Removed for Guests] which makes them even less appealing for our projects.

And as for Annex users not being able to edit two plain text files and modify a few lines, you're going to make a lot of people angry. :lol: :lol:
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Sep 08, 2023 9:41 pm Francesco, I know that the data in these files is prepared for modules with ESP8266 and 4 MB of memory. But I think they can be adapted for those who only have 1MB of memory.
In fact, a more rational design would be to include all three files config.cmd, flashAnnex.cmd and flashConfig.cmd in one. If I separated them into three it is because for me it is more practical if I want to modify only the version or the configuration of a module.

My proposal:

FILE: flash_1M.cmd

Code: [Local Link Removed for Guests]

mkspiffs -c data -p 256 -b 4096 -s 262144 annex-data.bin
esptool write_flash 0x00000 versions/annex8266V144_3.bin
esptool write_flash 0xbb000 annex-data.bin
FILE: flash_4M.cmd

Code: [Local Link Removed for Guests]

mkspiffs -c data -p 256 -b 8192 -s 3125248 annex-data.bin
esptool write_flash 0x00000 versions/annex8266V144_3.bin
esptool write_flash 0x100000 annex-data.bin
My request:
Tell me if my design and my data are correct and if, in theory, this system can work without subsequent problems.
Someone put it into practice and tell me if it works for you.

My opinion:
The ESP8266 micros have had their place in history. And very important. They still have some role, especially in basic applications and, I repeat, that they are not in continuous use 24 hours a day, because perhaps my bad luck or my stinginess for buying very cheap modules, mine end up failing and becoming unstable.
Modules with 4MB of memory, for example the Wemos D1 Mini, are certainly more usable and easier to load the Annex into.
On the ones of only 1MB, for example, the ESP-01, from a version of Annex that I can't remember, it is impossible to load Annex on them with the typical programming motherboard, since the DTR pin is required. I mentioned it in my message [Local Link Removed for Guests] which makes them even less appealing for our projects.

And as for Annex users not being able to edit two plain text files and modify a few lines, you're going to make a lot of people angry. :lol: :lol:
Hi Fernando,
I developed the toolkit exactly for this reason, is too complicate to use batch files and people give up rapidly when things become complicate.
As the toolkit exists, people can continue to use it; in your case, I suggest to propose only the script to flash the device and don't care about the creation of data because this can be done through the web interface as soon as the module is flashed.
Ideally you should publish a script for 2M, 8M and 16M too :D

Anyway, the rules are the following :
for all the page is 256
for modules with 1M, the block is 4096 and 8192 for all the other size
the size of the "disk" is the size of the flash - 0x5000 but for flash > 1M you must substract also 0x100000
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Re: Hand recording the ESP8266.

Post by Fernando Perez »

Elementary my dear Watson:
1 MegaByte = 8 MegaBits = 1,048,576 Bytes (0x100000)
4 MegaBytes = 32 MegaBits = 4,194,304 Bytes (0x400000)
8 MegaBytes = 64 MegaBits = 8,388,608 Bytes (0x800000)
16 MegaBytes = 128 MegaBits = 16,777,216 Bytes (0x1000000)
Then:
flash_16M.cmd file

Code: [Local Link Removed for Guests]

mkspiffs -c data -p 256 -b 8192 -s 15708160 annex-data.bin
esptool write_flash 0x00000 versions/annex8266V144_3.bin
esptool write_flash 0x100000 annex-data.bin
Where I have subtracted 0x105000 (1,069,056) from the flash:
16,777,216 - 1,069,056 = 15,708,160

But there is one thing that doesn't fit me for the 1 MB modules.
I rest 0xc0000:
1,048,576 - 786,432 = 262,144
And it works for me. If I apply your subtraction of 0x5000, it doesn't work for me.
Can you review your documentation and confirm the information for me?
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Sat Sep 09, 2023 4:37 pm Elementary my dear Watson:
1 MegaByte = 8 MegaBits = 1,048,576 Bytes (0x100000)
4 MegaBytes = 32 MegaBits = 4,194,304 Bytes (0x400000)
8 MegaBytes = 64 MegaBits = 8,388,608 Bytes (0x800000)
16 MegaBytes = 128 MegaBits = 16,777,216 Bytes (0x1000000)
Then:
flash_16M.cmd file

Code: [Local Link Removed for Guests]

mkspiffs -c data -p 256 -b 8192 -s 15708160 annex-data.bin
esptool write_flash 0x00000 versions/annex8266V144_3.bin
esptool write_flash 0x100000 annex-data.bin
Where I have subtracted 0x105000 (1,069,056) from the flash:
16,777,216 - 1,069,056 = 15,708,160

But there is one thing that doesn't fit me for the 1 MB modules.
I rest 0xc0000:
1,048,576 - 786,432 = 262,144
And it works for me. If I apply your subtraction of 0x5000, it doesn't work for me.
Can you review your documentation and confirm the information for me?
For the chip with 1M, as all must fit inside 1M, the disk starts at 0xBB000 and stops at 0xFB000 (0x40000 ->262144)
User avatar
cicciocb
Site Admin
Posts: 2195
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

Do not forget to take into account the memory mode as some modules work only in DIO :D
User avatar
Fernando Perez
Posts: 378
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 195 times
Been thanked: 267 times

Re: Hand recording the ESP8266.

Post by Fernando Perez »

I know that too, boss.
I add the ---flash_mode option after the write_flash command.
But so far, with the modules I have tried (clones of the Wemos D1 Mini, several with 4 MB and one with 16 MB, a couple of ESP-12F with 4 MB, and several ESP-01S of only 1 MB), I have not had problems with recording without using this option.

Code: [Local Link Removed for Guests]

esptool write_flash --flash_mode dio 0x00000 versions/annex8266V144_3.bin
Post Reply