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
[DO NOT MERGE] Rework socket buffer layer #77
[DO NOT MERGE] Rework socket buffer layer #77
Conversation
@sandeepmistry |
@RamonRibes, here are some instructions:
|
Hi, @sandeepmistry,
...so it's a partial success (the board doesn't hangs). regards. |
@RamonRibes thank you for trying this. Can you also please run the following tests?
I'll take a look at running the same tests you ran with my Windows 10 VM in the next day or so. |
Did you copy all the files from the zip over to the WiFi101 folder? It seems like you did, but I would like to confirm. |
@sandeepmistry, |
@RamonRibes thanks for trying this out. I'm looking at another change to remove the long delays when the serial monitor is open and closed when the sketch contains
Btw, how much current does your mobile charger provide? I think it will be either 500mA or 1A, you'll find this labeled on the charger. Any updates on the long running test? |
@sandeepmistry, -Eliminate this part (unnecessary in a MKR1000):
-Move the connection part to a new function 'verifyWifiConnection()', who will check in every loop for propper connection. Here you have the sketch:
Will let home for weekend. Hope the monday i'll find the board still working :-) |
Hi, @sandeepmistry. |
Hi @RamonRibes, Good idea on the re-connect. One note, I would suggest removing the call to Maybe the first delay was due to the board not being connected to the access point at that point in time? Another note, the board I setup 2 weeks ago with the WiFi101 v0.9.1 is still running the web server fine. I'm using an Apple AirPort Express as the AP. |
@sandeepmistry,
well, started the second test right now... |
@sandeepmistry EDIT: Both tests still alive and working fine. Does it mean the end of the problematic behaviour?? ...Let's hope yes! |
Well, bad news...
Well, after a series of tests, it seems the problem is in the sentence |
Hi @RamonRibes, I just noticed you are using |
Hi, @sandeepmistry, thank you for your comment. The bug is now fixed in this way:
I'll comment the test results later. |
@RamonRibes Hello. Any (good) news? Thanks |
Hi, @q2dg, |
In my testing with the wifi101 stack and wifi modem, I can't keep a simple udp connection up for more that a day or two... Similar problem as you're having ~~ _/) ~~~~ _/) ~~~~ _/) ~~~~ _/) ~~ Tom Lafleur
|
Hello! |
…m2m_wifi_handle_events
This reverts commit 2685f97.
ba0a581
to
1e73bee
Compare
Closing in favour of #204 for now. |
This change reworks the socket buffer layer such that the receive buffers are dynamically allocated inside per socket instead of relying on WiFiClient, so the buffer does not get reassigned when the copy constructor or assignment is done.
I've also changed the callbacks to be static to allow for some member variables to be private. As well added a per socket parent field to allow for more than one pending connection per server socket.
I've tested the example sketches on a WiFI101 Shield + Uno and MKR1000, things seem good so far but we need more testing.
It think it will resolve #36, #70, #74 and a piece of #72.
cc/ @agdl @facchinm