Merge "[Feature][S300][task-view-1900][arms] before Docking with ARMS platform"
diff --git a/lynq/R306_MTN/BJMTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user b/lynq/R306_MTN/BJMTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user
index f6b90a0..a2e6974 100755
--- a/lynq/R306_MTN/BJMTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user
+++ b/lynq/R306_MTN/BJMTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user
@@ -498,3 +498,10 @@
 use_network_adb=usb
 SSIDbak=
 wifi_switch_status=
+#for apparms begin
+arms_task_id=
+arms_device_id=
+arms_device_sec=
+arms_device_md5=
+arms_fota_version=
+#for apparms end
\ No newline at end of file
diff --git a/lynq/R306_MTN/ap/app/apparms/apparms_config_example.c b/lynq/R306_MTN/ap/app/apparms/apparms_config_example.c
index 9b65b48..097738a 100755
--- a/lynq/R306_MTN/ap/app/apparms/apparms_config_example.c
+++ b/lynq/R306_MTN/ap/app/apparms/apparms_config_example.c
@@ -137,7 +137,6 @@
 		strcpy(pIPAddr, wan_ipaddr);

 		ret = 0;

 	}

-	printf("****ppp status:%s, ip:%s\n", buf, wan_ipaddr);

 

 	return ret;

 }

diff --git a/lynq/R306_MTN/ap/app/apparms/apparms_data_example.c b/lynq/R306_MTN/ap/app/apparms/apparms_data_example.c
index eafaf44..f1d72dd 100755
--- a/lynq/R306_MTN/ap/app/apparms/apparms_data_example.c
+++ b/lynq/R306_MTN/ap/app/apparms/apparms_data_example.c
@@ -360,6 +360,7 @@
 	switch(index+1) 

 	{

 		case 1:

+#if 0

 #ifndef ARMS_SUPPORT_TEST_MULTI_INSTANCE

 			if (1 == arms_util_readConfigValue(ARMS_SW_VERSION_FILE_PATH, "SW Ver", (char *)pData))

 			{

@@ -374,9 +375,15 @@
 			strcpy((char*)pData, "1.1.2.1");

 			*pLen = strlen((char*)pData);

 #endif

+#endif

+			memset(szTemp, 0, sizeof(szTemp));

+			cfg_get_item("wa_version", szTemp, sizeof(szTemp));

+			strcpy((char*)pData, szTemp);

+			*pLen = strlen((char*)pData);

 			break;

 			

 		case 2:

+#if 0

 			if (1 == arms_util_readConfigValue(ARMS_SW_VERSION_FILE_PATH, "Inner Ver", (char *)pData))

 			{

 				*pLen = strlen((char *)pData);

@@ -386,6 +393,11 @@
 				*pLen = 3;

 				strcpy((char*)pData, "N/A");

 			}

+#endif

+			memset(szTemp, 0, sizeof(szTemp));

+			cfg_get_item("cr_inner_version", szTemp, sizeof(szTemp));

+			strcpy((char*)pData, szTemp);

+			*pLen = strlen((char*)pData);

 			break;

 			

 		case 3:

@@ -429,6 +441,7 @@
 			break;

 

 		case 5:

+#if 0

 			if (1 == arms_util_readConfigValue(ARMS_NW_STATUS_FILE_PATH, "RSSI", (char *)szTemp))

 			{

 				nValueLen = strlen(szTemp);

@@ -446,6 +459,11 @@
 				*pLen = 3;

 				strcpy((char*)pData, "N/A");

 			}

+#endif

+			memset(szTemp, 0, sizeof(szTemp));

+			cfg_get_item("rssi", szTemp, sizeof(szTemp));

+			strcpy((char*)pData, szTemp);

+			*pLen = strlen((char*)pData);

 			break;

 

 		case 6:

@@ -592,8 +610,11 @@
 #endif

 	char buf[64] = {0};

 	cfg_get_item("wa_version", buf, sizeof(buf));

+	memset(g_stFotaData.stFWVerArr,0,sizeof(FOTADATAFW)*ARMS_FOTA_FW_VER_NUM);

 	strcpy(g_stFotaData.stFWVerArr[0].szFOTAFwVer, buf);

+	strcpy(g_stFotaData.stFWVerArr[1].szFOTAFwVer, buf);

 	memcpy(pVerFW, g_stFotaData.stFWVerArr, sizeof(FOTADATAFW)*ARMS_FOTA_FW_VER_NUM);

+	printf("****arms_data_example_get_fota_ver_fw version:%s\n", pVerFW->szFOTAFwVer);

 

 	return 0;

 }

@@ -765,6 +786,9 @@
 #ifdef EXAMPLE_REF_VALUE

 	memcpy(pPreVerFW,g_stFotaData.stFWPreVerArr,sizeof(FOTADATAFW)*ARMS_FOTA_FW_VER_NUM);

 #endif

+	char buf[64] = {0};

+	cfg_get_item("arms_fota_version", buf, sizeof(buf));

+	strcpy(pPreVerFW->szFOTAFwVer, buf);

 

 	return 0;		

 }

