-
Notifications
You must be signed in to change notification settings - Fork 315
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
question about responseStatusCode #9
Comments
this is not my library, I only fork it. But I also have some troubles with 2014-03-14 2:29 GMT+04:00 krapp70 [email protected]:
Михаил Богатырев |
something like this then?
Me too have problems with Xively timing out after about 1 week of continous upload to Xively server. /Anders 13 mar 2014 kl. 23:29 skrev krapp70 [email protected]:
|
Hi, (millis() - timeoutStartResponse) < iHttpResponseTimeout ) .. obviously I added at the beginning of the loop the definition of the variable unsigned long timeoutStartResponse = millis()). Anyway I think it's not a memory problem, I monitored the RAM but seen no leakage while after I modified the code adding the timeout I had no more problem. But I was looking for a better solution! thanks |
When I move the declaration to the place as the other timeout I get compile error: /Users/tvillingett/Documents/Arduino/libraries/HttpClient/HttpClient.cpp:384: error: 'timeoutStartResponse' was not declared in this scope I might need some more coffee... I'm code blind at the moment, please tell me where you put it :) /Anders 14 mar 2014 kl. 09:00 skrev krapp70 [email protected]:
|
ops, sorry :) bye |
I had some coffee now, and placed it right. It works with both compile and downloading to my arduino. Thanks! /Anders 14 mar 2014 kl. 10:46 skrev krapp70 [email protected]:
|
OK. Let me know. With this modification my Arduino has been putting data on xively for more than a week without freezing. But I am looking for a better solution, let's say I just worked empirically :) bye |
Hello, Your solution with the timeout is fine and good practice, if you want to Also i have trobble with the ethernet shield locking in the summer due to Regards, 2014-03-13 22:29 GMT+00:00 krapp70 [email protected]:
|
Yes, you are right... but I dont' have much free time to debug :) At the beginning I thought was a memory problem, so I monitored for a while the RAM, but everything seemed fine. I also wanted to trace the sever response via Serial, but the freeze was radom (maybe after 2/3 days). Then I looked up to write a log in the SD, but I had some problem with the SD library! At the end I just gave a look to the code and added the time out where I thought it could be the problem. It worked, but I wrote this post becasue it looks like a wierd problem. As I wrote I do not know the HTTP protocol (thanks fo the link) and I am just having fun once in a while with arduino & C.; it has to remain at a fun level! Let's wait the test of tvillingett :) thanks |
Sorry to say that my test did fail. It failed after about 8h. We need to have a way to do some kind of debugging, with logging. There is a problem with the limited resources. /Anders
|
oh... I am sorry. As soon as I get some time I will try to compile the skecth with the original httpclient library and see if it freezes. If you want to give a look my sketch you can find it at https://github.com/krapp70/arduino_test_repo/tree/master/test_vari2/test_xively5 (don't mind the code about the leds, it's just for my kids) and this is what I am using: -Arduino UNO bye |
Hi,
I am a newbie of github, so I apologise if I am using this issue tracking to ask a question...
I am using Arduino UNO + Ethernet Shield + xively library (https://github.com/xively/xively_arduino, that it is based upon the HttpClient library) to put some temperature data from a sensor to the xively platform.
Everythig works fine except that happens once in while (sorry... let's say randomly) that Arduino hangs on the xively put function, which recall the HttpClient put + sendHeader + endRequest + responseStatusCode + flush + stop functions.
The question is:
I modified the responseStatusCode adding a timeout condition on the while loop for the informational status code
and I don't have freezes anymore, but I am sure (I do not know the http protocoll) that there is a better solution for this problem, maybe it's a server problems, and I would like to know what you think about.
thanks
best regards
Federico
The text was updated successfully, but these errors were encountered: