Page 1 of 1

NodeMCU board resets when I activate AP mode

Posted: Sun Feb 09, 2020 2:53 pm
by Jon7sky
I have a NodeMCU board with the latest MicroPython installed. Using WiFi in station mode works just fine, but when I try to use it in access point mode, the board stops responding to input, and it resets a few seconds later. It happens on more than one of my ESP8266 boards. Does anybody know what my problem might be?

Code: Select all

>>> import network
>>> sta_if = network.WLAN(network.STA_IF)
>>> ap_if = network.WLAN(network.AP_IF)
>>> sta_if.active()
False
>>> ap_if.active()
False
>>> sta_if.active(True)
#4 ets_task(4020f4d8, 28, 3fff9428, 10)
>>> sta_if.isconnected()
False
>>> sta_if.connect('My WiFI', 'My Password')
>>> sta_if.isconnected()
True
>>> sta_if.disconnect()
>>> sta_if.active(False)
>>> ap_if.active(True)
#5 ets_task(4020f510, 29, 3fff9050, 10)
>>>  
 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x40100000, len 31088, room 16
tail 0
chksum 0x44
load 0x3ffe8000, len 1028, room 8
tail 12
chksum 0x1e
ho 0 tail 12 room 4
load 0x3ffe8410, len 824, room 12
tail 12
chksum 0x89
csum 0x89

MicroPython v1.12 on 2019-12-20; ESP module with ESP8266
Type "help()" for more information.
>>>

Re: NodeMCU board resets when I activate AP mode

Posted: Sun Feb 09, 2020 5:44 pm
by Jon7sky
I erased the flash and loaded firmware again, and it's now stuck in this wdt reset loop. (I guess the thing defaults to AP mode active after wiping the flash?) Anyway, to get it un-stuck, I had to enter this line QUICKLY immediately after the reset:

Code: Select all

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

Re: NodeMCU board resets when I activate AP mode

Posted: Sun Feb 09, 2020 6:11 pm
by Roberthh
Check the USB cable and power supply
Maybe the supply drops when WiFi starts transmitting with a high demand for power.

Re: NodeMCU board resets when I activate AP mode

Posted: Tue Feb 11, 2020 10:58 pm
by Jon7sky
OK, I can't believe I'm saying this, but it doesn't work AT MY HOUSE.

Let me explain. I tried various USB cables and USB ports/chargers, and it kept resetting no matter what I did. So I brought it to work this morning to try some stuff there, and for whatever reason, it worked just fine. So I programmed it to enable the access point and blink the LED, and plugged it into my car charger. It was fine all the way home, but when I got near my house, it locked up, and kept resetting. Just to prove I wasn't imagining this, I drove away from the house and back home three times.

Now, it might not be MY house. There are two other houses nearby. I guess some RF device in one of the houses could be interfering with it?

I'll keep you posted.

Re: NodeMCU board resets when I activate AP mode

Posted: Wed Feb 12, 2020 12:38 am
by OutoftheBOTS_
It is highly likely to be a power issue on the EN pin.

There is likely to be soemthing close to your house that is trying to login to your AP and this causes the AP to do work needing more power. If there is a sudden draw on the radio then the power supply on the EN pin can dip and this will cause it to reset.

The solution that many others have done is solder a 100nf cap between EN pin and GND as close as possible to the EN pin. See the blue ENABLE pin on the module https://randomnerdtutorials.com/esp8266 ... nce-gpios/