-
Notifications
You must be signed in to change notification settings - Fork 3
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
Connect Async vs write Async ( question more then Issue ) #3
Comments
Hi, if you are using my fork of the Adafruit WINC1500 library, the I also made an asynchronous version of I didn't focus so much on |
Hello, Yes, I did see the beginAsync which is the connection to the "router". Is your HTTPserver always available once connected to WiFi? this may still be a blocking issue. During my testing, I get my server to be unavailable for a few seconds ( realistic scenario ) and it suddenly blocks the main loop for 20seconds ... My application sends and HTTP msg ( maybe I should go for UDP ... ) every minute. But my main concern is client.connect(server, port) blocking for a full 20 seconds. What I am trying to solve: luckily I never have to write on my SD card AND use the Wifi at the same time BUT I tried noInterrupts() within my CANbus ISR routine to prevent WINc1500 to handle its interupt "right-away" and maintain a priority but for some reasons ... I did see it accessing the SPI bus while it was in my CAN_isr() function ... can you confirm ? |
Ah, I forgot about the If you go here https://github.com/wchill/Adafruit_WINC1500/blob/master/src/Adafruit_WINC1500Client.cpp#L155 and remove everything until line 167, it should work as an asynchronous version of |
Hello Eric, I like your work on the async calls, i'll most likely use it and will let Have you found a way of resetting "locked" sockets ? I am trying to implement a timeout feature on writeAsynch for the current HOWEVER, even with a "client.stop", I can no longer call Q1: do you know how to flush the opened sockets in the WINC1500 ? i tried I want to make sure that WINC1500 can ALWAYS recover from a bad network What do you think ? Eric I checked into adding a "timeout" into client.write to mange such cases On Tue, May 24, 2016 at 12:11 PM Eric Ahn [email protected] wrote:
|
Hello Wchill, am very happy to stumble on your work with the winc1500.
This is not an issue but a question-feedback based on use-case of the winc1500.
I have built a CANbus-datalogger with the WIN1500 and I too found the winc1500 calls to be blocking.
HOWEVER, using a scope, I noticed that in the sequence ( Connect , write,write,write, read (loop) , client.close ) the CONNECT aspect is the one that causes the longest blocking.
If the server is present and OK, it will always answer within <10-100ms ( depending on ping time ) and then the client.write(s) and client.close() are always very fast.
if the server is down or extremly busy, then the client.connect() can reach the 20seconds timeouts.
I started reading down to the m2m_xyz(.c / .h ) and the nm_xyz(.c / .h ) and found your work on the ASYNC calls ...
Why did you focus on client.write() ? maybe there is something i have not seen yet ...
I'd like to check for a connectASYNC as well ... your feedback would be very much appreciated
Eric
The text was updated successfully, but these errors were encountered: