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);
          digitalWrite (12, LOW);
  • Can you post a link to the exact example code you used? Have you made any modifications to it? – Peter Bloomfield Dec 1 '14 at 10:34
  • @PeterR.Bloomfield I just added what I have changed in web server example. – Ekrem Doğan Dec 2 '14 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.