error +HTTPACTION:0,601,0 - 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
Unable to access google. 601 code shows Network error.
How to get rid of this error?

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
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
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
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.

I have found that when an http call is made to an https only website it will throw a 601 error on the sim. Beware some sim devices have ssl and some don't. Use AT+HTTPSSL=? to interrogate. device with ssl will respond like, 'HTTPSSL 1'. If you get an error your device doesn't have ssl. This took some work with the factory for me to determine this.
You must also use to hit ssl site. I am using the wifi101 ssl client.
fona.setHTTPSRedirect(true);
dy3

I have encoutered this error as well. The cause of the problem may be that there is not enough money in the phone number account. You may check it.

601 is some custom implemented Error code.
Here is the list of standard HTTP Status codes
+HTTPACTION:0,601,0
The above AT response code (601) for HTTP session start indicates that
there is a network error. Then make sure that the PDP context is setup
properly.
source
https://m2msupport.net/m2msupport/at-command-for-http-functions-for-remote-server-data-access/

I have spent many hours with this module right now.
My experience is that when you dont get a 200 reply from remote server, you should check IP address to verify you are still on the network sendng a ping to a working server (AT+CIPPING="XX.XX.XX.XX").
If it succeeds: Try AT+SAPBR=2,1 and AT+CIFSR. You should get same address for both commands.
If you dont get same address, login again to the netword/service with AT+CIPCSGP=1, "yourapn.com", "user", "password".
If nothing works, power down the module. Wait a couple of minutes, and restart again.

Just in case someone is affected by this problem and stumbles on this post 4 years later: in my case the module had a small "sticker" type antenna and it got somehow damaged.
I could connect to the network but when I tried to use HTTP over the GPRS networks I only got return code 601 (network error) or 603 (failed to resolve DNS).
Once I replaced the antenna with a new one, everything worked perfectly.

Again, in case somebody has the same problem. In my case it was a typo in url:
AT+HTTPPARA="URL"," http://www.google.com"
Did you notice the space before http? For several hours, I didn't notice it too.

Usually after this command AT+SAPBR=3,1,"CONTYPE","GPRS" you enter your "APN", "USR" & "PWD" details also using SAPBR=3,1 etc. These details must match the SIM card / mobile phone provider.
Then it is recommended to check that your device has now received an IP address. Sometimes this is not straight away. Use AT+SAPBR=2,1 to query and this will return your IP address which you should check for confirmation.
Once you have IP address you can enter AT+HTTPINIT, AT+HTTPPARA="CID",1 etc.
Now to use GET you have to include a "?" after the URL to provide your php script with a key=value pairing.
Thus in your case it is something like, AT+HTTPPARA="URL","http://<Public_Ip_Address>:8080/folder/savedata.php?A=1001" where A is the key and 1001 is the value.
Now send the AT+HTTPACTION=0 and you should get a +HTTPACTION: 0,200,1000 response where 200 is the OK and 1000 is the payload size. AT+HTTPREAD will allow you to read the response if it is required.

Change URL. 601 is a URL has been moved. Is a redirect.

Related

Sim7080G module can't send data over TCP while using GNSS

