8266EX Module with MicroPython in continous loop & REPL non responsive

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
OptimusGREEN
Posts: 5
Joined: Mon May 04, 2020 4:53 pm

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by OptimusGREEN » Wed May 06, 2020 2:26 pm

Hi,

http://micropython.org/resources/firmwa ... -v1.12.bin

The latest stable one is the one I tried. I actually tried a couple of others too but was the same problem.

I then reflashed tasmota and an Arduino sketch to confirm MC was fine which it is.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by pythoncoder » Thu May 07, 2020 4:58 am

I think that's the wrong build. You need https://micropython.org/resources/firmw ... d419ba.bin or https://micropython.org/resources/firmw ... ef200b.bin. The first is release build 1.12 and the second is today's daily build.
Peter Hinch
Index to my micropython libraries.

OptimusGREEN
Posts: 5
Joined: Mon May 04, 2020 4:53 pm

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by OptimusGREEN » Thu May 07, 2020 6:18 am

Hi,

Unfortunately same outcome with both those builds. here is the output...

Code: Select all

chksum 0x0c
load 0x3ffe8000, len 1004, room 0 
tail 12
chksum 0xea
ho 0 tail 12 room 4
load 0x3ffe83f0, len 1064, room 12 
tail 12
chksum 0x81
csum 0x81
���o�;��'<�d
            $l$ ��s�d�$
                       l`��{�l�l

                                $ ��s�d
                                       ���
                                          $d`{l��rl���c��c�cc{�s
                                                                �g�n�$��
                                                                        $�d��l$��Ą���d�n�����#ld�{p
                                                                                                   ����#l�c{l;l;�'���
                                                                                                                     ��g����#;����dl�Performing initial setup

MicroPython v1.12-434-ge2def200b on 2020-05-07; ESP module (1M) with ESP8266
Type "help()" for more information.
>>> 


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

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by Roberthh » Thu May 07, 2020 7:28 am

At the end you get the REPL. Can you use that?
Ignore the rubbish before the MicroPython start message. That's typical for ESP8266, sending the bootlog at 74880 baud.

OptimusGREEN
Posts: 5
Joined: Mon May 04, 2020 4:53 pm

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by OptimusGREEN » Thu May 07, 2020 7:54 am

No, it's available for a split second then loops again.

Trkcat
Posts: 1
Joined: Thu May 21, 2020 9:06 pm

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by Trkcat » Thu May 21, 2020 9:21 pm

I've got the same issue as well, on three different nodeMCU boards (all ESP-12E (ESP8266MOD), 4M flash, CP2102, Amica brand). I've tried flashing them to both v1.9.1 and v1.12, on two different computers (one linux, one Win10). Tried with all the different flash modes.

Same issue every time, REPL will accept maybe a character or two, freeze, and then restart due to the watchdog timer. I've tried using puTTY, Coolterm, pyserial miniterm, and upycraft to connect, all show the same behavior, so I believe it to be on the board side. Loops through the restart cycle roughly every 9 seconds. I also tried one poster's suggestion of reading the flash and then writing back (both with wiping the erasing the board flash in between and not) without success.

I offer no solutions at this point, but wanted to let you know there is another person out there with the same issues.

One final note, as one poster said, I reflashed one of them to the nodeMCU binary, and successfully uploaded and got the Arduino blink program to work.

Sergyobmx
Posts: 1
Joined: Tue Jun 16, 2020 4:46 am

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by Sergyobmx » Tue Jun 16, 2020 4:52 am

Hi there.
I have the nodeMCU board V1. Using v1.12 saw that AP is enabled.

I was trying to implement the microweb server but the problem with the watchdog start trying to enable the network as client.

I just disable the actual status of the network and stop to reset. Hope to help.

sta_if.active(False)

Code: Select all

def do_connect(SSID, PASSWORD):
    import network                            # importa el módulo network
    global sta_if
    sta_if = network.WLAN(network.STA_IF)     # instancia el objeto -sta_if- para controlar la interfaz STA
    sta_if.active(False)                       # !Desactiva el ap por defecto en micropython 
    
    if not sta_if.isconnected():              # si no existe conexión...
        sta_if.active(True)                       # activa el interfaz STA del ESP32
...
...

tentacles1349
Posts: 6
Joined: Fri Sep 18, 2020 2:03 am

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by tentacles1349 » Fri Sep 18, 2020 4:16 am

Trkcat wrote:
Thu May 21, 2020 9:21 pm
I've got the same issue as well, on three different nodeMCU boards (all ESP-12E (ESP8266MOD), 4M flash, CP2102, Amica brand). I've tried flashing them to both v1.9.1 and v1.12, on two different computers (one linux, one Win10). Tried with all the different flash modes.

Same issue every time, REPL will accept maybe a character or two, freeze, and then restart due to the watchdog timer. I've tried using puTTY, Coolterm, pyserial miniterm, and upycraft to connect, all show the same behavior, so I believe it to be on the board side. Loops through the restart cycle roughly every 9 seconds. I also tried one poster's suggestion of reading the flash and then writing back (both with wiping the erasing the board flash in between and not) without success.

I offer no solutions at this point, but wanted to let you know there is another person out there with the same issues.

One final note, as one poster said, I reflashed one of them to the nodeMCU binary, and successfully uploaded and got the Arduino blink program to work.
Funny this is exactly my setup and what I tried! Glad I've found a support group. Any updates since?

tentacles1349
Posts: 6
Joined: Fri Sep 18, 2020 2:03 am

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by tentacles1349 » Fri Sep 18, 2020 6:01 pm

I found by disabling the AP, the chip boot loop is fixed and REPL is functional.
Took the right timing to upload the command between reboots, but after the command was issued the chip functioned as expected and the setting persisted between power cycles.

Code: Select all

import network; network.WLAN(network.AP_IF).active(False)
Unfortunately no solution yet for it working with AP enabled :cry:

tentacles1349
Posts: 6
Joined: Fri Sep 18, 2020 2:03 am

Re: 8266EX Module with MicroPython in continous loop & REPL non responsive

Post by tentacles1349 » Fri Sep 18, 2020 7:04 pm

Found a solution, at least in my case:
After disabling AP at power up (e.g. setting doesn't persist after power cycle)

My process that worked:
  • Flash firmware
  • Send command to disable AP at powerup

    Code: Select all

    import network; network.WLAN(network.AP_IF).active(False)
  • Create connection via boot.py

    Code: Select all

    import network
    sta_if = network.WLAN(network.STA_IF); sta_if.active(True)
    sta_if.connect("<**>", "<**>")
    print(sta_if.isconnected())
Now I am connected to my network, have access to the REPL and no more reboots! But can only operate as a station not as an access point

Post Reply