2

I've been working on a weather station project, and I used a SIM 900 module to upload the data to a web server. Recently I started using a SIM800-DS for the same purpose and I had to rewrite the code without using the simcom HTTP stack. Here I ran into a problem with http request.

After configuring the module and connecting to the internet, I opened a TCP connection using

AT+CIPSTART="TCP","requestb.in","80"

And then, after sending

AT+CIPSEND

I formed a simple GET request

GET /s64y13s6 HTTP/1.1 
HOST: requestb.in

followed by a 0x1a. (I used requestb.in to test the requests).

The module responds with a SEND OK. But doesn't display the server response. ("ok"). After a while, I get this request time-out message.

HTTP/1.1 408 Request Timeout
Connection: close
Server: Cowboy
Date: Tue, 05 Jan 2016 20:05:07 GMT
Content-Length: 0

My question is, is there something more I have to send in order to let the server know I have finished sending the request?

Bence Kaulics
  • 6,353
  • 12
  • 33
  • 60
chamod
  • 516
  • 8
  • 23

1 Answers1

2

Well at last I found what I was missing. An additional blank new line at the end of TCP text followed by the 0x1a signalled the module to wrap up the request.

chamod
  • 516
  • 8
  • 23
  • I was hoping to use the SIM800 to transfer data to the internet somehow. I have seen many videos on how to send messages from the SIM-arduino module to a cellphone. Instead, I wish to somehow send the data to a free internet server so that the data could be displayed on the web browser in a simple HTML page. Is that possible? Any suggestions on how this could be done? – Nazar Apr 22 '17 at 21:37
  • Well you can use http requests instead of SMS. – chamod May 02 '17 at 20:45