From a44568d47a44beb66433206cdb7f7d931efc0f43 Mon Sep 17 00:00:00 2001 From: Yevhen Mykhno Date: Tue, 31 Jan 2023 13:39:31 +0200 Subject: [GP-1733] mPower R.6.3.X: L6G1 Support - libmts-io, radio-cmd, radio-query Implementing CB610L radio modem support --- src/MTS_IO_CellularRadioFactory.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/MTS_IO_CellularRadioFactory.cpp') diff --git a/src/MTS_IO_CellularRadioFactory.cpp b/src/MTS_IO_CellularRadioFactory.cpp index 1a2cee2..f545599 100644 --- a/src/MTS_IO_CellularRadioFactory.cpp +++ b/src/MTS_IO_CellularRadioFactory.cpp @@ -38,6 +38,7 @@ #include #include "mts/MTS_IO_EG95Radio.h" #include "mts/MTS_IO_EG25Radio.h" +#include "mts/MTS_IO_CB610LRadio.h" #include using namespace MTS::IO; @@ -62,6 +63,7 @@ CellularRadioFactory::CellularRadioFactory() { m_mCreationMap[LE866A1JSRadio::MODEL_NAME] = &CellularRadioFactory::createLE866A1JS; m_mCreationMap[EG95Radio::MODEL_NAME] = &CellularRadioFactory::createEG95Radio; m_mCreationMap[EG25Radio::MODEL_NAME] = &CellularRadioFactory::createEG25Radio; + m_mCreationMap[CB610LRadio::MODEL_NAME] = &CellularRadioFactory::createCB610LRadio; } ICellularRadio* CellularRadioFactory::create(const std::string& sModel, const std::string& sPort) { @@ -101,7 +103,7 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { //Get model int count = 0; - std::string sCmd("AT+GMM"); + std::string sCmd("AT+CGMM"); std::string sResult; do { sResult = ICellularRadio::sendCommand(apIo, sCmd, ICellularRadio::DEFAULT_BAIL_STRINGS, 1000, ICellularRadio::CR); @@ -120,7 +122,7 @@ std::string CellularRadioFactory::identifyRadio(const std::string& sPort) { } std::string sModel = ICellularRadio::extractModelFromResult(sResult); - printDebug("RADIO| Extracted [%s] from AT+GMM query", sModel.c_str()); + printDebug("RADIO| Extracted [%s] from AT+CGMM query", sModel.c_str()); apIo->close(); return sModel; } @@ -200,3 +202,7 @@ ICellularRadio* CellularRadioFactory::createEG95Radio(const std::string& sPort) ICellularRadio* CellularRadioFactory::createEG25Radio(const std::string& sPort) const { return new EG25Radio(sPort); } + +ICellularRadio* CellularRadioFactory::createCB610LRadio(const std::string& sPort) const { + return new CB610LRadio(sPort); +} \ No newline at end of file -- cgit v1.2.3