lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #ifndef CONFIG_MIN_8M_VERSION
|
| 2 | #include "at_context.h"
|
| 3 |
|
| 4 | int ext_LocklistAuth_func(char *at_paras, void ** res_msg)
|
| 5 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 6 | if(0 == 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 | else{
|
| 9 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 10 | return AT_END;
|
| 11 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 12 | }
|
| 13 |
|
| 14 | int ext_LocknetList_set_func(char *at_paras, void ** res_msg)
|
| 15 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 16 | 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))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 17 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 18 | else{
|
| 19 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 20 | return AT_END;
|
| 21 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 22 | }
|
| 23 |
|
| 24 | int ext_LocknetKey_func(char *at_paras, void ** res_msg)
|
| 25 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 26 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETKEY_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 27 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 28 | else{
|
| 29 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 30 | return AT_END;
|
| 31 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 32 | }
|
| 33 |
|
| 34 | int ext_LocknetAmtStatus_get_func(char *at_paras, void ** res_msg)
|
| 35 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 36 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETAMTSTATUS_GET_REQ, 0, NULL,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 37 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 38 | else{
|
| 39 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 40 | return AT_END;
|
| 41 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 42 | }
|
| 43 |
|
| 44 | int ext_LocknetDigest_get_func(char *at_paras, void ** res_msg)
|
| 45 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 46 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETDIGEST_GET_REQ, 0, NULL,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 47 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 48 | else{
|
| 49 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 50 | return AT_END;
|
| 51 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 52 | }
|
| 53 |
|
| 54 | int ext_LocknetSign_set_func(char *at_paras, void ** res_msg)
|
| 55 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 56 | 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))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 57 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 58 | else{
|
| 59 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 60 | return AT_END;
|
| 61 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 62 | }
|
| 63 |
|
| 64 | int ext_LocknetLevel_get_func(char *at_paras, void ** res_msg)
|
| 65 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 66 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETLEVEL_GET_REQ, 0, NULL,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 67 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 68 | else{
|
| 69 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 70 | return AT_END;
|
| 71 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 72 | }
|
| 73 |
|
| 74 | int ext_LocknetList_get_func(char *at_paras, void ** res_msg)
|
| 75 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 76 | 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))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 77 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 78 | else{
|
| 79 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 80 | return AT_END;
|
| 81 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 82 | }
|
| 83 |
|
| 84 | int ext_LocknetAuth_func(char *at_paras, void ** res_msg)
|
| 85 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 86 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETAUTH_REQ, 0, NULL,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 87 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 88 | else{
|
| 89 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 90 | return AT_END;
|
| 91 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 92 | }
|
| 93 |
|
| 94 | int ext_LocknetUnlockTimes_get_func(char *at_paras, void ** res_msg)
|
| 95 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 96 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETUNLOCKTIMES_GET_REQ, 0, NULL,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 97 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 98 | else{
|
| 99 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 100 | return AT_END;
|
| 101 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 102 | }
|
| 103 |
|
| 104 | int ext_LocknetStatus_get_func(char *at_paras, void ** res_msg)
|
| 105 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 106 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETSTATUS_GET_REQ, 0, NULL,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 107 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 108 | else{
|
| 109 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 110 | return AT_END;
|
| 111 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 112 | }
|
| 113 |
|
| 114 | int ext_LocknetUnlock_func(char *at_paras, void ** res_msg)
|
| 115 | {
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 116 | if(0 == ipc_send_message(MODULE_ID_AT_CTL,MODULE_ID_LOCKNET,MSG_CMD_LOCKNETUNLOCK_REQ,strlen(at_paras), (unsigned char *)at_paras,0))
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 117 | return AT_CONTINUE;
|
xf.li | 6236ea7 | 2023-07-26 04:58:33 -0700 | [diff] [blame] | 118 | else{
|
| 119 | *res_msg = at_err_build(ATERR_PROC_FAILED);
|
| 120 | return AT_END;
|
| 121 | }
|
lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 122 | }
|
| 123 |
|
| 124 | //ÊÕµ½zudryÖ÷¶¯Éϱ¨ÃüÁîºó£¬Ï·¢AT+ZSCHPLMN=1ʹmodemÔÊÐíËÑÍø(¸ÃÃüÁîÊÇÔÚËøÍø¹¦ÄÜÖÐʹÓÃ)
|
| 125 | int zurdy_auto_act(char *at_paras ,int is_query_report)
|
| 126 | {
|
| 127 | int appmode = 0;
|
| 128 | int initresult = 0;
|
| 129 | void *p[2] = {&appmode, &initresult};
|
| 130 |
|
| 131 | parse_param2("%d,%d", at_paras, p);
|
| 132 | at_print(AT_ERR,"zurdy_auto_act appmode:%d,initresult:%d!\n",appmode,initresult);
|
| 133 | if(appmode != 0 && (initresult == 30 || initresult == 31))
|
| 134 | {
|
| 135 | ipc_send_message(MODULE_ID_AT_CTL, MODULE_ID_LOCKNET, MSG_CMD_ZURDY_LOCKAUTH_REQ, 0, NULL,0);
|
| 136 | }
|
| 137 | return AT_END;
|
| 138 | }
|
| 139 |
|
| 140 | void ext_locknet_regist_init()
|
| 141 | {
|
| 142 | register_serv_func("LOCKLISTAUTH=", MODULE_ID_LOCKNET, ext_LocklistAuth_func);
|
| 143 | register_serv_func("LOCKNETLIST=", MODULE_ID_LOCKNET, ext_LocknetList_set_func);
|
| 144 | register_serv_func("UNLOCKKEY=", MODULE_ID_LOCKNET, ext_LocknetKey_func);
|
| 145 | register_serv_func("UNLOCKKEY?", MODULE_ID_LOCKNET, ext_LocknetAmtStatus_get_func);
|
| 146 | register_serv_func("LOCKDIGEST?", MODULE_ID_LOCKNET, ext_LocknetDigest_get_func);
|
| 147 | register_serv_func("LOCKSIGN=", MODULE_ID_LOCKNET, ext_LocknetSign_set_func);
|
| 148 | register_serv_func("LOCKLEVEL?", MODULE_ID_LOCKNET,ext_LocknetLevel_get_func);
|
| 149 | register_serv_func("MEPCG=", MODULE_ID_LOCKNET, ext_LocknetList_get_func);
|
| 150 | register_serv_func("LOCKNETAUTH", MODULE_ID_LOCKNET, ext_LocknetAuth_func);
|
| 151 | register_serv_func("ZNCK?", MODULE_ID_LOCKNET, ext_LocknetUnlockTimes_get_func);
|
| 152 | register_serv_func("ZSEC?", MODULE_ID_LOCKNET, ext_LocknetStatus_get_func);
|
| 153 | register_serv_func("ZNCK=", MODULE_ID_LOCKNET, ext_LocknetUnlock_func);
|
| 154 |
|
| 155 | register_inform_func("ZURDY",zurdy_auto_act);
|
| 156 | }
|
| 157 | #endif
|
| 158 |
|