blob: d4372b888df6694a4ca26cff41c693ce3a7863dc [file] [log] [blame]
#ifndef CONFIG_MIN_8M_VERSION
#include "at_context.h"
int ext_LocklistAuth_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKLISTAUTH_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetList_set_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLIST_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetKey_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETKEY_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetAmtStatus_get_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETAMTSTATUS_GET_REQ, 0, NULL,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetDigest_get_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETDIGEST_GET_REQ, 0, NULL,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetSign_set_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETSIGN_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetLevel_get_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLEVEL_GET_REQ, 0, NULL,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetList_get_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLIST_GET_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetAuth_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETAUTH_REQ, 0, NULL,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetUnlockTimes_get_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETUNLOCKTIMES_GET_REQ, 0, NULL,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetStatus_get_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETSTATUS_GET_REQ, 0, NULL,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
int ext_LocknetUnlock_func(char *at_paras, void ** res_msg)
{
if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETUNLOCK_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
return AT_CONTINUE;
else{
*res_msg = at_err_build(ATERR_PROC_FAILED);
return AT_END;
}
}
//ÊÕµ½zudryÖ÷¶¯Éϱ¨ÃüÁîºó£¬Ï·¢AT+ZSCHPLMN=1ʹmodemÔÊÐíËÑÍø(¸ÃÃüÁîÊÇÔÚËøÍø¹¦ÄÜÖÐʹÓÃ)
int zurdy_auto_act(char *at_paras ,int is_query_report)
{
int appmode = 0;
int initresult = 0;
void *p[2] = {&appmode, &initresult};
parse_param2("%d,%d", at_paras, p);
at_print(AT_ERR,"zurdy_auto_act appmode:%d,initresult:%d!\n",appmode,initresult);
if(appmode != 0 && (initresult == 30 || initresult == 31))
{
ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_LOCKNET, MSG_CMD_ZURDY_LOCKAUTH_REQ, 0, NULL,0);
}
return AT_END;
}
void ext_locknet_regist_init()
{
register_serv_func("LOCKLISTAUTH=", MODULE_ID_LOCKNET, ext_LocklistAuth_func);
register_serv_func("LOCKNETLIST=", MODULE_ID_LOCKNET, ext_LocknetList_set_func);
register_serv_func("UNLOCKKEY=", MODULE_ID_LOCKNET, ext_LocknetKey_func);
register_serv_func("UNLOCKKEY?", MODULE_ID_LOCKNET, ext_LocknetAmtStatus_get_func);
register_serv_func("LOCKDIGEST?", MODULE_ID_LOCKNET, ext_LocknetDigest_get_func);
register_serv_func("LOCKSIGN=", MODULE_ID_LOCKNET, ext_LocknetSign_set_func);
register_serv_func("LOCKLEVEL?", MODULE_ID_LOCKNET,ext_LocknetLevel_get_func);
register_serv_func("MEPCG=", MODULE_ID_LOCKNET, ext_LocknetList_get_func);
register_serv_func("LOCKNETAUTH", MODULE_ID_LOCKNET, ext_LocknetAuth_func);
register_serv_func("ZNCK?", MODULE_ID_LOCKNET, ext_LocknetUnlockTimes_get_func);
register_serv_func("ZSEC?", MODULE_ID_LOCKNET, ext_LocknetStatus_get_func);
register_serv_func("ZNCK=", MODULE_ID_LOCKNET, ext_LocknetUnlock_func);
register_inform_func("ZURDY",zurdy_auto_act);
}
#endif