STM32F103C8T6 GPRS TCP

Dependents:   STM32F103C8T6_GPRS_TCP

Fork of GPRS by Seeed

Files at this revision

API Documentation at this revision

Comitter:
shivanandgowdakr
Date:
Fri Jul 13 07:35:24 2018 +0000
Parent:
7:1278e9dde24e
Commit message:
STM32F103C8T6 GPRS TCP ;

Changed in this revision

gprs.cpp Show annotated file Show diff for this revision Revisions of this file
gprs.h Show annotated file Show diff for this revision Revisions of this file
diff -r 1278e9dde24e -r 35feba458a38 gprs.cpp
--- a/gprs.cpp	Mon Apr 28 12:32:12 2014 +0000
+++ b/gprs.cpp	Fri Jul 13 07:35:24 2018 +0000
@@ -76,7 +76,7 @@
             return -1;
         }
     }
-    timeCnt.stop();                	// stop timer
+    timeCnt.stop();                	    // stop timer
     timeCnt.reset();             		// clear timer
     while(gprsSerial.readable()) {  	// display the other thing..
         char c = gprsSerial.getc();
@@ -328,6 +328,10 @@
     return 0;
 }
 
+int GPRS::waitforReply(char *data)
+{
+   return waitForResp(data,DEFAULT_TIMEOUT);
+}
 int GPRS::closeTCP(void)
 {
     sendCmd("AT+CIPCLOSE\r\n");
diff -r 1278e9dde24e -r 35feba458a38 gprs.h
--- a/gprs.h	Mon Apr 28 12:32:12 2014 +0000
+++ b/gprs.h	Fri Jul 13 07:35:24 2018 +0000
@@ -50,7 +50,7 @@
      *  @param number default phone number during mobile communication
      */
     GPRS(PinName tx, PinName rx, int baudRate,char *number) : gprsSerial(tx, rx) {
-        //gprsSerial.baud(baudRate);
+        gprsSerial.baud(baudRate);
         phoneNumber = number;
     };
     
@@ -165,6 +165,14 @@
      *      0 on success
      *      -1 on error
      */
+     
+     int waitforReply(char *data);
+      /** close TCP connection
+     *  @returns
+     *      0 on success
+     *      -1 on error
+     */
+     
     int closeTCP(void);
 
     /** close TCP service