I bought a Simcom (Sim7080G) module to use it for geolocation and send data over TCP. These modules are quite new on the market (it was first launched in mid 2019) and there is some weird functionning with it. I would like to know if people that use it struggle with the same problem.
My goal is to take GNSS (latitude/longitude) informations, and to send them over TCP.
Activate and take GNSS informations
AT+CGNSPWR=1
returns OK
AT+CGNSINF returns +CGNSINF: 1,1,20200517191239.000,4x.xxxxxx,6.xxxxxx,473.769,0.00,,0,,1.9,2.1,1.0,,7,,7.9,6.0
Connect to any TCP server
AT+CNACT=0,1 returns OK\r\n\r\n+APP PDP: 0,ACTIVE
AT+CAOPEN=0,0,"TCP",151.101.1.69,80 (151.101.1.69 is stackoverflow.com ip address)
--> Some time waiting (like +40s) and then:
+CAOPEN: 0,23\r\n\r\nOK
The code 23 means: 23 Remote refuse, but in my case the connection never reached the server.
Only GNSS or TCP can be used, but not both
What is weird about all of this, is the fact that I can connect on a TCP server, but this stops to work when I activate GNSS.
I sent an email to Simcom technical support.
After insisting that my problem be addressed by a Simcom engineer, I received an answer. I encouraged them to be more clear on their documentation because this information was nowhere (this module is pretty new so I think they missed it on documentation).
Hope to help somebody in the same way or not to do the same pricey error:
Hi Dardan,
"it is not possible to use GNSS and TCP at the same time"
This is known limitation for this module, as there are limitation for
LTE and GNSS part, they can not run simultaneously because they are
sharing part of RF components(SIM7070G low cost version of SIM7000G)
so it is time MUX for LTE and GNSS which means the GNSS performance
could not be good(if customer needs to send GNSS data to server in
very short interval such as <10 seconds), for SIM7000G LTE and GNSS
can work simultaneously without problem. so SIM7070G could be a good
solution for "parcel tracking" etc, which do not need the continue
navigation. please go for SIM7000G, thanks.
xxxx Sun
I found this issue some hours before read this post. My product publishs in AWS IoT MQTT broker; it works, but I need the GPS coordinates to be sent together in message. I'm a lot frustrated, because such problem should be said in Simcom's documents. My previous version was using sim7600g, more expensive, but works fine. I live in Brazil, everytime I need to test some different module I loose more than 1 month to buy from China or somewhere and arrive a new one to me. I tried to turn ON/OFF GNSS and the TCP conection in alternate way, but is too slow the process to reconnect on gsm network.
Ran into this as well. With MQTT it is possible to power down the GPS unit to be able to send and receive MQTT messages without reconnecting/subscribing to the broker again. I've made a 30 second interval to enable/disable the GPS unit and tested it with HiveMQ public broker. Receiving of position data every 60 seconds is possible with this setup, which might be sufficient for some applications. For the price, it has this is still a good module.
I receive no response for HTTP Get request for the http://httpbin.org/get URL. Following is the output using the AT Command Tester from https://m2msupport.net
Checking registration status...
AT+CREG?
+CREG: 2,1,"912","3D73",0
OK
The device is registered in home network.
AT+CGREG?
+CGREG: 2,1,"912","3D73",0,"1"
OK
The device is registered in home network.
Device is registered..
Check the network APN...
AT+CGNAPN
+CGNAPN: 0,""
OK
Network did not send APN to the device.
Activate the network bearer...
AT+CNACT=0,1
OK
+APP PDP: 0,ACTIVE
Set up the HTTP URL...
AT+SHCONF="URL","httpbin.org"
OK
Set up the HTTP body length...
AT+SHCONF="BODYLEN",1024
OK
Set up the HTTP header length...
AT+SHCONF="HEADERLEN",350
OK
Initiating HTTP connection...
AT+SHCONN
OK
Get the HTTP connection state...
AT+SHSTATE?
+SHSTATE: 1
OK
HTTP connection is successful...
HTTP get request...
AT+SHREQ="http://httpbin.org/get",1
OK
No reponse received..

Can NOT launch a HTTP operation using SIM5320E

I want to send/receive data to/from website by using SIM5320E.
Connection between my PC and module SIM5320E is look good because the AT command responses OK. But the command to launch a HTTP operation gets ERROR.
It seems that my SIM5320E is NOT connected to 3G network. The GPRS is no longer available in Japan (DOCOMO) now.
How to active SIM4320E connect to 3G ?
This is my current result.
AT
OK
AT+COPS?
+COPS: 0,0,"NTT DOCOMO",2
OK
AT+CGSOCKCONT=1,"IP","line.me"
OK
AT+CSOCKSETPN=1
OK
AT+CSOCKAUTH=1,3,"line","line#line"
OK
AT+CHTTPACT=?
+CHTTPACT: "ADDRESS",(1-65535)
OK
// I got error from here
AT+CPING="google.com",1
OK
+CPING: 3,0,0,0,0,0,0
AT+CHTTPACT="google.com",80
+CHTTPACT: 237
ERROR
AT+CHTTPACT="www.google.com",80
+CHTTPACT: 237
ERROR
AT+CHTTPACT="stackoverflow.com",80
+CHTTPACT: 237
ERROR
Update 1: Also tried this
AT+CMEE=2
OK
AT+CHTTPSSTART
ERROR
AT+CHTTPSSTART\r\nAT+CHTTPSOPSE="pruebas.libelium.com",80,1\r\nAT+CHTTPSSEND=88\r\n"GET / HTTP/1.1"\r\nHost: pruebas.libelium.com\r\nContent-Length: 0"
ERROR
Update 2: Also tried
AT+CNMP?
+CNMP: 2
OK
AT+CNAOP?
+CNAOP: 2
OK
AT+CPSI?
+CPSI: WCDMA,Online,440-10,0x01C6,72728730,WCDMA IMT 2000,331,10736,0,4.5,70,31,45,500
OK
AT+CHTPSERV="ADD","www.google.com",80,1
OK
AT+CHTPUPDATE
OK
+CHTPUPDATE: 4 // Network error
Thanks!
I was able to download web site data using SIM5320E module. Haven't used SIM4320E though but should be quite similar.
Follow the exact steps in SIM5320e HTTPS Stack, can't make successful GET request which worked for me.
From what you have provided:
You have selected the correct module for DOCOMO band (2100Mhz) according to Cellular Bands in Japan. Since AT+CPSI? and AT+COPS? shows it's online with WCDMA so may assume it's connected to network. You can use AT+CREG? and AT+CGREG? to see whether your voice and data connections are registered with the network (It must be registered with the network)
If it's not connected to the network. Try AT+COPS=2 to force it to select a network.
AT+CHTTPSSTART can fail, if the HTTPS service has already been started. So you can use following commands to restart it.
AT+CHTTPSCLSE
AT+CHTTPSSTOP
AT+CHTTPSTART
If you still face problems, try using this Tutorial by SimComm. It doesn't contain the 3G connectivity stuff. But you can make sure your module works fine with your network. Once it's ensured, try following the steps mentioned above.
All the best!

