diff options
-rw-r--r-- | main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -107,6 +107,7 @@ const uint32_t OPT_CONFIG_FILE = 0x04000000; const uint32_t OPT_GET_RADIOMODE = 0x08000000; const uint32_t OPT_SET_RADIOMODE = 0x10000000; const uint32_t OPT_UNLOCK_SIM_CARD = 0x20000000; +const uint32_t OPT_RESET_RADIO = 0x40000000; void handle_sigterm(int signum); void printHelp(const std::string& sApp); @@ -147,6 +148,7 @@ static struct option long_options[] = { { "unlock-sim-card", required_argument, 0, OPT_UNLOCK_SIM_CARD }, { "get-radio-network-mode", no_argument, &iOption, OPT_GET_RADIOMODE }, { "set-radio-network-mode", required_argument, 0, OPT_SET_RADIOMODE }, + { "reset-radio", no_argument, &iOption, OPT_RESET_RADIO }, { "init-dc", no_argument, &iOption, OPT_INIT_DC }, { "init-fumo", no_argument, &iOption, OPT_INIT_FUMO }, { "init-prl", no_argument, &iOption, OPT_INIT_PRL }, @@ -381,6 +383,10 @@ int main(int argc, char** argv) { jArgs["pin"] = g_sSimPin; result = g_apRadio->unlockSimCard(jArgs); printf("%s\n", code2str(result)); + } else if(g_iOptions & OPT_RESET_RADIO) { + bool ret = g_apRadio->resetRadio(); + result = (ret) ? ICellularRadio::CODE::SUCCESS : ICellularRadio::CODE::FAILURE; + printf("%s\n", code2str(result)); } shutdown(); @@ -651,6 +657,7 @@ void printHelp(const std::string& sApp) { // printf("\t--set-active-firmware <VAL> : switch to a specific firmware image\n"); 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("\n"); printf("\t--printlvl (p) <level> : sets the printlvl [0-100]\n"); printf("\t--version (v) : returns version\n"); |