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

Re: Hand recording the ESP8266.

Post by Fernando Perez »

You say: "and people give up rapidly when things become complicated."
It's something that worries me. And a lot. I see young people who, if they can't immediately get what they want, lose interest in it.
But if I limit myself to copying, I will never get anything better than the original, only equal or worse.
If I don't understand how things work, I can only copy them, never create new things.
The 2006 film Idiocracy is a not very good comedy, but it is also depressing.

But let's get on with it. And may the veterans forgive me, because everything that follows is aimed at those who are just starting out:
We open the File Explorer. Let's go to the folder where we have the esptool.exe file, either the Annex Toolkit folder or the one that includes my Zip (It's the same version).
We click with the left mouse button on the small icon (yellow folder) in the explorer's address bar. The entire current route will light up blue.
Above that path, we write cmd and press Enter. A black CMD command window opens.
Now we connect our ESP8266 (or ESP32) module to the computer through a USB cable, if the board already has an adapter included, or through a USB/Serial adapter and cable if it does not.
We can now communicate with our module, writing the various esptool instructions and options in the CMD window.

Examples:
esptool [Enter]
It returns an impressive list of commands and options, many of which are already unnecessary because over the years, esptool has been automating its work and is able to identify on its own if there is an ESP connected to any port. We save the –chip, the –port, the –baud, etc.

esptool chip_id [Enter]
It tells us if we have managed to connect with our ESP, what port, and what characteristics it has.

esptool flash_id [Enter]
The same, but it also informs us of the amount of memory found.

Back up a 4 MB module:
esptool read_flash 0x00000 0x400000 backup.img

Retrieve the image in that module or in a different one:
esptool write_flash 0x00000 backup.img

Can you think of more things that could be done?
A warning: Do not play to execute commands like crazy, without first knowing what they do. Nothing usually happens, but what if it does?
User avatar
cicciocb
Site Admin
Posts: 2060
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1358 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

It's a very good initiative ,Fernando, basically you aim to replace the toolkit with batch files.
I hope that this will be useful by someone but, honestly, I fear that people will continue to use the toolkit :D

However, there are other tools around useful to flash the esp8266
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 am attaching two files, Annex8266.zip and Annex8266_Source.zip.
They contain my work on how to record Annex in ESP8266 modules without resorting to the "ToolKit" or the "Annex Web Installer" from Cicciocb.
The ToolKit works very well, but it is excessively large for what I need, recording only ESP8266. It contains a multitude of options and tabs that I never use and when trying to cover all the Espressif models and the Linux and Windows operating systems, it is difficult for me to understand. And it won't let me record ESP-01 using the popular adapter
image.png
The Web Installer works perfectly, but Francesco has forgotten (I suppose intentionally) the 1MB modules in the drop-down list. And I know it's ridiculous, but I don't like uploading my router's Wi-Fi data, including password, to any site on the Internet.
Therefore, and given the opinion, I suppose well founded, that users do not like CMD files, I have looked for a Basic compiler that I used 25 years ago, to create an executable with its little windows, its buttons and its colors.
Although they don't know what they're missing. Did you know that by running "esptool erase_flash" we erase everything that our module's flash memory contains, writing FF characters over it? Very useful on occasion. 8-)
You do not have the required permissions to view the files attached to this post.
Last edited by Fernando Perez on Thu Sep 21, 2023 10:39 pm, edited 1 time in total.
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 »

Good. Unzip the files on your hard drive. Connect your ESP8266 to the computer. Enter the Annex8266 folder and run ESP8266.exe. Press the [Test] button to see if your module is recognized. Fill in your details in the corresponding boxes and press [Save Config]. A "config.ini" file will be created in the /data/_root folder of your directory.
If you want to find out if your module already had configuration data saved by other programs, press the [Read Config] button, although this option sometimes fails and I am working on fixing it.
All you have to do is choose the Annex version you want to save from the drop-down menu and press the remaining buttons, [Flash Config] and [Flash Annex]. I don't know if the order is indifferent. I am working on a version that allows recording only the configuration without affecting the rest of the data contained in the ESP8266, for example, programs. In the current version, everything is deleted.
Finally, and if everything has worked well, press the [Open Annex] button and the Annex website will open in your default browser. Logically, you must press the red cross to exit the program. Although of course, if you don't know how to use CMD files, it's better to explain everything. :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 »

