I have a question regarding SIM800L and HTTP GET request. I'm using this https://exploreembedded.com/wiki/Setting_up_GPRS_with_SIM800L simple code to communicate with SIM800l with AT commands. To perform the HTTP request, I use the following set of AT commands:
AT+CFUN=1
OK
AT+CSTT="internet","",""
OK
AT+CIICR
OK
AT+CIFSR
10.180.xxx.xx
AT+CIPSTART="TCP","84.42.xxx.xx",80
OK
CONNECT OK
AT+CIPSEND=52
>
GET /bakalarka.php/? HTTP/1.1
Host:84.42.xxx.xx
SEND OK
HTTP/1.1 200 OK
Date: Mon, 19 Aug 2019 16:20:27 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
10
time201908191820
0
CLOSED
The problem is that sometimes. Or every other time, I don't get the whole HTTP answer. I usually get only the beginning. Something like this:
AT+CIPSEND=52
>
GET /bakalarka.php/? HTTP/1.1
Host:84.42.xxx.xx
SEND OK
HTTP/1.1 200 OK
Date: Mon, 19 Aug 2019 16:20:27 GMT
Server: Apac
and then after a couple of seconds, the connection closes.
CLOSED
Do you know what could cause that? It's literally random. I need the information from the webpage (it's the current time) and currently, it's really unreliable.
Another question. What does the "10" and "0" mean in the HTTP request? The "time201908191820" is the current time from printed from PHP.
Thank you very much!