Go Down

Topic: How can we work with AT+SDATASTATUS (Read 441 times) previous topic - next topic

pierrot10

Good evening,

I searched a lot on internet (sorry I ma a beginner) to know how to get a value of
Quote
AT+SDATASTATUS


My goal is to know the status of the connection in order to create a condition

if connection is good => continue
id connection is'nt => reconnect and execute AT' commands

Could you provide me an exemple of AT+SDATASTATUS with the Serial.print() of the retunr value/data?

Thank for your help
Il ne suffit pas de tout savoir, la persévérance, c'est déjà presque tout!

marco_c

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

pierrot10

Hello Thank for your answer,
I already read that document. it help me, but in spite of this I still block, specialy to display teh result of SDATASTATUS.
It would better help if I can have an exemple in that way I can better understand that copying.

Thank
Il ne suffit pas de tout savoir, la persévérance, c'est déjà presque tout!

PaulS

Quote
specialy to display teh result of SDATASTATUS.

Displaying the response to that AT command is the same as displaying the response to any AT command. How are you doing it for other AT commands?

pierrot10

It still does not work.

I wish to display the result or status of each command, in order to make sure that all of them return me an OK.

Here is my code. Each command ate followed by status() function. I also add
Code: [Select]
cell.print("+SOCKSTATUS");, but it does not show/display anythink

Code: [Select]

   Serial.println(F("Setting up PDP Context"));
     cell.println("AT+CGDCONT=1,\"IP\",\"internet\"");
     status();
     delay(1000);
     
     Serial.println(F("Activating PDP Context"));
     cell.println("AT+CGACT=1,1");
     status();
     delay(1000);
     
     Serial.println(F("Configuring TCP connection to TCP Server"));
     cell.println("AT+SDATACONF=1,\"TCP\",\"92.104.69.134\",81");
     status();
     delay(1000);
     
     Serial.println(F("Starting TCP Connection\n"));
     cell.println("AT+SDATASTART=1,1");
     status();
     delay(1000);
     
     Serial.println(F("Getting status"));
     cell.print("AT+SDATASTATUS=1");
     status();
   
    Serial.println(F("Display status"));
     cell.print("+SOCKSTATUS");
     status();


Here is my status() command
Code: [Select]

static void status(){
   
     while(cell.available()){
        incoming_status=cell.read();
        Serial.print(incoming_status);
      }
}


Please, help with exemple, it would be very nice from you.

Have a nice day.
Il ne suffit pas de tout savoir, la persévérance, c'est déjà presque tout!

Go Up