From 3b7515ee25cf6d3ef65436c724eea29e99604896 Mon Sep 17 00:00:00 2001 From: Yevhen Mykhno Date: Fri, 10 Feb 2023 14:31:12 +0200 Subject: [GP-1597] mPower R.6.3.X: Cellular Provider Profiles - LTE Authentication added opportunity to set up PDP context authentication --- main.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 : specify a Context ID for the set-pdp-conf-static command\n"); printf("\t --apn : specify an APN for the set-pdp-conf-static command\n"); printf("\t --ipMode : specify an IP Mode for the set-pdp-conf-static command\n"); + printf("\t --authType : specify an authentication type for the set-pdp-conf-static: NONE, PAP, CHAP, PAP-CHAP\n"); + printf("\t --username : specify an authentication username for the set-pdp-conf-static\n"); + printf("\t --password : specify an authentication password for the set-pdp-conf-static\n"); // Undocumented: use for debugging and testing purposes // printf("\t--delta-fwu-upload : 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"); -- cgit v1.2.3