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.
Dependencies: FXOS8700CQ MODSERIAL mbed-rtos mbed
Fork of ATT_Cellular_IOT_Button by
Revision 38:564b312a719f, committed 2016-07-23
- Comitter:
- fkellermavnet
- Date:
- Sat Jul 23 04:27:35 2016 +0000
- Parent:
- 37:44265008bab9
- Child:
- 39:1996eaec02d6
- Commit message:
- Changed timeout for sockconn.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| wnc_control.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Jul 23 02:32:14 2016 +0000 +++ b/main.cpp Sat Jul 23 04:27:35 2016 +0000 @@ -41,7 +41,7 @@ #define WNC_WAIT_FOR_AT_CMD_MS 40 Serial pc(USBTX, USBRX); -SerialBuffered mdm(PTD3, PTD2, 128); +SerialBuffered mdm(PTD3, PTD2, 4096); DigitalOut led_green(LED_GREEN); DigitalOut led_red(LED_RED); DigitalOut led_blue(LED_BLUE);
--- a/wnc_control.cpp Sat Jul 23 02:32:14 2016 +0000
+++ b/wnc_control.cpp Sat Jul 23 04:27:35 2016 +0000
@@ -267,6 +267,7 @@
// send_wnc_cmd("AT+CFUN=1", &pRespStr, WNC_TIMEOUT_MS); // Try to force on network pt2
// send_wnc_cmd("AT", &pRespStr, WNC_TIMEOUT_MS); // Heartbeat?
pc.puts("WNC Status:\r\n");
+ send_wnc_cmd("AT@SOCKDIAL?", &pRespStr, WNC_TIMEOUT_MS);
send_wnc_cmd("AT+CPIN?", &pRespStr, WNC_TIMEOUT_MS); // Check if SIM locked
send_wnc_cmd("AT+CREG?", &pRespStr, WNC_TIMEOUT_MS); // Check if registered on network
send_wnc_cmd("AT+CSQ", &pRespStr, WNC_TIMEOUT_MS); // Check RSSI
@@ -281,7 +282,8 @@
cmd_str += ipStr;
cmd_str += "\",";
cmd_str += port;
- send_wnc_cmd(cmd_str.c_str(), &pRespStr, 5*WNC_TIMEOUT_MS);
+ cmd_str += ",30";
+ send_wnc_cmd(cmd_str.c_str(), &pRespStr, 30000);
send_wnc_cmd("AT@SOCKCREAT?", &pRespStr, WNC_TIMEOUT_MS);
send_wnc_cmd("AT@SOCKCONN?", &pRespStr, WNC_TIMEOUT_MS);
}
