SIM800A上传数据到Onenet平台命令

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

你可能感兴趣的:(单片机)