找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2324|回复: 2
打印 上一主题 下一主题
收起左侧

esp8266与onenet利用串口助手进行连接的时候出现问题

[复制链接]
跳转到指定楼层
楼主
ID:808223 发表于 2021-5-25 13:47 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
AT指令严格要求网上的步骤输入了但是不行,实在找不出啥原因。。。

都是到输入 AT+CIPSEND 返回 “ok” 跟 “>” 之后输入
POST /devices/714368913/datapoints HTTP/1.1 (回车)
api-key: nrHkt8g2BsKsKnyZTTeeqZbSiKE= (回车)
Host:api.heclouds点com (回车)

之后就跳出这么个信息:

>HTTP/1.1 400 Bad Request
Server: nginx
Date: Tue, 25 May 2021 05:43:17 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>


整体流程如下:

WIFI CONNECTED
WIFI GOT IP
AT+CIPSTART="TCP","183.230.40.33",80

CONNECT

OK
AT+CIPMODE=1


OK
AT+CIPSEND


OK

>HTTP/1.1 400 Bad Request
Server: nginx
Date: Tue, 25 May 2021 05:43:17 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:347826 发表于 2021-5-25 17:09 | 只看该作者
缺少东西,POST并没有上报参数
参考添加加粗部分
都是到输入 AT+CIPSEND 返回 “ok” 跟 “>” 之后输入
POST /devices/714368913/datapoints HTTP/1.1 (回车)
api-key: nrHkt8g2BsKsKnyZTTeeqZbSiKE= (回车)
Host:api.heclouds点com (回车)
Content-Length:63
{"datastreams":[{"id":"sys_time","datapoints":
[{"value":50}]}]}
回复

使用道具 举报

板凳
ID:808223 发表于 2021-5-27 09:07 来自触屏版 | 只看该作者
w1065184016 发表于 2021-5-25 17:09
缺少东西,POST并没有上报参数
参考添加加粗部分
都是到输入 AT+CIPSEND 返回 “ok” 跟 “>” 之后输入
...

好的,会了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表