Cellular library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems
Dependents: mtsas mtsas mtsas mtsas
Diff: Cellular/UIP.cpp
- Revision:
- 8:2d7259d244d1
- Parent:
- 7:0ee8e69a3e9c
- Child:
- 9:1a03e3f3e7fe
diff -r 0ee8e69a3e9c -r 2d7259d244d1 Cellular/UIP.cpp --- a/Cellular/UIP.cpp Wed May 21 15:21:25 2014 -0500 +++ b/Cellular/UIP.cpp Wed May 21 15:28:37 2014 -0500 @@ -35,17 +35,15 @@ bool UIP::init(MTSBufferedIO* io) { - if (io == NULL) { + if (! Cellular::init(io)) { return false; } - this->io = io; - test(); // Reset radio to make sure it's in a good state and wait for it to come back reset(); test(); - return SUCCESS; + return true; } bool UIP::configureSignals(PinName DCD, PinName DTR, PinName RESET) @@ -574,22 +572,6 @@ return code; } -Code UIP::setApn(const std::string& apn) -{ - Code code = sendBasicCommand("AT#APNSERV=\"" + apn + "\"", 1000); - if (code != SUCCESS) { - return code; - } - this->apn = apn; - return code; -} - - -Code UIP::setDns(const std::string& primary, const std::string& secondary) -{ - return sendBasicCommand("AT#DNS=1," + primary + "," + secondary, 1000); -} - bool UIP::ping(const std::string& address) { char buffer[256] = {0}; @@ -724,4 +706,4 @@ } while (!done); return result; -} \ No newline at end of file +}