-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection refused after some time/multiple requests on Wiznet5k Pico W5100S #41
Comments
Personally I do not own a W5100S, so I can't test it myself. What do you mean by Incognito helped, is it working fine when accessed via Incognito? Also not connected, but it is not necessary to explicitly |
I can't explain properly, but when I use Incognito socket doesn't block(or smth), and server is responding to requests.Maybe not Incognito sends several requests?
What helped me, is breaking this loop
|
Please check two things:
If the server works that means the sockets are being passed correctly, otherwise it wouldn't work even in incognito. That is interesting that the loops repeats infinitely. |
Made some tests to watch socket's behaviour. It looks like I could get it to work with 1-2 requests at time, but not with 3 or more.
Apparently, this means main problem is with wiznet5k socket. I think it blocks, when perfoming too many write() functions, that are called in _send_bytes() |
Seems like it, you might try to pinpoint the location of the block by placing prints inside Until the underlying problem in |
Sorry, forgot to show new traceback
It's no longer problem with |
I did some testing and I back out from my previous statement about patching that in I think your best bet is creating an issue on |
I've noticed that, socket stucks in recv function in adafruit_wiznet5k_socket.py
After that, my problem was particularly solved. Particularly, because it still blocking if doing too many requests, but not blocking after time |
Interestingly I'm just debugging with a view to raising an issue - what would seem to be a similar problem on the pico w - requesting 3 or 4 connections in quick succession locks the board up and polling stops for me with no apparent exception. |
Adafruit CircuitPython 8.0.3 on 2023-02-23; Raspberry Pi Pico with rp2040
I am building HTTP server with W5100S and can't get this library to work properly because of adafruit_wiznet5k_socket, i think. I cut some code to demonstrate the problem, so if you need explanation in something, i'll explain
code.py
index.html
After first request, server stops responding after some time, giving "ERR_CONNECTION_REFUSED" in browsers. Also, multiple POST requests(2 fast clicks on button) are doing the same, but faster. I've done some tests with different systems, that gave me no results. The only thing, that helped me is "Incognito" mode. Other versions of CircuitPython don't help.
When I interrupt programm with CTRL+C it gives.
The text was updated successfully, but these errors were encountered: