summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <Jeff.Hatch@multitech.com>2018-06-21 08:54:19 -0500
committerJeff Hatch <Jeff.Hatch@multitech.com>2018-06-21 08:54:19 -0500
commitc8d7d6c4e60bb46766031342955b53afd9c3bc7e (patch)
tree1ea17cc90307c2ecbd5f00cb1839e7d6b2efe72f
parent4b1e0509379acf7773ffa6575825bffb4c068d13 (diff)
downloadlibmts-io-1.0.9.tar.gz
libmts-io-1.0.9.tar.bz2
libmts-io-1.0.9.zip
Update to detect LAT3 or LNA3 with FWSWITCH AT command1.0.9
-rw-r--r--src/MTS_IO_CellularRadio.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/MTS_IO_CellularRadio.cpp b/src/MTS_IO_CellularRadio.cpp
index 746d3c5..569f8fc 100644
--- a/src/MTS_IO_CellularRadio.cpp
+++ b/src/MTS_IO_CellularRadio.cpp
@@ -42,6 +42,7 @@
#include <mts/MTS_Timer.h>
#include <mts/MTS_Logger.h>
#include <mts/MTS_Text.h>
+#include <mts/MTS_System.h>
#include <map>
#include <cstring>
#include <sstream>
@@ -301,7 +302,14 @@ CellularRadio::CODE CellularRadio::convertModelToMtsShortCode(const std::string&
sCode = "LAT1";
eCode = SUCCESS;
} else if (sModel.find("LE910-NA1") == 0) {
- sCode = "LNA3";
+ std::string cmd = "radio-query --active-firmware";
+ std::string result;
+ int32_t code = MTS::System::cmd(cmd, result);
+ if (!code) {
+ sCode = "LNA3";
+ } else {
+ sCode = "LAT3";
+ }
eCode = SUCCESS;
} else if (sModel.find("LE910-SVG") == 0) {
sCode = "LVW2";