Simple detection for LE910-NA1 modules
Fork of MTS-Cellular by
Diff: Cellular/EasyIP.cpp
- Revision:
- 49:1fc51c53cebf
- Parent:
- 41:8b9b5098696f
- Child:
- 51:ffc556ba33f7
--- a/Cellular/EasyIP.cpp Fri Aug 01 21:54:36 2014 +0000 +++ b/Cellular/EasyIP.cpp Mon Aug 04 22:16:18 2014 +0000 @@ -44,7 +44,7 @@ } logDebug("radio type: %s", Cellular::getRadioNames(type).c_str()); - //Turns on the HW flow control, equiv. to AT&K + //Turns on the HW flow control if(sendBasicCommand("AT&K3", 2000) != MTS_SUCCESS) { logWarning("Failed to set flow control to radio"); } @@ -713,12 +713,11 @@ std::string result; unsigned int timeoutMillis = 10000; //time in ms - const int size_cmd = 3; //Attempt to write command wait(1.2); //Format for +++ command is 1 second wait, send +++, then another second wait //1s wait after command is implemented as a polling function for 2 seconds //Option: Could change wait periods to be longer/shorter (0-255)*50ms - if(io->write("+++", size_cmd, timeoutMillis) != size_cmd) { + if(io->write("+++", 3, timeoutMillis) != 3) { //Failed to write command logError("failed to send command to radio within %d milliseconds", timeoutMillis); return false;