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 esp.connect() causes crash with latest builds
Building the current firmware with current esp-open-sdk succeeds, but the resulting code is crashing on the esp.connect() call. For example:
Micro Python v1.4.3-128-gb4a41a8 on 2015-06-06; ESP module with ESP8266
Type "help()" for more information.
>>> import esp
>>> esp.phy_mode()
1
>>> esp.scan(print)
>>> (b'linnjk', b'df\xb3\xbc>\xb0', 6, -88, 4, 0)
>>> esp.connect('foo', 'bar')
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 32280, room 16
tail 8
chksum 0x89
load 0x3ffe8000, len 1380, room 0
tail 4
chksum 0x8f
load 0x3ffe8570, len 20672, room 4
tail 12
chksum 0x7d
csum 0x7d
??ՁMEM CHECK FAIL!!!
?rl??rl??b
>>>
Micro Python v1.4.3-128-gb4a41a8 on 2015-06-06; ESP module with ESP8266
This is an ESP-07 module on a Baoshi breadboard adapter, with an external power supply to avoid any issues with voltage sag (5 volt/3 amp supply feeding the regulator on the adapter). I get the same result with an ESP-01 on a breadboard adapter powered by a PL2303 serial cable. The crash also occurs when using legit SSID and password, on an 802.11g network with WEP2 that I could previously connect to.