I'm using a SIM 900 GPRS Shield for Arduino for sending data using HTTP command; sometime when I use the command
AT+HTTPACTION=1
I receive error code 604, that mean Stack Busy.
Someone know what is the problem?
If I reset the board I receive the same this error; I note that if I turn off and turn on the GPRS board, so that I receive a new IP address, the error does not occur, so it's like if the old IP address is "blocked"; why?
If I reset the board I receive the same this error; I note that if I turn off and turn on the GPRS board, so that I receive a new IP address, the error does not occur, so it's like if the old IP address is "blocked"; why?
Does that mean you have the same IP after a reset? In this case the reset wasn't successful.
"Stack busy" sound like a SIM900 internal problem, so resetting the shield is probably the best option. How do you reset the module? By a software command, a hardware button or anything else?
I reset the module by software using a reset pin of Arduino and a digital output low; I don't use the watchdog because it doesn't work into my version of Arduino (Arduino Mega 2560).. However also using the HW reset button I receive sometimes the same IP address, and I don't think this is an error, because the GPRS shield is always turned on, so the reset doesn't have effect on it.
watchdog feature not work on a Mega2560 because of a bug into the bootloader; newer Mega2560 shouldn't have this bug
I never heard of this bug and I didn't know that the bootloader is able to disable the watchdog feature completely. Do you have any more information about that?
I reset the module by software using a reset pin of Arduino and a digital output low;
If you mean pin 9, this isn't a reset but a power down of the module. You can power it up and down using this pin, just put a high pulse of 1s length on it. How do you do the reset you mentioned?
no, i don't mean pin 9, but the reset pin of arduino UNO, I have used part ot this code:
int led = 13;//pin 13 as OUTPUT LED pin
int resetPin = 12;
// the setup routine runs once when you press reset:
void setup() {
digitalWrite(resetPin, HIGH);
delay(200);
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
pinMode(resetPin, OUTPUT);
Serial.begin(9600);//initialize Serial Port
Serial.println("reset");//print reset to know the program has been reset and
//the setup function happened
delay(200);
}
// the loop routine runs over and over again forever:
void loop() {
delay(10);
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
Serial.println("on");
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
Serial.println("off");
delay(1000); // wait for a second
Serial.println("resetting");
delay(10);
digitalWrite(resetPin, LOW);
Serial.println("this never happens");
//this never happens because Arduino resets
}
however turning off and turning on the GPRS Shield via software I solved: