I use official Arduino GSM Shield with Uno R3.
I uploaded web server examples from official GSM library. I use a simple python script to make TCP/IP connections to my GSM Shield web server. I send simple requests from my computer to shield, and it responses back.
At first, this worked like a charm. I even connected a led to arduino uno, and started turn it on and off. But after some time, I get timeout errors from my script.
I turned on debug mode of gsm shield. At first, it displayed normal stuff. When connection gone between my computer and shield, it doesn't showed anything on serial window.
I thought there is something wrong with shield, but when I send a request from my computer; light of the shield indicates that there is a transmission incoming; but nothing shows on serial window. I think after some time, connection between arduino and gsm shield gets broken.
What could be done to make this web server more stable? I don't want it stop working after half an hour.
Edit: Other than loop function, my code is same as web server example in the Arduino examples.
// I connected leds to D11 and D12 to see what happens during program.
void loop(){
GSMClient client = server.available();
digitalWrite (11, HIGH);
if (client) {
while (client.connected())
{
if (client.available())
{
char c = client.read();
// when it receives 1, D12 pin is high for 3 seconds.
if (c == '1') {
digitalWrite (12, HIGH);
delay(1000);
client.stop();
delay(2000);
digitalWrite (12, LOW);
}
}
}
}
}