Wireshark Student - I can't see any http post or get requests

I am a student and today for a lab, we were asked to install and use Wireshark. The installation went well, I installed the correct version, installed WinPcap, and the program started without any issues.
I was connected to the University's Wifi and as part of our lab we had to visit http://www.cas.mcmaster.ca/~rzheng/course/CAS4C03W17/Labs/INTRO-wireshark-file1.html and answer questions about the data captured in Wireshark.
Problem is, I am not getting any get or post requests, filtering by http.request.method == "GET" shows nothing, and http.request.method == "POST" shows nothing as well. Filtering by http shows the 200 OK and 304 Not Modified (if I refresh).
I was the only one in my lab who had this problem, and my instructor wasn't able to figure it out. He saved and sent me his output which has Get and Post requests so I can continue my work.
Did anyone have this problem before or have any idea on how to solve it? I can upload the saved outputs if you think it would help. Thanks!
Capture sample looks like it's filtered, since it contains only packets sent to your PC IP address. What is missing:
There is not a single outgoing packet, despite they are obviously on the net. E.g. there are "TCP acknowledge" packets received by PC in capture file, but packets sent by PC, which are acknowledged by them, aren't shown.
Not a single incoming broadcast/multicast packet. This situation is possible, but not very likely.
So there is some trouble with sniffer setup on your site. Possible explanations:
accidentally configured capture filter (don't mix with display filter)
Some interfering software is installed. Example of the same complaint
Method to determine if issue is gone: apply !(ip.dst == YOUR_IP_ADDR) display filter and check if packets output isn't empty on visiting any web page. Possible plan of troubleshooting:
check capture filter
check different network card (e.g. non-wireless connection)
check wireshark operability in pure environment (e.g. liveUSB)
try removing suspected interfering software

SIM900 error 601 when sending a second POST

Using SIM 900 :
AT+HTTPINIT
AT+HTTPPARA="CID",1
AT+HTTPPARA="URL","www.onewebsite.fr"
AT+HTTPDATA=lengthofpostdata, 10000
sending data
AT+HTTPACTION=1
AT_HTTPREAD=0, lengthofreceiveddata
Up to that point everything works OK
Then i send a new request :
AT+HTTPPARA="CID",1
AT+HTTPPARA="URL","www.onewebsite.fr"
AT+HTTPDATA=lengthofpostdata, 10000
sending data
AT+HTTPACTION=1
Then I received the message : +HTTPACTION=1,601,0
Any idea ?
601 is some custom implemented Error code, as an example
This is a "magic" status code that we use to signal that something wrong happened with the request that was so bad that we didn't even got a response back from the server. In this case the request timed out (more than 30 seconds to return any bytes).
source
Here is the list of standard HTTP Status codes
At times you would get this error if you are sending requests too often as well! try to increase the delay between the two requests!
. +HTTPACTION:0,601,0
The above AT response code (601) for HTTP session start indicates that
there is a network error. Then make sure that the PDP context is setup
properly.
source
I faced this problem and the solution is to open the bearer again before the second request.
Use
AT+SAPBR=1,1https://stackoverflow.com/questions
Some steps I have found to work:
Use the Adafruit FONA library if possible
Before every HTTP request check whether GPRS is enabled
If GPRS is enabled, check whether you have been assigned an IP Address
If 2 and 3 are true, proceed to make the HTTP request. If not, try to reconnect to GPRS until 2 and 3 are true

What is HTTP Status code 000?

Just switched some downloads over to the Akamai CDN network and I'm seeing some strange stuff in the log files they deliver. A number of entries have the status code 000. When I asked them they said that 000 is the status when the client disconnects without transferring the entire file. Since 000 doesn't appear to be a valid HTTP response code (from the RFC), I have to wonder if that's right.
There's a knowledge base article (requires login) which lists their log values:
Log Delivery Services (LDS) LDS will show a 000 for any 200 or 206
responses with a client abort: the object was served correctly from
the origin or edge, but the end-user terminated the
connection/transaction before it completed.
This is indeed a custom status because the standard log format doesn't include a field which can indicate a client abort.
000 is a common code to use when no HTTP code was received due to a network error. According to a knowledge base article for Amazon CloudFront, 000 also means that the client disconnected before completing the request for that service.
It normally means: No valid HTTP response code
(ie: Connection failed, or was aborted before any data happened).
I would guess that their are either network issues or Akamai isn't managing their webservers correctly.

Resources