The second folder, Annex8266_Source, contains the minimum essential files to run the Basic RAPIDQ programming language compiler https://en.wikipedia.org/wiki/RapidQ
I still can not believe it. A language so robust that it was created to work on Windows 98 and still works on Widows 10 and, I suppose, Windows 11.
I have included the source code of my program, ESP8266.bas, so you can view, modify and compile it. Although I use a specific editor, PSPad, which includes a syntax highlighter for Rapidq and options to compile and run without leaving the editor, I have prepared a small .bat file for this purpose. Simply select the .bas file with the left mouse button and drag and drop it ON the "compila.bat" file to start compiling and executing the resulting .exe.
They can use their favorite editor, even Notepad. Try, for example, changing the window background color from "color = &HC0DCF3" (line 35) to another color.
And I am attaching to this message an example .bas to include in your folder and compile it.
You do not have the required permissions to view the files attached to this post.
User avatar
Electroguard
Posts: 860
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 276 times
Been thanked: 323 times

Re: Hand recording the ESP8266.

Post by Electroguard »

Hmm, are you the same person who was wishing for a 32Mb ESP32-S3 a short while ago ?
Have you found a way of connecting 32 ESP-01's in parallel ?

I was never a fan of esp-01's cos of all the faff and the extra clobber needed to make them do anything, but the Itead Sonoff's took the 1Mb esp to another level, so ability to flash 1Mb 8266 is useful.
Was a chance missed that nobody brought out an affordable esp32 equivalent plug-in mains switch, or even just a 4Mb esp-12 version.

BTW, Rapid-Q runs on linux WINE - so thanks, I will have a look at it later.
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 »

In minimalism is the aesthetic, in the power is the useful.
When I was resurrecting my RapidQ, I thought of you, Robin, and tried on a laptop where I have Ubuntu 20.4 to get the linux version "rqbeta.tgz" working.
Useless, I give up. After hours of installing packages that it asked me for, one after another, the references to libraries not found finally disappeared, but when running any compiled program it gives the error "floating point exception ('core' generated)".
I tried to run it from Wine but it returns a nice window in which it says it has found a serious problem and apologizes for the inconvenience.
If you get it, please tell me I'm interested. But I'm afraid the rest of the forum doesn't, so do you mind doing it via private message? Thank you.
User avatar
cicciocb
Site Admin
Posts: 2060
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 439 times
Been thanked: 1358 times
Contact:

Re: Hand recording the ESP8266.

Post by cicciocb »

Hi Fernando,
I updated yesterday the online flasher to support the ESP8266, so that now it supports the whole suite of ESP chips.
I understand your fear regarding personal data (which, for information, are not transferred to the site) so, in this case, you can avoid entering them and just flash the module.
barneyb
Posts: 15
Joined: Sat Jun 12, 2021 7:00 am
Has thanked: 8 times
Been thanked: 2 times

Re: Hand recording the ESP8266.

Post by barneyb »

[Local Link Removed for Guests] wrote: [Local Link Removed for Guests]Fri Sep 22, 2023 1:38 pm In minimalism is the aesthetic, in the power is the useful.
When I was resurrecting my RapidQ, I thought of you, Robin, and tried on a laptop where I have Ubuntu 20.4 to get the linux version "rqbeta.tgz" working.
Useless, I give up. After hours of installing packages that it asked me for, one after another, the references to libraries not found finally disappeared, but when running any compiled program it gives the error "floating point exception ('core' generated)".
I tried to run it from Wine but it returns a nice window in which it says it has found a serious problem and apologizes for the inconvenience.
If you get it, please tell me I'm interested. But I'm afraid the rest of the forum doesn't, so do you mind doing it via private message? Thank you.
i also think minimalism is key, i have my own basic that does not consume ram by loading bloat that i am never going to need, i have never in all the projects i have made approached anywhere near 50% ram use, i can run projects on a 8266 with a rtc and power brick charged by solar for the same cost of a 32 with lipo, again minimalism is key, prudent use of functions and def ref pointers with only libraries needed and i have more than enough ram free for projects that have run for years. I suppose todays ethos is more is better and if it has it i must use it, then throw it away when it fails. Then again i was from an era where ram was at a premium and groups such as mindows emerged to do the same thing, a min95 was a joy to use, rock solid, with serial ports to bit bang into to microcs.
BeanieBots
Posts: 345
Joined: Tue Jun 21, 2022 2:17 pm
Location: South coast UK
Has thanked: 183 times
Been thanked: 112 times

Re: Hand recording the ESP8266.

Post by BeanieBots »

Absolutely barneyb!
Post Reply