summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevhen Mykhno <yevhen.mykhno@globallogic.com>2023-02-10 14:31:12 +0200
committerYevhen Mykhno <yevhen.mykhno@globallogic.com>2023-02-27 17:00:35 +0200
commit3b7515ee25cf6d3ef65436c724eea29e99604896 (patch)
treec6aa0646969fbd75c4f7e3e967f6fa65673a225c
parentbe3d7152ede929187c9a022c6d4fea33d9b61719 (diff)
downloadradio-cmd-3b7515ee25cf6d3ef65436c724eea29e99604896.tar.gz
radio-cmd-3b7515ee25cf6d3ef65436c724eea29e99604896.tar.bz2
radio-cmd-3b7515ee25cf6d3ef65436c724eea29e99604896.zip
[GP-1597] mPower R.6.3.X: Cellular Provider Profiles - LTE Authentication
added opportunity to set up PDP context authentication
-rw-r--r--main.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index ffd4535..bb8bc49 100644
--- a/main.cpp
+++ b/main.cpp
@@ -173,6 +173,9 @@ static struct option long_options[] = {
{ "ctx-id", required_argument, 0, 'C' },
{ "apn", required_argument, 0, 'a' },
{ "ipMode", required_argument, 0, 'i' },
+ { "authType", required_argument, 0, 'T' },
+ { "username", required_argument, 0, 'u' },
+ { "password", required_argument, 0, 'W' },
{ 0, 0, 0, 0 }
};
@@ -693,6 +696,24 @@ void parseOptions(int argc, char** argv)
g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_IPMODE] = optarg;
}
break;
+
+ case 'T':
+ if(optarg != 0) {
+ g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_AUTH_TYPE] = optarg;
+ }
+ break;
+
+ case 'u':
+ if(optarg != 0) {
+ g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_AUTH_USERNAME] = optarg;
+ }
+ break;
+
+ case 'W':
+ if(optarg != 0) {
+ g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_AUTH_PASSWORD] = optarg;
+ }
+ break;
default:
printf("OPTION: [%d] ABORTING!!\n", c);
@@ -752,6 +773,9 @@ void printHelp(const std::string& sApp) {
printf("\t --ctx-id <ID> : specify a Context ID for the set-pdp-conf-static command\n");
printf("\t --apn <APN> : specify an APN for the set-pdp-conf-static command\n");
printf("\t --ipMode <MODE> : specify an IP Mode for the set-pdp-conf-static command\n");
+ printf("\t --authType <TYPE> : specify an authentication type for the set-pdp-conf-static: NONE, PAP, CHAP, PAP-CHAP\n");
+ printf("\t --username <USERNAME> : specify an authentication username for the set-pdp-conf-static\n");
+ printf("\t --password <PASSWORD> : specify an authentication password for the set-pdp-conf-static\n");
// Undocumented: use for debugging and testing purposes
// 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");