@@ -793,11 +817,6 @@
 #ifdef EXAMPLE_REF_VALUE

 	memcpy(pPreVerCFG,g_stFotaData.stCFGPreVerArr,sizeof(FOTADATAFCFG)*ARMS_FOTA_CFG_VER_NUM);

 #endif

-	FOTADATAFCFG stCFGPreVerArr[ARMS_FOTA_CFG_VER_NUM];

-	char buf[ARMS_FOTA_CFG_VER_BUF_SIZE] = {0};

-	cfg_get_item("wa_version", buf, sizeof(buf));

-	strcpy(stCFGPreVerArr[0].szFOTCfgVer, buf);

-	memcpy(pPreVerCFG, stCFGPreVerArr, sizeof(FOTADATAFCFG)*ARMS_FOTA_CFG_VER_NUM);

 

 	return 0;		

 }

@@ -1002,7 +1021,7 @@
 	}

 

 #ifdef EXAMPLE_REF_VALUE

-	remove(pPath);

+	//remove(pPath);

 #endif

 

 	return 0;	

diff --git a/lynq/R306_MTN/ap/app/apparms/apparms_fota.c b/lynq/R306_MTN/ap/app/apparms/apparms_fota.c
index 4679f45..501de34 100755
--- a/lynq/R306_MTN/ap/app/apparms/apparms_fota.c
+++ b/lynq/R306_MTN/ap/app/apparms/apparms_fota.c
@@ -778,6 +778,9 @@
 	PARMSDATAFUNLIST pDataFunc = pARMSFOTA->pDataFunList;
 	PFOTADATA pData = &pARMSFOTA->stFOTAData;
 
+	system("rm -rf /cache/zte_fota");
+	system("mkdir /cache/zte_fota/");
+
 	arms_fota_set_state(pARMSFOTA,ARMS_FOTA_STATE_DL);
 
 	ARMS_LOG_INFO("%s(%d) Start Download.\r\n",__FUNCTION__,__LINE__);
@@ -1742,7 +1745,7 @@
 		return -1;
 	}
 
-	arms_util_create_timer_msec(&pARMSFOTA->fota_timer, arms_fota_timer_cb, 120*1000, pARMSFOTA->fota_check_period, SIGUSR2);
+	arms_util_create_timer_msec(&pARMSFOTA->fota_timer, arms_fota_timer_cb, 30*1000, pARMSFOTA->fota_check_period, SIGUSR2);
 
 	return 0;
 }
diff --git a/lynq/R306_MTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user b/lynq/R306_MTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user
index 3bacc49..58489fd 100755
--- a/lynq/R306_MTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user
+++ b/lynq/R306_MTN/ap/project/zx297520v3/prj_cpe/fs/normal/rootfs/etc_ro/default/default_parameter_user
@@ -498,10 +498,3 @@
 use_network_adb=usb
 SSIDbak=
 wifi_switch_status=
