blob: 60fe04c3199e3814e2b367b4c622fd6c7b1773e7 [file] [log] [blame]
w.dengaec3b5d2025-08-21 15:54:53 +08001// #ifndef CONFIG_MIN_8M_VERSION
2#include "at_context.h"
3
4int ext_LocklistAuth_func(char *at_paras, void ** res_msg)
5{
6 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKLISTAUTH_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
7 return AT_CONTINUE;
8}
9
10int ext_LocknetList_set_func(char *at_paras, void ** res_msg)
11{
12 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLIST_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
13 return AT_CONTINUE;
14}
15
16int ext_LocknetKey_func(char *at_paras, void ** res_msg)
17{
18 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETKEY_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
19 return AT_CONTINUE;
20}
21
22int ext_LocknetAmtStatus_get_func(char *at_paras, void ** res_msg)
23{
24 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETAMTSTATUS_GET_REQ, 0, NULL,0);
25 return AT_CONTINUE;
26}
27
28int ext_LocknetDigest_get_func(char *at_paras, void ** res_msg)
29{
30 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETDIGEST_GET_REQ, 0, NULL,0);
31 return AT_CONTINUE;
32}
33
34int ext_LocknetSign_set_func(char *at_paras, void ** res_msg)
35{
36 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETSIGN_SET_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
37 return AT_CONTINUE;
38}
39
40int ext_LocknetLevel_get_func(char *at_paras, void ** res_msg)
41{
42 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLEVEL_GET_REQ, 0, NULL,0);
43 return AT_CONTINUE;
44}
45
46int ext_LocknetList_get_func(char *at_paras, void ** res_msg)
47{
48 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLIST_GET_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
49 return AT_CONTINUE;
50}
51
52int ext_LocknetAuth_func(char *at_paras, void ** res_msg)
53{
54 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETAUTH_REQ, 0, NULL,0);
55 return AT_CONTINUE;
56}
57
58int ext_LocknetUnlockTimes_get_func(char *at_paras, void ** res_msg)
59{
60 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETUNLOCKTIMES_GET_REQ, 0, NULL,0);
61 return AT_CONTINUE;
62}
63
64int ext_LocknetStatus_get_func(char *at_paras, void ** res_msg)
65{
66 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETSTATUS_GET_REQ, 0, NULL,0);
67 return AT_CONTINUE;
68}
69
70int ext_LocknetUnlock_func(char *at_paras, void ** res_msg)
71{
72 ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETUNLOCK_REQ,strlen(at_paras), (unsigned char *)at_paras,0);
73 return AT_CONTINUE;
74}
75
76//ÊÕµ½zudryÖ÷¶¯Éϱ¨ÃüÁîºó£¬Ï·¢AT+ZSCHPLMN=1ʹmodemÔÊÐíËÑÍø(¸ÃÃüÁîÊÇÔÚËøÍø¹¦ÄÜÖÐʹÓÃ)
77int zurdy_auto_act(char *at_paras ,int is_query_report)
78{
79 int appmode = 0;
80 int initresult = 0;
81 void *p[2] = {&appmode, &initresult};
82
83 parse_param2("%d,%d", at_paras, p);
84 at_print(AT_ERR,"zurdy_auto_act appmode:%d,initresult:%d!\n",appmode,initresult);
85 if(appmode != 0 && (initresult == 30 || initresult == 31))
86 {
87 ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_LOCKNET, MSG_CMD_ZURDY_LOCKAUTH_REQ, 0, NULL,0);
88 }
89 return AT_END;
90}
91
92void ext_locknet_regist_init()
93{
94 register_serv_func("LOCKLISTAUTH=", MODULE_ID_LOCKNET, ext_LocklistAuth_func);
95 register_serv_func("LOCKNETLIST=", MODULE_ID_LOCKNET, ext_LocknetList_set_func);
96 register_serv_func("UNLOCKKEY=", MODULE_ID_LOCKNET, ext_LocknetKey_func);
97 register_serv_func("UNLOCKKEY?", MODULE_ID_LOCKNET, ext_LocknetAmtStatus_get_func);
98 register_serv_func("LOCKDIGEST?", MODULE_ID_LOCKNET, ext_LocknetDigest_get_func);
99 register_serv_func("LOCKSIGN=", MODULE_ID_LOCKNET, ext_LocknetSign_set_func);
100 register_serv_func("LOCKLEVEL?", MODULE_ID_LOCKNET,ext_LocknetLevel_get_func);
101 register_serv_func("MEPCG=", MODULE_ID_LOCKNET, ext_LocknetList_get_func);
102 register_serv_func("LOCKNETAUTH", MODULE_ID_LOCKNET, ext_LocknetAuth_func);
103 register_serv_func("ZNCK?", MODULE_ID_LOCKNET, ext_LocknetUnlockTimes_get_func);
104 register_serv_func("ZSEC?", MODULE_ID_LOCKNET, ext_LocknetStatus_get_func);
105 register_serv_func("ZNCK=", MODULE_ID_LOCKNET, ext_LocknetUnlock_func);
106
107 register_inform_func("ZURDY",zurdy_auto_act);
108}
109// #endif
110