ESP8266使用AT命令的websocket
我正在尝试使用AT命令在ESP8266上实现websocket,并发送以下命令:ESP8266使用AT命令的websocket,websocket,esp8266,at-command,Websocket,Esp8266,At Command,我正在尝试使用AT命令在ESP8266上实现websocket,并发送以下命令: AT+CIPSTART = "TCP","My_IP_Address", 80 回答是可以的 AT+CIPSEND = length_of Data\r\n 回应是 好 啊 > 答复如下: +IPD,325:HTTP/1.1 400 Bad Request Server: nginx/1.10.2 Date: Sat, 05 Aug 2017 16:04:12 GMT Content-Type: text/ht
AT+CIPSTART = "TCP","My_IP_Address", 80
回答是可以的
AT+CIPSEND = length_of Data\r\n
回应是
好 啊
>
答复如下:
+IPD,325:HTTP/1.1 400 Bad Request
Server: nginx/1.10.2
Date: Sat, 05 Aug 2017 16:04:12 GMT
Content-Type: text/html
Content-Length: 173
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.10.2</center>
</body>
</html>
CLOSED
+IPD,325:HTTP/1.1400错误请求
服务器:nginx/1.10.2
日期:2017年8月5日星期六格林尼治标准时间16:04:12
内容类型:text/html
内容长度:173
连接:关闭
400错误请求
400错误请求
nginx/1.10.2
关闭
我得到以下回应:
请告诉我怎么了
谢谢
GyaneshGET/HTTP/1.1\r\n
主机:我的IP地址\r\n
连接:升级\r\n
升级:websocket\r\n\r\n
而不是
获取ws://My\u IP\u Address/HTTP/1.1
来源:
连接:升级\r\n
主机:我的IP地址\r\n
升级:websocket\r\n
尝试…您必须在URL
http://myipaddress/
,而不是ws://.
。在某些测试页面(例如)上使用“检查元素”,并查看请求。也。
+IPD,325:HTTP/1.1 400 Bad Request
Server: nginx/1.10.2
Date: Sat, 05 Aug 2017 16:04:12 GMT
Content-Type: text/html
Content-Length: 173
Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.10.2</center>
</body>
</html>
CLOSED