From 5649cebb23edc7ef20456e76b959e4a217a08594 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Wed, 12 Jun 2019 09:51:50 +0300 Subject: [MTS-MTQ] QuectelRadio implementation Updated the following functions to support Quectel radios: - CellularRadioFactory::createEG95Radio - fixed to build a EG95Radio instance; - ICellularRadio::extractModelFromResult - returning EG95 for EG95 radios; - ICellularRadio::convertModelToType - returning VALUE_TYPE_LTE for EG95. --- src/MTS_IO_ICellularRadio.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/MTS_IO_ICellularRadio.cpp') diff --git a/src/MTS_IO_ICellularRadio.cpp b/src/MTS_IO_ICellularRadio.cpp index 2f19f3a..7f216d0 100644 --- a/src/MTS_IO_ICellularRadio.cpp +++ b/src/MTS_IO_ICellularRadio.cpp @@ -181,6 +181,27 @@ MTS::IO::ICellularRadio::CODE MTS::IO::ICellularRadio::convertModelToMtsShortCod } else if (sModel.find("DE910") == 0) { sCode = "EV3"; eCode = SUCCESS; + } else if (sModel.find("EG95") == 0) { + if (NULL == radioObject) { + sCode = VALUE_NOT_SUPPORTED; + eCode = ERROR; + } else { + std::string sValue; + eCode = radioObject->getFirmware(sValue); + if (eCode != SUCCESS) { + sCode = VALUE_NOT_SUPPORTED; + eCode = ERROR; + } else if (sValue.find("EG95E") != std::string::npos) { + sCode = "LEU7"; + eCode = SUCCESS; + } else if (sValue.find("EG95NA") != std::string::npos) { + sCode = "LNA7"; + eCode = SUCCESS; + } else { + sCode = VALUE_NOT_SUPPORTED; + eCode = ERROR; + } + } } else { sCode = VALUE_NOT_SUPPORTED; printError("RADIO| Could not identify MTS short code from model. [%s]", sModel.c_str()); @@ -274,6 +295,9 @@ MTS::IO::ICellularRadio::CODE MTS::IO::ICellularRadio::convertModelToType(const } else if (sModel.find("DE910") == 0) { sType = VALUE_TYPE_CDMA; eCode = SUCCESS; + } else if (sModel.find("EG95") == 0) { + sType = VALUE_TYPE_LTE; + eCode = SUCCESS; } else { sType = VALUE_TYPE_GSM; eCode = ERROR; -- cgit v1.2.3