本文共 2043 字,大约阅读时间需要 6 分钟。
#define ABS_CMNET_ACCOUNT_NAME "abscmnet"
#define ABS_GPRS_ACCOUNT_NO 10// (10)
#define ABS_GSM_ACCOUNT_NO
10// (10)
#define ABS_NWK_ACCOUNT_CMNET_ID (ABS_GPRS_ACCOUNT_NO+ABS_GSM_ACCOUNT_NO-3)
#define ABS_ACCOUNT_EXTRA myMsgPtr->profile_type = DATA_ACCT_GPRS_PROF;/
myMsgPtr->gprs_account.dcomp_algo = 0x02;/
myMsgPtr->gprs_account.dcomp_algo = 0x02;/
myMsgPtr->gprs_account.hcomp_algo = 0x02;/
myMsgPtr->gprs_account.pdp_type = 0x21;/
myMsgPtr->gprs_account.pdp_addr_len = 0x01;
#define ABS_ACCOUNT_EXTRA
kal_bool abs_initDataAccount_cmnet(const char *mode)
mmi_ps_set_gprs_data_account_req_struct *myMsgPtr;
const char* apnMode = mode != NULL ? mode : "cmnet";
myMsgPtr = (mmi_ps_set_gprs_data_account_req_struct*) OslConstructDataPtr(sizeof(mmi_ps_set_gprs_data_account_req_struct));
ref_count = myMsgPtr->ref_count;
msg_len = myMsgPtr->msg_len;
memset(myMsgPtr,'/0',sizeof(mmi_ps_set_gprs_data_account_req_struct));
myMsgPtr->ref_count = ref_count;
myMsgPtr->msg_len = msg_len;
myMsgPtr->gprs_account.context_id = ABS_NWK_ACCOUNT_CMNET_ID - ABS_GSM_ACCOUNT_NO+ 1;
myMsgPtr->gprs_account.authentication_type = 0;
myMsgPtr->gprs_account.name_dcs = 0;
myMsgPtr->gprs_account.name_length = strlen(ABS_CMNET_ACCOUNT_NAME);
strcpy ((char*)myMsgPtr->gprs_account.name, ABS_CMNET_ACCOUNT_NAME);
strcpy ((char*)myMsgPtr->gprs_account.apn, apnMode);
myMsgPtr->gprs_account.apn_length = strlen(apnMode);
strcpy ((char*)myMsgPtr->gprs_account.user_name, "");
strcpy ((char*)myMsgPtr->gprs_account.password, "");
myMsgPtr->gprs_account.dns[i] = 0;
Message.oslSrcId=MOD_MMI;
Message.oslDestId=MOD_L4C;
Message.oslMsgId = PRT_MMI_PS_SET_GPRS_DATA_ACCOUNT_REQ;
Message.oslDataPtr = (oslParaType *)myMsgPtr;
Message.oslPeerBuffPtr= NULL;
SetProtocolEventHandler(ABS_GPRSSetAccountRsp_net,PRT_MMI_PS_SET_GPRS_DATA_ACCOUNT_RSP);
OslMsgSendExtQueue(&Message);
转载地址:http://guifb.baihongyu.com/