2
\$\begingroup\$

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?

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ 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? \$\endgroup\$ – Nazar Apr 22 '17 at 21:37
  • \$\begingroup\$ Well you can use http requests instead of SMS. \$\endgroup\$ – chamod May 2 '17 at 20:45

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.