[Feature][R306][task-view-1900][arms] Docking with ARMS platform
Change-Id: I3b7fa45f604ccfa98287231d2cdf252f1be6a8b0
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