summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykola Salomatin <mykola.salomatin@globallogic.com>2021-09-28 13:25:50 +0300
committerMykola Salomatin <mykola.salomatin@globallogic.com>2021-09-28 13:25:50 +0300
commita7a3aa974d67e1d9d5942e699b3c9c752be7a22a (patch)
treef56c4389c228b20fdad46ec158b7f311253da4b7
parente172671f2d6eb8757dfa7e1b8a7acb3688ff4d62 (diff)
downloadradio-query-a7a3aa974d67e1d9d5942e699b3c9c752be7a22a.tar.gz
radio-query-a7a3aa974d67e1d9d5942e699b3c9c752be7a22a.tar.bz2
radio-query-a7a3aa974d67e1d9d5942e699b3c9c752be7a22a.zip
[MTX-4206] mPower R.6.0: Making Telit and Quectel radios data-only on AT&T network. GP-1364
Add new option --voice-support to receive current voice support configuration for specific radio.
-rw-r--r--main.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/main.cpp b/main.cpp
index ee30668..f30a417 100644
--- a/main.cpp
+++ b/main.cpp
@@ -98,6 +98,9 @@ const uint32_t OPT_SUMMARY_NETWORK = 0x02000000;
const uint32_t OPT_CELL_MODE = 0x04000000;
const uint32_t OPT_SUPPORTED_CELL_MODE = 0x08000000;
+int32_t g_iAuxOptions = 0;
+const uint32_t AOPT_VOICE_SUPPORT = 0x00000001;
+
void handle_sigterm(int signum);
void printHelp(const std::string& sApp);
void parseOptions(int argc, char** argv);
@@ -358,6 +361,12 @@ int main(int argc, char** argv) {
jValue[MTS::IO::ICellularRadio::KEY_SIM_MNC] = sMnc;
printf("%s", jValue.toStyledString().c_str());
}
+ } else if (g_iAuxOptions & AOPT_VOICE_SUPPORT) {
+ Json::Value jValue;
+ result = g_apRadio->getVoiceSupport(jValue);
+ if (result == ICellularRadio::SUCCESS) {
+ printf("%s", jValue.toStyledString().c_str());
+ }
}
if (g_bIstty && result == ICellularRadio::CODE::SUCCESS)
@@ -604,7 +613,8 @@ Json::Value getNetworkData() {
void parseOptions(int argc, char** argv) {
int c;
- int iOption;
+ int iOption = 0;
+ int iAuxOption = 0;
std::string sPath;
if(argc == 1) {
@@ -649,6 +659,7 @@ void parseOptions(int argc, char** argv) {
{ "sim-carrier-code", no_argument, &iOption, OPT_SIM_CARRIER_CODE },
{ "ue-mode-of-operation", no_argument,&iOption, OPT_UE_MODE_OF_OPERATION },
{ "sim-mcc-mnc", no_argument, &iOption, OPT_SIM_MCC_MNC },
+ { "voice-support",no_argument, &iAuxOption, AOPT_VOICE_SUPPORT },
{ 0, 0, 0, 0 } };
/* getopt_long stores the option index here. */
@@ -663,6 +674,7 @@ void parseOptions(int argc, char** argv) {
if(c == 0) {
g_iOptions |= iOption;
+ g_iAuxOptions |= iAuxOption;
continue;
}
@@ -761,6 +773,7 @@ void printHelp(const std::string& sApp) {
printf("\t--sim-carrier-code\n");
printf("\t--ue-mode-of-operation\n");
printf("\t--sim-mcc-mnc\n");
+ printf("\t--voice-support\n");
// Applicable for LTE910-NA1 dual FW images only
// printf("\t--active-firmware\n");
printf("\n");