summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-06-30 18:39:31 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2020-06-30 18:42:26 +0300
commit761cdbbb8652dc3569e78bea9d11e3db60d9f723 (patch)
treef1a081a0019e47acc2faf891f52145f49a6e2227
parent1870facf5636ee237b217c5950bb64597ee21a51 (diff)
parente024df7d4815f8d7ce69df467c7dba308b6311b5 (diff)
downloadradio-cmd-761cdbbb8652dc3569e78bea9d11e3db60d9f723.tar.gz
radio-cmd-761cdbbb8652dc3569e78bea9d11e3db60d9f723.tar.bz2
radio-cmd-761cdbbb8652dc3569e78bea9d11e3db60d9f723.zip
Merge remote-tracking branch 'origin/master' into sk/quectel-delta-fwu
-rw-r--r--main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 8ac634d..ba8b268 100644
--- a/main.cpp
+++ b/main.cpp
@@ -112,7 +112,8 @@ const uint32_t OPT_UNLOCK_SIM_CARD = 0x20000000;
const uint32_t OPT_RESET_RADIO = 0x40000000;
int32_t g_iAuxOptions = 0;
-const uint32_t AOPT_DFU_UPLOAD = 0x00000001;
+const uint32_t AOPT_OMA_DM_START = 0x00000001;
+const uint32_t AOPT_DFU_UPLOAD = 0x00000002;
void handle_sigterm(int signum);
void printHelp(const std::string& sApp);
@@ -157,6 +158,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' },
{ "delta-fwu-upload", required_argument, 0, 'x' },
{ 0, 0, 0, 0 }
};
@@ -393,6 +395,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);
} else if (g_iAuxOptions & AOPT_DFU_UPLOAD) {
result = handleDeltaFwUpload(g_sDeltaFwPath);
}
@@ -615,6 +619,10 @@ void parseOptions(int argc, char** argv)
g_iOptions |= OPT_SET_CELLULAR_MODE;
break;
+ case 'o':
+ g_iAuxOptions |= AOPT_OMA_DM_START;
+ break;
+
case 'x':
if (optarg)
g_sDeltaFwPath = optarg;
@@ -671,6 +679,7 @@ void printHelp(const std::string& sApp) {
printf("\t--factory-default [ --msl <MSL> ] : reset to factory defaults\n");
printf("\t--unlock-sim-card <SIM PIN> : 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("\t--delta-fwu-upload <FILE_PATH> : upload a delta radio FWU file to the radio\n");
printf("\n");
printf("\t--printlvl (p) <level> : sets the printlvl [0-100]\n");
@@ -678,7 +687,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) {