summaryrefslogtreecommitdiff
path: root/src/MTS_IO_TelitRadio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MTS_IO_TelitRadio.cpp')
-rw-r--r--src/MTS_IO_TelitRadio.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/MTS_IO_TelitRadio.cpp b/src/MTS_IO_TelitRadio.cpp
index 7e74ca6..5b8e55d 100644
--- a/src/MTS_IO_TelitRadio.cpp
+++ b/src/MTS_IO_TelitRadio.cpp
@@ -634,12 +634,12 @@ ICellularRadio::CODE TelitRadio::getSupportedCellularModes(CELLULAR_MODES &netwo
std::string sCmd("AT+WS46=?");
std::string cmdResult = sendCommand(sCmd);
if (cmdResult.find("+WS46:") == std::string::npos) {
- printDebug("%s| AT+WS46=? returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str());
+ printError("%s| AT+WS46=? returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str());
return FAILURE;
}
if (cmdResult.find('(') == std::string::npos) {
- printDebug("AT+WS46: error responce %s", cmdResult.c_str());
+ printError("AT+WS46: error responce %s", cmdResult.c_str());
return FAILURE;
}
std::string s = MTS::Text::split(cmdResult, '(')[1];
@@ -652,7 +652,7 @@ ICellularRadio::CODE TelitRadio::getSupportedCellularModes(CELLULAR_MODES &netwo
const std::vector<std::string> &r = MTS::Text::split(it, "-");
int begin, end;
if ( ! MTS::Text::parse(begin, r[0]) || ! MTS::Text::parse(end, r[1])) {
- printDebug("AT+WS46: error parsing network mode range: %s-%s", r[0].c_str(), r[1].c_str());
+ printError("AT+WS46: error parsing network mode range: %s-%s", r[0].c_str(), r[1].c_str());
return FAILURE;
}
for (int i = begin; i<=end; ++i) {
@@ -663,14 +663,14 @@ ICellularRadio::CODE TelitRadio::getSupportedCellularModes(CELLULAR_MODES &netwo
} else {
int v;
if ( ! MTS::Text::parse(v, it)) {
- printDebug("AT+WS46: error parsing network mode: %s", it.c_str());
+ printError("AT+WS46: error parsing network mode: %s", it.c_str());
return FAILURE;
}
m.push_back(v);
}
}
if (m.size()>1024) {
- printDebug("AT+WS46: network modes count overflow, parsing error");
+ printError("AT+WS46: network modes count overflow, parsing error");
return FAILURE;
}
@@ -707,7 +707,7 @@ ICellularRadio::CODE TelitRadio::setCellularMode(CELLULAR_MODES networks) {
sCmd += std::to_string(wds);
std::string cmdResult = sendCommand(sCmd);
if (cmdResult.find(ICellularRadio::RSP_OK) == std::string::npos) {
- printDebug("%s| AT+WS46= returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str());
+ printError("%s| AT+WS46= returned unexpected response: [%s][%s]", getName().c_str(), sCmd.c_str(), cmdResult.c_str());
return FAILURE;
}
return SUCCESS;
@@ -735,7 +735,7 @@ ICellularRadio::CELLULAR_MODES TelitRadio::preferredNetwork(CELLULAR_MODES prefN
case 41: result |= CELLULAR_MODE_2G | CELLULAR_MODE_3G | CELLULAR_MODE_5G; break;
case 42: result |= CELLULAR_MODE_2G | CELLULAR_MODE_5G; break;
default:
- printDebug("AT+WS46: unhandled network mode: %d", wds);
+ printError("AT+WS46: unhandled network mode: %d", wds);
break;
}
return static_cast<CELLULAR_MODES>(result);