1
AT+CSTT="live.vodafone.com"$0D$0A                       OK

AT+CIPSHUT$0D$0A                                        SHUT OK

AT+CIPMUX=0$0D$0A                                       OK

AT+CLPORT="TCP",80$0D$0A                                OK

AT+CIICR$0D$0A                                          OK

AT+CIPSTART="TCP","http://ph.mydomain.in",80$0D$0A      OK   CONNECT OK

AT+CIPSEND$0D$0A                                        

GET /phreading.aspx?value=092016040804550815 HTTP/1.1$0D$0A
Host: http://www.ph.mydomain.in$0D$0A$0D$0A
$1A

比我得到以下错误。

在此处输入图像描述 请帮我解决这个问题。并告诉我在服务器上正确发送数据的正确顺序。

4

1 回答 1

1

尝试使用AT+HTTPPARA命令发送您的获取请求。它比使用该CIPSEND方法容易得多。

连接到 GPRS

AT+CGATT?
AT+SAPBR=3,1,"CONTYPE","GPRS"
AT+SAPBR=3,1,"APN","live.vodafone.com"
AT+SAPBR=3,1,"USER","APN_USERNAME"  // adapt it to yours
AT+SAPBR=3,1,"PWD","APN_PASSWORD" // adapt it to yours
AT+SAPBR=1,1

使用 HTTP GET 发送数据

AT+HTTPINIT
AT+HTTPPARA="CID",1
AT+HTTPPARA="URL","www.ph.mydomain.in//phreading.aspx?value=092016040804550815"
AT+HTTPACTION=0 // sends HTTP GET  
AT+HTTPTERM  // terminate HTTP request
AT+SAPBR=0,1 // disconnect gprs if required

希望这可以帮助..

于 2016-04-13T05:34:22.680 回答