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: M2XStreamClient jsonlite mbed
Fork of MTSAS_Cellular_Connect_Example_F411 by
Diff: main.cpp
- Revision:
- 5:46e66c649006
- Parent:
- 4:8b02a6b67f4d
- Child:
- 7:3e937d898953
diff -r 8b02a6b67f4d -r 46e66c649006 main.cpp
--- a/main.cpp Mon Jul 28 15:09:18 2014 +0000
+++ b/main.cpp Mon Jul 28 15:15:53 2014 +0000
@@ -39,10 +39,10 @@
Cellular* radio = CellularFactory::create(io);
for (int i = 0; i < 10; i++) {
if (i >= 10) {
- logError("Failed to set APN");
+ logError("Failed to set APN to %s", APN);
}
if (radio->setApn(APN) == MTS_SUCCESS) {
- logInfo("Successfully set APN [%s]", APN);
+ logInfo("Successfully set APN to %s", APN);
break;
} else {
wait(1);
@@ -52,7 +52,7 @@
//Establish PPP link
for (int i = 0; i < 10; i++) {
if (i >= 10) {
- logError("Failed to connect to cell network");
+ logError("Failed to establish PPP link");
}
if (radio->connect() == true) {
logInfo("Successfully established PPP link");
@@ -65,7 +65,7 @@
//Ping google.com
for (int i = 0; i < 10; i++) {
if (i >= 10) {
- logError("Failed to ping google.com");
+ logError("Failed to ping www.google.com");
}
if (radio->ping("www.google.com") == true) {
logInfo("Successfully pinged www.google.com");
