polling tcp socket leads to Fatal exception 28(LoadProhibitedCause) on v1.10-23-g1fa8f977f
Posted: Tue Jan 29, 2019 1:16 pm
Hi,
following tcp server leads to Fatal exception 28 on esp8266:
It fails on events = poller.poll(0).
Tried several adaptations as noted in comment, nothing helped.
Came out of ideas. Do you have any?
thanks
FW looks fine
following tcp server leads to Fatal exception 28 on esp8266:
Code: Select all
import uselect # same with select
import usocket # same with socket
import time
time.sleep(5) # dirty wait to get wifi connection (as station)
server_address = usocket.getaddrinfo('0.0.0.0', 80)[0][-1]
server = usocket.socket()
server.bind(server_address)
server.listen(1) # same with 0
poller = uselect.poll()
poller.register(server, uselect.POLLIN)
events = poller.poll(0) # same with ipoll, or with -1 or 100 args
Tried several adaptations as noted in comment, nothing helped.
Came out of ideas. Do you have any?
thanks
Code: Select all
OSError: [Errno 2] ENOENT
MicroPython v1.10-23-g1fa8f977f on 2019-01-28; ESP module with ESP8266
Type "help()" for more information.
>>> scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 1
cnt
connected with jmi-svetla2, channel 13
dhcp client start...
ip:10.99.0.25,mask:255.255.255.0,gw:10.99.0.1
>>> pm open,type:2 0
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== import uselect # same with select
=== import usocket # same with socket
=== import time
===
=== time.sleep(5) # dirty wait to get wifi connection (as station)
===
=== server_address = usocket.getaddrinfo('0.0.0.0', 80)[0][-1]
=== server = usocket.socket()
=== server.bind(server_address)
=== server.listen(1) # same with 0
===
=== poller = uselect.poll()
=== poller.register(server, uselect.POLLIN)
===
=== events = poller.poll(0) # same with ipoll, or with -1 or 100 args
===
Fatal exception 28(LoadProhibitedCause):
epc1=0x40266000, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x40100000, len 30964, room 16
tail 4
chksum 0x23
load 0x3ffe8000, len 1080, room 4
tail 4
chksum 0x8a
load 0x3ffe8440, len 808, room 4
tail 4
chksum 0xee
csum 0xee
Code: Select all
import esp
>>> esp.check_fw()
size: 587620
md5: 58d3cf2c75e069af579179f26e261c90
True