ets Jan 8 2013,rst cause:4, boot mode:(3,6) with wifi

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
MicroNinja
Posts: 16
Joined: Sun Dec 29, 2019 8:38 am

ets Jan 8 2013,rst cause:4, boot mode:(3,6) with wifi

Post by MicroNinja » Wed Feb 10, 2021 9:41 pm

Hi!

Is this a common/expected issue?
I have found several threads with similar issue but I have not found how to solve it yet?
I get this error only when I am using a wifi connection. Using a wifi connection in my projects is the only reason I got started with micropython so now I am stuck from start :(

I am curious of the nature of this issue though.. The only way I can make the cycle stop is to erase and flash my ESP8266 board. I have 3 boards and facing the same problem on each of them. Noing a soft reset or program interuption does not do anything to stop the message to in a loop print to the console (like every 5-10seconds or so)

Code: Select all

ets Jan  8 2013,rst cause:4, boot mode:(3,6)

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??{??o|?llll`??r?l?l?l`??r?l?l?l`??r?l??ll`{d??rd????b??c?ccs??sc??g??gg?l??l?l??ll???????d?g?cd?brlrlr?n???d?????d?d
MicroPython v1.14 on 2021-02-02; ESP module with ESP8266
Type "help()" for more information.
This is the code for connecting to WIFI. Which is basically the only thing the program does at the moment.

Code: Select all

def connect():
    import network
 
    ssid = "yourNetworkName"
    password =  "yourNetworkPassword"
 
    station = network.WLAN(network.STA_IF)
 
    if station.isconnected() == True:
        print("Already connected")
        return
 
    station.active(True)
    station.connect(ssid, password)
 
    while station.isconnected() == False:
        pass
 
    print("Connection successful")
    print(station.ifconfig())

davef
Posts: 813
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: ets Jan 8 2013,rst cause:4, boot mode:(3,6) with wifi

Post by davef » Wed Feb 10, 2021 11:11 pm

Somewhere there is information on the cause numbers. Found this:
http://docs.micropython.org/en/v1.10/li ... -constants
Looks like you are suppose to do a machine.reset_cause()

https://www.esp8266.com/viewtopic.php?f=28&t=21249

Never played with the watchdog timer in the ESP8266 firmware, which is what they seem to be talking about.

MicroNinja
Posts: 16
Joined: Sun Dec 29, 2019 8:38 am

Re: ets Jan 8 2013,rst cause:4, boot mode:(3,6) with wifi

Post by MicroNinja » Thu Feb 11, 2021 7:09 am

Hmm i have seen watchdog being mentioned as well as power outage.
watchdog still goes over my head, need to spend more time understandig what it is.

I just erased and flashed another wemos mini D1 I have and tried with just the wifi connection script and the same crash happened. So far I have used 3 different usb lead I have laying around. I know i have used at lest 2 of them when I ran basic wifi connect script using the arduino language on them before going to Micropython. Using Micropython is great, but it does not seem to work together with wifi? Im so confused as there are plenty of tutorials out there using wifi. Am I unlucky with the units? I cannot work out if this is a hardware issue or not.

Its not that it is crashing every now and then, it happens pretty much immediate and the only was to stop these cyclic messages is to reset and flash the board?

Here is a picture from my IDE with the error https://i.imgur.com/5A5KnsU.png

davef
Posts: 813
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: ets Jan 8 2013,rst cause:4, boot mode:(3,6) with wifi

Post by davef » Thu Feb 11, 2021 7:40 am

Which version of firmware are you putting on the board?
Are all your boards wemos mini D1, if not state which flash variant he other boards have?

Post Reply