QUERY · ISSUE
esp8266: wlan.connect() may crash when there're too many scan results
port-esp8266
As a follow up of #1943, wlan.connect function causes reset:
print("naber")
naber
>>> import network
>>> wlan = network.WLAN(network.STA_IF)
>>> wlan.active(True)
>>> wlan.scan()
f r0, scandone
[(b'aktos-elektronik', b'\x00\x1c\xa8\xf7\xe8M', 6, -49, 3, 0), (b'UEM', b'\xf4\xe3\xfb\xbak\xdc', 9, -92, 4, 0), (b'TTNET_HUAWEI_827F', b'\xec#=d\x82\x88', 10, -91, 4, 0)]
>>> wlan.isconnected()
False
>>> wlan.connect("aea", "084DA789BF")
Fatal exception 3(LoadStoreErrorCause):
epc1=0x4000deed, epc2=0x00000000, epc3=0x00000000, excvaddr=0x40000008, depc=0x00000000
ets Jan 8 2013,rst cause:1, boot mode:(1,7)
CANDIDATE · ISSUE
esp8266: wifi scan and ^C Keyboard Interrupt causes reboot
port-esp8266
Steps to reproduce:
import network
sta_if = network.WLAN(network.STA_IF)
sta_if.scan()
Then press ctrl-C before scan is finished.
Expected result:
REPL command line continues working normally
Actual result:
after a few seconds, a crash & reboot:
>>> sta_if.scan()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyboardInterrupt:
>>>
ets Jan 8 2013,rst cause:2, boot mode:(3,3)
load 0x40100000, len 31364, room 16
tail 4
chksum 0x8e
load 0x3ffe8000, len 1040, room 4
tail 12
chksum 0x8a
ho 0 tail 12 room 4
load 0x3ffe8410, len 804, room 12
tail 8
chksum 0xb5
csum 0xb5
Followed by garbage, then resets into the normal command-line.