如何使用 ESP8266 访问网站?
How can I access web site with ESP8266?
我正在尝试使用 ESP8266 检索 HTTP 资源 (http://srcafe21.cafe24.com/mylight.php?id=2
):
ESP8266 AT commands :
AT+CWMODE=3
AT+RST
AT+CWJAP="iptime-3","20030214"
AT+CIFSR
AT+CIPMUX=0
AT+CIPSTART="TCP","srcafe21.cafe24.com",80
AT+CIPSEND=60
GET/HTTP/1.1
Host:srcafe21.cafe24.com/mylight.php?id=2
AT+CIPCLOSE
我收到这样的回复:
SEND OK +IPD,311:HTTP/1.1 400 Bad Request
Server: nginx Date: ....
我做错了什么?
您对 HTTP 的使用有误。应该是
GET /mylight.php?id=2 HTTP/1.1
Host: srcafe21.cafe24.com
我正在尝试使用 ESP8266 检索 HTTP 资源 (http://srcafe21.cafe24.com/mylight.php?id=2
):
ESP8266 AT commands :
AT+CWMODE=3
AT+RST
AT+CWJAP="iptime-3","20030214"
AT+CIFSR
AT+CIPMUX=0
AT+CIPSTART="TCP","srcafe21.cafe24.com",80
AT+CIPSEND=60
GET/HTTP/1.1
Host:srcafe21.cafe24.com/mylight.php?id=2
AT+CIPCLOSE
我收到这样的回复:
SEND OK +IPD,311:HTTP/1.1 400 Bad Request Server: nginx Date: ....
我做错了什么?
您对 HTTP 的使用有误。应该是
GET /mylight.php?id=2 HTTP/1.1
Host: srcafe21.cafe24.com