2

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 ?

rene
  • 46
  • 1
  • 1
  • 4
  • possible duplicate of [error +HTTPACTION:0,601,0](http://stackoverflow.com/questions/15975051/error-httpaction0-601-0) – Burhan Khalid Aug 09 '15 at 15:07
  • Not a duplicate, because setting up of connection bearer was already done (even if not described here) and because the first transaction (POST) worked successfully. The concern if for the second POST request. – rene Aug 09 '15 at 19:08
  • I send commands repeatedly with the following set (I don't send the CID again): HTTPPARA=URL, HTTPACTION=0 (http get instead of post), HTTPREAD. This generally works, but sometimes I get a 60x error. I'm thinking of upgrading the firmware... – erict Apr 09 '16 at 23:47

3 Answers3

4

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

dmSherazi
  • 3,743
  • 5
  • 37
  • 62
1

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
clemens
  • 16,716
  • 11
  • 50
  • 65
0

Some steps I have found to work:

  1. Use the Adafruit FONA library if possible
  2. Before every HTTP request check whether GPRS is enabled
  3. If GPRS is enabled, check whether you have been assigned an IP Address
  4. 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
RobC
  • 22,977
  • 20
  • 73
  • 80
Karanja Mutahi
  • 25
  • 1
  • 1
  • 7