错误+ HTTPACTION:0,601,0 [英] error +HTTPACTION:0,601,0

查看:260
本文介绍了错误+ HTTPACTION:0,601,0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用sim900 GSM模块访问网站. 这是命令列表

I m trying to access a website using sim900 GSM module. This is the list of commands

AT+CSQ      
+CSQ: 16,0          

OK  
AT+HTTPINIT           
OK  
AT+HTTPPARA="CID",1                   
OK  
AT+HTTPPARA="URL","www.google.com"                                  
OK  
AT+HTTPACTION=0               
OK  

+HTTPACTION:0,601,0                         

AT+HTTPACTION=0
OK

+HTTPACTION:0,601,0

无法访问google. 601代码显示网络错误. 如何摆脱这个错误?

Unable to access google. 601 code shows Network error. How to get rid of this error?

推荐答案

您需要设置与承载的连接.这是对我有用的最小设置命令(基于试验/错误和在Internet上搜索).

You need to setup the connection to the bearer. Here are the minimum setup commands that have worked for me (based on trial/error and searching around on the internet).

AT+SAPBR=3,1,"APN","wap.cingular"
AT+SAPBR=1,1

APN的正确值可能因您而异,具体取决于您的网络和服务提供商.我正在使用AT& T预付SIM卡.一旦工作,您就可以执行HTTP设置命令了……

The correct value for the APN may be different for you, depending on your network and service provider. I'm using AT&T prepaid SIM cards. Once that's working, then you can do the HTTP setup commands as you already have...

AT+HTTPINIT
AT+HTTPPARA="URL","http://www.google.com"
AT+HTTPACTION=0

在HTTP标准中,未分配状态代码600以上(有些在500范围内).在SIM908的AT命令手册中,状态含义在HTTPACTION命令的注释中给出:

Status codes above 600 (and some in the 500 range) are unassigned in the HTTP standard. In the AT command manual for the SIM908, status meanings are given in the notes on the HTTPACTION command:

600 Not HTTP PDU
601 Network Error
602 No memory
603 DNS Error
604 Stack Busy

您可以使用AT+SAPBR=2,1查询CID 1的承载连接状态,并使用AT+SAPBR=4,1查询相关参数.您也可以使用AT+CGATT?检查是否已连接到GPRS网络.如果一切都表明您已连接,并且仍在获取601状态代码,则请检查您的服务计划中是否有数据并且还没有用完.我发现,即使我的帐户中有数百k数据显示在余额上,我也开始获得601状态,直到将更多数据添加到预付费电话计划中为止.如果SIM卡模块一直处于运行状态,并且您添加了更多数据,则需要关闭并重新打开连接(AT+SAPBR=0,1后跟AT+SAPBR=1,1),然后您的HTTP*命令将再次开始工作而不会不必再次设置HTTPPARA设置,而不必使用HTTPINIT重新启动.

You can query the bearer connection status of CID 1 with AT+SAPBR=2,1 and the related parameters with AT+SAPBR=4,1. You can also check that you're attached to the GPRS network with AT+CGATT?. If everything indicates that you are connected and you are still getting a 601 status code, then check that your service plan has data and that it hasn't run out. I have found that even when my account has a few hundred k of data showing on the balance that I start to get a 601 status until I add more data to my prepaid phone plan. If the SIM module has been on the whole time and you add more data, you'll need to close and re-open your connection (AT+SAPBR=0,1 followed by AT+SAPBR=1,1) and then your HTTP* commands will start working again without having to set the HTTPPARA settings again and without having to restart with HTTPINIT.

这篇关于错误+ HTTPACTION:0,601,0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