lingeshbarani / gsm-shield-arduino

Automatically exported from code.google.com/p/gsm-shield-arduino
0 stars 0 forks source link

Arduino restarts when waiting for end of TCP connection #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open TCP connection
2. Don't read response
3. Wait for TCP connection to be closed by server:
    while(true) {
        Serial.println("Waiting for TCP to close...");
        gsm.SimpleWriteln("AT+CIPSTATUS");
        if(gsm.WaitResp(5000, 50, "TCP CLOSED")==RX_FINISHED_STR_RECV)
            break;
        delay(1000);
    }

What is the expected output? What do you see instead?
I expect to exit from the loop and move on when TCP connection is closed.
Instead, My program *restarts*. Here is terminal output:
(...)
Waiting for TCP to close...
Waiting for TCP to close...
Waiting for TCP to close...
ÀStart!
(...)

What version of the product are you using? On what operating system?
Arduino IDE 1.0.3
GSM library v304
Linux (Fedora 17)
GBOARD Model: IM120411004 ( like this one: 
http://imall.iteadstudio.com/im120411004.html )

Please provide any additional information below.

I tried to implement my method "waitForEndOfConnection()" using gsm.read() and 
provided content-length, and the method above. Both end up restarting the 
device. It is not RAM problem, since I have also used printMem() in the loop 
and I have 268 bytes free all the time.

Anyone has an idea what can be the cause?

Original issue reported on code.google.com by pierzcha...@gmail.com on 23 Jan 2013 at 4:34

GoogleCodeExporter commented 8 years ago
Ehh.. I don't know how to edit an issue here... of course the steps include:
1. Open TCP connection
2. Sent HTTP GET request
3. Don't read response
... and later as in issue :)

Original comment by pierzcha...@gmail.com on 23 Jan 2013 at 4:37

GoogleCodeExporter commented 8 years ago
Usually when Arduino restarts itself there is a RAM problem.
Try to use less variable and less string.
We're going to reduce the RAM usage of the lib.
Marco

Original comment by martines...@gmail.com on 6 Feb 2013 at 6:36

GoogleCodeExporter commented 8 years ago

Original comment by martines...@gmail.com on 8 Mar 2013 at 10:54

GoogleCodeExporter commented 8 years ago
This issue section is not longer supported.
Please check the support page www.gsmlib.org 

Original comment by martines...@gmail.com on 6 Jul 2013 at 11:27