找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2277|回復(fù): 2
打印 上一主題 下一主題
收起左側(cè)

esp8266與onenet利用串口助手進行連接的時候出現(xiàn)問題

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:808223 發(fā)表于 2021-5-25 13:47 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
AT指令嚴(yán)格要求網(wǎng)上的步驟輸入了但是不行,實在找不出啥原因。。。

都是到輸入 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空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報

沙發(fā)
ID:347826 發(fā)表于 2021-5-25 17:09 | 只看該作者
缺少東西,POST并沒有上報參數(shù)
參考添加加粗部分
都是到輸入 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}]}]}
回復(fù)

使用道具 舉報

板凳
ID:808223 發(fā)表于 2021-5-27 09:07 來自手機 | 只看該作者
w1065184016 發(fā)表于 2021-5-25 17:09
缺少東西,POST并沒有上報參數(shù)
參考添加加粗部分
都是到輸入 AT+CIPSEND 返回 “ok” 跟 “>” 之后輸入
...

好的,會了
回復(fù)

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機教程網(wǎng)

快速回復(fù) 返回頂部 返回列表