How to flash the original Espressiv AT firmware on ESP8266. Besides restoring the factory state of the ESP8266 module, the AT firmware is used in conjunction with an external microcontroller to communicate over WiFi with simple serial line commands.
Download the necessary tools:
Now connect the module and the serial adapter, see here for a connection diagram, and find the serial adapter by looking into the /dev folder of your machine for a USB or Serial tty device. Mine looks like this: /dev/tty.SLAB_USBtoUART as reported by the CP2102 adapter.
See if the connection to the module works by doing
python esptool.py --port [your_serial_port] --baud 115200 read_mac
And then, if the previous command was successful, flash the AT firmware on ESP8266 with the following command:
python esptool.py --port [your_serial_port] --baud 115200 write_flash [address] [image_file]
The command has to be repeated four times to flash the various chip flash segments with the image parts. For version 0.20 the addresses and images are the following:
boot_v1.1.bin---------------->0x00000 user1.bin-------------------->0x01000 esp_init_data_default.bin---->0x7C000 blank.bin-------------------->0x7E000
IMPORTANT: Always refer to the readme file of the official repository AT firmware for the addresses to be used.
At this point you should have got the AT firmware on ESP8266.
Connect then with a serial program (I use the Arduino IDE serial terminal) to the same serial port used for flashing, at 115200 baud, and issue the AT command: you should see the OK response from the module,
The commands AT+CWMODE=1 and AT+CWLAP should eventually allow you to list all the SSIDs of the WiFi networks in reach around you.