Connection handling of AP mode

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
cowbjt
Posts: 3
Joined: Fri Apr 27, 2018 1:19 am

Connection handling of AP mode

Post by cowbjt » Mon Apr 30, 2018 10:11 am

Hi All,

Did anyone test the connection handling of ESP32, when ESP32 acts as a AP?

I noticed that in the log of REPL, “(1159338) network: event 15” and “(1159338) network: event 16” sometimes won’t appear paired.
(but they should. 15: connected, 16: disconnected)

When the unpaired situation occurred several times, the exception can be raised on web server:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "liot/status.py", line 201, in init
File "uasyncio/core.py", line 154, in run_forever
File "uasyncio/core.py", line 109, in run_forever
File "uasyncio/__init__.py", line 249, in start_server
OSError: 23

File "liot/status.py", line 201 is my code just call "loop.run_forever()"
and
File "uasyncio/__init__.py", line 249 is "s2, client_addr = s.accept()"

The web server is uasyncio sample:
https://github.com/micropython/micropyt ... _server.py

I think [OSError 23] occurred because ESP32 holds too many disconnected connection.
Anyone has any idea about this?

P.S.
If I don’t connect and disconnect wifi to make the unpaired situation, just refresh the web page, the web server works pretty well.


Post Reply