赞
踩
一、设置http参数命令
AT+CGATT?
+CGATT: 1
OK
AT+SAPBR=3,1,"CONTYPE","GPRS"
OK
AT+SAPBR=3,1,"APN","CMNET"
OK
AT+SAPBR=1,1
OK
1.HTTP中的GET操作
AT+HTTPINIT
OK
AT+HTTPPARA="URL","www.baidu.com/img/baidu_logo.gif"
OK
AT+HTTPACTION=0
OK // 此时等待以下信息的返回,不要操作其它
+HTTPACTION:0,200,1489 // 获取成功
AT+HTTPREAD // 读取数据
+HTTPREAD:1489
GIF89a? p蒊
… // 如果下载数据在sscom中无法看到ok返回,客户认
OK 为模块问题,请选择hex显示在取消即可。
AT+HTTPTERM
OK
2.HTTP中的POST操作
AT+HTTPINIT
OK
AT+HTTPPARA="CID",1
OK
AT+HTTPPARA="URL","116.228.221.51:7015"
OK
AT+HTTPDATA=10,10000
DOWNLOAD
OK
AT+HTTPACTION=1
OK
+HTTPACTION:1,408,0
AT+HTTPTERM
OK
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。