From eaccd9489d5b9bd3c205db574ab6a8523645a605 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Wed, 3 Jun 2020 09:52:36 +0300 Subject: [GP-651] LNA7: Allow to start the OMA DM procedure when it is required This commit adds the new "radio-cmd --start-oma-dm" command that allows to trigger the OMA DM procedure for selected radios and cellular networks. When this command is not supported by the radio or OMA DM can't be started for another reason - a non-zero exit code is returned by the command. --- main.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 5169d4e..cbda6d2 100644 --- a/main.cpp +++ b/main.cpp @@ -108,6 +108,8 @@ const uint32_t OPT_SET_CELLULAR_MODE = 0x08000000; const uint32_t OPT_UNLOCK_SIM_CARD = 0x20000000; const uint32_t OPT_RESET_RADIO = 0x40000000; +int32_t g_iAuxOptions = 0; +const uint32_t AOPT_OMA_DM_START = 0x00000001; void handle_sigterm(int signum); void printHelp(const std::string& sApp); @@ -152,6 +154,7 @@ static struct option long_options[] = { { "init-activation", no_argument, &iOption, OPT_INIT_ACTIVATION }, { "factory-default", no_argument, &iOption, OPT_INIT_RTN }, { "set-cellular-mode", required_argument, 0, 'w' }, + { "start-oma-dm", no_argument, 0, 'o' }, { 0, 0, 0, 0 } }; @@ -386,6 +389,8 @@ int main(int argc, char** argv) { } else { printf("Invalid argument: %s\n", g_sCellularMode.c_str()); } + } else if (g_iAuxOptions & AOPT_OMA_DM_START) { + result = g_apRadio->startOmaDm(cb); } shutdown(); @@ -606,6 +611,10 @@ void parseOptions(int argc, char** argv) g_iOptions |= OPT_SET_CELLULAR_MODE; break; + case 'o': + g_iAuxOptions |= AOPT_OMA_DM_START; + break; + default: printf("OPTION: [%d] ABORTING!!\n", c); abort(); @@ -656,13 +665,14 @@ void printHelp(const std::string& sApp) { printf("\t--factory-default [ --msl ] : reset to factory defaults\n"); printf("\t--unlock-sim-card : unlock the SIM card using the PIN code provided\n"); printf("\t--reset-radio : reset the radio module using AT commands\n"); + printf("\t--start-oma-dm : start the OMA DM procedure (selected radios and networks only)\n"); printf("\n"); printf("\t--printlvl (p) : sets the printlvl [0-100]\n"); printf("\t--version (v) : returns version\n"); printf("\t--help (?) : returns this message\n"); printf("\n"); printf("\tSupported Radios:\n"); - printf("\t\tLE910, HE910, GE910, DE910, CE910\n"); + printf("\t\tLE910, HE910, GE910, DE910, CE910, ME910, EG95\n"); } const char *code2str(MTS::IO::ICellularRadio::CODE code) { -- cgit v1.2.3 From 96c939ec3c6eced37e1a12dc0be3ebbde0efb421 Mon Sep 17 00:00:00 2001 From: Serhii Kostiuk Date: Thu, 25 Jun 2020 10:36:25 +0300 Subject: [MTX-3489] mPower Oct20: Porting "LNA7 Intermediate Release" changes Added EG25 to the list supported radios (as EG25 support is already merged into master). --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index cbda6d2..cfe7727 100644 --- a/main.cpp +++ b/main.cpp @@ -672,7 +672,7 @@ void printHelp(const std::string& sApp) { printf("\t--help (?) : returns this message\n"); printf("\n"); printf("\tSupported Radios:\n"); - printf("\t\tLE910, HE910, GE910, DE910, CE910, ME910, EG95\n"); + printf("\t\tLE910, HE910, GE910, DE910, CE910, ME910, EG95, EG25\n"); } const char *code2str(MTS::IO::ICellularRadio::CODE code) { -- cgit v1.2.3