ESP8266 Bootloop after some seconds

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
davidtxu74
Posts: 5
Joined: Tue Apr 13, 2021 1:06 pm

ESP8266 Bootloop after some seconds

Post by davidtxu74 » Tue Apr 13, 2021 1:15 pm

Hello All,

After several tryials with a couple of ESP8266 model with the NodeMCU dev board I am not able to work with the micropython "script".

I tried to load the FW into the board with the esptool.py (also with espsetup-master) with all the combinations possibles read in the forums and videos but with no success. After some seconds with the putty opened I can see how it reboots with no chance to run more than a couple of lines.
I also put an external power supply because I have readed many times about with no success.

Yesterday, looking to another sollutions in youtube, I tried to erase the flash with the arduino IDE and running the "blink" example with in C++ and it worked. I am now trying to develop the Code for this application in C++ but it´s slower for me, I programmed a long time ago in C++ and I am used to do it in python so micropython is much better for me.

Any ideas about how could I solve this issue?

Many thanks. Regards,

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: ESP8266 Bootloop after some seconds

Post by scruss » Tue Apr 13, 2021 2:44 pm

can you tell us, please:
  1. what board you have: there are lots of NodeMCU variants, all slightly different.
  2. how much flash is on board. There's a script in the Arduino ESP8266 package which will work that out for you and display it in the terminal.
  3. what esptool.py command line you used, exactly: please copy and paste as text from your terminal
  4. what error messages/output you got
  5. how you are trying to connect to the REPL afterwards: application, port, speed, …
Generally, the instructions at Deploying the firmware will work with the right firmware downloaded from here: Firmware for Generic ESP8266 module . Recent MicroPython builds require more flash storage than they used to, so older (1 M or less) boards might not work.

davidtxu74
Posts: 5
Joined: Tue Apr 13, 2021 1:06 pm

Re: ESP8266 Bootloop after some seconds

Post by davidtxu74 » Tue Apr 13, 2021 3:24 pm

Many thanks for your quick answer.

I hope the following info is the one you are requiring me:
import esp
esp.check_fw()

size: 632048
md5; fccbe03ec7fd06fcfa29ccb626bb3db1
True

FlashROM:
Flash ID: 1640ef (Vendor: ef Device: 4016)
Flash bootloader data:
Byte @2: 02
Byte @3: 40 (Flash size: 4MB Flash freq: 40MHZ)
Firmware checksum:
size: 588944
md5: b2830d305b46654ba5a43108f3750c52
True

import port_diag

Networking:
STA ifconfig: ('0.0.0.0', '0.0.0.0', '0.0.0.0', '208.67.222.222')
AP ifconfig: ('192.168.4.1', '255.255.255.0', '192.168.4.1', '208.67.222.222')
Free WiFi driver buffers of type:
0: 8 (1,2 TX)
1: 0 (4 Mngmt TX(len: 0x41-0x100))
2: 8 (5 Mngmt TX (len: 0-0x40))
3: 4 (7)
4: 7 (8 RX)
lwIP PCBs:
Active PCB states:
Listen PCB states:
TIME-WAIT PCB states:

ANSWER FROM SERIAL COMM:

