0

When I send a HTTP request (AT+HTTPACTION=0) with my SIM808 it sometimes does not response with +HTTPACTION: 0,200,2. My goal is to check whether the SIM808 is still waiting for the response or is ready to send another one. Another solution would be to cancel and forgot the request. I don't care if the data wont reach the server (I'm sending them every 15 seconds).

I don't want to check error code 604 (STACK BUSSY) hence it could bring errors into my code.

Now I wait 200 seconds (long enough to TCP/IP timeout) if the +HTTPACTION: 0,200,2 didn't come and after that I send another one request.

Summary:

How to cancel HTTP request

or How to check wheter the SIM808 is still waiting for the response.

Many thanks :-)

Lopuch
  • 664
  • 2
  • 5
  • 20
  • Do the `+HTTPSTATUS` and `+HTTPTERM` commands not satisfy your requirements? – David Collins Jun 09 '19 at 11:47
  • AT+HTTPSTATUS? allways returns only OK with no additional info. Simple AT+HTTPSTATUS (without ?) returns ERROR. However HTTPTERM should be a good solution. While I was reading additional info about HTTPTERM I found AT+HTTPPARA="TIMEOUT","30" which dramatically shortens my watchdog timer. – Lopuch Jun 09 '19 at 14:12
  • @Lopuch have you found out if it's possible to straight up discard a request? By my experience, doing `+HTTPTERM` while waiting for `+HTTPACTION` response simply returns `OK`, and the response comes in anyway afterward. Does this happen with you as well? The 30s timeout is fine for me, but I'd like to try and optimize it even further. – Gabriel Jablonski Jul 10 '19 at 18:20
  • I ended up with 30s timeout. In my experience it is better to not to make unnecessary actions with SIM modules because they tends to freeze in long term use. Maybe its only due to lack of my knowledge. – Lopuch Jul 11 '19 at 06:37

0 Answers0