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/UIP.cpp
- Revision:
- 13:e443e7e2b605
- Parent:
- 11:4e428f689069
- Child:
- 14:614952fb3af3
diff -r 33c83c8e412a -r e443e7e2b605 Cellular/UIP.cpp --- a/Cellular/UIP.cpp Thu May 22 15:05:37 2014 +0000 +++ b/Cellular/UIP.cpp Thu May 22 14:05:49 2014 -0500 @@ -88,7 +88,11 @@ } while(tmr.read() < 30); //AT#CONNECTIONSTART: Make a PPP connection - logDebug("Making PPP Connection Attempt. APN[%s]", apn.c_str()); + if (type == MTSMC_H5_IP) { + logDebug("Making PPP Connection Attempt. APN[%s]", apn.c_str()); + } else { + logDebug("Making PPP Connection Attempt"); + } std::string pppResult = sendCommand("AT#CONNECTIONSTART", 120000); std::vector<std::string> parts = Text::split(pppResult, "\r\n"); @@ -127,18 +131,20 @@ bool UIP::isConnected() { - //1) Check if APN was set - if(apn.size() == 0) { - logDebug("APN is not set"); - return false; + //1) Check if APN was set if we're on a HSPA radio + if (type == MTSMC_H5_IP) { + if(apn.size() == 0) { + logDebug("APN is not set"); + return false; + } } - //1) Check that we do not have a live connection up + //2) Check that we do not have a live connection up if(socketOpened) { logDebug("Socket is opened"); return true; } - //2) Query the radio + //3) Query the radio std::string result = sendCommand("AT#VSTATE", 3000); if(result.find("CONNECTED") != std::string::npos) { if(pppConnected == false) {