-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Description
I'm on Arduino RP2040 connect with Micropython 1.18
I would like to run Microdot in combination with Wifi AP.
I could start the server, but the first request (using curl) causes the following issue:
The minimum example-code is:
import network
SSID ='My_Nano_RP2040_Connect' # Network SSID
KEY ='1234567890' # Network key (must be 10 chars)
wlan = network.WLAN(network.AP_IF)
wlan.active(True)
wlan.config(essid=SSID, key=KEY, security=wlan.WEP, channel=2)
print("AP mode started. SSID: {} IP: {}".format(SSID, wlan.ifconfig()[0]))
from microdot import Microdot
app = Microdot()
@app.route('/')
def hello(request):
return 'Hello, world!'
app.run(port=80, debug=True)
Starting threaded server on 0.0.0.0:80...
Traceback (most recent call last):
File "<stdin>", line 21, in <module>
File "microdot.py", line 770, in run
OSError: -1
�>Traceback (most recent call last):
File "microdot.py", line 811, in dispatch_request
File "microdot.py", line 257, in create
File "microdot.py", line 318, in _safe_readline
OSError: [Errno 1] EPERM
Unhandled exception in thread started by <closure>
Traceback (most recent call last):
File "microdot.py", line 36, in run
File "microdot.py", line 860, in dispatch_request
File "microdot.py", line 407, in write
OSError: [Errno 1] EPERM
Also, the socket lib seems missing the SOL_SOCKET, which means I cannot use the async implementation
self.server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
I think it is the same issue as in: Issue