rene
rene

Reputation: 46

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 ?

Upvotes: 2

Views: 21351

Answers (3)

dmSherazi
dmSherazi

Reputation: 3831

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

Upvotes: 4

Karanja Mutahi
Karanja Mutahi

Reputation: 25

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

Upvotes: 0

user2115205
user2115205

Reputation: 11

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

Upvotes: 1

Related Questions