MicroPython v1.14 on 2021-02-02; ESP module (1M) with ESP8266
Type "help()" for more information.
>>> import math
>>>
ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 30712, room 16
tail 8
chksum 0xd1
load 0x3ffe8000, len 996, room 0
tail 4
chksum 0x6b
load 0x3ffe83f0, len 1064, room 4
tail 4
chksum 0x4a
csum 0x4a
▒▒▒▒o▒r▒▒g|▒
dldl`▒▒s▒l▒l
l`▒▒{▒d▒d▒
$`▒▒s▒l▒▒▒
dl s$▒▒sl▒▒▒c▒▒c▒b
#{▒s▒n▒og▒
l▒▒l

d▒▒dl▒▒▒▒▒▒d▒g▒▒▒▒bl
$▒sp
▒▒▒▒c
l▒#{$sdr▒g▒▒▒▒▒oܟ▒c8
l▒▒l▒▒
MicroPython v1.14 on 2021-02-02; ESP module (1M) with ESP8266
Type "help()" for more information.
>>>


The putty configuration is the following:

BaudRate: 115200
Data bits: 8
Stop bits: 1
Parity: None
FlowControl: None

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

Re: ESP8266 Bootloop after some seconds

Post by Roberthh » Tue Apr 13, 2021 3:35 pm

MicroPython v1.14 on 2021-02-02; ESP module (1M) with ESP8266
You seem to use the 1MB firmware. Did you try the 2MB+ firmware too? https://micropython.org/resources/firmw ... -v1.14.bin, or the daily build https://micropython.org/resources/firmw ... ffda17.bin

davidtxu74
Posts: 5
Joined: Tue Apr 13, 2021 1:06 pm

Re: ESP8266 Bootloop after some seconds

Post by davidtxu74 » Tue Apr 13, 2021 3:47 pm

The information with the version sent by you (I have tested with many versions in the repository):
MicroPython v1.14 on 2021-02-02; ESP module with ESP8266
Type "help()" for more information.
>>> import math
>>> math
ets Jan 8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 30712, room 16
tail 8
chksum 0xd5
load 0x3ffe8000, len 996, room 0
tail 4
chksum 0x2e
load 0x3ffe83f0, len 1064, room 4
tail 4
chksum 0xfd
csum 0xfd
▒▒▒▒o▒;▒▒g|▒
lld$`▒▒s▒l▒l
l`▒▒{▒d▒l
d`▒▒r▒l
▒▒▒
dl sd▒▒sl▒▒▒c▒▒c▒#
c{▒r
▒▒'▒ng▒
l▒▒l

dćdl▒▒▒▒▒▒d▒g▒▒▒▒b$
d▒sp
▒▒▒cl▒#s$sd;▒g▒▒▒▒▒o▒▒▒b8
$DŽl▒▒
MicroPython v1.14 on 2021-02-02; ESP module with ESP8266
Type "help()" for more information.
>>>

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

Re: ESP8266 Bootloop after some seconds

Post by Roberthh » Tue Apr 13, 2021 4:25 pm

Can you try other flash modes, like dout?
Also, can you try a different USB cable, in case that it is a power problem.

davidtxu74
Posts: 5
Joined: Tue Apr 13, 2021 1:06 pm

Re: ESP8266 Bootloop after some seconds

Post by davidtxu74 » Tue Apr 13, 2021 4:50 pm

I have just tried with:
espsetup.py -port COM9 -fm dio 0

The situation with this is even wrost, the led is blinking so fast and I have no time to write anythin in the REPL mode.

I have also changed from usb port, usb cable and also from a PC to a raspberry pi.

Thanks for the help.

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

Re: ESP8266 Bootloop after some seconds

Post by Roberthh » Tue Apr 13, 2021 6:11 pm

OK. so -fm=dout seems to work better. At least MP starts. If you do not touch REPL, does it reboot too?
Another measure some people took was adding a capacitor between the EN pin and GND, and ensuring that EN is properly pulled high by a resistor.

Christian Walther
Posts: 169
Joined: Fri Aug 19, 2016 11:55 am

Re: ESP8266 Bootloop after some seconds

Post by Christian Walther » Tue Apr 13, 2021 6:28 pm

Someone had a similar problem here related to their WiFi environment – worth a try if the usual measures don’t help.

davidtxu74
Posts: 5
Joined: Tue Apr 13, 2021 1:06 pm

Re: ESP8266 Bootloop after some seconds

Post by davidtxu74 » Tue Apr 13, 2021 9:32 pm

Christian Walther wrote:
Tue Apr 13, 2021 6:28 pm
Someone had a similar problem here related to their WiFi environment – worth a try if the usual measures don’t help.
Many thanks! The issue is solved running as soon as REPL lets you paste some orders:


>>> import network
>>> network.WLAN(network.AP_IF).active(False)

As it is in that thread!

Post Reply