当前位置:   article > 正文

SIM800A上传数据到Onenet平台命令_"string data = \"{\\\"datastreams\\\":[{\\\"id\\\"

"string data = \"{\\\"datastreams\\\":[{\\\"id\\\":\\\"temperature\\\",\\\"datapoints\\\":[{\\"

1.使sim800A与服务器建立TCP连接

AT+CGDCONT=1,"IP","CMNET"

AT+CGATT=1

AT+CIPCSGP=1,"CMNET"

AT+CLPORT="TCP","2000"

AT+CIPSTART="TCP","183.230.40.33","80"

AT+CIPSEND

2.进入发送数据状态

POST /devices/7034847/datapoints HTTP/1.1

api-key:8JlQgbzjsgeJRDjEYYXsptnfX=o=
Host:api.heclouds.com
Content-Length:66

 

{"datastreams":[{"id":"temperature","datapoints":[{"value":88}]}]}

 

注意:json报文格式与上空一行  以发送十六进制 1A 结束发送

OneNET数据展示:

http://open.iot.10086.cn/app/browse2?pid=88569&id=18373&is_model=0

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/361128
推荐阅读
相关标签
  

闽ICP备14008679号