ESP8266 - How does it understand what "AT+RST" means without the firmware
I am new to ESP8266 and to the electronics world. I request you to please be patient if I am mis-understanding a point.
I am using ESP8266-01. I successfully re-flashed the at official ai-thinker firmware version 1.1.1 to my module and I noticed that it was being written at memory location 0x00000. Later I successfully uploaded a basic blink program using Arduino ide. Again the program was written to the memory location 0x00000(over-writing the firmware I guess).
I want to use it as a web server. The code for that uses the AT commands, something like "Serial.println("AT+RST");"
Now from what I understand the firmware would be over-written. Then how would the module understand what "AT+RST" means?
"Arduino" is more than just the IDE you see and the boards (e.g. Uno). Arduino is also a kind of firmware/OS that runs on those boards. A sketch you write in the IDE is compiled together with the firmware into a single package that's written to memory.
There are a few more hints at https://github.com/esp8266/Arduino:
This project brings support for ESP8266 chip to the Arduino environment. It lets you write sketches using familiar Arduino functions and libraries, and run them directly on ESP8266, no external microcontroller required.
ESP8266 Arduino core comes with libraries to communicate over WiFi using TCP and UDP, set up HTTP, mDNS, SSDP, and DNS servers, do OTA updates, use a file system in flash memory, work with SD cards, servos, SPI and I2C peripherals.
When you hit that 'Upload' button in the IDE you're effectively replacing anything that's been written to the ESP8266 before.
This question is wrong on many levels.
- It was based on the assumption that "Serial.println("AT+RST")" was a command to the esp while in reality the programmer meant it as a logging message to the serial monitor.
- I had asked "How does it understand what “AT+RST” means without the firmware". The answer is that it doesn't and it can't unless I write some code in my sketch to handle it. The firmware is a kind of interpretter. It accepts a command in a particular format (e.g. "AT \n"), parses it, executes some corresponding low level function and returns the result. After I have uploaded a sketch and over-written the AT firmware, the interpretter code is gone and hence the esp cannot interpret/understand the AT command.
- "How "web server" and AT commands are related is unknown to me" - You are right, they are not related. My bad.
- "Anyway AT commands is understood directly by ESP8266 chip" I doubt it.
Thanks for your answers.
This question is not adding any knowledge to anything. I think it should be deleted.