summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2021-03-31 16:17:27 -0500
committerJeff Hatch <jhatch@multitech.com>2021-03-31 16:17:27 -0500
commit798ce3fc49a80d079580f0eec484ede498d51a34 (patch)
treecc6f39e5fcb1e6caf6e12791dc74ca7e79f56781
parent12c16c4e6625251bd5d20c35aca5fb75494b86ee (diff)
parent0337cce1fb3c7554f1909d1d604941069ca66be6 (diff)
downloadradio-cmd-0.8.tar.gz
radio-cmd-0.8.tar.bz2
radio-cmd-0.8.zip
Merge branch 'rs/GP-1111-cemode-for-telit' into 'master' 0.8
[GP-1111] mPower R. Apr 2021: +CEMODE shall be set to CEMODE=2 - libmts-io for $ See merge request !8
-rw-r--r--main.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 3ec00db..14b3c31 100644
--- a/main.cpp
+++ b/main.cpp
@@ -71,6 +71,7 @@ Json::Value g_jData;
std::string g_sSimPin;
std::string g_sCellularMode;
std::string g_sDeltaFwPath;
+std::string g_sUeModeOfOperation;
MTS::AutoPtr<MTS::IO::ICellularRadio> g_apRadio;
@@ -116,6 +117,7 @@ const uint32_t AOPT_OMA_DM_START = 0x00000001;
const uint32_t AOPT_DFU_UPLOAD = 0x00000002;
const uint32_t AOPT_DFU_APPLY = 0x00000004;
const uint32_t AOPT_FUMO_LOCAL = 0x00000008;
+const uint32_t AOPT_SET_UE_MODE_OF_OPERATION = 0x00000010;
void handle_sigterm(int signum);
void printHelp(const std::string& sApp);
@@ -164,6 +166,7 @@ static struct option long_options[] = {
{ "delta-fwu-upload", required_argument, 0, 'x' },
{ "delta-fwu-apply", no_argument, 0, 'A' },
{ "init-fumo-local", required_argument, 0, 'F' },
+ { "set-ue-mode-of-operation",required_argument, 0, 'U' },
{ 0, 0, 0, 0 }
};
@@ -408,6 +411,15 @@ int main(int argc, char** argv) {
result = g_apRadio->fumoLocalApply(cb);
} else if (g_iAuxOptions & AOPT_FUMO_LOCAL) {
result = handleFumoLocal(g_sDeltaFwPath);
+ } else if (g_iAuxOptions & AOPT_SET_UE_MODE_OF_OPERATION) {
+ ICellularRadio::UE_MODES_OF_OPERATION mode;
+ result = ICellularRadio::convertStringToUeMode(g_sUeModeOfOperation, mode);
+ if (result == ICellularRadio::CODE::SUCCESS) {
+ result = g_apRadio->setUeModeOfOperation(mode);
+ printf("%s\n", code2str(result));
+ } else {
+ printf("Invalid argument: %s\n", g_sUeModeOfOperation.c_str());
+ }
}
shutdown();
@@ -648,6 +660,12 @@ void parseOptions(int argc, char** argv)
g_iAuxOptions |= AOPT_FUMO_LOCAL;
break;
+ case 'U':
+ if (optarg)
+ g_sUeModeOfOperation = optarg;
+ g_iAuxOptions |= AOPT_SET_UE_MODE_OF_OPERATION;
+ break;
+
default:
printf("OPTION: [%d] ABORTING!!\n", c);
abort();
@@ -693,6 +711,7 @@ void printHelp(const std::string& sApp) {
printf("\t--set-mip-mn-ha-ss <VAL> : set MIP MN HA SS\n");
printf("\t--set-rx-diversity <VAL> : set RX Diversity\n");
printf("\t--set-cellular-mode : set preferred networks eg. 2g,3g,4g\n");
+ printf("\t--set-ue-mode-of-operation <MODE> : set the UE mode of operation: ps_1, ps_2, csps_1, csps_2\n");
// Applicable for LTE910-NA1 dual FW images only
// printf("\t--set-active-firmware <VAL> : switch to a specific firmware image\n");
printf("\t--factory-default [ --msl <MSL> ] : reset to factory defaults\n");