-#for apparms begin
-arms_task_id=
-arms_device_id=
-arms_device_sec=
-arms_device_md5=
-arms_fota_version=
-#for apparms end
\ No newline at end of file
diff --git a/lynq/S300AI/ap/app/zte_webui/js/ext/set_realtek.js b/lynq/S300AI/ap/app/zte_webui/js/ext/set_realtek.js
index b0981ef..f22f4bd 100755
--- a/lynq/S300AI/ap/app/zte_webui/js/ext/set_realtek.js
+++ b/lynq/S300AI/ap/app/zte_webui/js/ext/set_realtek.js
@@ -1,6 +1,6 @@
 define(function () {

     var config = {

-        WEBUI_TITLE: 'MTN Broadband 4G CPE',

+        WEBUI_TITLE: '4G CPE',

         PRODUCT_TYPE: 'CPE', // ��Ʒ����UFI��CPE

         HAS_BLACK_AND_WHITE_FILTER: true, //�Ƿ�֧�ֺڰ�����

         AP_STATION_SUPPORT: false,

@@ -19,13 +19,14 @@
         } ],

         WIFI_SUPPORT_QR_CODE: true,

         HAS_PHONEBOOK: false,

-        HAS_BATTERY: false, //�Ƿ��е��

+        HAS_BATTERY: true, //�Ƿ��е��

 		FAST_BOOT_SUPPORT: false, //�Ƿ�֧�ֿ��ٿ���

         TURN_OFF_SUPPORT: false, //�Ƿ�֧�ֹػ�

 		WIFI_SLEEP_SUPPORT: false, // �Ƿ�֧��wifi����

         HAS_USSD: true, // 是否支持USSD功能,

         WIFI_WAP3_SUPPORT: false, //是否支持wifi WAP3加密

         WIFI_WPA2_WAP3_SUPPORT: false, //是否支持wifi WPA2/WAP3兼容模式

+		HAS_VOICE: false,

         //station����ģʽ

         //wifi加密模式

         AUTH_MODES: [{

diff --git a/lynq/wifi/S300AI/rtl8192cd_92fs/ap/app/zte_webui/js/ext/set_aic8800d40i.js b/lynq/wifi/S300AI/rtl8192cd_92fs/ap/app/zte_webui/js/ext/set_aic8800d40i.js
deleted file mode 100755
index 6d201d9..0000000
--- a/lynq/wifi/S300AI/rtl8192cd_92fs/ap/app/zte_webui/js/ext/set_aic8800d40i.js
+++ /dev/null
@@ -1,96 +0,0 @@
-define(function () {

-    var config = {

-        WEBUI_TITLE: '4G CPE',

-        PRODUCT_TYPE: 'CPE', // „1¤7„1¤703„1¤7„1¤7„1¤7„1¤7UFI„1¤7„1¤7CPE

-        TURN_OFF_SUPPORT: false, //ÊÇ·ñÖ§³Ö¹Ø»ú

-        WIFI_SLEEP_SUPPORT: false, // ÊÇ·ñÖ§³ÖwifiÐÝÃß

-        HAS_BATTERY: true, //ÊÇ·ñÓÐµç³Ø

-        FAST_BOOT_SUPPORT: false, //ÊÇ·ñÖ§³Ö¿ìËÙ¿ª»ú

-        HAS_BLACK_AND_WHITE_FILTER: true, //ÊÇ·ñÖ§³ÖºÚ°×Ãûµ¥

-        AP_STATION_SUPPORT: false,

-        MAX_STATION_NUMBER: 8,

-        STATION_BLOCK_SUPPORT: true, // ÒÑÁ¬½ÓÉ豸ÊÇ·ñÖ§³ÖBlock¹¦ÄÜ

-        HAS_MULTI_SSID: false, //„1¤7„1¤7ssid„1¤7„1¤7„1¤7„1¤7

-		WIFI_HAS_5G: false,

-		WIFI_BANDWIDTH_SUPPORT_80MHZ: false,

-        WIFI_BANDWIDTH_SUPPORT_40MHZ: true, //Ƶ´ø¿í¶ÈÊÇ·ñÖ§³Ö40MHZ,reltekоƬ֧³Ö

-        WIFI_BANDWIDTH_SUPPORT: true,

-        WIFI_BAND_SUPPORT: true,

-        //WIFI_WAP3_SUPPORT: false, 

-        //WIFI_WPA2_WAP3_SUPPORT: false, 

-	WIFI_SUPPORT_QR_CODE: true, //ÊÇ·ñÖ§³Öwifi¶þάÂëÏÔʾ

-        SD_CARD_SUPPORT: false, //ÊÇ·ñÖ§³ÖSD¿¨

-	UPGRADE_TYPE: 'NONE', //ȡֵÓÐ"NONE","OTA","FOTA","TWO_PORTION"

-	HAS_UPNP: false, //ÊÇ·ñÖ§³ÖUPNP

-        DDNS_SUPPORT: false, //DDNS

-        NETWORK_UNLOCK_SUPPORT: true,

-        RJ45_SUPPORT: false,

-        HAS_VOICE: false,

-        NETWORK_MODES : [ {

-            name : '802.11 b/g/n/ax',

-            value : '6'

-        } ],

-		NETWORK_MODES_BAND: [ {

-            name: '802.11 a/n/ac/ax',

-            value: '6'

-        } ],

-        HAS_PHONEBOOK: false,

-        HAS_USSD: false,

-        //station¼ÓÃÜģʽ

-        AUTH_MODES_ALL: [{

-                name: 'NO ENCRYPTION',

-                value: 'OPEN'

-            }, {

-                name: 'WPA2-PSK',

-                value: 'WPA2PSK'

-            }, {

-                name: 'WPA-PSK/WPA2-PSK',

-                value: 'WPAPSKWPA2PSK'

-            }, {

-                name: 'WPA3-Personal',

-                value: 'WPA3Personal'

-            }, {

-                name: 'WPA2(AES)/WPA3-Personal',

-                value: 'WPA2WPA3'

-            }

-        ],

-        pppoeModes: [{

-                name: "Static",

-                value: "STATIC"

-            }, {

-                name: "DHCP",

-                value: "DHCP"

-            }

-        ],

-        AUTO_MODES: [{

-                name: 'Automatic',

-                value: 'NETWORK_auto'

-            }, {

-                name: '4G Only',

-                value: 'Only_LTE'

-            }, {

-                name: '3G Only',

-                value: 'Only_WCDMA'

-            }

-        ],

-        batteryVoiceSetModes: [{

-                name: "Always on",

-                value: "0"

-            }, {

-                name: "3600 mV",

-                value: "3600"

-            }, {

-                name: "3700 mV",

-                value: "3700"

-            }, {

-                name: "3800 mV",

-                value: "3800"

-            }, {

-                name: "3900 mV",

-                value: "3900"

-            }

-        ]

-    };

-

-    return config;

-});