博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
程序自动添加GPRS ACCOUNT_ID
阅读量:2221 次
发布时间:2019-05-08

本文共 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)
#if (MTK_VER >= 0x0936)
#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;
#else
#define ABS_ACCOUNT_EXTRA
#endif
kal_bool abs_initDataAccount_cmnet(const char *mode)
mmi_ps_set_gprs_data_account_req_struct *myMsgPtr;
U8
ref_count;
U16 msg_len;
MYQUEUE Message;
U8 i=0; 
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));
if(myMsgPtr == NULL)
{
return KAL_FALSE;
}
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, "");
for ( i = 0; i < 4; i++) 
{
myMsgPtr->gprs_account.dns[i] = 0;
}
        ABS_ACCOUNT_EXTRA
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);
return KAL_TRUE;
}

转载地址:http://guifb.baihongyu.com/

你可能感兴趣的文章
利用栈实现DFS
查看>>
(PAT 1019) General Palindromic Number (进制转换)
查看>>
(PAT 1073) Scientific Notation (字符串模拟题)
查看>>
(PAT 1080) Graduate Admission (排序)
查看>>
Play on Words UVA - 10129 (欧拉路径)
查看>>
mininet+floodlight搭建sdn环境并创建简答topo
查看>>
【linux】nohup和&的作用
查看>>
Set、WeakSet、Map以及WeakMap结构基本知识点
查看>>
【NLP学习笔记】(一)Gensim基本使用方法
查看>>
【NLP学习笔记】(二)gensim使用之Topics and Transformations
查看>>
【深度学习】LSTM的架构及公式
查看>>
【python】re模块常用方法
查看>>
剑指offer 19.二叉树的镜像
查看>>
剑指offer 20.顺时针打印矩阵
查看>>
剑指offer 21.包含min函数的栈
查看>>
剑指offer 23.从上往下打印二叉树
查看>>
剑指offer 25.二叉树中和为某一值的路径
查看>>
剑指offer 60. 不用加减乘除做加法
查看>>
Leetcode C++《热题 Hot 100-14》283.移动零
查看>>
Leetcode C++《热题 Hot 100-15》437.路径总和III
查看>>