SIM900发送AT+SAPBR=1,1返回错误!!!
用单片机给SIM900发送指令和结果返回如下,到第三条AT+SAPBR=1,1时,就返回+CME ERROR: operation not allowed,求高手赐教啊,在线等!!!
AT
OK
AT+SAPBR=3,1,"Contype","GPRS"
OK
AT+SAPBR=3,1,"APN","CMNET"
OK
AT+SAPBR=1,1
+CME ERROR: operation not allowed
AT+SAPBR=2,1
+SAPBR: 1,3,"0.0.0.0"
OK
AT+HTTPINIT
OK
AT+HTTPPARA="CID",1
OK
AT+HTTPPARA="URL","www.baidu.com"
OK
AT+HTTPACTION=0
OK
+HTTPACTION:0,601,0
AT+HTTPREAD
OK
[解决办法]
建议先执行AT+CSTT AT+CIICR AT+CIFSR后在执行AT+SAPBR=1,1
我的代码如下,可以获得数据
AT+CSQ
AT+CREG?
AT+CGATT?;
AT+SAPBR=3,1,"CONTYPR","GPRS"
AT+SAPBR=3,1,"APN","CMNET"
AT+SAPBR=1,1
AT+HTTPINIT
AT+HTTPPARA="URL","www.baidu.com/images/favicon.png"
AT+HTTPACTION=0
AT+HTTPREAD