Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of GPRSInterface by
Diff: GPRS/GPRS.cpp
- Revision:
- 8:180feb3ebe62
- Parent:
- 7:1bdcfd6da2d0
- Child:
- 10:698c04e25c6b
diff -r 1bdcfd6da2d0 -r 180feb3ebe62 GPRS/GPRS.cpp
--- a/GPRS/GPRS.cpp Tue May 06 03:50:21 2014 +0000
+++ b/GPRS/GPRS.cpp Tue May 06 03:56:03 2014 +0000
@@ -224,19 +224,15 @@
if (socket < 0 || socket > MAX_SOCK_NUM-1) {
return -1;
}
-
char cmd[32];
- char resp[16];
wait(1);
if(len > 0){
- snprintf(cmd,sizeof(cmd),"AT+CIPSEND=%d,%d\r\n",socket,len);
- if(0 != sendCmdAndWaitForResp(cmd,">",DEFAULT_TIMEOUT,CMD)) {
+ snprintf(cmd,sizeof(cmd),"AT+CIPSEND=%d\r\n",socket);
+ if(0 != sendCmdAndWaitForResp(cmd,">",2,CMD)) {
return false;
}
- snprintf(resp,sizeof(resp),"%d, SEND OK",socket);
- if(0 != sendCmdAndWaitForResp(str,resp,DEFAULT_TIMEOUT,DATA)) {
- return -1;
- }
+ sendCmd(str);
+ serialModem.putc((char)0x1a);
}
return len;
}