I'm working with GSM module and with some HTTP GET requests. Currently everything goes fine but I'm not able to save the data which I get from server. I can output it with Serial.print easily and nothing goes missing but if I try to add it to String the data gets corrupted.
If I use
Serial.print(char(mySerial.read())); I get the following (as expected)
GET /report.php?xxxxxxxxxxxxx HTTP/1.0 Host: xxx.xxx.xxx SEND OK HTTP/1.1 406 Not Acceptable Date: Tue, 04 Oct 2011 21:38:20 GMT Server: Apache Content-Length: 0 Connection: close Content-Type: text/html
However if I change the code to
I get the following saved to return_data:
GET /report.php?xxxxxxxxxxxxxxxxxxxxxxx HTTP/1.0 Host: xxx.yyyxx SEND OK HTTP/1.1 406 Not Acceptable Date: Tue, 04 Oct 2011 21:40:31 GMT Server: Apache Coneh nt sCeT:tm CLOSED
Any ideas where's the problem or is adding to String object just too slow operation? Any ideas how to get around this?