From 9134fd1b5c0ac1e4c16085f019019a0296888e0b Mon Sep 17 00:00:00 2001 From: "rodion.shyshkin" Date: Wed, 31 Mar 2021 19:59:57 +0300 Subject: [GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2 - libmts-io for $ Adding support for --ue-mode-of-operation command. --- main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 0630d44..2a51203 100644 --- a/main.cpp +++ b/main.cpp @@ -90,6 +90,7 @@ const uint32_t OPT_SIM_STATUS = 0x00040000; const uint32_t OPT_RADIO_CODE = 0x00080000; const uint32_t OPT_SIM_CARRIER_CODE = 0x00100000; const uint32_t OPT_VENDORFIRMWARE = 0x00200000; +const uint32_t OPT_UE_OPERAION_MODE = 0x00400000; const uint32_t OPT_SUMMARY_STATIC = 0x01000000; const uint32_t OPT_SUMMARY_NETWORK = 0x02000000; @@ -338,6 +339,17 @@ int main(int argc, char** argv) { printf("%s", sValue.c_str()); } } + else if (g_iOptions & OPT_UE_OPERAION_MODE) { + std::string sValue; + ICellularRadio::UE_MODES_OF_OPERATION mode; + result = g_apRadio->getUeModeOfOperation(mode); + if (result == ICellularRadio::SUCCESS) { + result = g_apRadio->convertUeModeToString(mode, sValue); + if(result == ICellularRadio::SUCCESS) { + printf("%s", sValue.c_str()); + } + } + } if (g_bIstty && result == ICellularRadio::CODE::SUCCESS) printf("\n"); @@ -618,6 +630,7 @@ void parseOptions(int argc, char** argv) { { "cellular-mode",no_argument, &iOption, OPT_CELL_MODE }, { "supported-cellular-modes", no_argument, &iOption, OPT_SUPPORTED_CELL_MODE }, { "sim-carrier-code", no_argument, &iOption, OPT_SIM_CARRIER_CODE }, + { "ue-mode-of-operation", no_argument,&iOption, OPT_UE_OPERAION_MODE }, { 0, 0, 0, 0 } }; /* getopt_long stores the option index here. */ @@ -728,6 +741,7 @@ void printHelp(const std::string& sApp) { printf("\t--cellular-mode\n"); printf("\t--supported-cellular-modes\n"); printf("\t--sim-carrier-code\n"); + printf("\t--ue-mode-of-operation\n"); // Applicable for LTE910-NA1 dual FW images only // printf("\t--active-firmware\n"); printf("\n"); -- cgit v1.2.3