0
String get_data()
{
  String resData ="";
  char msgs[450];
  numdata=inet.httpGET("myserver.com", 80, "/call.php?id=1&q=1&code=1001", msgs, 450);
  resData = parseMessage(msgs,numdata);
  return resData;
}

When this function executed my Arduino UNO getting restarted.

I have observed that when I keep the buffer size from 450 to 50, it is executing well and is not restarting. Actual HTTP response from GSM SIM900 contains HTTP Header and body.

Sample Response:

HTTP/1.1 200 OK
Date: Mon, 16 Sep 2019 06:28:59 GMT
Server: Apache
X-Powered-By: PHP/7.2.20
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=5b21eeac22dcf61f2e4d2efd579d437c; path=/
Upgrade: h2,h2c
Connection: Upgrade, close
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=UTF-8

-1

So, I have to use nearly 500 bytes buffer to receive the complete response. But, with this larget buffer, my Arduino UNO board is getting restarting.

Any Suggestion appreciated.

I am using GSM Library from ITEAM GSM

  • 2
    The Uno only has 2kB of RAM, so you might be using it all there, which might be the reason for the reset – chrisl Sep 17 at 7:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.