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 MTS-Cellular by
Diff: Cellular/CellularFactory.cpp
- Revision:
- 41:8b9b5098696f
- Parent:
- 30:1326b623919a
- Child:
- 51:ffc556ba33f7
diff -r ecef43f87c7a -r 8b9b5098696f Cellular/CellularFactory.cpp
--- a/Cellular/CellularFactory.cpp Tue Jul 29 19:39:01 2014 +0000
+++ b/Cellular/CellularFactory.cpp Wed Jul 30 20:22:23 2014 +0000
@@ -25,10 +25,15 @@
/* "ATI4" gets us the model (HE910, DE910, etc) */
for (int i = 0; i < 5; i++) {
- model = sendCommand(io, "ATI4", 2000);
+ model = sendCommand(io, "ATI4", 3000);
if (model.find("error") == string::npos && model.find("ERROR") == string::npos && !model.empty()) {
/* didn't get an error - keep going */
- break;
+ if(model.find("#STN") != string::npos) {
+ //If response found is from unsolicited response #STN: from the radio,
+ //then we got a "corrupted" response, and to try again.
+ continue;
+ }
+ break;
}
wait(1);
