diff --git a/Common/config_manager.h b/Common/config_manager.h index 1c88266c5..49743d901 100755 --- a/Common/config_manager.h +++ b/Common/config_manager.h @@ -18,9 +18,9 @@ typedef enum{ LOCALAUTH_CONFIG_MODULE = 0x00000003, ///< PORTAL SERVER CONFIG LOG_CONFIG_MODULE = 0x00000004, ///< VLAN_CONFIG_MODULE = 0x00000005, ///< vlan config - DHCP_CONFIG_MODULE = 0x00000007, ///< DHCP CONFIG - LTE_CONFIG_MODULE = 0x00000008, ///< 4G config - NAT_CONFIG_MODULE = 0x00000009, ///< nat config + DHCP_CONFIG_MODULE = 0x00000006, ///< DHCP CONFIG + LTE_CONFIG_MODULE = 0x00000007, ///< 4G config + NAT_CONFIG_MODULE = 0x00000008, ///< nat config STATIC_ROUTING_CONFIG_MODULE = 0x00000009, ///< static routing OBJECT_MANAGER_CONFIG_MODULE = 0x0000000A, ///< Object manager config id diff --git a/Common/ret_errno.h b/Common/ret_errno.h index 70b47d236..d55d2c011 100644 --- a/Common/ret_errno.h +++ b/Common/ret_errno.h @@ -59,7 +59,7 @@ typedef unsigned int ret_code; #define RET_GATEWAY_ERR (unsigned int)((unsigned int)STATIC_ROUTING_CONFIG_MODULE<<16|9) #define RET_GW_DEV_ERR (unsigned int)((unsigned int)STATIC_ROUTING_CONFIG_MODULE<<16|10) -/* LTE_CONFIG_MODULE 0x00100000 ~ 0x0010ffff*/ +/* LTE_CONFIG_MODULE 0x00070000 ~ 0x0007ffff*/ #define RET_EXEC_SHELL_ERR (unsigned int)((unsigned int)LTE_CONFIG_MODULE<<16|1) #define RET_NULL_INPUT_ERR (unsigned int)((unsigned int)LTE_CONFIG_MODULE<<16|2) #define RET_LTE_NO_MATCH_ERR (unsigned int)((unsigned int)LTE_CONFIG_MODULE<<16|3) diff --git a/Platform/user/configm/config-server/LTE_config/LTE_config.c b/Platform/user/configm/config-server/LTE_config/LTE_config.c index 597f30f14..c87647873 100644 --- a/Platform/user/configm/config-server/LTE_config/LTE_config.c +++ b/Platform/user/configm/config-server/LTE_config/LTE_config.c @@ -51,6 +51,7 @@ ret_code LTE_config_init(void) while(fgets(result,sizeof(result),f) != NULL) { + rpc_log_info("%s\n",result); ret = compare(result); memset(result,sizeof(result),0); fseek(f,0,SEEK_CUR); @@ -189,18 +190,20 @@ ret_code start_lte() fgets(result,sizeof(result),f); - if(strcmp(result,"not install lte! ") == 0) + rpc_log_info("%s\n",result); + + if(strstr(result,"not install lte") != NULL ) { pclose(f); return RET_NO_LTE_MODULE_ERR; } - else if(strcmp(result,"pppd apparently already active, start aborted!") == 0) + else if(strstr(result,"pppd apparently already active") != NULL) { pclose(f); return RET_ALREADY_START_ERR; } - else if(strcmp(result,"start pppd ppp0") == 0) + else if(strstr(result,"start pppd ppp0") != NULL) { while(i < 120) { @@ -246,13 +249,15 @@ ret_code stop_lte() fgets(result,sizeof(result),f); - if(strcmp(result,"pppd may be sotped already") == 0) + rpc_log_info("%s\n",result); + + if(strstr(result,"pppd may be sotped already") != NULL) { pclose(f); return RET_ALREADY_STOP_ERR; } - else if((strcmp(result,"stop pppd ppp0") == 0) && access(file_path,0) != 0) + else if((strstr(result,"stop pppd ppp0") != NULL) && access(file_path,0) != 0) { pclose(f); return RET_OK; @@ -285,18 +290,20 @@ ret_code restart_lte() fseek(f,0,SEEK_CUR); fgets(result,sizeof(result),f); - if(strcmp(result,"not install lte! ") == 0) + rpc_log_info("%s\n",result); + + if(strstr(result,"not install lte! ") != NULL) { pclose(f); return RET_NO_LTE_MODULE_ERR; } - else if(strcmp(result,"pppd apparently already active, start aborted!") == 0) + else if(strstr(result,"pppd apparently already active, start aborted!") != NULL) { pclose(f); return RET_ALREADY_START_ERR; } - else if(strcmp(result,"start pppd ppp0") == 0) + else if(strstr(result,"start pppd ppp0") != NULL) { while(i < 120) {