From aaf0cae749d393ec18505a4cf28aaeb3dd8e12b0 Mon Sep 17 00:00:00 2001 From: Jeff Hatch Date: Fri, 2 Jun 2017 16:30:00 -0500 Subject: Add AT#FWSWITCH support for LNA radio --- main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 46d2135..12b5d81 100644 --- a/main.cpp +++ b/main.cpp @@ -80,6 +80,7 @@ const uint32_t OPT_SERVICE = 0x00000800; const uint32_t OPT_TYPE = 0x00001000; const uint32_t OPT_CARRIER = 0x00002000; const uint32_t OPT_DATETIME = 0x00004000; +const uint32_t OPT_ACTIVEFIRMWARE = 0x00008000; const uint32_t OPT_SUMMARY_STATIC = 0x01000000; const uint32_t OPT_SUMMARY_NETWORK = 0x02000000; @@ -255,6 +256,12 @@ int main(int argc, char** argv) { if(result == CellularRadio::SUCCESS) { printf("%s %s GMT%s", sDate.c_str(), sTime.c_str(), sZone.c_str()); } + } else if(g_iOptions & OPT_ACTIVEFIRMWARE) { + std::string sValue; + result = g_apRadio->getActiveFirmware(sValue); + if(result == CellularRadio::SUCCESS) { + printf("%s", sValue.c_str()); + } } if (g_bIstty && result == CellularRadio::CODE::SUCCESS) @@ -491,6 +498,7 @@ void parseOptions(int argc, char** argv) { { "type", no_argument, &iOption, OPT_TYPE }, { "carrier", no_argument, &iOption, OPT_CARRIER }, { "datetime", no_argument, &iOption, OPT_DATETIME }, + { "active-firmware", no_argument, &iOption, OPT_ACTIVEFIRMWARE }, { "static", no_argument, &iOption, OPT_SUMMARY_STATIC }, { "dynamic", no_argument, &iOption, OPT_SUMMARY_NETWORK }, { 0, 0, 0, 0 } }; @@ -595,6 +603,8 @@ void printHelp(const std::string& sApp) { printf("\t--type\n"); printf("\t--carrier\n"); printf("\t--datetime\n"); + //Applicable for LTE910-NA1 dual FW images only + //printf("\t--active-firmware\n"); printf("\n"); printf("\tSupported Radios:\n"); printf("\t\tHE910, GE910, DE910, CE910\n"); -- cgit v1.2.3