QUERY · ISSUE
compatibility : esp8266 *may* stop processing wifi when (ab)using micropython.schedule()
port-esp8266
use case was scheduling asyncio loop step while REPL is running like it can be done with cpython PyOS_InputHook ( cf https://gist.github.com/pmp-p/2cc65bc914cb046972a3e94003fe7f1c )
import micropython, time
def hog(v):
time.sleep_us(1) # <= will make wifi hang
micropython.schedule( hog , 1)
micropython.schedule( hog , 1)
CANDIDATE · ISSUE
esp8266 Waiting for STA_IF connect causing reset
bugport-esp8266
On NodeMCU esp8266 running 1.10 I get a reset after approximately 5 iterations of the while loop shown below.
import machine
import network
station = network.WLAN(network.STA_IF)
while not station.isconnected():
machine.idle()
When I reflashed with 1.10 from 1.9.4 it stopped working - but I suspect that may be because it lost saved wifi credentials.
Edit: forgot to include reset message:
ets Jan 8 2013,rst cause:2, boot mode:(3,0)
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