5
\$\begingroup\$

I am trying to install MIcroPython Firmware on my ESP8266-12E chip. I am using esptool.py to flash the firmware. I have successfully uploaded the firmware esp8266-20170612-v1.9.1.bin followed by a flash_erase. I have used following commands to flash the chip.

$ sudo esptool.py --port /dev/ttyUSB0 erase_flash
  esptool.py v2.0.1
  Connecting........_
  Detecting chip type... ESP8266
  Chip is ESP8266
  Uploading stub...
  Running stub...
  Stub running...
  Erasing flash (this may take a while)...
  Chip erase completed successfully in 13.0s
  Hard resetting...

$ sudo esptool.py --port /dev/ttyUSB0 write_flash --flash_mode qio --flash_size detect 0x0 esp8266-20170612-v1.9.1.bin --verify
  esptool.py v2.0.1
  Connecting....
  Detecting chip type... ESP8266
  Chip is ESP8266
  Uploading stub...
  Running stub...
  Stub running...
  Configuring flash size...
  Auto-detected Flash size: 4MB
  Flash params set to 0x0040
  Compressed 598432 bytes to 390604...
  Wrote 598432 bytes (390604 compressed) at 0x00000000 in 34.5 seconds (effective 138.8 kbit/s)...
  Hash of data verified.

  Leaving...
  Verifying just-written flash...
  (This option is deprecated, flash contents are now always read back after flashing.)
  Flash params set to 0x0040
  Verifying 0x921a0 (598432) bytes @ 0x00000000 in flash against esp8266-20170612-v1.9.1.bin...
  -- verify OK (digest matched)
  Hard resetting...

As you can see verification of flash process is OK. And I can see a new wifi ssid on my wifi list.

Now when I am trying to access REPL via picocom it is hanging on following:

picocom v1.7

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

Terminal ready

I also tried screen, putty and minicom same behaviour on them as well. Also encountered a strange behaviour that it is working perfectly via ESPlorer.

Is there anything that I am missing? Or any suggestion to hunt this situation?

Thanks

\$\endgroup\$
3
  • \$\begingroup\$ I would try different baud rate - i would check 74880bps "boot log" baud rate or other that might be set by micropython (you would need to dig through micro python docs) \$\endgroup\$ Jul 31, 2017 at 8:27
  • \$\begingroup\$ Did you try to press ctrl-D on picocom? Just to do a microcontroler reset. \$\endgroup\$
    – danihp
    Aug 25, 2017 at 20:13
  • \$\begingroup\$ This worked for me as well. This solution is also documented on the MicroPython getting started guide for ESP8266 at docs.micropython.org/en/latest/esp8266/esp8266/tutorial/…. \$\endgroup\$
    – JTW
    Oct 14, 2017 at 23:34

3 Answers 3

6
\$\begingroup\$

I was having a similar problem with a Wemos D1 mini board. Erasing and Flashing the firmware worked. However I was getting no REPL prompt, resetting was giving me garbage. I solved it by adding "-fm dio" when writing flash.

esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash -fm dio --flash_size=detect 0 esp8266-20170823-v1.9.2.bin

\$\endgroup\$
1
  • 1
    \$\begingroup\$ adding -fm dio worked for me too! Thanks \$\endgroup\$ Sep 3, 2017 at 15:11
0
\$\begingroup\$

I had the same problem, checked my setup (bare ESP8266 module) 100+ times and it definitely was correct. I could flash the ESP, but could not connect afterwards. Problem had something to do with my breadboard/wiring; bad junctions (maybe because of dirt/glue). Did the exact same wiring on another board with cleaned resistors, now it works.

\$\endgroup\$
0
\$\begingroup\$

I had the same problem with ESP8266 ESP-12E, but -fm dio did not help. Surprisingly, flashing in another mode, dout (Dual Output) helped:

esptool.py --port COM11 --baud 460800 write_flash -e --flash_size=detect -fm dout 0 esp8266-20190529-v1.11.bin

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.