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 StarterKit by
Diff: main.cpp
- Revision:
- 6:713b4cbf1a7d
- Parent:
- 5:3417b6a84ee3
- Child:
- 8:b08ec94d9e9f
diff -r 3417b6a84ee3 -r 713b4cbf1a7d main.cpp --- a/main.cpp Mon Jul 11 21:34:31 2016 +0000 +++ b/main.cpp Mon Jul 11 22:05:34 2016 +0000 @@ -168,14 +168,20 @@ } int mdm_sendAtCmdRsp(const char *cmd, const char **rsp_list, int timeout_ms, string * rsp, int * len) { - static char cmd_buf[3200]; // Need enough room for the WNC sockreads (over 3000 chars) - - if (cmd && strlen(cmd) > 0) { + size_t n = strlen(cmd); + if (cmd && n > 0) { if (mdm_dbgmask & MDM_DBG_AT_CMDS) { printf(MAG "ATCMD: " DEF "--> " GRN "%s" DEF "\n", cmd); } - mdm.printf("%s\r\n", cmd); + while (n--) { + mdm.putc(*cmd++); + wait_ms(1); + }; + mdm.putc('\r'); + wait_ms(1); + mdm.putc('\n'); + wait_ms(1); } if (rsp_list) {