Can't Flash ESP8266

Posted on
  • I have Espruino Pico with the v2. shim and ESP8266 soldered. When plugged into my USB the ESP8266 LED lights red. And when I check the installed firmware using your software it shows "AT+GMR\r\r\n00160901\r\n\r\nOK\r\n".

    I set the ESP8266 into bootloader mode using your software and the blue LED flashes briefly once.

    I set up the Python 2.7.12 environment and installed esptool.py, then edit it according to the Block Size edits you suggest. But I run esptool.py with the correct arguments I get "A fatal error occurred: Failed to connect to ESP8266."

    I've tried different baud rates (9600, 74880, 115200) to no avail. And I know the COM3 port is correct since the same port is used by the Web IDE.

    Incidentally, I tried connecting to my home AP using the ESP8266WiFi Module but I continually get "Uncaught No 'ready' after AT+RST." It never says "Connecting to WiFi"

    Any ideas?

    -Neil

  • Hi .Neil,

    On my ESP8266 board (ESP-12F), the blue LED does 2 or 3 very quick flashes then a very short pause then one more quick flash. Then it's in bootloader mode. Also I found I needed to powercycle it first, erase it with...

    python "...esptool.py" --port COM3 --baud 115200 erase_flash
    

    then powercycle again before flashing and powercycle again before using it.

    I know you're using a different board but hope that helps.

  • Thanks for your response. Your post was actually quite helpful. I discovered powercycling is a must when working with the ESP8266. After each failed flash the Espruino MUST be removed and reinserted or it won't properly connect and the Web IDE will ignore everything I type in the left edit screen. My ESP-01 however only produces one blue flash when put in bootloader mode. And I did erase using esptool.py but it didn't seem to be required to flash. What WAS required was dozens of attempts to finally get to 100% complete. Other forums suggested this very thing.

    Beyond that I noticed the Espruino is very finicky about its USB slot, and after trying multiple computers only one slot in one PC recognized it. But what seemed to finally work was applying some physical pressure while flashing. Could be coincidence but after nearly 30 tries the flash worked flawlessly when I applied some finger pressure, pushing it down and into the USB slot.

    Has anyone else noticed these eccentricities?

  • I also had trouble flashing the ESP8266 from firmware "0018000902-AI03" to "0.25.0.0". I was using esptool on a mac, and it would look like it was working and get to "Uploading stub...", then it would fail with error "A fatal error occurred: Timed out waiting for packet header".

    I tried many things, and finally got it to work by decreasing the baud rate from 9600 down to 57600.

    For others experiencing this problem, the steps below worked for me:

    1) Pin connections:
    [ESP8266 ---> USB-TTL adaptor]
    GND --> GND
    UTXD --> RXD
    GPIO2 --> [none]
    CH_PD --> 3.3V
    GPIO0 --> GND
    VCC --> 3.3V
    URXD --> TXD

    2) Downloaded firmware ESP8266_AT25-SDK112-512k.bin into my Documents folder

    3) Downloaded and installed esptool.py using terminal:

    cd ~/Documents
    git clone https://github.com/themadinventor/esptoo­l.git
    cd esptool
    sudo python setup.py install

    4) In the terminal found my tty port using

    ls /dev/tty.*

    For me, I found it was /dev/tty.usbserial-AI06B7Y6

    5) I then ran the esptool from the terminal:

    python esptool/esptool.py -b 57600 -p /dev/tty.usbserial-AI06B7Y6 write_flash 0 ESP8266_AT25-SDK112-512k.bin

    It spit out a bunch of stuff and finally finished with:
    Hash of data verified.
    Leaving...
    Hard resetting via RTS pin...

    6) To verify, I followed the firmware test in Espruino IDE as described here, and it verified 0.25.0.0.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Can't Flash ESP8266

Posted by Avatar for .Neil @.Neil

Actions