diff options
author | Jeff Hatch <jhatch@multitech.com> | 2021-03-31 16:17:33 -0500 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2021-03-31 16:17:33 -0500 |
commit | 0b0453bfed849170b23b7adadaab6e660dc46452 (patch) | |
tree | ba55b6ed0296cad425450856119ff132b16abd17 | |
parent | d2279c048a9dadbedae185da301ae57de7301379 (diff) | |
parent | cd8f96c204d479283c34f787f2c5f056016c739b (diff) | |
download | radio-query-0b0453bfed849170b23b7adadaab6e660dc46452.tar.gz radio-query-0b0453bfed849170b23b7adadaab6e660dc46452.tar.bz2 radio-query-0b0453bfed849170b23b7adadaab6e660dc46452.zip |
Merge branch 'rs/GP-1111-cemode-for-telit' into 'master'
[GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2 - libmts-io for $
See merge request !10
-rw-r--r-- | main.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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_MODE_OF_OPERATION = 0x00400000; const uint32_t OPT_SUMMARY_STATIC = 0x01000000; const uint32_t OPT_SUMMARY_NETWORK = 0x02000000; @@ -189,9 +190,9 @@ int main(int argc, char** argv) { std::string sValue; ICellularRadio::REGISTRATION eReg; result = g_apRadio->getRegistration(eReg); - if(result == ICellularRadio::SUCCESS) { + if (result == ICellularRadio::SUCCESS) { result = g_apRadio->convertRegistrationToString(eReg, sValue); - if(result == ICellularRadio::SUCCESS) { + if (result == ICellularRadio::SUCCESS) { printf("%s", sValue.c_str()); } } @@ -338,6 +339,17 @@ int main(int argc, char** argv) { printf("%s", sValue.c_str()); } } + else if (g_iOptions & OPT_UE_MODE_OF_OPERATION) { + 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_MODE_OF_OPERATION }, { 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"); |