diff options
-rw-r--r-- | main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -114,6 +114,7 @@ const uint32_t OPT_RESET_RADIO = 0x40000000; int32_t g_iAuxOptions = 0; const uint32_t AOPT_OMA_DM_START = 0x00000001; const uint32_t AOPT_DFU_UPLOAD = 0x00000002; +const uint32_t AOPT_DFU_APPLY = 0x00000004; void handle_sigterm(int signum); void printHelp(const std::string& sApp); @@ -160,6 +161,7 @@ static struct option long_options[] = { { "set-cellular-mode", required_argument, 0, 'w' }, { "start-oma-dm", no_argument, 0, 'o' }, { "delta-fwu-upload", required_argument, 0, 'x' }, + { "delta-fwu-apply", no_argument, 0, 'F' }, { 0, 0, 0, 0 } }; @@ -399,6 +401,8 @@ int main(int argc, char** argv) { result = g_apRadio->startOmaDm(cb); } else if (g_iAuxOptions & AOPT_DFU_UPLOAD) { result = handleDeltaFwUpload(g_sDeltaFwPath); + } else if (g_iAuxOptions & AOPT_DFU_APPLY) { + result = g_apRadio->applyDeltaFirmwareFile(cb); } shutdown(); @@ -629,6 +633,10 @@ void parseOptions(int argc, char** argv) g_iAuxOptions |= AOPT_DFU_UPLOAD; break; + case 'F': + g_iAuxOptions |= AOPT_DFU_APPLY; + break; + default: printf("OPTION: [%d] ABORTING!!\n", c); abort(); @@ -681,6 +689,7 @@ void printHelp(const std::string& sApp) { 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("\t--delta-fwu-apply : apply the delta radio FWU image that was already uploaded to the radio\n"); printf("\n"); printf("\t--printlvl (p) <level> : sets the printlvl [0-100]\n"); printf("\t--version (v) : returns version\n"); |