ESP8266 REPL not responding and keeps restarting

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
smela
Posts: 2
Joined: Thu Feb 28, 2019 4:17 pm

ESP8266 REPL not responding and keeps restarting

Post by smela » Thu Feb 28, 2019 4:25 pm

So I've got some ESP8266 board that I would like to install MicroPython on.
However, after many tries - I'm always failing.
I've followed the tutorial on main MicroPython site: erased flash, and flashed esp8266-20190125-v1.10 using esptool.py
That process went through without any problems, but when I try to access REPL using screen or picocom I'm getting:

wdt reset
load 0x40100000, len 31020, room 16
tail 12
chksum 0xd2
ho 0 tail 12 room 4
load 0x3ffe8000, len 1100, room 12
tail 0
chksum 0x9a
load 0x3ffe8450, len 824, room 8
tail 0
chksum 0xbd
csum 0xbd
����n�{��o|�l$ld`c��<s�d�'��n�$`��s�l�$�l ��{�d�l�d`��r�$���dl`sd��sl���b��b|$c��c|����ldc��o�'��lg���l�ld���l`�n�����cd$섇c���cd�c{l{$s�'�����g����c�c����{�OSError: [Errno 2] ENOENT

MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>





I can't type anything into REPL and it keeps restarting after about 5 - 10 seconds.
https://images-na.ssl-images-amazon.com ... L1500_.jpg - here is an image of my board

Does anyone have some idea how to solve this?

joelhoro
Posts: 5
Joined: Wed Feb 27, 2019 2:37 pm

Re: ESP8266 REPL not responding and keeps restarting

Post by joelhoro » Thu Feb 28, 2019 6:31 pm

This is going to be the blind leading the blind, given that I only got into the ESP last week, and Micropython 2 days ago. I've had issues myself, as mentionned in viewtopic.php?f=16&t=6015&sid=7c32b091f ... 4c79db714d

I finally found one way to get hold of my ESP, using uPyCraft. I could see the shell, but it would not respond, and when I connected it using uPyCraft, it was working fine. There must be something off with the terminal emulation which makes putty not able to converse with the REPL, and somehow uPyCraft's fine. It also lets you edit files and upload them, which could give you hope of fixing the issue you have. If you manage to get hold of boot.py while the ESP is up, you may be able to then edit it at your convenience, then upload it (by commenting out whatever it is that is creating these reboots) and hope it breaks the cycle.

https://randomnerdtutorials.com/flash-u ... 2-esp8266/

kevinkk525
Posts: 505
Joined: Sat Feb 03, 2018 7:02 pm

Re: ESP8266 REPL not responding and keeps restarting

Post by kevinkk525 » Thu Feb 28, 2019 7:13 pm

Right, I now remember something.

If you use Putty, you have to disable flow control (change to "None") under Connection/serial or it might reboot your esp over and over again.

Also I found it useful to put some delay in my starting script as this also increased the reboot risk thing.. Using "time.sleep_ms(100)" helped in that regard.
Kevin Köck

cyberlab
Posts: 56
Joined: Sat Apr 21, 2018 5:02 am

Re: ESP8266 REPL not responding and keeps restarting

Post by cyberlab » Thu Feb 28, 2019 10:08 pm

Hi, it could be that micropython was not installed properly, I installed it in several dozens of modules in this way and they all worked the first time.
esptool.py --port COM6 erase_flash
To completely erase the flash.

esptool.py --port COM6 --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266.bin
(It was wrong, I changed it)
To load micropython, of course you have to change the COM number and the name of your file.bin

I, use the upyloader to configure it, load applications, run them, edit them, etc.
upyloader, runs on 64bit windows, very easy to use.
Last edited by cyberlab on Fri Mar 01, 2019 6:45 pm, edited 1 time in total.

User avatar
Roberthh
Posts: 1701
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP8266 REPL not responding and keeps restarting

Post by Roberthh » Fri Mar 01, 2019 6:30 am

@smela I have a pair of old ESP-0x, which worked fine with v1.9.4, but refuse to work with newer builds. On of them has 1 MByte flash (like the modules you have), at the other I replaced the flash chip with a 16 MB one (it had 512 initially). The symptom is like you describe. The interesting aspect is, that after a flash erase the file system is created with 0 blocks free. I do no know what killed it, and it is certainly of no commercial value to find the reason, especially since boards like the adafruit feather and wemos D1 works well.

smela
Posts: 2
Joined: Thu Feb 28, 2019 4:17 pm

Re: ESP8266 REPL not responding and keeps restarting

Post by smela » Fri Mar 01, 2019 3:23 pm

I've tested proposed solutions that all You, kind members provided but to no avail... I've got about 10 of this boards, tested three of them and none was able to properly load micropython. I guess I have to buy something different....

cyberlab
Posts: 56
Joined: Sat Apr 21, 2018 5:02 am

Re: ESP8266 REPL not responding and keeps restarting

Post by cyberlab » Fri Mar 01, 2019 6:42 pm

smela, sorry, copy and paste the instructions of how I record micropython without any problem in nodemcu, and for some reason it was copied wrong in my previous post the correct thing is:
esptool.py --port COM6 --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266.bin
replace com number and esp8266.bin according to your needs
and I believe that your modules contain the esp-12E which have 4 megabytes
Last edited by cyberlab on Fri Mar 01, 2019 6:55 pm, edited 1 time in total.

kevinkk525
Posts: 505
Joined: Sat Feb 03, 2018 7:02 pm

Re: ESP8266 REPL not responding and keeps restarting

Post by kevinkk525 » Fri Mar 01, 2019 6:54 pm

I use this for flashing:

Code: Select all

make PORT=/dev/ttyS3 FLASH_MODE=qio FLASH_SIZE=32m BAUDRATE=115200 deploy
Kevin Köck

User avatar
Roberthh
Posts: 1701
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP8266 REPL not responding and keeps restarting

Post by Roberthh » Fri Mar 01, 2019 7:57 pm

I found the reason for my problem between the keyboard and the chair. The esp's were running at a too low voltage.

I have a small adapter PCB to interface with a USB/UART adapter and the ESP-0x devices. That small PCB has a regulator and requires 5V. The USB/UART bridge was set to 3.3V. For normal opeartion that was fine, but not for flashing. Not seeing that for a while is OK, but exactly that happened before. DANG!

P.S.: That should not be the problem for the Node-MCUs, unless there is a weak cable or a weak USB port.

Post Reply