diff --git a/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.bin b/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.bin
index 38be3b4..371de96 100755
--- a/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.bin
+++ b/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.bin
Binary files differ
diff --git a/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.ini b/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.ini
index 03e1552..fa377c3 100755
--- a/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.ini
+++ b/allbins/zx297520v3/prj_vehicle/config_dc_4Gb/partition.ini
@@ -69,37 +69,37 @@
 partition_name=caprootfs
 partition_type=nand
 partition_addr=0x05900000
-partition_size=0x02000000
+partition_size=0x02800000
 
 [Partition11]
 partition_name=caprootfs2
 partition_type=nand
-partition_addr=0x07900000
-partition_size=0x02000000
+partition_addr=0x08100000
+partition_size=0x02800000
 
 [Partition12]
 partition_name=capuserdata
 partition_type=nand
-partition_addr=0x09900000
-partition_size=0x04100000
+partition_addr=0x0A900000
+partition_size=0x02800000
 
 [Partition13]
 partition_name=oem
 partition_type=nand
-partition_addr=0x0DA00000
+partition_addr=0x0D100000
 partition_size=0x06400000
 
 [Partition14]
 partition_name=oem2
 partition_type=nand
-partition_addr=0x13E00000
+partition_addr=0x13500000
 partition_size=0x06400000
 
 [Partition15]
 partition_name=oemdata
 partition_type=nand
-partition_addr=0x1A200000
-partition_size=0x07400000
+partition_addr=0x19900000
+partition_size=0x07C00000
 
 [Partition16]
 partition_name=ddr
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
index dec4edf..d2479c9 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
@@ -22,6 +22,11 @@
 //bsim
 #include <openssl/aes.h>
 
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone.
+#define _XOPEN_SOURCE
+extern long timezone;
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone end.
+
 typedef struct
 {
     unsigned int pubKeyRsaE[32];
@@ -162,7 +167,10 @@
     set_tm.tm_mon = set_tm.tm_mon - 1;
 
     time_tv.tv_sec = mktime(&set_tm);
-    time_tv.tv_sec = time_tv.tv_sec +	time_zone * 3600 / 4;
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone.
+    tzset();
+    time_tv.tv_sec = time_tv.tv_sec - timezone;
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone end.
 
 
     if (0 != settimeofday(&time_tv, NULL))
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf
index 56c0ee4..15ba171 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf
@@ -164,6 +164,7 @@
         liblynq-qser-gnss \
         liblynq-qser-fota \
         liblynq-systime \
+        liblynq-led \
 	"
 
 zxic_lib += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'libril libreference-ril', 'libtelsvr', d)}"
@@ -227,8 +228,10 @@
 	msm-svr \
 	player-demo \
         lynq-ril-service \
+        lynq-led-demo \
         lynq-qser-sim-demo \
         lynq-qser-sms-demo \
+        lynq-led-sev \
         uci \
         gdb \
         mobiletek-tester-rdit \
@@ -297,7 +300,7 @@
 RAT_CONFIG_C2K_SUPPORT = "no"
 MTK_MULTI_SIM_SUPPORT = "dsds" 
 TARGET_PLATFORM = "T106"
-MTK_LED_SUPPORT = "no"
+MTK_LED_SUPPORT = "yes"
 #support lynq_atsvc [hong.liu add for lynq atsvc on 2022.12.1]
 LYNQ_ATSVC_SUPPORT = "yes"
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
index 2ba0f08..85278a4 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
@@ -187,6 +187,7 @@
         liblynq-qser-network \
         liblynq-qser-gnss \
         liblynq-qser-fota \
+        liblynq-qser-audio \
         libpoweralarm \
         liblynq-systime \
         liblynq-autosuspend \
@@ -195,6 +196,8 @@
         liblynq-gpio \
         liblynq-irq \
         liblynq-at-common \
+        liblynq-led \
+        liblynq-adc \
 	"
 
 zxic_lib += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'libril', 'libtelsvr', d)}"
@@ -256,6 +259,8 @@
 	msm-svr \
 	player-demo \
 	lynq-ril-service \
+        lynq-led-demo \
+        lynq-led-sev \
         uci \
         gdb \
         mobiletek-tester-rdit \
@@ -275,6 +280,8 @@
         lynq-gpio-demo \
         lynq-irq-demo \
         lynq-gnss-update \
+        lynq-audio-demo \
+        lynq-adc-demo \
         "
 
 zxic_app_open += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'rild', '', d)}"
@@ -337,7 +344,7 @@
 RAT_CONFIG_C2K_SUPPORT = "no"
 MTK_MULTI_SIM_SUPPORT = "dsds" 
 TARGET_PLATFORM = "T106"
-MTK_LED_SUPPORT = "no"
+MTK_LED_SUPPORT = "yes"
 #support lynq_atsvc [hong.liu add for lynq atsvc on 2022.12.1]
 LYNQ_ATSVC_SUPPORT = "yes"
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf
index 9cc2d8b..0e4d57d 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf
@@ -3,7 +3,7 @@
 RAT_CONFIG_C2K_SUPPORT = "no"
 MTK_MULTI_SIM_SUPPORT = "dsds" 
 TARGET_PLATFORM = "T106"
-MTK_LED_SUPPORT = "no"
+MTK_LED_SUPPORT = "yes"
 #support lynq_atsvc [hong.liu add for lynq atsvc on 2022.12.1]
 LYNQ_ATSVC_SUPPORT = "yes"
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-adc/liblynq-adc.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-adc/liblynq-adc.bb
new file mode 100755
index 0000000..bd5e36d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-adc/liblynq-adc.bb
@@ -0,0 +1,51 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-adc"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4f60c98fa94e02f659ef5939f67fa8ae"
+
+DEPENDS += "liblynq-log libbsp"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-adc/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+          file://liblynq-adc\
+          "
+
+SRC-DIR = "${S}/../liblynq-adc"
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+#Parameters passed to do_compile()
+FILES_${PN} = "${base_libdir}/*.so "
+
+FILES_${PN}-dev = "/test \
+                   ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+                  ${base_libdir}/.debug \
+                  ${base_sbindir}/.debug"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu"
+}
+
+do_install () {
+    oe_runmake install -C ${SRC-DIR} ROOT=${D}
+
+    if [ -d "${WORKONSRC}" ] ; then
+        install -d ${D}${includedir}/
+        cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+    fi
+}
+
+addtask bachclean
+do_bachclean () {
+    oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-led/liblynq-led.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-led/liblynq-led.bb
new file mode 100755
index 0000000..fcbf6a6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-led/liblynq-led.bb
@@ -0,0 +1,54 @@
+#inherit externalsrc package
+
+DESCRIPTION = "lynq led"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+DEPENDS += "libpal gstreamer1.0 glib-2.0 libapn liblynq-log libvendor-ril liblynq-shm libbinder liblynq-uci"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-led"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+          file://liblynq-led \
+          "
+
+SRC-DIR = "${S}/../liblynq-led"
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'RAT_CONFIG_C2K_SUPPORT = ${RAT_CONFIG_C2K_SUPPORT}'\
+                'MTK_MULTI_SIM_SUPPORT = ${MTK_MULTI_SIM_SUPPORT}'\
+                'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
+
+FILES_${PN} = "${base_libdir}/*.so \
+               ${base_bindir}\
+               ${base_sbindir} \
+               /etc/dbus-1/system.d/"
+FILES_${PN}-dev = "/test \
+                   ${includedir}"
+FILES_${PN}-doc = "/doc"
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+                  ${base_libdir}/.debug \
+                  ${base_sbindir}/.debug"
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+	if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+	elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+	elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+	else
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+	fi
+}
+
+do_install() {
+    oe_runmake install -C ${SRC-DIR} ROOT=${D}
+    if [ -d "${WORKONSRC}" ] ; then
+        install -d ${D}${includedir}
+        cp -af ${SRC-DIR}/include/libled/ ${D}${includedir}/libled
+    fi
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-audio/liblynq-qser-audio.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-audio/liblynq-qser-audio.bb
new file mode 100755
index 0000000..59d21db
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-audio/liblynq-qser-audio.bb
@@ -0,0 +1,58 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-qser-audio.so "
+SECTION = "base"
+#LICENSE = "Mobiletek""
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4f60c98fa94e02f659ef5939f67fa8ae"
+DEPENDS += "bootchart  liblynq-log libupi-ab openssl libmedia"
+
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-audio/"
+
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+          file://liblynq-qser-audio \
+          "
+
+SRC-DIR = "${S}/../liblynq-qser-audio"
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+
+#Parameters passed to do_compile()
+
+FILES_${PN} = "${base_libdir}/*.so "
+
+
+FILES_${PN}-dev = "/test \
+                   ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+                  ${base_libdir}/.debug \
+                  ${base_sbindir}/.debug"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu"
+}
+
+do_install () {
+    oe_runmake install -C ${SRC-DIR} ROOT=${D}
+	
+    if [ -d "${WORKONSRC}" ] ; then
+        install -d ${D}${includedir}/
+        cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+    fi 
+}
+
+addtask bachclean
+do_bachclean () {
+    oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
index 469ee92..8dcdfb7 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-gnss/liblynq-qser-gnss.bb
@@ -3,7 +3,7 @@
 DESCRIPTION = "liblynq-qser-gnss"
 LICENSE = "CLOSED"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3f86c7f456a6d0bbeca155e65084eee1"
-DEPENDS += "liblynq-log libxml2"
+DEPENDS += "liblynq-log libxml2 liblynq-uci libsctel libbsp"
 #inherit workonsrc
 WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-gnss/"
 FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
@@ -38,18 +38,19 @@
 
 #INHIBIT_PACKAGE_STRIP = "1"
 do_compile () {
-		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+        oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
 }
 
 do_install () {
     oe_runmake install -C ${SRC-DIR} ROOT=${D}
-	
+
     if [ -d "${WORKONSRC}" ] ; then
         install -d ${D}${includedir}/
         cp -raf ${SRC-DIR}/include/ ${D}${includedir}/
         install -d ${D}/data/gnss_update
-	    install -m 644 ${WORKONSRC}UC6228CI-R3.2.10.100Build8019_mfg.pkg ${D}/data/gnss_update
+        install -m 644 ${WORKONSRC}UC6228CI-R3.2.10.100Build8019_mfg.pkg ${D}/data/gnss_update
         install -m 644 ${WORKONSRC}bootloader_r3.0.0_build6773_uartboot_921600.pkg ${D}/data/gnss_update
+        install -m 644 ${WORKONSRC}agps.conf ${D}/data/gnss_update
         ln -sf ./UC6228CI-R3.2.10.100Build8019_mfg.pkg ${D}/data/gnss_update/firmware.pkg
         ln -sf ./bootloader_r3.0.0_build6773_uartboot_921600.pkg ${D}/data/gnss_update/bootloader.pkg
     fi 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/LICENSE b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/LICENSE
new file mode 100755
index 0000000..cb88533
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("Mobiletek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to Mobiletek Inc. and/or its licensors. Without
+the prior written permission of Mobiletek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of Mobiletek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+Mobiletek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("Mobiletek SOFTWARE")
+RECEIVED FROM Mobiletek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. Mobiletek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES Mobiletek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE Mobiletek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN Mobiletek
+SOFTWARE. Mobiletek SHALL ALSO NOT BE RESPONSIBLE FOR ANY Mobiletek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND Mobiletek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE Mobiletek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT Mobiletek'S OPTION, TO REVISE OR REPLACE THE
+Mobiletek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO Mobiletek FOR SUCH Mobiletek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/lynq-adc-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/lynq-adc-demo.cpp
new file mode 100755
index 0000000..7fca094
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/lynq-adc-demo.cpp
@@ -0,0 +1,49 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <include/lynq-adc.h>
+
+void handle_adc(const char* adc_name, int adc_type)
+{
+    if (adc_name == NULL)
+    {
+        printf("Error: adc_name is a null pointer\n");
+        return;
+    }
+    int adc_value = qser_adc_show(adc_type);
+    if (adc_value < 0)
+    {
+        printf("Error: Failed to get the value of %s\n", adc_name);
+        return;
+    }
+    printf("%s value: %d mV\n", adc_name, adc_value);
+}
+
+int main(int argc, char *argv[])
+{
+    if (argc != 2)
+    {
+        printf("Usage: %s <ADC0|ADC1|ADC2>\n", argv[0]);
+        return -1;
+    }
+
+    if (strcmp(argv[1], "ADC0") == 0)
+    {
+        handle_adc("ADC0", ADC0);
+    }
+    else if (strcmp(argv[1], "ADC1") == 0)
+    {
+        handle_adc("ADC1", ADC1);
+    }
+    else if (strcmp(argv[1], "ADC2") == 0)
+    {
+        handle_adc("ADC2", ADC2);
+    }
+    else
+    {
+        printf("Please enter valid parameters: ADC0|ADC1|ADC2\n");
+        return -1;
+    }
+
+    return 0;
+}
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/makefile
similarity index 70%
copy from cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile
copy to cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/makefile
index 890f85a..8e2ac82 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/files/makefile
@@ -1,58 +1,49 @@
-SHELL = /bin/sh
-RM = rm -f
-
-LOCAL_CFLAGS := -Wall \
-                -std=gnu++14 \
-                -g -Os \
-                -flto \
-                -fpermissive \
-
-ifeq ($(strip $(TARGET_PLATFORM)), T106)
-LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
-endif
-
-ifeq ($(strip $(TARGET_PLATFORM)), T106)
-LOCAL_CFLAGS += -DMOBILETEK_TARGET_PLATFORM_T106
-endif
-
-LOCAL_CFLAGS += -Wno-error=format-security
-
-LOCAL_PATH   = .
-
-LOCAL_C_INCLUDES = \
-  -I. \
-  -I$(LOCAL_PATH)/include/ \
-  -I$(ROOT)$(includedir)/ \
-  -I$(ROOT)$(includedir)/include/ \
-
-
-
-LOCAL_LIBS := \
-    -L. \
-    -ldl \
-    -lstdc++ \
-    -lpthread \
-    -llynq-systime \
-
-
-
-SOURCES = lynq_systime_demo.cpp
-
-EXECUTABLE = lynq-systime-demo
-
-OBJECTS=$(SOURCES:.cpp=.o)
-
-OBJECTS_TOOL=$(SOURCES_TOOL:.cpp=.o)
-all: $(EXECUTABLE) 
-
-$(EXECUTABLE): $(OBJECTS)
-	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
-
-%.o : %.cpp
-	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
-
-.PHONY: clean
-clean:
-	$(RM) $(OBJECTS) $(EXECUTABLE)
-	$(RM) $(OBJECTS_TOOL) $(EXECUTABLE)
-
+SHELL = /bin/sh
+RM = rm -rf
+
+LOCAL_CFLAGS := -Wall \
+                -std=gnu++14 \
+                -g -Os \
+                -flto \
+                -fpermissive \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -Werror=format-security
+
+$(warning ################# rock ROOT: $(ROOT),includedir:$(includedir),)
+
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include/ \
+  -I$(ROOT)$(includedir)/ \
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lstdc++ \
+    -llynq-adc \
+
+SOURCES = lynq-adc-demo.cpp
+
+EXECUTABLE = lynq-adc-demo
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
+	$(RM) $(OBJECTS_TOOL) $(EXECUTABLE)
+
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/lynq-adc-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/lynq-adc-demo.bb
new file mode 100644
index 0000000..edcbbe4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-adc-demo/lynq-adc-demo.bb
@@ -0,0 +1,29 @@
+#inherit externalsrc package
+#inherit externalsrc package systemd
+DESCRIPTION = "lynq-adc-demo"
+LICENSE = "CLOSED"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+SRC_URI = "file://lynq-adc-demo.cpp \
+           file://makefile \
+"
+DEPENDS += "liblynq-adc"
+
+SRC-DIR = "${S}/../lynq-adc-demo"
+FILES_${PN} += "${bindir}/"
+TARGET_CC_ARCH += "${LDFLAGS}"
+SYSTEMD_PACKAGES = "${PN}"
+S = "${WORKDIR}"
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+	if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
+		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+	else
+		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+	fi
+}
+
+do_install() {
+	install -d ${D}${bindir}/
+	install -m 0755 ${S}/lynq-adc-demo ${D}${bindir}/
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/LICENSE b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/LICENSE
new file mode 100755
index 0000000..cb88533
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("Mobiletek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to Mobiletek Inc. and/or its licensors. Without
+the prior written permission of Mobiletek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of Mobiletek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+Mobiletek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("Mobiletek SOFTWARE")
+RECEIVED FROM Mobiletek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. Mobiletek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES Mobiletek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE Mobiletek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN Mobiletek
+SOFTWARE. Mobiletek SHALL ALSO NOT BE RESPONSIBLE FOR ANY Mobiletek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND Mobiletek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE Mobiletek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT Mobiletek'S OPTION, TO REVISE OR REPLACE THE
+Mobiletek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO Mobiletek FOR SUCH Mobiletek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/lynq-audio-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/lynq-audio-demo.cpp
new file mode 100755
index 0000000..eb557f6
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/lynq-audio-demo.cpp
@@ -0,0 +1,138 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <include/lynq-qser-audio.h>
+
+extern sc_audio_handle_t playback_handle;
+
+void player_cmd_proc(char *cmdstr)
+{
+    if (strcmp(cmdstr, "P\n") == 0)
+    {
+        qser_AudPlayer_Pause(playback_handle);
+    }
+    else if (strcmp(cmdstr, "R\n") == 0)
+    {
+        qser_AudPlayer_Resume(playback_handle);
+    }
+    else if (strcmp(cmdstr, "T\n") == 0)
+    {
+        qser_AudPlayer_Stop(playback_handle);
+    }
+    else
+    {
+        printf("Unknown command: %s", cmdstr);
+    }
+}
+
+void capture_cmd_proc(char *cmdstr)
+{
+    if (strcmp(cmdstr, "P\n") == 0)
+    {
+        qser_AudRecorder_Pause();
+    }
+    else if (strcmp(cmdstr, "R\n") == 0)
+    {
+        qser_AudRecorder_Resume();
+    }
+    else if (strcmp(cmdstr, "T\n") == 0)
+    {
+        qser_AudRecorder_Stop();
+    }
+    else
+    {
+        printf("Unknown command: %s", cmdstr);
+    }
+}
+
+int main(int argc, char *argv[])
+{
+    if (argc < 3)
+    {
+        printf("Usage: %s <play|recd> <file>\n", argv[0]);
+        return 1;
+    }
+
+    const char *action = argv[1];
+    const char *file = argv[2];
+
+    int g_audio_owner_id = 0;
+    char player_device[] = "device1";
+    char recorder_device[] = "device2";
+    char cmdstr[256];
+
+    _cb_onPlayer cb_fun = [](int result)
+    {
+        if (result == 0)
+        {
+            printf("Audio recorder opened successfully.\n");
+        }
+        else
+        {
+            printf("Failed to open audio recorder, error code: %d\n", result);
+        }
+    };
+
+    if (strcmp(action, "play") == 0)
+    {
+        int player_open_result = qser_AudPlayer_Open(player_device, cb_fun);
+        if (player_open_result != 0)
+        {
+            printf("Failed to open audio player.\n");
+            return 1;
+        }
+
+        qser_AudPlayer_PlayFrmFile(g_audio_owner_id, file, 0);
+
+        while (1)
+        {
+            printf("Please input a player command (P/R/T/exit) :\n");
+            if (fgets(cmdstr, sizeof(cmdstr), stdin) != NULL)
+            {
+                if (strcmp(cmdstr, "exit\n") == 0)
+                {
+                    qser_AudPlayer_Close(playback_handle);
+                    break;
+                }
+                player_cmd_proc(cmdstr);
+            }
+        }
+
+        qser_AudPlayer_Close(playback_handle);
+    }
+    else if (strcmp(action, "recd") == 0)
+    {
+        int recorder_open_result = qser_AudRecorder_Open(recorder_device, cb_fun);
+        if (recorder_open_result != 0) {
+            printf("Failed to open audio recorder.\n");
+            return 1;
+        }
+
+        qser_AudRecorder_StartRecord(g_audio_owner_id, file, 0);
+
+        while (1)
+        {
+            printf("Please input a player command (P/R/T/exit) :\n");
+            if (fgets(cmdstr, sizeof(cmdstr), stdin) != NULL)
+            {
+                if (strcmp(cmdstr, "exit\n") == 0)
+                {
+                    qser_AudRecorder_Close();
+                    break;
+                }
+                capture_cmd_proc(cmdstr);
+            }
+        }
+        qser_AudRecorder_Close();
+    }
+    else
+    {
+        printf("Unknown action: %s\n", action);
+        return 1;
+    }
+
+    qser_Audio_Deinit();
+
+    return 0;
+}
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/makefile
similarity index 74%
copy from cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile
copy to cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/makefile
index 890f85a..c37eeaa 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/files/makefile
@@ -1,58 +1,51 @@
-SHELL = /bin/sh
-RM = rm -f
-
-LOCAL_CFLAGS := -Wall \
-                -std=gnu++14 \
-                -g -Os \
-                -flto \
-                -fpermissive \
-
-ifeq ($(strip $(TARGET_PLATFORM)), T106)
-LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
-endif
-
-ifeq ($(strip $(TARGET_PLATFORM)), T106)
-LOCAL_CFLAGS += -DMOBILETEK_TARGET_PLATFORM_T106
-endif
-
-LOCAL_CFLAGS += -Wno-error=format-security
-
-LOCAL_PATH   = .
-
-LOCAL_C_INCLUDES = \
-  -I. \
-  -I$(LOCAL_PATH)/include/ \
-  -I$(ROOT)$(includedir)/ \
-  -I$(ROOT)$(includedir)/include/ \
-
-
-
-LOCAL_LIBS := \
-    -L. \
-    -ldl \
-    -lstdc++ \
-    -lpthread \
-    -llynq-systime \
-
-
-
-SOURCES = lynq_systime_demo.cpp
-
-EXECUTABLE = lynq-systime-demo
-
-OBJECTS=$(SOURCES:.cpp=.o)
-
-OBJECTS_TOOL=$(SOURCES_TOOL:.cpp=.o)
-all: $(EXECUTABLE) 
-
-$(EXECUTABLE): $(OBJECTS)
-	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
-
-%.o : %.cpp
-	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
-
-.PHONY: clean
-clean:
-	$(RM) $(OBJECTS) $(EXECUTABLE)
-	$(RM) $(OBJECTS_TOOL) $(EXECUTABLE)
-
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -std=gnu++14 \
+                -g -Os \
+                -flto \
+                -fpermissive \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -Werror=format-security
+
+$(warning ################# rock ROOT: $(ROOT),includedir:$(includedir),)
+
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include/ \
+  -I$(ROOT)$(includedir)/ \
+
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lstdc++ \
+    -lpthread \
+    -llynq-qser-audio \
+
+SOURCES = lynq-audio-demo.cpp
+
+EXECUTABLE = lynq-audio-demo
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+all: $(EXECUTABLE) 
+
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
+	$(RM) $(OBJECTS_TOOL) $(EXECUTABLE)
+
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/lynq-audio-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/lynq-audio-demo.bb
new file mode 100644
index 0000000..2260b19
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-audio-demo/lynq-audio-demo.bb
@@ -0,0 +1,31 @@
+#inherit externalsrc package
+#inherit externalsrc package systemd
+DESCRIPTION = "lynq-audio-demo"
+LICENSE = "CLOSED"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+SRC_URI = "file://lynq-audio-demo.cpp \
+           file://makefile \
+"
+DEPENDS += "liblynq-qser-audio"
+
+SRC-DIR = "${S}/../lynq-audio-demo"
+FILES_${PN} += "${bindir}/"
+TARGET_CC_ARCH += "${LDFLAGS}"
+SYSTEMD_PACKAGES = "${PN}"
+S = "${WORKDIR}"
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+	if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
+		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+	else
+		oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+	fi
+}
+
+
+do_install() {
+
+	install -d ${D}${bindir}/
+	install -m 0755 ${S}/lynq-audio-demo ${D}${bindir}/
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
index 85fbc84..b1d03ff 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-autosuspend/files/autosuspend_wakeup_count.c
@@ -235,13 +235,26 @@
 }
 #endif
 
-static int suspend_ctrl(char *wakeup_count,int wakeup_count_len)
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int t106_early_suspend(void)
 {
+    RLOGD("t106_early_suspend start\n");
+    system("/etc/init.d/syslog stop");
+    return 0;
+}
 
+void t106_early_resume(void)
+{
+    RLOGD("t106_early_resume start\n");
+    system("/etc/init.d/syslog start");
+    return NULL;
+}
+#endif
 
-    char buf[80];
-    int ret = 0;
 #ifdef MOBILETEK_SUSPEND_CFG
+int t800_early_suspend(char *wakeup_count, int wakeup_count_len)
+{
+    char buf[80];
     system("echo \"Sys standby mode\" >/dev/console");
     // sleep(1);
     system("echo 7 | emdlogger_ctrl");
@@ -278,6 +291,63 @@
             return -1;
         }    
     }
+    return 0;
+}
+
+void t800_early_resume(bool success)
+{
+    system("hwclock -s");
+    RLOGD("TIME: rtc to sys\n");
+    if (!success)
+    {
+
+       system("mdlogctl start");
+
+       system("echo 8 | emdlogger_ctrl");
+    
+       usleep(200000); 
+       ALOGI("Log on with failure\n");
+       return ;
+    }
+    
+    if (lynq_screen(1) != 0)  // notify ril for screen on
+    {
+        ALOGI("lynq_screen on fail\n");
+    }
+
+    system("mdlogctl start");
+
+    system("echo 8 | emdlogger_ctrl");
+    usleep(300000); //delay 2s for ril handling screen on,at least 70ms
+
+    return NULL;
+}
+#endif
+
+
+static int suspend_ctrl(char *wakeup_count,int wakeup_count_len)
+{
+
+
+    char buf[80];
+    int ret = 0;
+#ifdef MOBILETEK_SUSPEND_CFG
+    ret = t800_early_suspend(char *wakeup_count, wakeup_count_len);
+    if(ret != 0)
+    {
+	ALOGD("t800_early_suspend fail\n");
+        return -1;
+    }
+#endif
+
+
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+    ret = t106_early_suspend();
+    if(ret != 0)
+    {
+        ALOGD("t106_early_suspend fail\n");
+        return -1;
+    }
 #endif
 
     system("echo \"autosuspend:Sys suspend\" >/dev/console");
@@ -297,35 +367,14 @@
 
     char buf[80];
     long sleeptime = 0;
+
 #ifdef MOBILETEK_SUSPEND_CFG
-    system("hwclock -s");
-    RLOGD("TIME: rtc to sys\n");
-    if (!success)
-    {
+    t800_early_resume(bool success);
+#endif
 
-       system("mdlogctl start");
 
-       system("echo 8 | emdlogger_ctrl");
-    
-       usleep(200000); 
-       ALOGI("Log on with failure\n");
-       return ;
-    }
-
-    
-    if (lynq_screen(1) != 0)  // notify ril for screen on
-    {
-    ALOGI("lynq_screen on fail\n");
-
-    }
-
-    system("mdlogctl start");
-
-//  sleep(1);
-
-    system("echo 8 | emdlogger_ctrl");
-
-    usleep(300000); //delay 2s for ril handling screen on,at least 70ms
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+    t106_early_resume();
 #endif
 
     pthread_mutex_lock(&time_info_mutex);
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-led-demo/lynq-led-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-led-demo/lynq-led-demo.bb
new file mode 100755
index 0000000..a598b6a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-led-demo/lynq-led-demo.bb
@@ -0,0 +1,41 @@
+#inherit externalsrc package
+
+DESCRIPTION = "lynq led demo"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+DEPENDS += "liblynq-uci liblynq-led"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/packages/apps/lynq-led-demo"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/packages/apps:"
+SRC_URI = " \
+          file://lynq-led-demo \
+          "
+
+SRC-DIR = "${S}/../lynq-led-demo"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'RAT_CONFIG_C2K_SUPPORT = ${RAT_CONFIG_C2K_SUPPORT}'\
+                'MTK_MULTI_SIM_SUPPORT = ${MTK_MULTI_SIM_SUPPORT}'\
+                'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
+
+EXTRA_OEMAKE += "'LYNQ_CONFIG_VERSION = ${LYNQ_CONFIG_VERSION}' \
+                 'LYNQ_CONFIG_SW_VERSION = ${LYNQ_CONFIG_SW_VERSION}'"
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+	if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+	elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+	elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+	else
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+	fi
+}
+
+do_install() {
+	install -d ${D}${bindir}/
+	install -m 0755 ${SRC-DIR}/lynq-led-demo ${D}${bindir}/
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-led-sev/lynq-led-sev.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-led-sev/lynq-led-sev.bb
new file mode 100755
index 0000000..1c8d0a8
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-led-sev/lynq-led-sev.bb
@@ -0,0 +1,51 @@
+#inherit externalsrc package
+
+DESCRIPTION = "lynq led sev"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+DEPENDS += "liblynq-uci"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/framework/lynq-led-sev"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/framework/:"
+SRC_URI = " \
+          file://lynq-led-sev \
+          "
+
+SRC-DIR = "${S}/../lynq-led-sev"
+TARGET_CC_ARCH += "${LDFLAGS}"
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE_${PN} = "lynq_led_sev.service"
+FILES_${PN} += "${systemd_unitdir}/system/lynq_led_sev.service"
+FILES_${PN} += "/system/etc/tele/ring ${bindir}"
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'RAT_CONFIG_C2K_SUPPORT = ${RAT_CONFIG_C2K_SUPPORT}'\
+                'MTK_MULTI_SIM_SUPPORT = ${MTK_MULTI_SIM_SUPPORT}'\
+                'TARGET_PLATFORM = ${TARGET_PLATFORM}'\
+                'MTK_LED_SUPPORT = ${MTK_LED_SUPPORT}'\
+                'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
+EXTRA_OEMAKE += "'MOBILETEK_RIL_CFG = ${MOBILETEK_RIL_CFG}'"
+
+EXTRA_OEMAKE += "'MOBILETEK_FOTA_CFG = ${MOBILETEK_FOTA_CFG}'"
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+	if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+	else
+		oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+	fi
+}
+
+do_install() {
+	install -d ${D}${bindir}/
+	install -m 0755 ${SRC-DIR}/lynq-led-sev ${D}${bindir}/
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}${systemd_unitdir}/system/
+		install -m 0644 ${B}/lynq_led_sev.service ${D}${systemd_unitdir}/system
+	else
+		install -d ${D}${sysconfdir}/init.d
+		install -m 0755  ${SRC-DIR}/lynq-led-sev.sh ${D}${sysconfdir}/init.d/lynq-led-sev.sh
+		install -d ${D}${sysconfdir}/rcS.d
+		ln -s ../init.d/lynq-led-sev.sh ${D}${sysconfdir}/rcS.d/S23lynq-led-sev
+	fi
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq-qser-network-demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq-qser-network-demo.cpp
index 8ef97ca..0b1dd7d 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq-qser-network-demo.cpp
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq-qser-network-demo.cpp
@@ -21,6 +21,10 @@
 int (*qser_nw_get_reg_status_p)(nw_client_handle_type  h_nw, QSER_NW_REG_STATUS_INFO_T *pt_info);
 int (*qser_nw_add_rx_msg_handler_p)(nw_client_handle_type  h_nw, QSER_NW_RxMsgHandlerFunc_t handlerPtr,void* contextPtr);
 int (*qser_nw_get_signal_strength_p)(nw_client_handle_type h_nw,QSER_NW_SIGNAL_STRENGTH_INFO_T *pt_info);
+int (*qser_nw_set_oos_config_p)(nw_client_handle_type   h_nw, QSER_NW_OOS_CONFIG_INFO_T *pt_info);
+int (*qser_nw_get_oos_config_p)(nw_client_handle_type   h_nw, QSER_NW_OOS_CONFIG_INFO_T *pt_info);
+
+
 
 int getFunc()
 {
@@ -40,6 +44,9 @@
     qser_nw_get_reg_status_p = (int (*)(nw_client_handle_type  h_nw, QSER_NW_REG_STATUS_INFO_T  *pt_info))dlsym(handle_network,"qser_nw_get_reg_status");
     qser_nw_get_signal_strength_p = (int (*)(nw_client_handle_type h_nw, QSER_NW_SIGNAL_STRENGTH_INFO_T *pt_info))dlsym(handle_network,"qser_nw_get_signal_strength");
     qser_nw_add_rx_msg_handler_p = (int (*)(nw_client_handle_type  h_nw, QSER_NW_RxMsgHandlerFunc_t handlerPtr,void* contextPtr))dlsym(handle_network,"qser_nw_add_rx_msg_handler");
+    qser_nw_get_oos_config_p = (int (*)(nw_client_handle_type   h_nw, QSER_NW_OOS_CONFIG_INFO_T *pt_info))dlsym(handle_network,"qser_nw_get_oos_config");
+    qser_nw_set_oos_config_p = (int (*)(nw_client_handle_type   h_nw, QSER_NW_OOS_CONFIG_INFO_T *pt_info))dlsym(handle_network,"qser_nw_set_oos_config");
+
         
     if(qser_nw_client_deinit_p==NULL || qser_nw_client_init_p==NULL || qser_nw_set_config_p ==NULL ||
        qser_nw_get_operator_name_p == NULL || qser_nw_get_reg_status_p ==NULL || qser_nw_add_rx_msg_handler_p==NULL)
@@ -78,7 +85,11 @@
     {3,     "qser_nw_get_reg_status"},        
     {4,     "qser_nw_add_rx_msg_handler"},     
     {5,     "qser_nw_get_signal_strength"},
-    {6,     "qser_nw_client_deinit"},  
+    {6,     "qser_nw_set_oos_config"},
+    {7,     "qser_nw_get_oos_config"},
+    {8,     "qser_nw_client_deinit"},  
+ 
+    
     {-1,    "quit"}
 };
 
@@ -424,7 +435,7 @@
                              
                  break;
              }                 
-             case 6://"qser_nw_client_deinit"
+             case 8://"qser_nw_client_deinit"
              {
                  ret = qser_nw_client_deinit_p(h_nw);
                  printf("qser_nw_client_deinit ret = %d\n", ret);
@@ -475,7 +486,76 @@
                 }
                 break;
              }        
-            
+             case 7 :
+             {
+                QSER_NW_OOS_CONFIG_INFO_T t_info;
+                int type = 0;
+                printf("please input you want query oos config's type (0: fast network scan config; 1: full band network scan config ) : \n");
+                scanf("%d", &type);
+                t_info.type = type;
+                ret = qser_nw_get_oos_config_p(h_nw, &t_info);  
+                printf("qser_nw_get_oos_config, ret=%d\n", ret);
+                if(ret==0)
+                {         
+                    if(t_info.type == QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN)
+                    {
+                        printf("qser_nw_get_oos_config         t_min = %d\n"
+                               "                               t_step = %d\n"
+                               "                               t_num = %d\n"
+                               "                               t_max = %d\n",
+                              t_info.u.full_band_scan_info.t_min, t_info.u.full_band_scan_info.t_step,                             
+                              t_info.u.full_band_scan_info.t_num, t_info.u.full_band_scan_info.t_max);
+                    }     
+                    else if(t_info.type == QSER_NW_OOS_CFG_TYPE_FAST_SCAN)
+                    {
+                        printf("qser_nw_get_oos_config         enable = %d\n"
+                               "                               time_interval = %d\n",
+                              t_info.u.fast_can_info.enable, t_info.u.fast_can_info.time_interval); 
+                    }
+                    else
+                    {
+                        printf("qser_nw_get_oos_config tyep is %d, ret is ok",t_info.type);
+                    }
+    
+                }
+                break;
+             }         
+             case 6 :
+             {
+                QSER_NW_OOS_CONFIG_INFO_T t_info;
+                int type = 0;
+                printf("please input you want set oos config's type (0: fast network scan config; 1: full band network scan config ) : \n");
+                scanf("%d", &type);
+                t_info.type = type;
+                if(t_info.type == QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN)
+                {
+                      printf("please input  t_min: \n");
+                      scanf("%d", &(t_info.u.full_band_scan_info.t_min));
+                      printf("please input t_step: \n");
+                      scanf("%d", &(t_info.u.full_band_scan_info.t_step));
+                      printf("please input  t_num: \n");
+                      scanf("%d", &(t_info.u.full_band_scan_info.t_num));
+                      printf("please input t_max: \n");
+                      scanf("%d", &(t_info.u.full_band_scan_info.t_max));
+                      ret = qser_nw_set_oos_config_p(h_nw, &t_info);  
+                      printf("qser_nw_get_oos_config, ret=%d\n", ret);                      
+                }
+                else if(t_info.type==QSER_NW_OOS_CFG_TYPE_FAST_SCAN)
+                {
+                      printf("please input  enable: \n");
+                      scanf("%d", &(t_info.u.fast_can_info.enable));
+                      printf("please input time_interval: \n");
+                      scanf("%d", &(t_info.u.fast_can_info.time_interval));                      
+                      ret = qser_nw_set_oos_config_p(h_nw, &t_info);  
+                      printf("qser_nw_get_oos_config, ret=%d\n", ret);                    
+                }
+                else 
+                {
+                       ret = qser_nw_set_oos_config_p(h_nw, &t_info);  
+                       printf("qser_nw_get_oos_config, ret=%d\n", ret);            
+                }                
+                break;
+             }         
              default:
              {
                  show_group_help(&t_nw_test);
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h
index b65e428..4083e13 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/files/lynq_qser_network.h
@@ -35,6 +35,37 @@
     E_QSER_NW_ROAM_STATE_TYPE_T   roaming_pref;       /**<   Roaming preference.*/
 }QSER_NW_CONFIG_INFO_T;
 
+/** Configures the OOS (out of service)  settings that define the MCM network interface. */
+#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN          0x00    /**<  fast net scan */
+#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN     0x01    /**<  full band scan */
+
+typedef struct 
+{
+    /*    Configuration parameters for MCM network fast network scan when OOS (out of service)*/
+    char                        enable;
+    uint16_t                    time_interval;
+}QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T;
+
+typedef struct 
+{
+    /*    Configuration parameters for MCM network full band network scan when OOS (out of service)*/
+    int t_min;
+    int t_step;
+    int t_num;
+    int t_max;
+}QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T;
+
+
+typedef struct 
+{    
+    char                        type;  /**<   QSER_NW_OOS_CFG_TYPE_xxxx.*/
+    union {
+    QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T  fast_can_info;       // 00
+    QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T full_band_scan_info;     // 01   
+  } u;
+}QSER_NW_OOS_CONFIG_INFO_T;
+
+
 
 //defined for QSER_NW_EventRegister
 #define     NW_IND_VOICE_REG_EVENT_IND_FLAG               (1 << 0)    /**< msg format : QSER_NW_VOICE_REG_EVENT_IND_T */
@@ -346,6 +377,18 @@
     QSER_NW_CONFIG_INFO_T     *pt_info 
 );
 
+int qser_nw_set_oos_config
+(
+    nw_client_handle_type       h_nw,
+    QSER_NW_OOS_CONFIG_INFO_T     *pt_info 
+);
+
+int qser_nw_get_oos_config
+(
+    nw_client_handle_type       h_nw,
+    QSER_NW_OOS_CONFIG_INFO_T     *pt_info 
+);
+
 int qser_nw_event_register
 (
     nw_client_handle_type       h_nw,
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/lynq_systime_demo.cpp b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/files/lynq_systime_demo.cpp
similarity index 100%
rename from cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/lynq_systime_demo.cpp
rename to cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/files/lynq_systime_demo.cpp
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/files/makefile
similarity index 95%
rename from cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile
rename to cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/files/makefile
index 890f85a..91b38a1 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/lynq-systime-demo/makefile
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/files/makefile
@@ -1,5 +1,5 @@
 SHELL = /bin/sh
-RM = rm -f
+RM = rm -rf
 
 LOCAL_CFLAGS := -Wall \
                 -std=gnu++14 \
@@ -23,7 +23,7 @@
   -I. \
   -I$(LOCAL_PATH)/include/ \
   -I$(ROOT)$(includedir)/ \
-  -I$(ROOT)$(includedir)/include/ \
+
 
 
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/lynq-systime-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/lynq-systime-demo.bb
index 8649a79..b726e50 100644
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/lynq-systime-demo.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-systime-demo/lynq-systime-demo.bb
@@ -2,19 +2,18 @@
 #inherit externalsrc package systemd
 DESCRIPTION = "lynq-systime-demo"
 LICENSE = "CLOSED"
-LICENSE = "CLOSED"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
 DEPENDS += "liblynq-systime"
-#inherit workonsrc
-WORKONSRC = "${TOPDIR}/../src/lynq/packages/apps/lynq-systime-demo"
-FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/packages/apps:"
-SRC_URI = " \
-          file://lynq-systime-demo \
-          "
 
-SRC-DIR = "${S}/../lynq-systime-demo"
+SRC_URI = "file://lynq_systime_demo.cpp \
+           file://makefile \
+          "
+SRC-DIR = "${S}/../"
+
+FILES_${PN} += "${bindir}/"
 TARGET_CC_ARCH += "${LDFLAGS}"
 SYSTEMD_PACKAGES = "${PN}"
+
 #Parameters passed to do_compile()
 EXTRA_OEMAKE = "'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
 
diff --git a/cap/zx297520v3/sources/meta-zxic/conf/pub_esdk.inc b/cap/zx297520v3/sources/meta-zxic/conf/pub_esdk.inc
index b66ac77..8b7ec5a 100755
--- a/cap/zx297520v3/sources/meta-zxic/conf/pub_esdk.inc
+++ b/cap/zx297520v3/sources/meta-zxic/conf/pub_esdk.inc
@@ -7,6 +7,7 @@
 ZXIC_ZX297520V3_CFLAGS += "-I${BSPDIR}/pub/project/zx297520v3/include/drv "
 ZXIC_ZX297520V3_CFLAGS += "-I${BSPDIR}/pub/project/zx297520v3/include/nv "
 ZXIC_ZX297520V3_CFLAGS += "-D_CHIP_ZX297520V3 -DCPU_SHIFT=0 -D_USE_VEHICLE_DC -D_USE_ZXIC_DEBUG_INFO"
+ZXIC_ZX297520V3_CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'vehicle_dc_ref', '-D_USE_VEHICLE_DC_REF', '', d)}"
 
 ZXIC_EXTRA_CFLAGS += "${@bb.utils.contains('MACHINE', 'zx297520v3', '${ZXIC_ZX297520V3_CFLAGS}', '', d)}"
 
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/sntp/sntp.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/sntp/sntp.bb
index 2b9fe3c..21f207e 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/sntp/sntp.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/sntp/sntp.bb
@@ -49,7 +49,7 @@
 	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
 		install -Dm 0755 ${WORKDIR}/sntp.sysvinit ${D}${sysconfdir}/init.d/sntp
 		install -d ${D}${sysconfdir}/rcS.d
-		ln -s ../init.d/sntp ${D}${sysconfdir}/rcS.d/S22sntp
+		#ln -s ../init.d/sntp ${D}${sysconfdir}/rcS.d/S22sntp
 	fi
 	
 	#install elfs
@@ -72,4 +72,4 @@
 SYSTEMD_SERVICE_${PN}     = "sntp.service"
 SYSTEMD_AUTO_ENABLE_${PN} = "enable"
 
-RDEPENDS_${PN} = " libnvram libsoftap libsofttimer"
\ No newline at end of file
+RDEPENDS_${PN} = " libnvram libsoftap libsofttimer"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig b/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig
index b4b886e..6c84688 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-kernel/linux/files/zx297520v3/linux-5_10-vehicle_dc_ref-normal-defconfig
@@ -1975,24 +1975,22 @@
 # CONFIG_SND_SOC_ZX29_TI3100 is not set
 #dongyu@modify for codec start
 # CONFIG_SND_SOC_ZX29_NAU8810 is not set
-# CONFIG_SND_SOC_ZX29_TI3104 is not set
+CONFIG_SND_SOC_ZX29_TI3104=y
 # CONFIG_SND_SOC_ZX29_ES8374 is not set
 # CONFIG_SND_SOC_ZX29_ES8312 is not set
 # CONFIG_SND_SOC_ZX29_AK4940 is not set
 # CONFIG_SND_SOC_ZX29_MAX9867 is not set
 # CONFIG_SND_SOC_ZX29_ES8311 is not set
-CONFIG_SND_SOC_ZX29_ES8311=y
 CONFIG_SND_SOC_ZX_VOICE=y
 CONFIG_SND_SOC_ZX297520V3=y
 CONFIG_SND_SOC_ZX_I2S=y
 CONFIG_SND_SOC_ZX_PCM=y
 # CONFIG_SND_SOC_ZX_TDM is not set
 # CONFIG_SND_SOC_TLV320AIC31XX is not set
-CONFIG_SND_SOC_NAU8810=y
-# CONFIG_SND_SOC_TLV320AIC3X is not set
+# CONFIG_SND_SOC_NAU8810 is not set
+CONFIG_SND_SOC_TLV320AIC3X=y
 # CONFIG_SND_SOC_MAX9867 is not set
 # CONFIG_SND_SOC_ES8311 is not set
-CONFIG_SND_SOC_ES8311=y
 #dongyu@modify for codec end
 CONFIG_SND_EXTRA_CTRL=y
 CONFIG_USE_TOP_I2S0=y
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq-led-sev.sh b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq-led-sev.sh
new file mode 100755
index 0000000..a5f0230
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq-led-sev.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+# Run the daemon
+#
+
+DAEMON="lynq-led-sev"
+PIDFILE="/var/run/$DAEMON.pid"
+EXEC="/usr/bin/lynq-led-sev"
+EXEC_ARGS=""
+
+
+start() {
+        echo -n "Starting $DAEMON... "
+        start-stop-daemon --no-close -S -b -m -p $PIDFILE -x $EXEC -- $EXEC_ARGS
+        [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+stop() {
+        echo -n "Stopping $DAEMON... "
+        start-stop-daemon -K -p $PIDFILE
+        [ $? -eq 0 ] && echo "OK" || echo "ERROR"
+}
+
+restart() {
+        stop
+        start
+}
+
+case "$1" in
+  start|stop|restart)
+        "$1"
+        ;;
+  *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+esac
+
+exit $?
+
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c
new file mode 100755
index 0000000..6f6f916
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.c
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <strings.h>
+#include<stdlib.h>
+#include <include/lynq_uci.h>
+
+
+#define BUF_LEN 8
+#define GPIO_LED 100
+#define LYNQ_UCI_SECTION "lynq_led"
+#define LYNQ_UCI_KEY "lynq_statusled_on"
+
+
+int main(int argc, const char *argv[])
+{
+    char led_enable[BUF_LEN] = "";
+    char com_val[GPIO_LED] = "";
+
+    system("/usr/bin/lynq-default");
+    lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, led_enable);
+    if(atoi(led_enable))
+    {
+        sprintf(com_val, "echo %d > /sys/class/gpio/gpio127/value",led_enable);
+        system("echo 127 > /sys/class/gpio/export");
+        system("echo out > /sys/class/gpio/gpio127/direction");//92 net_Status,127 status
+        system(com_val);
+    }
+
+    return 0;
+}
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.service b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.service
new file mode 100755
index 0000000..bea06a6
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/lynq_led_sev.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=lynq ril service
+After=mtkfusionrild.service
+Requires=mtkfusionrild.service
+
+[Service]
+StandardOutput=kmsg+console
+Type=simple
+RemainAfterExit=no
+ExecStart=/usr/bin/lynq-led-sev
+Restart=always
+User=root
+Group=root
+
+[Install]
+Alias=rilsvc
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-led-sev/makefile b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/makefile
new file mode 100755
index 0000000..4e83c2b
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/framework/lynq-led-sev/makefile
@@ -0,0 +1,46 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -g -Os \
+                -flto \
+                -fpermissive \
+                -fPIC \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -DLYNQ_SW_INSIDE_VERSION=\"$(LYNQ_CONFIG_VERSION)\"
+LOCAL_CFLAGS += -DLYNQ_SW_VERSION=\"$(LYNQ_CONFIG_SW_VERSION)\"
+
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+
+
+
+
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -llynq-uci \
+
+SOURCES = $(wildcard *.c)
+
+EXECUTABLE = lynq-led-sev
+
+OBJECTS=$(SOURCES:.c=.o)
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.c
+	$(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/common.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/common.cpp
index e63b046..36d9e01 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/common.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/common.cpp
@@ -101,6 +101,10 @@
 
 /*Warren add for SZZT 2021/11/14 end*/
 
+#define LED_ON 4
+#define LYNQ_UCI_SECTION "lynq_led"
+#define LYNQ_UCI_KEY "lynq_netled_on"
+
 
 /*hq add for key information output start 2022/03/01*/
 // extern int lynq_output_LINFO_enable =0;
@@ -576,6 +580,10 @@
         RLOGD("[slot%d]updateCardStatusV6: sim card message is null", slot);
     }
 #ifdef LED_SUPPORT
+    char netled_on[LED_ON] = "";
+    lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, netled_on);
+    if(!atoi(netled_on))
+        return ;
     mbtk_netled_state_update(GPIO_NETLED_REFLASH_NORMAL);  
 #endif
 }
@@ -605,6 +613,10 @@
         regCodeToServiceState(request, atoi(code), slot);
     }
 #ifdef LED_SUPPORT
+    char netled_on[LED_ON] = "";
+    lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, netled_on);
+    if(!atoi(netled_on))
+        return ;
     mbtk_netled_state_update(GPIO_NETLED_REFLASH_NORMAL);  
 #endif
 }
@@ -627,6 +639,10 @@
         /*Warren change for SZZT 2021//11/14 end*/
     }
 #ifdef LED_SUPPORT
+    char netled_on[LED_ON] = "";
+    lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, netled_on);
+    if(!atoi(netled_on))
+        return ;
     mbtk_netled_state_update(GPIO_NETLED_REFLASH_NORMAL);  
 #endif
 }
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/led/led.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/led/led.cpp
index a252764..0a10645 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/led/led.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/led/led.cpp
@@ -24,7 +24,13 @@
 *************************************************************/
 #define GPIO_NETLED_CONNECT_REFLASH_TIMER   200
 #define GPIO_NETLED_CREG_REFLASH_TIMER   800
+#ifndef MOBILETEK_TARGET_PLATFORM_T106
 #define MBTK_GPIO_NETLED_N            77
+#else
+#define MBTK_GPIO_LED  100
+#define MBTK_GPIO_NETLED_N 92
+#define MBTK_GPIO_STATUSLED_N 127
+#endif
 
 /*************************************************************
     Extern Function Declaration
@@ -495,6 +501,18 @@
 
 void mbtk_gpio_write_output(int gpio_port, int value)
 {
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+    char com_exp[MBTK_GPIO_LED] = "";
+    char com_dir[MBTK_GPIO_LED] = "";
+    char com_val[MBTK_GPIO_LED] = "";
+    sprintf(com_exp, "echo %d > /sys/class/gpio/export", gpio_port);
+    sprintf(com_dir, "echo out > /sys/class/gpio/gpio%d/direction", gpio_port);
+    sprintf(com_val, "echo %d > /sys/class/gpio/gpio%d/value", value, gpio_port);
+
+    system(com_exp);//92 net_Status,127 status
+    system(com_dir);
+    system(com_val);
+#else
     if(value==1)
     {
         system("echo 255 > /sys/class/leds/led9515:green:cellular-radio/brightness");
@@ -503,6 +521,7 @@
 	{
 	    system("echo 0 > /sys/class/leds/led9515:green:cellular-radio/brightness");
 	}
+#endif
 }
 
 /*=============================================
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
index c23afae..76f99b3 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
@@ -3801,6 +3801,7 @@
     s_registerCalled = 1;
 
     sendRequestToMd(RIL_REQUEST_RADIO_POWER, get_default_sim_all_except_data());
+     initCoditions();
 
     pthread_mutex_lock(&s_InitMutex);
     if(utils::is_support_dsds()) {
@@ -3813,7 +3814,7 @@
         }
     }
     pthread_mutex_unlock(&s_InitMutex);
-    initCoditions();
+    //initCoditions();
     // New rild impl calls RIL_startEventLoop() first
     // old standalone impl wants it here.
 
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/stateManager/stateManager.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/stateManager/stateManager.cpp
index d4f3ce3..291fea2 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/stateManager/stateManager.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/stateManager/stateManager.cpp
@@ -49,10 +49,13 @@
 #include <liblog/lynq_deflog.h>
 #ifdef LED_SUPPORT
 #include "led.h"
+#include <include/lynq_uci.h>
 #endif
 #undef LOG_TAG
 #define LOG_TAG "DEMO_MANAGER"
-
+    #define LED_ON 4
+    #define LYNQ_UCI_SECTION "lynq_led"
+    #define LYNQ_UCI_KEY "lynq_netled_on"
 //RIL_REQUEST_DEVICE_IDENTITY
 int getDeviceIdentity(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
 {
@@ -103,6 +106,10 @@
     int screen_state= atoi(argv[1]);
     p.writeInt32(screen_state);
 #ifdef LED_SUPPORT
+    char netled_on[LED_ON] = "";
+    lynq_get_value(LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, netled_on);
+    if(!atoi(netled_on))
+        return -1;
     mbtk_netled_state_update(screen_state==0 ? GPIO_NETLED_AP_GOINGSLEEP : GPIO_NETLED_AP_WAKEUP);	
     usleep(wait_led_update_effective_timer_ms*1000);
 #endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-adc/LICENSE
new file mode 100644
index 0000000..cb88533
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("Mobiletek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to Mobiletek Inc. and/or its licensors. Without
+the prior written permission of Mobiletek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of Mobiletek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+Mobiletek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("Mobiletek SOFTWARE")
+RECEIVED FROM Mobiletek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. Mobiletek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES Mobiletek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE Mobiletek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN Mobiletek
+SOFTWARE. Mobiletek SHALL ALSO NOT BE RESPONSIBLE FOR ANY Mobiletek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND Mobiletek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE Mobiletek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT Mobiletek'S OPTION, TO REVISE OR REPLACE THE
+Mobiletek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO Mobiletek FOR SUCH Mobiletek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/include/lynq-adc.h b/cap/zx297520v3/src/lynq/lib/liblynq-adc/include/lynq-adc.h
new file mode 100644
index 0000000..95f55be
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/include/lynq-adc.h
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sc_bsp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum ADC_CHANNEL_ENUM
+{
+    QADC_NONE = 0,
+    ADC0 =1,
+    ADC1 =2,
+    ADC2 =3,
+    QADC_END
+}ADC_CHANNEL_E;
+
+int qser_adc_show(ADC_CHANNEL_E qadc);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/lynq-adc.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-adc/lynq-adc.cpp
new file mode 100755
index 0000000..b392fca
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/lynq-adc.cpp
@@ -0,0 +1,88 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sc_bsp.h>
+#include <errno.h>
+#include "lynq-adc.h"
+#include "liblog/lynq_deflog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ADC0_NODES "/sys/kernel/debug/pmu_zx29/adc0"
+#define ADC1_NODES "/sys/kernel/debug/pmu_zx29/adc1"
+#define ADC2_NODES "/sys/kernel/debug/pmu_zx29/adc2"
+
+/********************************************************************
+* @brief: qser_adc_show, function to read ADC value from specific channel
+* @param qadc [IN]: ADC_CHANNEL_E, the ADC channel to read from
+* @return : int, the read ADC value, or error code if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_adc_show(ADC_CHANNEL_E qadc)
+{
+    int adc_value;
+    char cmd[1024];
+    char cmd_ret[1024];
+    FILE *fp;
+    switch(qadc)
+    {
+    case QADC_NONE:
+    {
+        LYERRLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+        return 0;
+    }
+    case ADC0:
+    {
+        LYDBGLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+        sprintf(cmd, "cat %s", ADC0_NODES);
+        break;
+    }
+    case ADC1:
+    {
+        LYDBGLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+        sprintf(cmd, "cat %s", ADC1_NODES);
+        break;
+    }
+    case ADC2:
+    {
+        LYDBGLOG("function %s line %d\n", __FUNCTION__, __LINE__);
+        sprintf(cmd, "cat %s", ADC2_NODES);
+        break;
+    }
+    default:
+    {
+        LYERRLOG("input error\n");
+        return -1;
+    }
+    }
+    if((fp = popen(cmd,"r")) == NULL)
+    {
+        LYERRLOG("popen error: %s", strerror(errno));
+        return -1;
+    }
+    if((fread(cmd_ret,sizeof(cmd_ret),1,fp))<0)
+    {
+        LYERRLOG("fread fail: %s", strerror(errno));
+        fclose(fp);
+        return -1;
+    }
+    fclose(fp);
+    adc_value = atoi(cmd_ret);
+    if (adc_value < 0 || adc_value > 12000)
+    {
+        LYERRLOG("bad adc value %s!", cmd_ret);
+        return -1;
+    }
+    return adc_value;
+}
+
+DEFINE_LYNQ_LIB_LOG(LYNQ_ADC)
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-adc/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-adc/makefile
new file mode 100644
index 0000000..d8447e6
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-adc/makefile
@@ -0,0 +1,61 @@
+SHELL = /bin/sh
+RM = rm -rf
+
+LOCAL_CFLAGS := -Wall \
+                -std=gnu++14 \
+                -g -Os \
+                -flto \
+                -fPIC \
+                -fpermissive \
+
+$(warning ################# lynq qser autosuspend API ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include/ \
+  -I$(LOCAL_PATH)/ \
+  -I$(ROOT)$(includedir)/logger \
+  -I$(ROOT)$(includedir)/liblog \
+
+LOCAL_LIBS := \
+    -L. \
+    -lstdc++ \
+    -lcutils \
+    -lutils \
+    -llynq-log \
+    -lbsp \
+
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-adc.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+
+.PHONY: build clean install pack_rootfs
+all: build
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+build:  $(EXECUTABLE)
+	$(warning ########## build $(EXECUTABLE)  ##########)
+install:
+	mkdir -p $(ROOT)$(base_libdir)/
+	install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+	mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+pack_rootfs:
+	mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+	mkdir -p $(PACK_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
+	-find . -name "*.o" -delete
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
index cacdf2d..ccb8eaa 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
@@ -24,21 +24,21 @@
 
 void lynq_response_ok()
 {
-    char *str = "OK\n";
+    char *str = "OK\r\n";
     handle_output(str, strlen(str), Response);
 }
 
 void lynq_response_error(int error_code)
 {
     char str[32] = {0};
-    sprintf(str, "+CME ERROR: %d\n", error_code);
+    sprintf(str, "+CME ERROR: %d\r\n", error_code);
     handle_output(str, strlen(str), Response);
 }
 
 void lynq_handle_version()
 {
     char buf[64] = {0};
-    sprintf(buf,"%s\n",LYNQ_SW_INSIDE_VERSION);
+    sprintf(buf,"+CGIR:%s\r\n",LYNQ_SW_INSIDE_VERSION);
     handle_output(buf, strlen(buf), Response);
     lynq_response_ok();
     return;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/gpio_T106.conf b/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/gpio_T106.conf
index 5133ad0..28dfd24 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/gpio_T106.conf
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/gpio_T106.conf
@@ -1,4 +1,4 @@
 platform:T106
 total:49
-gpio:16,17,18,20,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,45,46,48,52,53,54,64,72,73,74,75,76,77,84,87,88,89,90,91,92,119,120,121,122,123,124,127,128,129,130,131,132,
+gpio:16,17,18,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,45,46,48,52,53,54,66,67,68,69,70,71,84,87,88,89,90,91,92,119,120,121,122,123,124,127,128,129,130,131,132,
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp
index b82cb42..ed8ca40 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp
@@ -42,14 +42,14 @@
 
 void lynq_response_ok()
 {
-    char *str = "OK\n";
+    char *str = "OK\r\n";
     handle_output(str, strlen(str), Response);
 }
 
 void lynq_response_error(int error_code)
 {
     char str[32] = {0};
-    sprintf(str, "+CME ERROR: %d\n", error_code);
+    sprintf(str, "+CME ERROR: %d\r\n", error_code);
     handle_output(str, strlen(str), Response);
 }
 
@@ -92,7 +92,7 @@
 
     fp=popen(lynq_adc_dev, "r");
     fgets(lynq_adc_buf,sizeof(lynq_adc_buf),fp);
-    sprintf(flag,"%s %s", "ADC:", lynq_adc_buf);
+    sprintf(flag,"%s %s\r\n", "+ADC:", lynq_adc_buf);
     if(handle_output != NULL)
     {
         handle_output(flag, strlen(flag), Response);
@@ -159,7 +159,7 @@
             }
             else
             {
-                handle_output("input error\r\n", strlen("input error\r\n"), Response);
+                handle_output("+GPIO:input error\r\n", strlen("input error\r\n"), Response);
                 return -1;
             }
         }
@@ -175,13 +175,13 @@
         if(k >= total_length)
         {
             bzero(res,64);
-            sprintf(res,"GPIO%d input error\r\n",num);
+            sprintf(res,"+GPIO:GPIO%d input error\r\n",num);
             handle_output(res, strlen(res), Response);
         }
     }
     if (lynq_gpio_arr == NULL)
     {
-        handle_output("input all gpio not exist\r\n", strlen("input all gpio not exist\r\n"), Response);
+        handle_output("+GPIO:input all gpio not exist\r\n", strlen("input all gpio not exist\r\n"), Response);
         return -1;
     }
     return size;
@@ -249,21 +249,8 @@
 {
     int ret;
     int value;
-    if(test_gpio_handle[50] != NULL)
-    {
-        ret = sc_gpio_uninit(test_gpio_handle[50]);
-        if(ret)
-        {
-            ALOGE("uninit 50 fail\n");
-            return -1;
-        }
-    }
-    test_gpio_handle[50] = sc_gpio_init(50, 0, 0, 0);
-    if(test_gpio_handle[50] == NULL)
-    {
-        ALOGE("init 50 fail\n");
-        return -1;
-    }
+
+    
     for(int m = 0; m < total_length; m++)
     {
         if(test_gpio_handle[lynq_gpio_arr[m]] != NULL)
@@ -285,6 +272,7 @@
     ret = sc_gpio_value_get(test_gpio_handle[50], &value);
     if(ret)
     {
+        ALOGE("RET = %d, value = %d\n",ret,value);
         return -1;
     }
     if(value != status)
@@ -297,13 +285,17 @@
 int all_gpio_uninit(int total_length, int lynq_gpio_total_arr[256])
 {
     int ret;
-    ret = sc_gpio_uninit(test_gpio_handle[50]);
-    if(ret)
+    if(test_gpio_handle[50] != NULL)
     {
-        return -1;
-        ALOGE("uninit 50 fail\n");
+        ret = sc_gpio_uninit(test_gpio_handle[50]);
+        if(ret)
+        {
+            ALOGE("uninit 50 fail\n");
+            return -1;
+        }
+        test_gpio_handle[50] = NULL;
     }
-    test_gpio_handle[50] = NULL;
+    
     for(int m = 0; m < total_length; m++)
     {
         ret = sc_gpio_uninit(test_gpio_handle[lynq_gpio_total_arr[m]]);
@@ -338,6 +330,12 @@
         ALOGE("Don't have this platform gpio configure\n");
         return;
     }
+    test_gpio_handle[50] = sc_gpio_init(50, 0, 0, 0);
+    ALOGE("50 youm:%p\n",test_gpio_handle[50]);
+    if(test_gpio_handle[50] == NULL)
+    {
+        ALOGE("uninit 50 fail\n");
+    }
     ALOGD("start function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
     input = input + strlen("gpio");
     if((valid_length = lynq_gpio_analysis(input, lynq_gpio_arr, lynq_gpio_total_arr, total_length)) < 0)
@@ -346,7 +344,7 @@
         return;
     }
     ALOGE("The Valid count:%d\n",valid_length);
-    for(i=0; i < sizeof(lynq_gpio_arr)/sizeof(int); i++)
+    for(i=0; i < valid_length; i++)
     {
         for(j=0;j<3;j++)
         {
@@ -357,7 +355,7 @@
 
             if (need_int == 1)
             {
-                ret = set_all_gpio_status_and_check(lynq_gpio_total_arr, 0, total_length);
+                ret = set_all_gpio_status_and_check(lynq_gpio_arr, 0, valid_length);
                 if (ret == 1)
                 {
                     ALOGE("can't pull up or pull down gpio-50\n");
@@ -374,7 +372,7 @@
                     lynq_response_error(100);
                     return;
                 }
-                ALOGD("finsh configure function %s line %d input %s\n", __FUNCTION__, __LINE__, input);  
+                ALOGD("finsh configure function\n");  
             }
 
             lynq_gpio_low = 0;
@@ -382,25 +380,26 @@
 
             for(int n=0;n<3;n++)
             {
-                ret = sc_gpio_value_set(test_gpio_handle[lynq_gpio_arr[1]], 1);
+                ret = sc_gpio_value_set(test_gpio_handle[lynq_gpio_arr[i]], 1);
+                usleep(10000);
                 ret = sc_gpio_value_get(test_gpio_handle[50], &value);
                 if(ret)
                 {
-                    ALOGD("sc_gpio_value_get");
+                    ALOGE("sc_gpio_value_get\n");
                 }
                 if(value == 1)
                 {
-                    ALOGD("high function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
+                    ALOGE("high function is OK,input %d\n",lynq_gpio_arr[i]);
                     lynq_gpio_high = 1;
                     lynq_gpio_test_env_error = 0;
                     break;
                 }
                 else
                 {
-                    ALOGD("high function %s line %d input %s num %d\n", __FUNCTION__, __LINE__, input,lynq_gpio_arr[i]);
+                    ALOGE("high function is Fail, input %d\n",lynq_gpio_arr[i]);
                     if(i == 0 && j == 0)
                     {
-                        lynq_gpio_test_env_error = set_all_gpio_status_and_check(lynq_gpio_total_arr, 1, total_length) == 0 ? 0 : 1;
+                        lynq_gpio_test_env_error = set_all_gpio_status_and_check(lynq_gpio_arr, 1, valid_length) == 0 ? 0 : 1;
                     }
                 }
             }
@@ -409,8 +408,9 @@
             ret = sc_gpio_value_set(test_gpio_handle[lynq_gpio_arr[i]], 0);
             if(ret)
                 {
-                    ALOGD("sc_gpio_value_set gpio%d fail\n",lynq_gpio_arr[i]);
+                    ALOGE("sc_gpio_value_set gpio%d fail\n",lynq_gpio_arr[i]);
                 }
+                usleep(10000);
             ret = sc_gpio_value_get(test_gpio_handle[50], &value);
             if(ret)
                 {
@@ -418,22 +418,22 @@
                 }
             if(value == 0)
             {
-                ALOGD("*low function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
+                ALOGE("low function is OK,input %d\n",lynq_gpio_arr[i]);
                 lynq_gpio_low = 1;
             }
             else
             {
-                ALOGE("low function fail %s line %d input %s num %d\n", __FUNCTION__, __LINE__, input,lynq_gpio_arr[i]);
+                ALOGE("low function is fail,input %d\n",lynq_gpio_arr[i]);
             }
             bzero(lynq_show_gpio_state, 64);
             if((lynq_gpio_low != 1) || (lynq_gpio_high != 1))
             {
-                ALOGE("fail function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
+                ALOGE("total fail function,input %d\n",lynq_gpio_arr[i]);
             }
             else
             {
-                ALOGD("success function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
-                sprintf(lynq_show_gpio_state,"gpio%d\n",lynq_gpio_arr[i]);
+                ALOGE("success function,input:%d\n",lynq_gpio_arr[i]);
+                sprintf(lynq_show_gpio_state,"+GPIO:%d\r\n",lynq_gpio_arr[i]);
                 handle_output(lynq_show_gpio_state, strlen(lynq_show_gpio_state), Response);
                 break; // do not retry when pass
             }
@@ -446,7 +446,7 @@
         if (j >= 3 )
         {
             lynq_gpio_beta_state = 0;
-            sprintf(lynq_show_gpio_state,"[gpio%d][result]:FAIL \n",lynq_gpio_arr[i]);
+            sprintf(lynq_show_gpio_state,"+GPIO:%d FAIL\r\n",lynq_gpio_arr[i]);
             handle_output(lynq_show_gpio_state, strlen(lynq_show_gpio_state), Response);
         }
     } // for(i=0; i < sizeof(lynq_gpio_arr)/sizeof(lynq_gpio_arr[0]); i++)
@@ -454,17 +454,17 @@
     if(lynq_gpio_test_env_error == 1)
     {
         ALOGE("tool error\n");
-        handle_output("tool error\n", strlen("tool error\n"), Response);
+        handle_output("+GPIO:tool error\r\n", strlen("+GPIO:tool error\r\n"), Response);
     }
 
     if(lynq_gpio_beta_state == 1)
     {
-        ALOGD("total success function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
+        ALOGD("total success function\n");
         lynq_response_ok();
     }
     else
     {
-        ALOGE("total fail function %s line %d input %s\n", __FUNCTION__, __LINE__, input);
+        ALOGE("total fail function\n");
         lynq_response_error(100);
     }
     ret = all_gpio_uninit(total_length, lynq_gpio_total_arr);
@@ -546,7 +546,7 @@
         }
         
     }
-    handle_output("can't receive correct data", strlen("can't receive correct data"), Response);
+    handle_output("+RMII:can't receive correct data\r\n", strlen("+RMII:can't receive correct data\r\n"), Response);
     return -1;
 }
 
@@ -558,14 +558,14 @@
     sprintf(lynq_set_rgmii_arr,"echo 1,0x03,0x8800,0xc834 > /sys/devices/platform/soc/1307000.gmac/mdio_test");
     if(system(lynq_set_rgmii_arr))
     {
-        handle_output("Please checkout network_line", strlen("Please checkout network_line"), Response);
+        handle_output("+RMII:Please checkout network_line\r\n", strlen("+RMII:Please checkout network_line\r\n"), Response);
         return -1;
     }
     bzero(lynq_set_rgmii_arr, 128);
     sprintf(lynq_set_rgmii_arr,"echo 1,0x01,0x0,0xa000 > /sys/devices/platform/soc/1307000.gmac/mdio_test");
     if(system(lynq_set_rgmii_arr))
     {
-        handle_output("Please checkout network_line", strlen("Please checkout network_line"), Response);
+        handle_output("+RMII:Please checkout network_line\r\n", strlen("+RMII:Please checkout network_line\r\n"), Response);
         return -1;
     }
 
@@ -627,7 +627,6 @@
     int raw_socket = -1;
     char buf_init[1024];
     char buf_recv[1472];
-    char flag[256]={0};
     struct sockaddr_in ser_addr;
     struct sockaddr_in cli_addr;
     struct sockaddr_ll raw_addr;
@@ -653,7 +652,7 @@
     socketfd = rgmii_socket_init(&ser_addr,ser_ip);
     if(socketfd < 0)
     {
-        handle_output("init_failed", strlen("init_failed"), Response);
+        ALOGE("init_failed\n");
         lynq_response_error(2);
         return;
     }
@@ -661,7 +660,7 @@
     raw_socket = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
     if(raw_socket < 0)
     {
-        handle_output("raw_socket init_failed", strlen("raw_socket init_failed"), Response);
+        ALOGE("raw_socket init_failed\n");
         lynq_response_error(2);
         return;
     }
@@ -673,7 +672,7 @@
     ret = bind(raw_socket, (struct sockaddr*)&raw_addr, sizeof(raw_addr));//bind network interface card
     if(ret < 0)
     {
-        handle_output("bind raw_socket init_failed", strlen("bind raw_socket init_failed"), Response);
+        ALOGE("bind raw_socket init_failed\n");
         lynq_response_error(3);
         return;
     }
@@ -726,8 +725,7 @@
     }
     else
     {
-        sprintf(flag,"sent %d, success %d\n", check_count, check_ok_count);
-        handle_output(flag, strlen(flag), Response);
+        ALOGE("sent %d, success %d\r\n", check_count, check_ok_count);
         lynq_response_error(100);
     }
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-led/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-led/LICENSE
new file mode 100755
index 0000000..605b7ea
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-led/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MobileTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MobileTek Inc. and/or its licensors. Without
+the prior written permission of MobileTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MobileTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MobileTek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MobileTek SOFTWARE")
+RECEIVED FROM MobileTek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MobileTek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MobileTek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MobileTek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MobileTek
+SOFTWARE. MobileTek SHALL ALSO NOT BE RESPONSIBLE FOR ANY MobileTek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MobileTek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MobileTek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MobileTek'S OPTION, TO REVISE OR REPLACE THE
+MobileTek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MobileTek FOR SUCH MobileTek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-led/include/libled/lynq_led.h b/cap/zx297520v3/src/lynq/lib/liblynq-led/include/libled/lynq_led.h
new file mode 100755
index 0000000..c95282b
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-led/include/libled/lynq_led.h
@@ -0,0 +1,12 @@
+#ifndef LYNQ_LED_H
+#define LYNQ_LED_H 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int lynq_set_netled_on(const int test_mode);
+int lynq_set_statusled_on(const int test_mode);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-led/lynq_led.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-led/lynq_led.cpp
new file mode 100755
index 0000000..66ff18d
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-led/lynq_led.cpp
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <log/log.h>
+#include "liblog/lynq_deflog.h"
+#include <include/lynq_uci.h>
+#include "lynq_led.h"
+
+#define BUF_LEN 258
+#define LYNQ_UCI_SECTION "lynq_led"
+#define LYNQ_UCI_KEY "lynq_statusled_on"
+#define LYNQ_UCI_STATUSLED_KEY "lynq_netled_on"
+
+int lynq_set_netled_on(int led_mode)
+{
+    char buf_netled[BUF_LEN] = "";
+
+    sprintf(buf_netled,"%s.%s.%s=%d", LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_STATUSLED_KEY, led_mode);
+    lynq_uci_set(buf_netled);
+
+    return 0;
+}
+
+int lynq_set_statusled_on(int led_mode)
+{
+    char buf_statusled[BUF_LEN] = "";
+
+    sprintf(buf_statusled,"%s.%s.%s=%d", LYNQ_UCI_FILE, LYNQ_UCI_SECTION, LYNQ_UCI_KEY, led_mode);
+    lynq_uci_set(buf_statusled);
+
+    return 0;
+}
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-led/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-led/makefile
new file mode 100755
index 0000000..d670bd5
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-led/makefile
@@ -0,0 +1,76 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -std=c++11 \
+                -g -Os \
+                -flto \
+                -DRIL_SHLIB \
+                -DATCI_PARSE \
+                -fPIC \
+                -DKEEP_ALIVE \
+                -DECALL_SUPPORT \
+                -fpermissive \
+
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+$(warning ################# lynq data demo ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include/libled \
+  -I$(ROOT)$(includedir)/logger \
+  -I$(ROOT)$(includedir)/liblog \
+  -I$(ROOT)$(includedir)/vendor-ril \
+  -I$(ROOT)$(includedir)/lynq_shm \
+
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lstdc++ \
+    -llog \
+    -lcutils \
+    -lutils \
+    -lbinder \
+    -lpthread \
+    -llynq-log \
+    -llynq-shm \
+	-llynq-uci \
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-led.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+
+.PHONY: build clean install pack_rootfs 
+all: build
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+build:  $(EXECUTABLE)
+	$(warning ########## build $(EXECUTABLE)  ##########)
+install:
+	mkdir -p $(ROOT)$(base_libdir)/
+	install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+	mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+pack_rootfs:
+	mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+	mkdir -p $(PACK_TO)$(base_libdir)/
+	cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+	$(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
+	-find . -name "*.o" -delete
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h b/cap/zx297520v3/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
index 462df68..e878e6b 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/include/lynq_network/lynq_network.h
@@ -7,6 +7,7 @@
 #define CELLINFO_MAX_NUM  10
 #define LY_RECOVER_TIMER_INTERVAL 128
 #define MAX_CELLINFO_ITEM_NUMBER 32
+#define MAX_OOS_CFG_ITEM_NUMBER 32
 /*T800 platform support gsm,wcdma lte,nr */
 typedef struct{
     int gw_sig_valid; /*1 valid,1 invalid*/
@@ -134,6 +135,10 @@
 */
 int lynq_oos_deep_sleep_recover_timer_interval(int recovery_threshold,int fullband_timer,int sniffer_timer,int inactive_mode);
 #endif
+#if (defined MOBILETEK_TARGET_PLATFORM_T106) || (defined MODEM_GEN97)
+int lynq_set_oos_net_scan_cfg(int config_list[MAX_OOS_CFG_ITEM_NUMBER], int valid_num);
+int lynq_get_oos_net_scan_cfg(int config_list[MAX_OOS_CFG_ITEM_NUMBER], int* valid_num);
+#endif
 void lynq_set_test_mode(const int test_mode);
 #ifdef __cplusplus
 }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
index dc16ae4..6a1b35b 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
@@ -25,6 +25,8 @@
 /*in CR AUTO00207414, in modem, 23G detach need 10s, 5g ims detach need 5s, so set length to 12s */
 #define WAIT_TIME_LENGTH_FOR_SET_PREFFERRED_NETWORK_TYPE (12) 
 
+#define MAX_AT_INT_RSP_NUM  32
+
 
 using ::android::Parcel;
 
@@ -1240,42 +1242,6 @@
     return RESULT_OK;                
 }
 
-int lynq_radio_on(const lynq_network_radio_on_type type)
-{     
-    if(g_module_init_flag != MODULE_RUNNING)
-    {
-        LYERRLOG("%s module state %d error",__func__,g_module_init_flag);
-        return LYNQ_E_CONFLICT;
-    }
-    if (type != NETWORK_RADIO_ON_TYPE_CFUN_0  && type != NETWORK_RADIO_ON_TYPE_NORMAL_MODE && type!=NETWORK_RADIO_ON_TYPE_FLIGHT_MODE)
-    {
-        LYERRLOG("%s parameter %d error",__func__,type);  
-        return LYNQ_E_PARAMETER_ANONALY;
-    }     
-    
-    Parcel* p=NULL;      
-    int ret;
-
-    if(type==NETWORK_RADIO_ON_TYPE_CFUN_0)
-    {
-        ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s","AT+CFUN=0");
-    }
-    else 
-    {
-        ret=lynq_send_common_request(p,65,RIL_REQUEST_RADIO_POWER,1,"%d",(type==NETWORK_RADIO_ON_TYPE_NORMAL_MODE));
-    }
-
-    if(ret!=RESULT_OK)
-    {
-        LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
-        return ret;  
-    }       
-
-    LYINFLOG("%s set %d suc",__func__,type);  
-    delete p;
-    return RESULT_OK;  
-}
-
 const char * lynq_get_raw_data(Parcel* &p, int* data_len) 
 {
     int32_t len;
@@ -1305,6 +1271,136 @@
     return data;
 }
 
+int GetIntArrayInRespString(Parcel* &p, const char* tagString, int int_array_in_resp[MAX_AT_INT_RSP_NUM], int* valid_num)
+{
+    int bfind=false;
+    const char* data;
+    int data_len;
+    char* data_str;
+    char* start;
+    int length;
+    int i;
+    int num_start;
+    int ret=RESULT_OK;
+    int pos = p->dataPosition();
+    data = lynq_get_raw_data(p,&data_len);
+    p->setDataPosition(pos);
+    if(data==NULL || data_len == 0)
+    {
+        LYERRLOG("%s lynq_get_raw_data NULL or data_len is 0",__func__);          
+        return LYNQ_E_INNER_ERROR; 
+    }
+    data_str = (char*) calloc(1,data_len+1);
+    if (NULL == data_str) 
+    {
+        LYERRLOG("%s alloc mem error, data_len is %d",__func__,data_len+1);              
+        return LYNQ_E_MALLOC_ERROR;
+    }
+    memmove(data_str, data, data_len);     
+    data_str[data_len]='\0';           
+    LYINFLOG("%s return string is %s",__func__,data_str);  
+    start = strstr(data_str,tagString);
+    int local_valid_num=0;
+    if(start!=NULL)
+    {
+         start=start+strlen(tagString);
+         length=strlen(start);
+         for(i=0; i<length;i++)
+         {
+             if((!bfind) && (start[i] >= '0') && (start[i] <= '9'))
+             {
+                 bfind=true;  
+                 num_start=i;
+             }
+             else if(bfind && ((start[i] < '0') || (start[i] > '9')))
+             {
+                start[i]='\0';
+                int_array_in_resp[local_valid_num]=atoi(start+num_start);
+                local_valid_num++;
+                bfind=false;                
+             }             
+         }                
+    }           
+    else
+    {
+         LYERRLOG("%s  can't find tag string",__func__,tagString);         
+         ret=LYNQ_E_INNER_ERROR; 
+    }
+
+    if(local_valid_num ==0)
+    {
+         LYERRLOG("%s  can't find integer",__func__);                 
+    }
+    *valid_num = local_valid_num; 
+    LYINFLOG("%s ret is %d valid num is %d ",__func__,ret,*valid_num);  
+    free(data_str);
+    return ret;
+}
+
+int get_ret_code_for_hook(Parcel* &p)
+{
+    int ret;
+    int int_array_in_resp[MAX_AT_INT_RSP_NUM];
+    int valid_num;
+    
+    ret=GetIntArrayInRespString(p,"OK",int_array_in_resp,&valid_num);
+    
+    if(ret!=RESULT_OK)    
+    {
+        ret=GetIntArrayInRespString(p,"ERROR",int_array_in_resp,&valid_num);
+        if(ret==RESULT_OK && valid_num > 0)
+        {
+            ret=int_array_in_resp[0];
+        }
+        else
+        {
+            ret=LYNQ_E_INNER_ERROR;
+        }
+    }
+    return ret;
+}
+
+int lynq_radio_on(const lynq_network_radio_on_type type)
+{     
+    if(g_module_init_flag != MODULE_RUNNING)
+    {
+        LYERRLOG("%s module state %d error",__func__,g_module_init_flag);
+        return LYNQ_E_CONFLICT;
+    }
+    if (type != NETWORK_RADIO_ON_TYPE_CFUN_0  && type != NETWORK_RADIO_ON_TYPE_NORMAL_MODE && type!=NETWORK_RADIO_ON_TYPE_FLIGHT_MODE)
+    {
+        LYERRLOG("%s parameter %d error",__func__,type);  
+        return LYNQ_E_PARAMETER_ANONALY;
+    }     
+    
+    Parcel* p=NULL;      
+    int ret;
+
+    if(type==NETWORK_RADIO_ON_TYPE_CFUN_0)
+    {
+        ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s","AT+CFUN=0");
+    }
+    else 
+    {
+        ret=lynq_send_common_request(p,65,RIL_REQUEST_RADIO_POWER,1,"%d",(type==NETWORK_RADIO_ON_TYPE_NORMAL_MODE));
+    }
+
+    if(ret!=RESULT_OK)
+    {
+        LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
+        return ret;  
+    }   
+
+    if(type==NETWORK_RADIO_ON_TYPE_CFUN_0)
+    {
+        ret=get_ret_code_for_hook(p);    
+    }    
+
+    LYINFLOG("%s set %d ret is %d",__func__,type,ret);  
+    delete p;
+    return RESULT_OK;  
+}
+
 int lynq_query_radio_state(int *radio_state)
 {
     if(g_module_init_flag != MODULE_RUNNING)
@@ -1324,66 +1420,33 @@
     {
         LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
         return ret;  
-    }           
+    }         
 
-    int bfind=false;
-    const char* data;
-    int data_len;
-    char* data_str;
-    char* start;
-    int length;
-    int i;
-    int num_start;
-    data = lynq_get_raw_data(p,&data_len);
-    if(data==NULL || data_len == 0)
+    int int_array_in_resp[MAX_AT_INT_RSP_NUM];
+    int valid_num;
+
+    ret=GetIntArrayInRespString(p,"CFUN",int_array_in_resp,&valid_num);
+
+    if(ret==RESULT_OK && valid_num > 0)
     {
-        LYERRLOG("%s lynq_get_raw_data NULL or data_len is 0",__func__);    
-        delete p;
-        return LYNQ_E_INNER_ERROR; 
+        *radio_state=int_array_in_resp[0];
     }
-    data_str = (char*) calloc(1,data_len+1);
-    if (NULL == data_str) 
+    else 
     {
-         LYERRLOG("%s alloc mem error, data_len is %d",__func__,data_len+1);         
-         delete p;
-         return LYNQ_E_MALLOC_ERROR;
+        ret=GetIntArrayInRespString(p,"ERROR",int_array_in_resp,&valid_num);
+        if(ret==RESULT_OK && valid_num > 0)
+        {
+            ret=int_array_in_resp[0];
+        }
+        else
+        {
+            ret=LYNQ_E_INNER_ERROR;
+        }
     }
-    memmove(data_str, data, data_len);     
-    data_str[data_len]='\0';           
-    LYINFLOG("%s return string is %s",__func__,data_str);  
-    start = strstr(data_str,"CFUN");
-    if(start!=NULL)
-    {
-         start=start+4;
-         length=strlen(start);
-         for(i=0; i<length;i++)
-         {
-             if((!bfind) && (start[i] >= '0') && (start[i] <= '9'))
-             {
-                 bfind=true;  
-                 num_start=i;
-             }
-             else if(bfind && ((start[i] < '0') || (start[i] > '9')))
-             {
-                start[i]='\0';
-                break;
-             }
-         }
-         if(bfind)
-         {                    
-             (*radio_state) = atoi(start+num_start);
-             LYINFLOG("%s, radio state is %s %d",__func__,start+num_start,*radio_state);  
-             free(data_str);
-             delete p;
-             return RESULT_OK;                         
-         }
-    }             
-    LYERRLOG("%s return string %s no cfun or no digit",__func__,data_str);  
-    free(data_str);
+    
     delete p;
-    return LYNQ_E_INNER_ERROR;              
-}
-
+    return ret;                
+} 
 int lynq_query_radio_tech(int* radioTech)
 {
     if(g_module_init_flag != MODULE_RUNNING)
@@ -1734,7 +1797,151 @@
     return RESULT_OK;   
 }
 
-#ifdef MODEM_GEN97
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+
+int lynq_set_oos_net_scan_cfg_fast(int t_fast_scan_enable,  int t_fast_scan_interval)
+{
+    if(! (
+               (t_fast_scan_enable==0) ||
+               (t_fast_scan_enable == 1 &&  
+                t_fast_scan_interval > 0 && t_fast_scan_interval <= 65535 )
+             )    )    
+        {
+            LYERRLOG("%s paramter %d %d error!",__func__, t_fast_scan_enable, t_fast_scan_interval);
+            return LYNQ_E_PARAMETER_ANONALY;
+        }
+    
+    Parcel* p=NULL;
+    int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s,%d,%d","AT+ZSET=\"FAST_FREQ_SCAN\"",t_fast_scan_enable,t_fast_scan_interval);
+
+    if(ret!=RESULT_OK)
+    {
+        LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
+        return ret;  
+    }  
+
+    ret=get_ret_code_for_hook(p);    
+
+    LYINFLOG("%s %d %d ret is %d",__func__,t_fast_scan_enable,t_fast_scan_interval,ret);     
+    delete p;
+    return ret;  
+}
+
+int lynq_get_oos_net_scan_cfg_fast(int* t_fast_scan_enable,  int* t_fast_scan_interval)
+{    
+    Parcel* p=NULL;
+    int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s","AT+ZSET=\"FAST_FREQ_SCAN\"");
+
+    if(ret!=RESULT_OK)
+    {
+        LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
+        return ret;  
+    }       
+    
+    int int_array_in_resp[MAX_AT_INT_RSP_NUM];
+    int valid_num;
+
+    ret=GetIntArrayInRespString(p,"FAST_FREQ_SCAN",int_array_in_resp,&valid_num);
+
+    if(ret==RESULT_OK && valid_num > 1)
+    {
+        *t_fast_scan_enable = int_array_in_resp[0];
+        *t_fast_scan_interval = int_array_in_resp[1];        
+    }
+    else 
+    {
+        ret=GetIntArrayInRespString(p,"ERROR",int_array_in_resp,&valid_num);
+        if(ret==RESULT_OK && valid_num > 0)
+        {
+            ret=int_array_in_resp[0];
+        }
+        else
+        {
+            ret=LYNQ_E_INNER_ERROR;
+        }
+    }
+    
+    delete p;
+    return ret;                
+}
+
+
+int lynq_set_oos_net_scan_cfg_full_band(int t_full_band_min, int t_full_band_step, int t_full_band_num, int t_full_band_max)
+{      
+    if(! (
+           (t_full_band_min==0 && t_full_band_step ==0  && t_full_band_num ==0 && t_full_band_max ==0) ||
+           (t_full_band_min > 0 && t_full_band_min <= 65535 && 
+            t_full_band_step > 0 && t_full_band_step <= 65535 && 
+            t_full_band_num > 0 && t_full_band_num <= 65535 && 
+            t_full_band_max > 0 && t_full_band_max <= 65535 )
+         )    )  
+    {
+        LYERRLOG("%s paramter  %d %d %d %d error!",__func__, t_full_band_min, t_full_band_step, t_full_band_num, t_full_band_max);
+        return LYNQ_E_PARAMETER_ANONALY;
+    }
+
+    Parcel* p=NULL;
+    int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s,%d,%d,%d,%d","AT+ZSET=\"FREQ_SCAN\"",t_full_band_min,t_full_band_step,t_full_band_num,t_full_band_max);
+
+    if(ret!=RESULT_OK)
+    {
+        LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
+        return ret;  
+    }     
+
+    ret=get_ret_code_for_hook(p);    
+
+    LYINFLOG("%s %d %d %d %d ret is %d",__func__,t_full_band_min,t_full_band_step,t_full_band_num,t_full_band_max,ret);     
+    delete p;
+    return ret;      
+}
+
+int lynq_get_oos_net_scan_cfg_full_band(int* t_full_band_min, int* t_full_band_step, int* t_full_band_num, int* t_full_band_max)
+{    
+    Parcel* p=NULL;
+    int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_OEM_HOOK_RAW,1,"%s","AT+ZSET=\"FREQ_SCAN\"");
+
+    if(ret!=RESULT_OK)
+    {
+        LYERRLOG("%s call lynq_send_common_request failure, ret is %d",__func__,ret);
+        return ret;  
+    }       
+    
+    int int_array_in_resp[MAX_AT_INT_RSP_NUM];
+    int valid_num;
+
+    ret=GetIntArrayInRespString(p,"FREQ_SCAN",int_array_in_resp,&valid_num);
+
+    if(ret==RESULT_OK && valid_num > 1)
+    {
+        *t_full_band_min = int_array_in_resp[0];
+        *t_full_band_step = int_array_in_resp[1];
+        *t_full_band_num = int_array_in_resp[2];
+        *t_full_band_max = int_array_in_resp[3];        
+    }
+    else 
+    {
+        ret=GetIntArrayInRespString(p,"ERROR",int_array_in_resp,&valid_num);
+        if(ret==RESULT_OK && valid_num > 0)
+        {
+            ret=int_array_in_resp[0];
+        }
+        else
+        {
+            ret=LYNQ_E_INNER_ERROR;
+        }
+    }
+
+    LYINFLOG("%s ret is %d",__func__,ret);  
+    delete p;
+    return ret;                
+}
+
+
+#define OOS_NET_SCAN_CFG_TYPE_FAST 0
+#define OOS_NET_SCAN_CFG_TYPE_FULL_BAND 1
+
+#elif defined(MODEM_GEN97) 
 /**@brief parse at response,return error code,and the response
 * @param response [IN] <response>:original at response,This parameter must be a character array.
 
@@ -1959,7 +2166,98 @@
  
 }
 
-DEFINE_LYNQ_LIB_LOG(LYNQ_NETWORK)
+#endif
+
+#if (defined MOBILETEK_TARGET_PLATFORM_T106) || (defined MODEM_GEN97)
+
+int lynq_set_oos_net_scan_cfg(int config_list[MAX_OOS_CFG_ITEM_NUMBER], int valid_num)
+{
+    if(g_module_init_flag != MODULE_RUNNING)
+    {
+        LYERRLOG("%s module state %d error",__func__,g_module_init_flag);
+        return LYNQ_E_CONFLICT;
+    }
+
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+    if(valid_num < 1)
+    {
+        LYERRLOG("%s paramter valid_num  %d error!",__func__,valid_num);
+        return LYNQ_E_PARAMETER_ANONALY;
+    }
+
+    if(config_list[0] == OOS_NET_SCAN_CFG_TYPE_FAST)  
+    {
+        if(valid_num <3 )
+        {            
+            LYERRLOG("%s paramter valid_num %d error!",__func__, valid_num);
+            return LYNQ_E_PARAMETER_ANONALY;
+        }        
+        return lynq_set_oos_net_scan_cfg_fast(config_list[1],config_list[2]);
+    }        
+    else if (config_list[0] == OOS_NET_SCAN_CFG_TYPE_FULL_BAND)
+    {
+        if(valid_num <5 )
+        {
+            
+            LYERRLOG("%s paramter valid_num %d error!",__func__, valid_num);
+            return LYNQ_E_PARAMETER_ANONALY;
+        }        
+        return lynq_set_oos_net_scan_cfg_full_band(config_list[1],config_list[2],config_list[3],config_list[4]);
+    }
+    else 
+    {
+        LYERRLOG("%s paramter type %d error!",__func__, config_list[0]);
+        return LYNQ_E_PARAMETER_ANONALY;
+    }     
+
+#else
+    if(valid_num < 4)
+    {
+        LYERRLOG("%s paramter valid_num  %d error!",__func__,valid_num);
+        return LYNQ_E_PARAMETER_ANONALY;
+    }
+    return lynq_oos_deep_sleep_recover_timer_interval(config_list[0],config_list[1],config_list[2],config_list[3]);   
+#endif    
+}
+
+
+int lynq_get_oos_net_scan_cfg(int config_list[MAX_OOS_CFG_ITEM_NUMBER], int* valid_num)
+{
+    if(g_module_init_flag != MODULE_RUNNING)
+    {
+        LYERRLOG("%s module state %d error",__func__,g_module_init_flag);
+        return LYNQ_E_CONFLICT;
+    }
+
+#ifdef MOBILETEK_TARGET_PLATFORM_T106   
+
+    if(NULL == valid_num || NULL == config_list)
+    {
+          LYERRLOG("%s there is parameter is NULL",__func__);  
+          return LYNQ_E_PARAMETER_ANONALY;
+    }      
+      
+
+    if(config_list[0] == OOS_NET_SCAN_CFG_TYPE_FAST)  
+    {
+        *valid_num=2;
+        return lynq_get_oos_net_scan_cfg_fast(&(config_list[0]),&(config_list[1]));
+    }        
+    else if (config_list[0] == OOS_NET_SCAN_CFG_TYPE_FULL_BAND)
+    {
+         *valid_num=4;
+         return lynq_get_oos_net_scan_cfg_full_band(&(config_list[0]),&(config_list[1]),&(config_list[2]),&(config_list[3]));
+    }
+    else 
+    {
+        LYERRLOG("%s paramter type %d error!",__func__, config_list[0]);
+        return LYNQ_E_PARAMETER_ANONALY;
+    }           
+#else    
+    return LYNQ_E_PARAMETER_ANONALY;
+#endif    
+}
 
 #endif
 
+DEFINE_LYNQ_LIB_LOG(LYNQ_NETWORK)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-network/makefile
index cf6f538..5505037 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/makefile
@@ -15,6 +15,9 @@
 LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
 endif
 
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+    LOCAL_CFLAGS += -DMOBILETEK_TARGET_PLATFORM_T106
+endif
 $(warning ################# lynq network demo ROOT: $(ROOT),includedir:$(includedir))
 LOCAL_PATH   = .
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/LICENSE
new file mode 100644
index 0000000..605b7ea
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MobileTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MobileTek Inc. and/or its licensors. Without
+the prior written permission of MobileTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MobileTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MobileTek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MobileTek SOFTWARE")
+RECEIVED FROM MobileTek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MobileTek EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MobileTek PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MobileTek SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MobileTek
+SOFTWARE. MobileTek SHALL ALSO NOT BE RESPONSIBLE FOR ANY MobileTek SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MobileTek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MobileTek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MobileTek'S OPTION, TO REVISE OR REPLACE THE
+MobileTek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MobileTek FOR SUCH MobileTek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/include/lynq-qser-audio.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/include/lynq-qser-audio.h
new file mode 100644
index 0000000..cc37b2e
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/include/lynq-qser-audio.h
@@ -0,0 +1,45 @@
+/*******************************************************
+* 
+* @brief: Add audio api
+* @details:  add liblynq-qser-audio api
+* @author:   yu.dong
+* @date:     2023.9.28
+* @version:  V1.0
+* @copyright：Copyright (c) MobileTek
+*
+*********************************************/
+#ifndef LYNQ_QSER_AUDIO
+#define LYNQ_QSER_AUDIO
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "sc_audio.h"
+
+sc_audio_handle_t playback_handle = SC_AUDIO_INVALID_HANDLE;
+sc_audio_handle_t capture_handle = SC_AUDIO_INVALID_HANDLE;
+
+typedef void (*_cb_onPlayer)(int);
+
+int qser_AudPlayer_Open(char* device, _cb_onPlayer cb_fun);
+int qser_AudPlayer_PlayFrmFile(int hdl, const char *fd, int offset);
+int qser_AudPlayer_Pause(int hdl);
+int qser_AudPlayer_Resume(int hdl);
+void qser_AudPlayer_Stop(int hdl);
+void qser_AudPlayer_Close(int hdl);
+
+int qser_AudRecorder_Open(char* device, _cb_onPlayer cb_fun);
+int qser_AudRecorder_StartRecord(int hdl, const char *fd, int offset);
+int qser_AudRecorder_Pause(void);
+int qser_AudRecorder_Resume(void);
+void qser_AudRecorder_Stop(void);
+void qser_AudRecorder_Close(void);
+
+void qser_Audio_Deinit(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/lynq-qser-audio.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/lynq-qser-audio.cpp
new file mode 100644
index 0000000..70b4e43
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/lynq-qser-audio.cpp
@@ -0,0 +1,546 @@
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "liblog/lynq_deflog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "sc_audio.h"
+#include "lynq-qser-audio.h"
+
+#define AUDIO_INIT_MAX_TRY_CNT 100
+
+#define SC_AUDIO_BE_DAI_MIN -1
+#define SC_AUDIO_STREAM_FORMAT_INVALID 0
+
+/********************************************************************
+* @brief: _cb_onPlayer, typedef for a callback function that is called
+          when an audio operation is performed
+* @param int [IN]: The result of the audio operation, 0 if successful, non-zero if failed
+* @return : void
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+typedef void (*_cb_onPlayer)(int);
+
+/********************************************************************
+* @brief: playback_state_cb, callback function that is called when the audio playback state changes
+* @param handle [IN]: sc_audio_handle_t, the handle of the audio device
+* @param params [IN]: void*, parameters for the callback function
+* @param state [IN]: sc_audio_playback_state_e, the current state of audio playback
+* @return : int, 0 if successful, non-zero if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int playback_state_cb (sc_audio_handle_t handle, void *params, sc_audio_playback_state_e state)
+{
+    LYINFLOG("playback_state_cb handle:0x%lx state:%d\n", handle, state);
+    return 0;
+}
+
+/********************************************************************
+* @brief: capture_state_cb, callback function that is called when the audio capture state changes
+* @param handle [IN]: sc_audio_handle_t, the handle of the audio device
+* @param params [IN]: void*, parameters for the callback function
+* @param state [IN]: sc_audio_capture_state_e, the current state of audio capture
+* @return : int, 0 if successful, non-zero if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int capture_state_cb (sc_audio_handle_t handle, void *params, sc_audio_capture_state_e state)
+{
+    LYINFLOG("capture_state_cb handle:0x%lx state:%d\n", handle, state);
+
+    return 0;
+}
+
+/********************************************************************
+* @brief: get_device_enum, function to convert a device string to its corresponding enum
+* @param device [IN]: const char*, the name of the device
+* @return : sc_audio_fe_pcm_dev_e, the enum corresponding to the device name
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+sc_audio_fe_pcm_dev_e get_device_enum(const char* device)
+{
+    if (strcmp(device, "device1") == 0)
+    {
+        return SC_AUDIO_FE_PCM_DEV_MULTIMEDIA1;
+    }
+    else if (strcmp(device, "device2") == 0)
+    {
+        return SC_AUDIO_FE_PCM_DEV_MULTIMEDIA2;
+    }
+    else
+    {
+        return SC_AUDIO_INVALID_HANDLE;
+    }
+}
+
+/********************************************************************
+* @brief: qser_AudPlayer_Open, open the audio device for playback
+* @param device [IN]: char* device, the audio device to be opened for playback
+* @param cb_fun [IN]: _cb_onPlayer, callback function to be called when the audio device is opened
+* @return : int, 0 if successful, non-zero if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudPlayer_Open(char* device, _cb_onPlayer cb_fun)
+{
+    int ret = SC_ERR_SUCCESS;
+    int retry_cnt = 0;
+    int audio_is_init = 0;
+
+    sc_audio_fe_pcm_dev_e device_enum = get_device_enum(device); // Convert device string to enum
+
+    while (AUDIO_INIT_MAX_TRY_CNT > retry_cnt)
+    {
+        ret = sc_audio_init();
+        if (SC_ERR_NOT_READY == ret)
+        {
+            LYINFLOG("audio service is not ready, try again, try count = %d\n", (retry_cnt + 1));
+            usleep(200 * 1000);
+            retry_cnt++;
+        }
+        else if (SC_ERR_SUCCESS == ret)
+        {
+            LYINFLOG("Success to initialize audio service\n");
+            audio_is_init = 1;
+            break;
+        }
+        else
+        {
+            LYINFLOG("Failed to initialize audio service, ret = %d\n", ret);
+            break;
+        }
+    }
+    if (1 != audio_is_init)
+    {
+        LYINFLOG("Failed to initialize audio service\n");
+        if (cb_fun != NULL)
+        {
+            cb_fun(-1);
+        }
+        return -1;
+    }
+
+    sc_audio_handle_t device_handle = sc_audio_playback_open(device_enum, SC_AUDIO_FE_PCM_DEV_MIN, SC_AUDIO_OWNER_ID_PLAYER);
+    if (SC_AUDIO_INVALID_HANDLE == device_handle)
+    {
+        LYINFLOG("Failed to open device: %s\n", device);
+        if (cb_fun != NULL)
+        {
+            cb_fun(-1);
+        }
+        return -1;
+    }
+
+    if (cb_fun != NULL)
+    {
+        cb_fun(0);
+    }
+    return 0;
+}
+
+/********************************************************************
+* @brief: qser_AudPlayer_PlayFrmFile, play audio from file
+* @param hdl [IN]: int, handle for the audio device or stream
+* @param fd [IN]: const char*, file descriptor of the audio file
+* @param offset [IN]: int, offset in the audio file
+* @return : success 0, failed -1
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudPlayer_PlayFrmFile(int hdl, const char *fd, int offset)
+{
+    int error_line;
+    sc_audio_pcm_config_t pcm_config;
+    int ret = 0;
+    sc_audio_owner_id owner_id = hdl;
+
+    if(NULL== fd || 0 == strlen(fd))
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    playback_handle = sc_audio_playback_open(SC_AUDIO_FE_PCM_DEV_MULTIMEDIA2,SC_AUDIO_FE_PCM_DEV_MIN,owner_id);
+    if (SC_AUDIO_INVALID_HANDLE == playback_handle)
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    if(strlen(fd))
+    {
+        ret = sc_audio_playback_file_prepare(playback_handle, fd, NULL, playback_state_cb, NULL);
+        if (SC_ERR_SUCCESS != ret)
+        {
+            error_line = __LINE__;
+            goto exit;
+        }
+    }
+
+    ret = sc_audio_playback_play(playback_handle);
+    if (SC_ERR_SUCCESS != ret)
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    return 0;
+exit:
+    LYINFLOG("qser_AudPlayer_PlayFrmFile error_line=%d\n",error_line);
+    return -1;
+}
+
+/********************************************************************
+* @brief: qser_AudPlayer_Pause, pause the audio playback
+* @param hdl [IN]: int, handle for the audio device or stream
+* @return : success 0, failed -1
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudPlayer_Pause(int hdl)
+{
+    if (SC_AUDIO_INVALID_HANDLE == playback_handle)
+    {
+        LYINFLOG("qser_AudPlayer_Pause handle is invalid.\n");
+        return -1;
+    }
+    if( sc_audio_playback_pause(playback_handle))
+    {
+	LYINFLOG("qser_AudPlayer_Pause sc_audio_playback_pause fail.\n");
+        return -1;
+    }
+    return 0;
+}
+
+/********************************************************************
+* @brief: qser_AudPlayer_Resume, resume the audio playback
+* @param hdl [IN]: int, handle for the audio device or stream
+* @return : success 0, failed -1
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudPlayer_Resume(int hdl)
+{
+    if (SC_AUDIO_INVALID_HANDLE == playback_handle)
+    {
+        LYINFLOG("qser_AudPlayer_Resume handle is invalid.\n");
+        return -1;
+    }
+    if( sc_audio_playback_resume(playback_handle))
+    {
+        LYINFLOG("qser_AudPlayer_Resume sc_audio_playback_resume fail.\n");
+        return -1;
+   }
+    return 0;
+}
+
+/********************************************************************
+* @brief: qser_AudPlayer_Stop, stop the audio playback
+* @param hdl [IN]: int, handle for the audio device or stream
+* @return : void
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+void qser_AudPlayer_Stop(int hdl)
+{
+    if (SC_AUDIO_INVALID_HANDLE == playback_handle)
+    {
+	LYINFLOG("qser_AudPlayer_Stop handle is invalid.\n");
+	return;
+    }
+
+    if( sc_audio_playback_stop(playback_handle))
+    {
+        LYINFLOG("qser_AudPlayer_Stop sc_audio_playback_stop fail.\n");
+        return;
+    }
+}
+
+/********************************************************************
+* @brief: qser_AudPlayer_Close, close the audio playback
+* @param hdl [IN]: int, handle for the audio device or stream
+* @return : void
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+void qser_AudPlayer_Close(int hdl)
+{
+    if (SC_AUDIO_INVALID_HANDLE == playback_handle)
+    {
+        LYINFLOG("qser_AudPlayer_Close handle is invalid.\n");
+        return;
+    }
+    if( sc_audio_playback_stop(playback_handle))
+    {
+        LYINFLOG("qser_AudPlayer_Close sc_audio_playback_stop fail.\n");
+        return;
+    }
+    if( sc_audio_playback_close(playback_handle))
+    {
+        LYINFLOG("qser_AudPlayer_Close sc_audio_playback_close fail.\n");
+        return;
+    }
+
+    playback_handle = SC_AUDIO_INVALID_HANDLE;
+}
+
+/********************************************************************
+* @brief: qser_AudRecorder_Open, open the audio device for recording
+* @param device [IN]: char* device, the audio device to be opened for recording
+* @param cb_fun [IN]: _cb_onPlayer, callback function to be called when the audio device is opened
+* @return : int, 0 if successful, non-zero if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudRecorder_Open(char* device, _cb_onPlayer cb_fun)
+{
+    int ret = SC_ERR_SUCCESS;
+    int retry_cnt = 0;
+    int audio_is_init = 0;
+
+    sc_audio_fe_pcm_dev_e device_enum = get_device_enum(device); // Convert device string to enum
+
+    while (AUDIO_INIT_MAX_TRY_CNT > retry_cnt)
+    {
+        ret = sc_audio_init();
+        if (SC_ERR_NOT_READY == ret)
+        {
+            LYINFLOG("audio service is not ready, try again, try count = %d\n", (retry_cnt + 1));
+            usleep(200 * 1000);
+            retry_cnt++;
+        }
+        else if (SC_ERR_SUCCESS == ret)
+        {
+            LYINFLOG("Success to initialize audio service\n");
+            audio_is_init = 1;
+            break;
+        }
+        else
+        {
+            LYINFLOG("Failed to initialize audio service, ret = %d\n", ret);
+            break;
+        }
+    }
+    if (1 != audio_is_init)
+    {
+        LYINFLOG("Failed to initialize audio service\n");
+        if (cb_fun != NULL)
+        {
+            cb_fun(-1);
+        }
+        return -1;
+    }
+
+    sc_audio_handle_t device_handle = sc_audio_playback_open(device_enum, SC_AUDIO_FE_PCM_DEV_MIN, SC_AUDIO_OWNER_ID_PLAYER);
+    if (SC_AUDIO_INVALID_HANDLE == device_handle)
+    {
+        LYINFLOG("Failed to open device: %s\n", device);
+        if (cb_fun != NULL)
+        {
+            cb_fun(-1);
+        }
+        return -1;
+    }
+
+    if (cb_fun != NULL)
+    {
+        cb_fun(0);
+    }
+    return 0;
+}
+
+/********************************************************************
+* @brief: qser_AudRecorder_StartRecord, play a file with capture
+* @param hdl [IN]: int, handle for the audio device or stream
+* @param fd [IN]: const char*, file descriptor of the audio file
+* @param offset [IN]: int, offset in the audio file
+* @return : int, 0 if successful, -1 if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudRecorder_StartRecord(int hdl, const char *fd, int offset)
+{
+    int error_line;
+    sc_audio_pcm_config_t pcm_config;
+    int ret = 0;
+    sc_audio_owner_id owner_id = hdl;
+
+    if(NULL== fd || 0 == strlen(fd))
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    capture_handle = sc_audio_capture_open(SC_AUDIO_FE_PCM_DEV_MULTIMEDIA1,SC_AUDIO_BE_DAI_MIN);
+    if (SC_AUDIO_INVALID_HANDLE == capture_handle)
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    memset(&pcm_config, 0, sizeof(sc_audio_pcm_config_t));
+
+    ret = sc_audio_capture_file_prepare(capture_handle, fd, SC_AUDIO_STREAM_FORMAT_INVALID, NULL, capture_state_cb, NULL);
+    if (SC_ERR_SUCCESS != ret)
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    ret = sc_audio_capture_record(capture_handle);
+    if (SC_ERR_SUCCESS != ret)
+    {
+        error_line = __LINE__;
+        goto exit;
+    }
+
+    return 0;
+exit:
+    LYINFLOG("qser_AudRecorder_StartRecord error_line=%d\n",error_line);
+    return -1;
+}
+
+/********************************************************************
+* @brief: qser_AudRecorder_Pause, pause the audio capture
+* @return : int, 0 if successful, -1 if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudRecorder_Pause(void)
+{
+    if (SC_AUDIO_INVALID_HANDLE == capture_handle)
+    {
+        LYINFLOG("qser_AudRecorder_Pause capture_handle is invalid.\n");
+        return -1;
+    }
+    if( sc_audio_capture_pause(capture_handle))
+    {
+	LYINFLOG("qser_AudRecorder_Pause sc_audio_capture_pause fail.\n");
+	return -1;
+    }
+    return 0;
+}
+
+/********************************************************************
+* @brief: qser_AudRecorder_Resume, resume the audio capture
+* @return : int, 0 if successful, -1 if failed
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+int qser_AudRecorder_Resume(void)
+{
+    if (SC_AUDIO_INVALID_HANDLE == capture_handle)
+    {
+        LYINFLOG("qser_AudRecorder_Resume capture_handle is invalid.\n");
+        return -1;
+    }
+    if( sc_audio_capture_resume(capture_handle))
+    {
+        LYINFLOG("qser_AudRecorder_Resume sc_audio_capture_resume fail.\n");
+        return -1;
+    }
+    return 0;
+}
+
+/********************************************************************
+* @brief: qser_AudRecorder_Stop, stop the audio capture
+* @return : void
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+void qser_AudRecorder_Stop(void)
+{
+    if (SC_AUDIO_INVALID_HANDLE == capture_handle)
+    {
+        LYINFLOG("qser_AudRecorder_Stop capture_handle is invalid.\n");
+        return;
+    }
+    if( sc_audio_capture_stop(capture_handle))
+    {
+        LYINFLOG("qser_AudRecorder_Stop sc_audio_capture_stop fail.\n");
+        return;
+    }
+}
+
+/********************************************************************
+* @brief: qser_AudRecorder_Close, close the audio capture
+* @return : void
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+void qser_AudRecorder_Close(void)
+{
+    if (SC_AUDIO_INVALID_HANDLE == capture_handle)
+    {
+        LYINFLOG("qser_AudRecorder_Close capture_handle is invalid.\n");
+        return;
+    }
+    if( sc_audio_capture_stop(capture_handle))
+    {
+        LYINFLOG("qser_AudRecorder_Close sc_audio_capture_stop fail.\n");
+        return;
+    }
+    if( sc_audio_capture_close(capture_handle))
+    {
+        LYINFLOG("qser_AudRecorder_Close sc_audio_capture_close fail.\n");
+        return;
+    }
+
+    capture_handle = SC_AUDIO_INVALID_HANDLE;
+}
+
+/********************************************************************
+* @brief: qser_Audio_Deinit, deinitialize the audio system, stop and close any active playback or capture,
+          and uninitialize the audio system
+* @return : void
+* @todo: NA
+* @see: NA
+* @warning: NA
+*********************************************************************/
+void qser_Audio_Deinit(void)
+{
+    if(SC_AUDIO_INVALID_HANDLE != playback_handle)
+    {
+        sc_audio_playback_stop(playback_handle);
+        sc_audio_playback_close(playback_handle);
+        playback_handle = SC_AUDIO_INVALID_HANDLE;
+    }
+
+    if(SC_AUDIO_INVALID_HANDLE != capture_handle)
+    {
+        sc_audio_capture_stop(capture_handle);
+        sc_audio_capture_close(capture_handle);
+        capture_handle = SC_AUDIO_INVALID_HANDLE;
+    }
+
+    sc_audio_uninit();
+}
+
+DEFINE_LYNQ_LIB_LOG(LYNQ_AUDIO)
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/makefile
new file mode 100644
index 0000000..cef3517
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-audio/makefile
@@ -0,0 +1,48 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -std=gnu++14 \
+                -g -Os \
+                -flto \
+                -fPIC \
+                -fpermissive \
+
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include \
+  -I$(LOCAL_PATH)/ \
+  -I$(ROOT)$(includedir)/logger \
+  -I$(ROOT)$(includedir)/liblog \
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lstdc++ \
+    -llynq-log \
+    -lmedia \
+
+SOURCES = lynq-qser-audio.cpp
+LIBRARY = liblynq-qser-audio.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+all: $(LIBRARY)
+
+$(LIBRARY): $(OBJECTS)
+	$(CXX) -shared -o $@ $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES)
+
+%.o : %.cpp
+	$(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -fPIC -c $<
+
+install:
+	mkdir -p $(ROOT)$(base_libdir)/
+	install $(LIBRARY) $(ROOT)$(base_libdir)/
+	mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+
+clean:
+	$(RM) $(OBJECTS) $(LIBRARY)
+
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index b5b2f6c..85767bc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -411,6 +411,11 @@
             sum_node = sum_node->next;
             continue;
         }
+        else if(strcmp((char *)xmlGetProp(sum_node, "apn_type"), apn->apn_type) == 0)
+        {
+            LYERRLOG("apntype already exists\n");
+            goto FAILED;
+        }
         node_num++;
         sum_node = sum_node->next;
     }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/agps.conf b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/agps.conf
new file mode 100755
index 0000000..71ed385
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/agps.conf
@@ -0,0 +1,2 @@
+ ID1: IcoeTempID1Expire20231031
+ Base 64 PW: YVoyWXNXcWp0RFRqVXlVeQ==
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/lynq_qser_gnss.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/lynq_qser_gnss.h
index d69af22..1fe5ab3 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/lynq_qser_gnss.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/lynq_qser_gnss.h
@@ -115,6 +115,8 @@
 int qser_Gnss_Delete_Aiding_Data(uint32_t h_gnss,DELETE_AIDING_DATA_TYPE_T flags);
 int qser_Gnss_InjectTime(uint32_t h_gnss,LYNQ_INJECT_TIME_INTO_T *time_info);
 int qser_firmware_update(uint32_t* ph_gnss);
+int qser_Gnss_injectEphemeris(uint32_t h_gnss);
+int qser_Gnss_download_tle();
 #ifdef __cplusplus
 }
 #endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h
index dfced9c..ce124b2 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_gnss_internal.h
@@ -2,12 +2,12 @@
 #include <stdint.h>
 #ifndef __MBTK_GNSS_H__
 #define __MBTK_GNSS_H__
+#include <sc_bsp.h>
 #include "ringbuffer.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-
 /*
 GGA: GNSS 定位数据
 $GNGGA,,,,,,0,00,99.99,,,,,,*56
@@ -271,13 +271,14 @@
 };
 
 
-
+#define MAX_GPIO_NUM 144
+static void *test_gpio_handle[MAX_GPIO_NUM]={NULL};
 static struct mopen_gnss_device_info_t mopen_gnss_device_info;
 static struct mbtk_gnss_handle_t *mbtk_gnss_handle = NULL;
 static int firmware_extren_state = 0;
 
 static char g_no_sv = 0;// 参与定位的卫星数量
-
+extern int gpio21_value;
 int mopen_gnss_get_nmea_config(uint32 h_gnss);
 int mopen_gnss_get_ant_state_info(uint32 h_gnss);
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_http.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_http.h
new file mode 100755
index 0000000..c1c6e9e
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_http.h
@@ -0,0 +1,364 @@
+/*************************************************************
+Description:
+    MBTK HTTP Header file.
+Author:
+    LiuBin
+Date:
+    2020/4/29 17:25:55
+*************************************************************/
+#ifndef _MBTK_HTTP_2_H
+#define _MBTK_HTTP_2_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdio.h>
+#include "mbtk_type.h"
+//#include "mbtk_sock2.h"
+
+
+/*************************************************************
+    Constants and Macros
+*************************************************************/
+#define MBTK_HTTP_URI_MAX 512
+#define MBTK_HTTP_HOST_MAX 50
+#define MBTK_HTTP_URL_MAX (MBTK_HTTP_URI_MAX + MBTK_HTTP_HOST_MAX)
+#define MBTK_HTTP_PORT_DEF 80
+#define MBTK_HTTPS_PORT_DEF 443
+#define HTTP_HANDLE_MAX 3
+#define HTTP_SESSION_MAX 5
+#define HTTP_REQUEST_HEADER_MAX 30
+#define HTTP_RESPONSE_HEADER_MAX 30
+#define HTTP_CONTENT_LEN_MAX 1024
+#define HTTP_MSG_LEN_MAX 1024
+
+#define HTTP_IPC_MSG_PATH "/dev"
+#define HTTP_IPC_MSG_ID 'H'
+
+/*************************************************************
+    Definitions:enum,struct,union,class
+*************************************************************/
+typedef enum {
+    HTTP_VERSION_1_0 = 0,
+    HTTP_VERSION_1_1,
+    HTTP_VERSION_2,
+    HTTP_VERSION_3
+} mbtk_http_version_enum;
+
+typedef enum {
+    HTTP_OPTION_HEAD = 0,
+    HTTP_OPTION_GET,
+    HTTP_OPTION_POST,
+    HTTP_OPTION_PUT,
+    HTTP_OPTION_DELETE,
+    HTTP_OPTION_OPTIONS,
+    HTTP_OPTION_TRACE,
+    HTTP_OPTION_CONNECT,
+    HTTP_OPTION_LINK,
+    HTTP_OPTION_UNLINK
+} mbtk_http_option_enum;
+
+#if 0
+typedef enum {
+    HTTP_HEADER_GENERAL = 0,
+    HTTP_HEADER_REQUEST,
+    HTTP_HEADER_RESPONSE,
+    HTTP_HEADER_ENTITY,
+    HTTP_HEADER_OTHERS
+} mbtk_http_header_type_e;
+
+typedef enum {
+    // General field start.
+    HTTP_HEADER_INDEX_CACHE_CONTROL = 0,
+    HTTP_HEADER_INDEX_CONNECTION,
+    HTTP_HEADER_INDEX_DATE,
+    HTTP_HEADER_INDEX_PRAGMA,
+    HTTP_HEADER_INDEX_TRAILER,
+    HTTP_HEADER_INDEX_TRANSFER_ENCODING,
+    HTTP_HEADER_INDEX_UPGRADE,
+    HTTP_HEADER_INDEX_VIA,
+    HTTP_HEADER_INDEX_WARNING,
+    // General field end.
+    // Request field start.
+    HTTP_HEADER_INDEX_ACCEPT,
+    HTTP_HEADER_INDEX_ACCEPT_CHARSET,
+    HTTP_HEADER_INDEX_ACCEPT_ENCODING,
+    HTTP_HEADER_INDEX_ACCEPT_LANGUAGE,
+    HTTP_HEADER_INDEX_AUTHORIZATION,
+    HTTP_HEADER_INDEX_EXPECT,
+    HTTP_HEADER_INDEX_FROM,
+    HTTP_HEADER_INDEX_HOST,
+    HTTP_HEADER_INDEX_IF_MATCH,
+    HTTP_HEADER_INDEX_IF_MODIFIED_SINCE,
+    HTTP_HEADER_INDEX_IF_NONE_MATCH,
+    HTTP_HEADER_INDEX_IF_RANGE,
+    HTTP_HEADER_INDEX_IF_UNMODIFIED_SINCE,
+    HTTP_HEADER_INDEX_MAX_FORWARDS,
+    HTTP_HEADER_INDEX_PROXY_AUTHORIZATION,
+    HTTP_HEADER_INDEX_RANGE,
+    HTTP_HEADER_INDEX_REFERER,
+    HTTP_HEADER_INDEX_TE,
+    HTTP_HEADER_INDEX_USER_AGENT,
+    // Request field end.
+    // Response field start.
+    HTTP_HEADER_INDEX_ACCEPT_RANGES,
+    HTTP_HEADER_INDEX_AGE,
+    HTTP_HEADER_INDEX_ETAG,
+    HTTP_HEADER_INDEX_LOCATION,
+    HTTP_HEADER_INDEX_PROXY_AUTHENTICATE,
+    HTTP_HEADER_INDEX_RETRY_AFTER,
+    HTTP_HEADER_INDEX_SERVER,
+    HTTP_HEADER_INDEX_VARY,
+    HTTP_HEADER_INDEX_WWW_AUTHENTICATE,
+    // Response field end.
+    // Entity field start.
+    HTTP_HEADER_INDEX_ALLOW,
+    HTTP_HEADER_INDEX_CONTENT_ENCODING,
+    HTTP_HEADER_INDEX_CONTENT_LANGUAGE,
+    HTTP_HEADER_INDEX_CONTENT_LENGTH,
+    HTTP_HEADER_INDEX_CONTENT_LOCATION,
+    HTTP_HEADER_INDEX_CONTENT_MD5,
+    HTTP_HEADER_INDEX_CONTENT_RANGE,
+    HTTP_HEADER_INDEX_CONTENT_TYPE,
+    HTTP_HEADER_INDEX_EXPIRES,
+    HTTP_HEADER_INDEX_LAST_MODIFIED,
+    // Entity field end.
+    // Other field start.
+    HTTP_HEADER_INDEX_SET_COOKIE,
+    HTTP_HEADER_INDEX_COOKIE,
+    HTTP_HEADER_INDEX_X_FRAME_OPTIONS,
+    HTTP_HEADER_INDEX_X_XSS_PROTECTION,
+    HTTP_HEADER_INDEX_DNT,
+    HTTP_HEADER_INDEX_P3P
+    // Other field end.
+} mbtk_http_header_index_e;
+#endif
+
+typedef enum {
+    HTTP_SESSION_STATE_NON = 0,
+    HTTP_SESSION_STATE_CONN,
+    HTTP_SESSION_STATE_WRITE_HEADER,
+    HTTP_SESSION_STATE_WRITE_CONTENT,
+    HTTP_SESSION_STATE_WRITE_END,
+    HTTP_SESSION_STATE_READ_HEADER,
+    HTTP_SESSION_STATE_READ_CONTENT,
+    HTTP_SESSION_STATE_READ_END
+} http_session_state_e;
+
+typedef enum {
+    MBTK_HTTP_STATE_CODE_200 = 200,
+    MBTK_HTTP_STATE_CODE_204 = 204,
+    MBTK_HTTP_STATE_CODE_206 = 206,
+    MBTK_HTTP_STATE_CODE_301 = 301,
+    MBTK_HTTP_STATE_CODE_302 = 302,
+    MBTK_HTTP_STATE_CODE_303 = 303,
+    MBTK_HTTP_STATE_CODE_304 = 304,
+    MBTK_HTTP_STATE_CODE_307 = 307,
+    MBTK_HTTP_STATE_CODE_400 = 400,
+    MBTK_HTTP_STATE_CODE_401 = 401,
+    MBTK_HTTP_STATE_CODE_403 = 403,
+    MBTK_HTTP_STATE_CODE_404 = 404,
+    MBTK_HTTP_STATE_CODE_500 = 500,
+    MBTK_HTTP_STATE_CODE_503 = 503
+} mbtk_http_state_code_e;
+
+typedef enum {
+    MBTK_HTTP_DATA_NON = 0,
+    MBTK_HTTP_DATA_HEADER,
+    MBTK_HTTP_DATA_CONTENT,
+    MBTK_HTTP_DATA_COMPLETE
+} mbtk_http_data_type_enum;
+
+typedef void (*mbtk_http_data_callback_func)(
+    int session_id, mbtk_http_data_type_enum type,
+    void *data,int data_len);
+
+typedef struct mbtk_http_header {
+    char name[30];
+    char *value;
+} mbtk_http_header_t;
+
+typedef struct {
+    int header_cnt;
+    mbtk_http_header_t *req_h[HTTP_REQUEST_HEADER_MAX];
+
+    int content_len;    // Post content lenght
+    int content_len_send; // Post content lenght for send.
+    char *content;
+} mbtk_http_session_req_t;
+
+typedef struct {
+    int state_code;
+    mbtk_http_version_enum version;
+
+    int content_length;
+    bool is_chunked;
+    int header_cnt;
+    mbtk_http_header_t *rsp_h[HTTP_RESPONSE_HEADER_MAX];
+} mbtk_http_session_rsp_t;
+
+typedef struct mbtk_http_session{
+    int handle_id;
+    int id;
+    int sock_fd;
+    FILE *sock_file;
+    http_session_state_e state;
+    char host[MBTK_HTTP_HOST_MAX + 1];
+    mbtk_http_option_enum option;
+    mbtk_http_version_enum version;
+    char uri[MBTK_HTTP_URI_MAX + 1];
+    int port;
+    bool is_ssl;
+
+    mbtk_http_session_req_t req;
+    mbtk_http_session_rsp_t rsp;
+} mbtk_http_session_t;
+
+typedef struct mbtk_http_handle{
+    int id;
+    bool show_rsp_header;
+    mbtk_http_data_callback_func data_cb;
+
+    int session_cnt;
+    mbtk_http_session_t *session[HTTP_SESSION_MAX];
+} mbtk_http_handle_t;
+
+#if 0
+typedef enum {
+    HTTP_MSG_SESSION_CREATE_REQ,
+    HTTP_MSG_SESSION_CREATE_RSP,
+    HTTP_MSG_SESSION_FREE_REQ,
+    HTTP_MSG_SESSION_FREE_RSP,
+    HTTP_MSG_SESSION_URL_SET_REQ,
+    HTTP_MSG_SESSION_URL_SET_RSP,
+    HTTP_MSG_SESSION_HEAD_SET_REQ,
+    HTTP_MSG_SESSION_HEAD_SET_RSP,
+    HTTP_MSG_SESSION_CONTENT_SET_REQ,
+    HTTP_MSG_SESSION_CONTENT_SET_RSP,
+    HTTP_MSG_SESSION_ACTION_REQ,
+    HTTP_MSG_SESSION_ACTION_RSP,
+    HTTP_MSG_SESSION_CONTENT_SEND_REQ,
+    HTTP_MSG_SESSION_CONTENT_SEND_RSP
+} mbtk_http_msg_type_enum;
+#endif
+
+typedef enum {
+    HTTP_MSG_SESSION_CREATE,
+    HTTP_MSG_SESSION_FREE,
+    HTTP_MSG_SESSION_HEAD_SET,
+    HTTP_MSG_SESSION_CONTENT_SET,
+    HTTP_MSG_SESSION_ACTION,
+    HTTP_MSG_SESSION_CONTENT_SEND,
+    HTTP_MSG_HANDLE_EXIT
+} mbtk_http_msg_type_enum;
+
+typedef enum {
+    MBTK_HTTP_ERR_SUCCESS,
+    MBTK_HTTP_ERR_UNKNOWN
+} mbtk_http_err_enum;
+
+typedef struct {
+    mbtk_http_msg_type_enum type;
+    int int_arg1;
+    int int_arg2;
+    char str_small[30];
+    char str_large[HTTP_MSG_LEN_MAX];
+} mbtk_http_msg_req_t;
+
+typedef struct {
+    mbtk_http_msg_type_enum type;
+    mbtk_http_err_enum err;
+
+    mbtk_http_data_type_enum data_type;
+    int buff_len;
+    char buff[HTTP_MSG_LEN_MAX];
+} mbtk_http_msg_rsp_t;
+
+/*************************************************************
+    Extern variables
+*************************************************************/
+#if 0
+const mbtk_http_header_field_t mbtk_http_headers[] = {
+    {HTTP_HEADER_INDEX_CACHE_CONTROL, HTTP_HEADER_GENERAL,"Cache-Control"},
+    {HTTP_HEADER_INDEX_CONNECTION, HTTP_HEADER_GENERAL,"Connection"},
+    {HTTP_HEADER_INDEX_DATE, HTTP_HEADER_GENERAL,"Date"},
+    {HTTP_HEADER_INDEX_PRAGMA, HTTP_HEADER_GENERAL,"Pragma"},
+    {HTTP_HEADER_INDEX_TRAILER, HTTP_HEADER_GENERAL,"Trailer"},
+    {HTTP_HEADER_INDEX_TRANSFER_ENCODING, HTTP_HEADER_GENERAL,"Transfer-Encoding"},
+    {HTTP_HEADER_INDEX_UPGRADE, HTTP_HEADER_GENERAL,"Upgrade"},
+    {HTTP_HEADER_INDEX_VIA, HTTP_HEADER_GENERAL,"Via"},
+    {HTTP_HEADER_INDEX_WARNING, HTTP_HEADER_GENERAL,"Warning"},
+    {HTTP_HEADER_INDEX_ACCEPT, HTTP_HEADER_REQUEST,"Accept"},
+    {HTTP_HEADER_INDEX_ACCEPT_CHARSET, HTTP_HEADER_REQUEST,"Accept-Charset"},
+    {HTTP_HEADER_INDEX_ACCEPT_ENCODING, HTTP_HEADER_REQUEST,"Accept-Encoding"},
+    {HTTP_HEADER_INDEX_ACCEPT_LANGUAGE, HTTP_HEADER_REQUEST,"Accept-Language"},
+    {HTTP_HEADER_INDEX_AUTHORIZATION, HTTP_HEADER_REQUEST,"Authorization"},
+    {HTTP_HEADER_INDEX_EXPECT, HTTP_HEADER_REQUEST,"Expect"},
+    {HTTP_HEADER_INDEX_FROM, HTTP_HEADER_REQUEST,"From"},
+    {HTTP_HEADER_INDEX_HOST, HTTP_HEADER_REQUEST,"Host"},
+    {HTTP_HEADER_INDEX_IF_MATCH, HTTP_HEADER_REQUEST,"If-Match"},
+    {HTTP_HEADER_INDEX_IF_MODIFIED_SINCE, HTTP_HEADER_REQUEST,"If-Modified-Since"},
+    {HTTP_HEADER_INDEX_IF_NONE_MATCH, HTTP_HEADER_REQUEST,"If-None-Match"},
+    {HTTP_HEADER_INDEX_IF_RANGE, HTTP_HEADER_REQUEST,"If-Range"},
+    {HTTP_HEADER_INDEX_IF_UNMODIFIED_SINCE, HTTP_HEADER_REQUEST,"If-Unmodified-Since"},
+    {HTTP_HEADER_INDEX_MAX_FORWARDS, HTTP_HEADER_REQUEST,"Max-Forwards"},
+    {HTTP_HEADER_INDEX_PROXY_AUTHORIZATION, HTTP_HEADER_REQUEST,"Proxy-Authorization"},
+    {HTTP_HEADER_INDEX_RANGE, HTTP_HEADER_REQUEST,"Range"},
+    {HTTP_HEADER_INDEX_REFERER, HTTP_HEADER_REQUEST,"Referer"},
+    {HTTP_HEADER_INDEX_TE, HTTP_HEADER_REQUEST,"TE"},
+    {HTTP_HEADER_INDEX_USER_AGENT, HTTP_HEADER_REQUEST,"User-Agent"},
+    {HTTP_HEADER_INDEX_ACCEPT_RANGES, HTTP_HEADER_RESPONSE,"Accept-Ranges"},
+    {HTTP_HEADER_INDEX_AGE, HTTP_HEADER_RESPONSE,"Age"},
+    {HTTP_HEADER_INDEX_ETAG, HTTP_HEADER_RESPONSE,"ETag"},
+    {HTTP_HEADER_INDEX_LOCATION, HTTP_HEADER_RESPONSE,"Location"},
+    {HTTP_HEADER_INDEX_PROXY_AUTHENTICATE, HTTP_HEADER_RESPONSE,"Proxy-Authenticate"},
+    {HTTP_HEADER_INDEX_RETRY_AFTER, HTTP_HEADER_RESPONSE,"Retry-After"},
+    {HTTP_HEADER_INDEX_SERVER, HTTP_HEADER_RESPONSE,"Server"},
+    {HTTP_HEADER_INDEX_VARY, HTTP_HEADER_RESPONSE,"Vary"},
+    {HTTP_HEADER_INDEX_WWW_AUTHENTICATE, HTTP_HEADER_RESPONSE,"WWW-Authenticate"},
+    {HTTP_HEADER_INDEX_ALLOW, HTTP_HEADER_ENTITY,"Allow"},
+    {HTTP_HEADER_INDEX_CONTENT_ENCODING, HTTP_HEADER_ENTITY,"Content-Encoding"},
+    {HTTP_HEADER_INDEX_CONTENT_LANGUAGE, HTTP_HEADER_ENTITY,"Content-Language"},
+    {HTTP_HEADER_INDEX_CONTENT_LENGTH, HTTP_HEADER_ENTITY,"Content-Length"},
+    {HTTP_HEADER_INDEX_CONTENT_LOCATION, HTTP_HEADER_ENTITY,"Content-Location"},
+    {HTTP_HEADER_INDEX_CONTENT_MD5, HTTP_HEADER_ENTITY,"Content-MD5"},
+    {HTTP_HEADER_INDEX_CONTENT_RANGE, HTTP_HEADER_ENTITY,"Content-Range"},
+    {HTTP_HEADER_INDEX_CONTENT_TYPE, HTTP_HEADER_ENTITY,"Content-Type"},
+    {HTTP_HEADER_INDEX_EXPIRES, HTTP_HEADER_ENTITY,"Expires"},
+    {HTTP_HEADER_INDEX_LAST_MODIFIED, HTTP_HEADER_ENTITY,"Last-Modified"},
+    {HTTP_HEADER_INDEX_SET_COOKIE, HTTP_HEADER_OTHERS,"Set-Cookie"},
+    {HTTP_HEADER_INDEX_COOKIE, HTTP_HEADER_OTHERS,"Cookie"},
+    {HTTP_HEADER_INDEX_X_FRAME_OPTIONS, HTTP_HEADER_OTHERS,"X-Frame-Options"},
+    {HTTP_HEADER_INDEX_X_XSS_PROTECTION, HTTP_HEADER_OTHERS,"X-XSS-Protection"},
+    {HTTP_HEADER_INDEX_DNT, HTTP_HEADER_OTHERS,"DNT"},
+    {HTTP_HEADER_INDEX_P3P, HTTP_HEADER_OTHERS,"P3P"}
+};
+#endif
+/*************************************************************
+    Public Function Declaration
+*************************************************************/
+int mbtk_http_handle_get(bool show_rsp_header,mbtk_http_data_callback_func data_cb);
+int mbtk_http_handle_free(int handle_id);
+int mbtk_http_session_create(int handle_id, mbtk_http_option_enum option,
+        mbtk_http_version_enum version);
+int mbtk_http_session_option_reset(int handle_id, int session_id, mbtk_http_option_enum option);
+int mbtk_http_session_free(int handle_id,int session_id);
+int mbtk_http_session_url_set(int handle_id,int session_id,void *url);
+int mbtk_http_session_head_add(int handle_id,int session_id,
+        char *name, char *value);
+int mbtk_http_session_content_set(int handle_id,int session_id,
+        char *content,uint32 content_len);
+int mbtk_http_session_start(int handle_id,int session_id);
+int mbtk_http_session_content_send(int handle_id,int session_id,
+        char *data,int data_len);
+const mbtk_http_session_t* mbtk_http_session_get(int handle_id,int session_id);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _MBTK_HTTP_2_H */
+
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_http_base.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_http_base.h
new file mode 100755
index 0000000..e8ae710
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_http_base.h
@@ -0,0 +1,44 @@
+#include <cstdio>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int mbtk_http_init();
+int mbtk_http_deinit();
+int mbtk_http_open
+(
+    //bool is_ssl,
+    //bool ingnore_cert,
+    const void *host,
+    int *port
+);
+int mbtk_http_read
+(
+    int sock_fd,
+    void *buf,
+    uint16_t len,
+    int timeout_ms
+);
+
+int mbtk_http_read_line
+(
+    int sock_fd,
+    void *buf,
+    uint16_t len
+);
+int mbtk_http_write
+(
+    int sock_fd,
+    void *buf,
+    uint16_t len
+);
+int mbtk_http_close(int sock_fd);
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_type.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_type.h
new file mode 100755
index 0000000..c5fc1a0
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/include/mbtk_type.h
@@ -0,0 +1,127 @@
+#ifndef MBTK_TYPE_INCLUDE
+#define MBTK_TYPE_INCLUDE
+#include <stdio.h>
+#include <stdbool.h>
+#include <sys/types.h>
+
+#ifndef MBTK_PLATFORM_LINUX
+#define MBTK_PLATFORM_LINUX
+#endif
+
+#ifndef MBTK_PLATFORM_QCOMM
+//#define MBTK_PLATFORM_QCOMM
+#endif
+
+#define MBTK_SUCCESS 0
+#define MBTK_FAILE (-1)
+
+#ifndef UNUSED
+#define UNUSED(param) ((void) param)
+#define UNUSEDPARAM UNUSED
+#endif
+
+#ifndef TRUE
+#define TRUE   1   /* Boolean true value. */
+#endif
+
+#ifndef true
+#define true   1   /* Boolean true value. */
+#endif
+
+#ifndef FALSE
+#define FALSE  0   /* Boolean false value. */
+#endif
+
+#ifndef false
+#define false  0   /* Boolean false value. */
+#endif
+
+
+#ifndef NULL
+#define NULL  0
+#endif
+
+
+#ifndef null
+#define null  0
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/**
+ * Compiler-digit : 16
+ * char : 1     (%c)
+ * char* : 2
+ * short int : 2
+ * int : 2      (%d)
+ * unsigned int : 2  (%u)
+ * float : 4    (%f)
+ * double : 8   (%f)
+ * long : 4
+ * unsigned long : 4
+ * long long : 8
+ * unsigned long long : 8
+ *
+ *
+ * Compiler-digit : 32
+ * char : 1
+ * char* : 4
+ * short int : 2
+ * int : 4
+ * unsigned int : 4
+ * float : 4
+ * double : 8
+ * long : 4
+ * unsigned long : 4
+ * long long : 8
+ * unsigned long long : 8
+ *
+ *
+ * Compiler-digit : 64
+ * char : 1
+ * char* : 8
+ * short int : 2
+ * int : 4
+ * unsigned int : 4
+ * float : 4
+ * double : 8
+ * long : 8
+ * unsigned long : 8
+ * long long : 8
+ * unsigned long long : 8
+ */
+typedef unsigned char boolean; /* Boolean value type. */
+// typedef unsigned char bool; /* Boolean value type. */
+typedef unsigned long long uint64; /* Unsigned 64 bit value */
+typedef unsigned long long uint64_t; /* Unsigned 64 bit value */
+typedef unsigned int uint32; /* Unsigned 32 bit value */
+typedef unsigned int uint32_t; /* Unsigned 32 bit value */
+typedef unsigned short uint16; /* Unsigned 16 bit value */
+typedef unsigned short uint16_t;
+typedef unsigned char uint8; /* Unsigned 8  bit value */
+typedef unsigned char uint8_t;
+typedef signed long long int64; /* Signed 64 bit value */
+typedef signed long long sint64; /* Signed 64 bit value */
+typedef signed int int32; /* Signed 32 bit value */
+typedef signed int sint32; /* Signed 32 bit value */
+typedef signed short int16; /* Signed 16 bit value */
+typedef signed short sint16; /* Signed 16 bit value */
+typedef signed char int8; /* Signed 8  bit value */
+typedef signed char sint8; /* Signed 8  bit value */
+typedef unsigned char byte; /* byte type */
+
+
+typedef struct
+{
+    char *buffer;
+    int size;
+    int size_max;
+}mbtk_buffer_t;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MBTK_TYPE_INCLUDE */
+
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
index b18390b..0f99e4f 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/makefile
@@ -11,8 +11,7 @@
 ifeq ($(strip $(TARGET_PLATFORM)), T106)
 LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
 endif
-
-$(warning ################# lynq qser sms demo ROOT: $(ROOT),includedir:$(includedir))
+$(warning lynq qser gnss demo ROOT = $(ROOT), includedir = $(includedir))
 LOCAL_PATH   = .
 
 LOCAL_C_INCLUDES = \
@@ -21,17 +20,21 @@
   -I$(ROOT)$(includedir)/logger \
   -I$(ROOT)$(includedir)/liblog \
   -I$(ROOT)$(includedir)/libxml2 \
+  -I$(ROOT)$(includedir)\
 
 
 LOCAL_LIBS := \
     -L. \
     -lstdc++ \
-	-llog \
+    -llog \
     -lcutils \
     -lutils \
     -lpthread \
     -llynq-log \
     -lxml2 \
+    -llynq-uci \
+    -lsctel \
+    -lbsp \
 
 
 SOURCES = $(wildcard *.c wildcard *.h src/*.cpp)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
index 735f467..1c4f1bc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/lynq_qser_gnss.cpp
@@ -34,6 +34,7 @@
 #include "mbtk_gnss_internal.h"
 #include "ringbuffer.h"
 #include "lynq_qser_gnss.h"
+#include "include/lynq_uci.h"
 DEFINE_LYNQ_LIB_LOG(LYNQ_QSER_GNSS)
 #ifdef __cplusplus
 extern "C" {
@@ -41,6 +42,8 @@
 
 int ret;
 LYNQ_INJECT_TIME_INTO_T time_test;
+int g_gnss_sync_enable_flag = 0;
+int g_gnss_sync_done = 0;
 
 int qser_Gnss_Init(uint32_t *h_gnss)
 {
@@ -129,15 +132,32 @@
     lynq_gnss_get_aidinfo(h_gnss);
     return 0;
 }
-
 int qser_Gnss_Start(uint32_t h_gnss)
 {
     struct mbtk_gnss_handle_t *gnss_handle = (struct mbtk_gnss_handle_t *)h_gnss;
+
+    char gnss_sync_enable[24] = "";
+    lynq_get_value("lynq_uci", "lynq_sync_time", "lynq_gnss_sync_time_enable" , gnss_sync_enable);
+    g_gnss_sync_enable_flag = atoi(gnss_sync_enable);
+    g_gnss_sync_done = 0;
+
     lynq_open_gps(1);
-    ret = set_baudrate(gnss_handle->dev_fd, B9600);
-    if(-1 == ret)
+    ALOGE("GNSS_VALUE: %d\n",gpio21_value);
+    if(gpio21_value == 1)
     {
-        return  -2;
+        ret = set_baudrate(gnss_handle->dev_fd, B115200);
+        if(-1 == ret)
+        {
+            return  -2;
+        }
+    }
+    else if(gpio21_value == 0)
+    {
+        ret = set_baudrate(gnss_handle->dev_fd, B9600);
+        if(-1 == ret)
+        {
+            return  -2;
+        }
     }
     return 0;
 }
@@ -233,6 +253,28 @@
     return 0;
 }
 
+int qser_Gnss_download_tle()
+{
+    int ret;
+    ret = mopen_gnss_download_tle();
+    if(ret < 0)
+    {
+        return -1;
+    }
+    return 0;
+}
+
+int qser_Gnss_injectEphemeris(uint32_t h_gnss)
+{
+    int ret;
+    ret = mopen_gnss_injects_aidpos(h_gnss);
+    if(ret < 0)
+    {
+        return -1;
+    }
+    return 0;
+}
+
 void atsvc_incb_entity(char *input,int length);
 int lynq_at_cgps(int at_type,int gnss_state_type);
 int lynq_at_cgpsnmea(int at_type,int gnss_state_type);
@@ -424,10 +466,22 @@
                 return -1;
             }
             lynq_open_gps(1);
-            ret = set_baudrate(tty_fd, B9600);
-            if(-1 == ret)
+
+            if(gpio21_value == 1)
             {
-                return -1;
+                ret = set_baudrate(tty_fd, B115200);
+                if(-1 == ret)
+                {
+                return  -2;
+                }
+            }
+            else if(gpio21_value == 0)
+            {
+                ret = set_baudrate(tty_fd, B9600);
+                if(-1 == ret)
+                {
+                    return  -2;
+                }
             }
         }
         else
@@ -445,14 +499,14 @@
     char cgpsnmea_at_res[64]={};
     if (at_type == 0)
     {
-        strncpy(cgpsnmea_at_res,"+CGPSNMEA:(0,1)\r\n",64);
+        sprintf(cgpsnmea_at_res,"+CGPSNMEA:(0,1)\r\n");
         atsvc_gnss_outcb(cgpsnmea_at_res,strlen(cgpsnmea_at_res),0);
         return 0;
     }
     else if(at_type == 1)
     {
         bzero(cgpsnmea_at_res,64);
-        sprintf(cgpsnmea_at_res,"+CGPSNMEA:<%d>",at_gpsnmea_status);
+        sprintf(cgpsnmea_at_res,"+CGPSNMEA:<%d>\r\n",at_gpsnmea_status);
         atsvc_gnss_outcb(cgpsnmea_at_res,strlen(cgpsnmea_at_res),0);
         return 0;
     }
@@ -465,7 +519,7 @@
         }
         else
         {
-            strncpy(cgpsnmea_at_res,"+CGPSNMEA: same status\r\n",64);
+            sprintf(cgpsnmea_at_res,"+CGPSNMEA: same status\r\n");
             atsvc_gnss_outcb(cgpsnmea_at_res,strlen(cgpsnmea_at_res),0);
             return -1;
         }
@@ -504,22 +558,21 @@
     int res = 0;
     int income_at_type = 0;
     int gnss_state_type = -1;
-    char at_cmd[128]={0};
+    //char at_cmd[128]={0};
     char gnss_at_cmd[64] = {0};
     char parse_atcmd[128] = {0}; 
     if(NULL == input)
     {
-        strncpy(gnss_at_cmd,"+CME ERROR: 100\r\n",64);
+        sprintf(gnss_at_cmd,"+CME ERROR: 100\r\n");
         atsvc_gnss_outcb(gnss_at_cmd,strlen(gnss_at_cmd),0);
         return;
     }
-    bzero(at_cmd,128);
-    strncpy(at_cmd,input,strlen(input));
-    res = gnss_at_cmd_parse(at_cmd,parse_atcmd,&gnss_state_type,&income_at_type);
+
+    res = gnss_at_cmd_parse(input,parse_atcmd,&gnss_state_type,&income_at_type);
     if (res != 0)
     {
         ALOGE("parse at cmd error");
-        strncpy(gnss_at_cmd,"+CME ERROR: 100\r\n",64);
+        sprintf(gnss_at_cmd,"+CME ERROR: 100\r\n");
         atsvc_gnss_outcb(gnss_at_cmd,strlen(gnss_at_cmd),0);
         return;
     }
@@ -529,7 +582,7 @@
         res = lynq_at_cgps(income_at_type,gnss_state_type);
         if (res != 0)
         {
-            strncpy(gnss_at_cmd,"+CME ERROR: 100\r\n",64);
+            sprintf(gnss_at_cmd,"+CME ERROR: 100\r\n");
             atsvc_gnss_outcb(gnss_at_cmd,strlen(gnss_at_cmd),0);
             return;
         }
@@ -539,12 +592,12 @@
         res = lynq_at_cgpsnmea(income_at_type,gnss_state_type);
         if (res != 0)
         {
-            strncpy(gnss_at_cmd,"+CME ERROR: 100\r\n",64);
+            sprintf(gnss_at_cmd,"+CME ERROR: 100\r\n");
             atsvc_gnss_outcb(gnss_at_cmd,strlen(gnss_at_cmd),0);
             return;
         }
     }
-    strncpy(gnss_at_cmd,"ok\r\n",64);
+    sprintf(gnss_at_cmd,"OK\r\n");
     atsvc_gnss_outcb(gnss_at_cmd,strlen(gnss_at_cmd),0);
     return;
 }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
index cffc6a9..a9a0b67 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_gnss.cpp
@@ -1,4 +1,3 @@
-
 #include <stdio.h>
 #include <string.h>
 #include <strings.h>
@@ -18,11 +17,66 @@
 #include <sys/time.h>
 #include <liblog/lynq_deflog.h>
 #include "mbtk_gnss_internal.h"
+#include "mbtk_http.h"
+#include "mbtk_type.h"
 #include "ringbuffer.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+#define _XOPEN_SOURCE
+#define NMEA_RMC "RMC"
+extern long timezone;
+extern int g_gnss_sync_enable_flag;
+extern int g_gnss_sync_done;
+
+typedef int (*sc_rtc_time_get_cb)(unsigned int src_id, unsigned long ulsec);
+extern int sc_rtc_timer_init(void);
+extern int sc_rtc_timer_uninit(void);
+extern int sc_rtc_time_set(int srcid);
+
+static inline int update_system_time(time_t timestamp)
+{
+    struct timeval tv;
+    int ret = gettimeofday(&tv, NULL);
+    int srcid = -1;
+    if (ret == -1) {
+        perror("gettimeofday");
+        return -1;
+    }
+    if (tv.tv_sec == timestamp)
+    {
+        return 0;
+    }
+    printf("Now: %ld\n", tv.tv_sec);
+    tv.tv_sec = timestamp;
+    tv.tv_usec = 0;
+    ret = settimeofday(&tv, NULL);
+    if (ret == -1) {
+        perror("settimeofday");
+        return -1;
+    }
+    //set system time to rtc.
+    if ((srcid = sc_rtc_timer_init()) <= 0)
+    {
+        gnss_log("%s %d error: sc_rtc_timer_init fail!\n", __func__, __LINE__);
+        return -1;
+    }
+    ret = sc_rtc_time_set(srcid);
+    if (ret != 0)
+    {
+        gnss_log("%s %d error: sc_rtc_time_set fail!\n", __func__, __LINE__);
+        return -1;
+    }
+    ret = sc_rtc_timer_uninit();
+    if (0 != ret)
+    {
+        LYERRLOG("uninit failed \n");
+        gnss_log("%s %d error: dc_rtc_timer_uninit fail!\n", __func__, __LINE__);
+        return -1;
+    }
+    return ret;
+}
 
 struct mbtk_gnss_handle_t
 {
@@ -178,14 +232,17 @@
     memcpy(tmp_char, &time[6], 2);
     tmp_time->tm_mday = atoi(tmp_char);
     memcpy(tmp_char, &time[8], 2);
-    tmp_time->tm_mon = atoi(tmp_char);
+    tmp_time->tm_mon = atoi(tmp_char) - 1;
     memcpy(tmp_char, &time[10], 2);
     tmp_time->tm_year = 100 + atoi(tmp_char);
 
     time_t _t = mktime(tmp_time);//按当地时区解析tmp_time
-    // gnss_log("timestamp: %ld\n",_t);
-    free(tmp_time);
+    //gnss_log("timestamp: %ld\n",_t);
+    tzset();
+    _t = _t - timezone;
+    //gnss_log("timestamp: %ld\n",_t);
 
+    free(tmp_time);
     return _t;
 }
 /**
@@ -449,7 +506,17 @@
         handle->gnss_handler_func((uint32)handle, E_MT_LOC_MSG_ID_LOCATION_INFO, &mopen_location_info, NULL);
         memset(&mopen_location_info, 0, sizeof(mopen_location_info));
     }
-
+    //set system time.
+    if (g_gnss_sync_enable_flag == 1 && g_gnss_sync_done == 0)
+    {
+        if( strncmp(data+3,NMEA_RMC,strlen(NMEA_RMC)) == 0 && data[17] == 'A')
+        {
+            if (update_system_time(nmea_info.timestamp) == 0)
+            {
+                g_gnss_sync_done = 1;
+            }
+        }
+    }
     return;
 }
 
@@ -664,7 +731,7 @@
         {
             return -1;
         }
-        printf("send cmd: %s\n", &buf[size]);
+        ALOGD("send cmd: %s\n", &buf[size]);
         size += size_written;
         if(size_written != size_to_wr)
         {
@@ -847,13 +914,19 @@
     return -1;
 }
 
-#define GPS_DEV "/sys/devices/soc.0/d4000000.apb/mbtk-dev-op/gps_power"
-
+int gpio21_value = -1;
 int lynq_open_gps(int state)
 {
-    char cmd[128] = "echo '86' > /sys/class/gpio/export && cd /sys/class/gpio/gpio86";
     int ret;
+    /*when in Eur,GPIO21 value is 1; in CN,GPIO21 value is 0. so use it to determined CN or Eur*/
+    test_gpio_handle[21] = sc_gpio_init(21,0,0,0);
+    ret = sc_gpio_value_get(test_gpio_handle[21],&gpio21_value);
+    if(ret)
+    {
+        ALOGE("gpio21 value get error\n");
+    }
 
+    /*in Eur,need set GPIO15 and 84 value; in CN,need set GPIO86 value*/
     if(0 == state)
     {
         nmea_state = 0;
@@ -865,36 +938,79 @@
             }
             usleep(10000);
         }
-        ret = exec_cmd(cmd,NULL);
-        if(0 != ret)
+
+        if(gpio21_value == 1)
         {
-            printf("stop fail %x\n", ret);
+            test_gpio_handle[15] = sc_gpio_init(15,1,0,0);
+            test_gpio_handle[84] = sc_gpio_init(84,1,0,0);
+            ret = sc_gpio_value_set(test_gpio_handle[15],0);
+            if(ret)
+            {
+                ALOGE("gpio15 set value 0 error\n");
+            }
+            usleep(10000);
+            ret = sc_gpio_value_set(test_gpio_handle[84],0);
+            if(ret)
+            {
+                ALOGE("gpio84 set value 0 error\n");
+            }
         }
-        char cmd2[128] = "echo '0' > /sys/class/gpio/gpio86/value && echo '86' > /sys/class/gpio/unexport";
-        ret = exec_cmd(cmd2,NULL);
-        if(0 != ret)
+
+        else if(gpio21_value == 0)
         {
-            printf("stop fail %x\n", ret);
-        }   
+            test_gpio_handle[86] = sc_gpio_init(86,1,0,0);
+            ret = sc_gpio_value_set(test_gpio_handle[86],0);
+            if(ret)
+            {
+                ALOGE("gpio86 set value 0 error\n");
+            }
+        }
+
     }
 
-    if(1 == state)
+    else if(1 == state)
     {
         nmea_state = 1;
+        if(gpio21_value == 1)
+        {
+            test_gpio_handle[15] = sc_gpio_init(15,1,0,0);
+            test_gpio_handle[84] = sc_gpio_init(84,1,0,0);
+            ret = sc_gpio_value_set(test_gpio_handle[15],1);
+            if(ret)
+            {
+                ALOGE("gpio15 set value 1 error\n");
+            }
+            usleep(10000);
+            ret = sc_gpio_value_set(test_gpio_handle[84],1);
+            if(ret)
+            {
+                ALOGE("gpio84 set value 1 error\n");
+            }
+        }
+        else if(gpio21_value == 0)
+        {
+            test_gpio_handle[86] = sc_gpio_init(86,1,0,0);
+            ret = sc_gpio_value_set(test_gpio_handle[86],1);
+            if(ret)
+            {
+                ALOGE("gpio86 set value 1 error\n");
+            }
+        }
+    }
 
-        ret = exec_cmd(cmd,NULL);
-        if(0 != ret)
-        {
-            printf("start fail %x\n", ret);
-            return -1;
-        }
-        char cmd3[128] = "echo '1' > /sys/class/gpio/gpio86/value && echo '86' > /sys/class/gpio/unexport";
-        ret = exec_cmd(cmd3,NULL);
-        if(0 != ret)
-        {
-            printf("start fail %x\n", ret);
-            return -1;
-        }
+    sc_gpio_uninit(test_gpio_handle[21]);
+    test_gpio_handle[21] = NULL;
+    if(gpio21_value == 1)
+    {
+        sc_gpio_uninit(test_gpio_handle[15]);
+        sc_gpio_uninit(test_gpio_handle[84]);
+        test_gpio_handle[15] = NULL;
+        test_gpio_handle[84] = NULL;
+    }
+    else if(gpio21_value == 0)
+    {
+        sc_gpio_uninit(test_gpio_handle[86]);
+        test_gpio_handle[86] = NULL;
     }
     return 0;
 }
@@ -920,26 +1036,9 @@
     }
     memset(mbtk_gnss_handle, 0, sizeof(struct mbtk_gnss_handle_t));
     memset(&mopen_gnss_device_info, 0, sizeof(mopen_gnss_device_info));
-    sleep(1);
     lynq_open_gps(0);
 
     mbtk_gnss_handle->dev_fd = mopen_gnss_open(MBTK_GNSS_DEV, 0);
-    ret = auto_set_uart_baudrate(mbtk_gnss_handle->dev_fd);
-    if(-1 == ret) {
-        ret = -2;
-        goto err;
-    } else if (B9600 == ret) {
-        ret = mopen_uart_change(mbtk_gnss_handle->dev_fd, 1);
-        if(ret)
-        {
-            printf("GNSS Uart set B115200 error\n");
-            mopen_gnss_close(mbtk_gnss_handle->dev_fd);
-            return -1;
-        }
-    }
-    
-    printf("Gnss Config Uart Baudrate Successful.\n");
-    
     mbtk_gnss_handle->rb = (char*)malloc(MBTK_UART_RECV_BUFFER_SIZE);
     if(NULL == mbtk_gnss_handle->rb)
     {
@@ -997,7 +1096,6 @@
 {
     int ret;
     struct mbtk_gnss_handle_t *gnss_handle = (struct mbtk_gnss_handle_t *)h_gnss;
-
     if(h_gnss == NULL)
     {
         gnss_log("ARG error or not inited.");
@@ -1025,10 +1123,13 @@
         printf("GNSS close init error\n");
         return -1;
     }
-
     firmware_extren_state = 0;
-    if (gnss_handle->rb) free(gnss_handle->rb);
-    free((void *)h_gnss);
+    if (gnss_handle->rb)
+    {
+        free(gnss_handle->rb);
+    }
+    free(mbtk_gnss_handle);
+    mbtk_gnss_handle = NULL;
     return 0;
 }
 
@@ -1198,12 +1299,196 @@
     return 0;
 }
 
-#define AGNSS_TLE_FILE  "/tmp/agnss_tle"
+#define AGNSS_TLE_FILE  "/mnt/userdata/agnss_tle"
 
+static void http_data_cb_func(
+    int session_id, mbtk_http_data_type_enum type,
+    void *data,int data_len)
+{
+    static int agnss_fd = 0;
+    int ret = 0;
 
+    if(type == MBTK_HTTP_DATA_HEADER) {
+        printf("Header(%d):%s\n", data_len, (char*)data);
+        if(agnss_fd > 0)
+            return;
+        unlink(AGNSS_TLE_FILE);
+        agnss_fd = open(AGNSS_TLE_FILE, O_RDWR|O_CREAT|O_TRUNC, 0644);
+        if (agnss_fd <= 0)
+        printf("file open error\n");
+        printf("agnss file open: %d\n", agnss_fd);
+    } else if(type == MBTK_HTTP_DATA_CONTENT) {
+        printf("http Data(%d)\n", data_len);
 
+        ret = write(agnss_fd, (char*)data, data_len);
+        if (ret < 0) {
+            printf("%s: error writing to file!\n", __FUNCTION__);
+        } else if (ret < data_len) {
+            printf("%s: wrote less the buffer size!\n", __FUNCTION__);
+        }
+    } else {
+        printf(">>>>>Complete<<<<<\n");
+        if(agnss_fd <= 0)
+            return;
+        close(agnss_fd);
+        agnss_fd = 0;
+    }
+}
 
-#define AGNSS_CONFIG_FILE  "/etc/mbtk/gps.conf"
+static int gnss_http_requst(char *id, char *pw)
+{
+    char tmp[128] = {0};
+    
+    int http_handle = mbtk_http_handle_get(TRUE, http_data_cb_func);
+    if(http_handle < 0)
+    {
+        printf("mbtk_http_handle_get() fail.");
+        return -1;
+    }
+    int http_session = mbtk_http_session_create(http_handle, HTTP_OPTION_POST, HTTP_VERSION_1_1);
+    if(http_handle < 0)
+    {
+        printf("mbtk_http_session_create() fail.");
+        return -2;
+    }
+    if(mbtk_http_session_url_set(http_handle, http_session, "http://unicore-api.rx-networks.cn/rxn-api/locationApi/rtcm")) {
+        printf("mbtk_http_session_url_set() fail.\n");
+        return -3;
+    }
+
+    char* post_data = "[{\"rtAssistance\":{\"format\":\"rtcm\",\"msgs\":[\"GPS:2NAF\",\"BDS:2NAF\",\"QZS:2NAF\"]}}]\r\n";
+
+    mbtk_http_session_head_add(http_handle, http_session, \
+    "Host", "unicore-api.rx-networks.cn");
+
+    sprintf(tmp, "RXN-BASIC cId=%s,mId=Unicore,dId=12-23-34-45-58,pw=%s", id, pw);
+    mbtk_http_session_head_add(http_handle, http_session, \
+    "Authorization", tmp);
+
+    mbtk_http_session_head_add(http_handle, http_session, \
+            "Content-Type", "application/json");
+
+    mbtk_http_session_head_add(http_handle, http_session, \
+            "Accept", "application/octet-stream");
+    mbtk_http_session_content_set(http_handle, http_session,
+                                  post_data, strlen(post_data));
+
+    if(mbtk_http_session_start(http_handle, http_session)) {
+        printf("mbtk_http_session_start() fail.\n");
+        return -4;
+    }
+    if(mbtk_http_handle_free(http_handle))
+    {
+        printf("mbtk_http_handle_free() fail.");
+        return -5;
+    }
+
+    return 0;
+}
+
+/**********************************
+
+ ID1: TempID1Expire20221031
+ Base 64 PW1: RlJYdkFTNE9DWXJhN2ZWTA==
+**************************************/
+#define AGNSS_CONFIG_FILE  "/data/gnss_update/agps.conf"
+
+/**
+ * @brief      mopen_gnss_download_tle
+ *
+ * @details    下载星历数据
+ *             (卫星星历，又称为两行轨道数据（TLE，Two-Line Orbital Element）)
+ *             保存到文件:AGNSS_TLE_FILE
+ * @param      param
+ *
+ * @return     return type
+ */
+int mopen_gnss_download_tle(void)
+{
+    FILE *fp;
+    char StrLine[64];
+    char _id[28] = {0};
+    char _passwd[28] = {0};
+    int i;
+    if((fp = fopen(AGNSS_CONFIG_FILE, "r")) == NULL)
+    {
+        printf("open %s error!\n", AGNSS_CONFIG_FILE);
+        return -1;
+    }
+
+    while (!feof(fp))
+    {
+        memset(StrLine, 0, 64);
+        fgets(StrLine, 64, fp);
+        gnss_log("%s\n", StrLine);
+        i = strstr_n(StrLine, ": ");
+        if(i && strstr_n(StrLine, "ID"))
+        {
+            memcpy(_id, &StrLine[i + 1], strlen(StrLine) - i - 2);
+            printf("%s\n",_id);
+        }
+        else if( i && strstr_n(StrLine, "Base 64"))
+        {
+            memcpy(_passwd, &StrLine[i + 1], strlen(StrLine) - i - 1);
+            printf("%s\n",_passwd);
+        }
+    }
+    fclose(fp);
+    gnss_log("%s : %s[%d], %s[%d]\n", __FUNCTION__, _id, strlen(_id), _passwd, strlen(_passwd));
+    return gnss_http_requst(_id, _passwd);
+}
+
+/**
+ * @brief      mopen_gnss_injects_aidpos
+ *
+ * @details    注入星历, 128 bytes
+ *
+ * @param      param
+ *
+ * @return     return type
+ */
+int mopen_gnss_injects_aidpos(uint32 h_gnss)
+{
+    int ret;
+    int agnss_fd = 0;
+    int size = 0;
+
+    if(0 == h_gnss)
+    {
+        printf("%s handler invalid.\n", __func__);
+        return -1;
+    }
+
+    agnss_fd = open(AGNSS_TLE_FILE, O_RDWR);
+    if (agnss_fd <= 0)
+    {
+        printf("%s open file FAIL. errno:%d\n", __FUNCTION__, errno);
+        return -1;
+    }
+    char* databuf = (char*)malloc(128);
+    if(databuf == NULL)
+    {
+        gnss_log("%s malloc() fail.", __FUNCTION__);
+        return -1;
+    }
+    memset(databuf, 0, 128);
+    while(0 < (size = read(agnss_fd, databuf, 128)))
+    {
+        gnss_log("%s Write[%d]\r\n", __FUNCTION__, size);
+        ret = lynq_gnss_send_cmd(h_gnss, databuf, size);
+        if(ret < 0)
+        {
+            printf("%s send cmd FAIL. ret:%d\n", __FUNCTION__, ret);
+            break;
+        }
+        memset(databuf, 0, 128);
+    }
+    close(agnss_fd);
+    free(databuf);
+    lynq_gnss_get_aidinfo(h_gnss);
+
+    return 0;
+}
 
 
 /**
@@ -1267,9 +1552,11 @@
     {
         if(fgets(buffer, 256, pipe))
         {
+            result[0] = buffer[0];
             memset(buffer, 0, sizeof(buffer));
         }
     }
+    
     pclose(pipe);
     return 0;
 }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_http.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_http.cpp
new file mode 100755
index 0000000..1963359
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_http.cpp
@@ -0,0 +1,1370 @@
+/*************************************************************
+Description:
+    MBTK HTTP c file.
+Author:
+    
+Date:
+  
+*************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <log/log.h>
+#include <liblog/lynq_deflog.h>
+#include "mbtk_http_base.h"
+#include "mbtk_http.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*************************************************************
+    Constants and Macros
+*************************************************************/
+
+/*************************************************************
+    Variables:local
+*************************************************************/
+static mbtk_http_handle_t http_handles[HTTP_HANDLE_MAX] =
+{
+    {
+        .id = -1,
+        .data_cb = NULL,
+        .session_cnt = 0,
+        .session = {NULL}
+    }
+};
+
+/*************************************************************
+    Variables:public
+*************************************************************/
+
+
+/*************************************************************
+    Local Function Declaration
+*************************************************************/
+
+
+/*************************************************************
+    Local Function Definitions
+*************************************************************/
+static void http_session_free(mbtk_http_session_t *session)
+{
+    if(session)
+    {
+        if(session->req.header_cnt > 0)
+        {
+            int index;
+            for(index = 0; index < HTTP_REQUEST_HEADER_MAX; index++)
+            {
+                if(session->req.req_h[index] != NULL)
+                {
+                    if(session->req.req_h[index]->value)
+                        free(session->req.req_h[index]->value);
+                    free(session->req.req_h[index]);
+                    session->req.req_h[index] = NULL;
+                }
+            }
+            session->req.header_cnt = 0;
+        }
+
+        if(session->req.content)
+        {
+            free(session->req.content);
+            session->req.content = NULL;
+        }
+
+        if(session->rsp.header_cnt > 0)
+        {
+            int index;
+            for(index = 0; index < HTTP_REQUEST_HEADER_MAX; index++)
+            {
+                if(session->rsp.rsp_h[index] != NULL)
+                {
+                    if(session->rsp.rsp_h[index]->value)
+                        free(session->rsp.rsp_h[index]->value);
+                    free(session->rsp.rsp_h[index]);
+                    session->rsp.rsp_h[index] = NULL;
+                }
+            }
+            session->rsp.header_cnt = 0;
+        }
+
+        free(session);
+    }
+}
+
+static int http_session_close(mbtk_http_session_t *session)
+{
+    if(session)
+    {
+        if(session->sock_fd > 0)
+        {
+            if(mbtk_http_close(session->sock_fd))
+            {
+                RLOGD("mbtk_http_close() fail.");
+                return -1;
+            }
+            session->sock_fd = -1;
+        }
+
+        session->state = HTTP_SESSION_STATE_NON;
+
+        return 0;
+    }
+
+    return -1;
+}
+
+
+static bool http_handle_check(int handle_id)
+{
+    if(handle_id < 0 || handle_id >= HTTP_HANDLE_MAX
+       || http_handles[handle_id].id < 0)
+    {
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+static bool http_session_check(int handle_id, int session_id)
+{
+    if(handle_id < 0 || handle_id >= HTTP_HANDLE_MAX
+       || http_handles[handle_id].id < 0
+       || http_handles[handle_id].id != handle_id)
+    {
+        return FALSE;
+    }
+
+    if(session_id < 0 || session_id >= HTTP_SESSION_MAX
+       || http_handles[handle_id].session[session_id] == NULL
+       || http_handles[handle_id].session[session_id]->id != session_id)
+    {
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+static bool http_is_space_char(char ch)
+{
+    if(ch == ' ' || ch == '\r' || ch == '\t' || ch == '\n')
+        return TRUE;
+
+    return FALSE;
+}
+
+static bool http_str_empty(char *str)
+{
+    if(str == NULL || strlen(str) == 0)
+        return TRUE;
+
+    return FALSE;
+}
+
+
+static int http_url_parse
+(
+    void* url,
+    void *host,
+    void *uri,
+    int *port,
+    bool *is_ssl
+)
+{
+    if(strlen(url) == 0)
+    {
+        return -1;
+    }
+    char *url_ptr = (char*)url;
+    char *host_ptr = (char*)host;
+
+    RLOGD("URL[%d]:%s",strlen(url_ptr),url_ptr);
+
+    if(!memcmp(url_ptr,"https://",8))
+    {
+        *is_ssl = TRUE;
+        url_ptr += 8;
+    }
+    else if(!memcmp(url_ptr,"http://",7))
+    {
+        *is_ssl = FALSE;
+        url_ptr += 7;
+    }
+    else
+    {
+        *is_ssl = FALSE;
+    }
+
+    // ptr point to host.
+    while(*url_ptr)
+    {
+        if(*url_ptr == ':' || *url_ptr == '/') // Host end
+            break;
+        if(http_is_space_char(*url_ptr))
+        {
+            url_ptr++;
+            continue;
+        }
+        *host_ptr++ = *url_ptr++;
+    }
+
+    // "www.baidu.com"
+    if(*url_ptr == '\0')   // No port and uri
+    {
+        if(*is_ssl)
+        {
+            *port = MBTK_HTTPS_PORT_DEF;
+        }
+        else
+        {
+            *port = MBTK_HTTP_PORT_DEF;
+        }
+        memcpy(uri,"/",1);
+
+        RLOGD("HTTP parse success:'%s','%s', %d, %d",(char*)host,(char*)uri,*port,*is_ssl);
+        return 0;
+    }
+    else
+    {
+        //LOGI("Host end with:%x",*url_ptr);
+        if(*url_ptr == ':')   // Port exist.
+        {
+            *port = atoi(url_ptr + 1);
+
+            // Point to '/' or NULL
+            while(*url_ptr && *url_ptr != '/')
+            {
+                url_ptr++;
+            }
+
+            // "www.baidu.com:80"
+            if(*url_ptr == '\0')   // No uri
+            {
+                if(*port == 0)
+                {
+                    if(*is_ssl)
+                    {
+                        *port = MBTK_HTTPS_PORT_DEF;
+                    }
+                    else
+                    {
+                        *port = MBTK_HTTP_PORT_DEF;
+                    }
+                }
+                memcpy(uri,"/",1);
+
+                RLOGD("HTTP parse success:'%s','%s', %d, %d",(char*)host,(char*)uri,*port,*is_ssl);
+                return 0;
+            }
+        }
+
+        // "www.baidu.com/xxx" or "www.baidu.com:80/xxx"
+        // Now,url_ptr point to '/'
+        if(*url_ptr != '/')
+        {
+            RLOGD("URI must start with '/'.");
+            return -1;
+        }
+
+        //LOGI("URL3[%d]:%s",strlen(url_ptr),url_ptr);
+
+        memcpy(uri,url_ptr,strlen(url_ptr));
+
+        if(*port == 0)
+        {
+            if(*is_ssl)
+            {
+                *port = MBTK_HTTPS_PORT_DEF;
+            }
+            else
+            {
+                *port = MBTK_HTTP_PORT_DEF;
+            }
+        }
+
+        RLOGD("HTTP parse success:'%s','%s', %d, %d",(char*)host,(char*)uri,*port,*is_ssl);
+        return 0;
+    }
+}
+
+static int http_session_req_head_add(mbtk_http_session_t *session,bool replace,
+                                     char *name, char *value)
+{
+    if(session == NULL || value == NULL)
+        return -1;
+
+    RLOGD("Add request header - %s:%s",name,value);
+
+    int i = 0;
+    while(i < HTTP_REQUEST_HEADER_MAX)
+    {
+        if(session->req.req_h[i]
+           && !strncasecmp(session->req.req_h[i]->name,name,strlen(name)))   // Is change value
+        {
+            break;
+        }
+        i++;
+    }
+
+    if(i == HTTP_REQUEST_HEADER_MAX)   // Should add new header.
+    {
+        i = 0;
+        while(i < HTTP_REQUEST_HEADER_MAX)
+        {
+            if(session->req.req_h[i] == NULL)   // Find NULL request.
+            {
+                session->req.req_h[i] = (mbtk_http_header_t*)malloc(sizeof(mbtk_http_header_t));
+                if(session->req.req_h[i] == NULL)
+                {
+                    RLOGD("malloc() fail.");
+                    return -1;
+                }
+
+                memset(session->req.req_h[i],0x0,sizeof(mbtk_http_header_t));
+                memcpy(session->req.req_h[i]->name, name, strlen(name));
+                session->req.req_h[i]->value = NULL;
+                session->req.header_cnt++;
+                break;
+            }
+            i++;
+        }
+    }
+    else     // Is change value
+    {
+        if(!replace)
+        {
+            RLOGD("Found this header[%s],no replace.",name);
+            return 0;
+        }
+    }
+
+    if(i == HTTP_REQUEST_HEADER_MAX)
+    {
+        RLOGD("Request header is full.");
+        return -1;
+    }
+
+    if(session->req.req_h[i]->value)
+    {
+        free(session->req.req_h[i]->value);
+    }
+    session->req.req_h[i]->value = (char*)malloc(strlen(value) + 1);
+    if(session->req.req_h[i]->value == NULL)
+    {
+        RLOGD("malloc() fail.");
+        return -1;
+    }
+    memset(session->req.req_h[i]->value,0x0,strlen(value) + 1);
+    memcpy(session->req.req_h[i]->value,value,strlen(value));
+
+    return 0;
+}
+
+#if 0
+static int http_session_rsp_head_add(mbtk_http_session_t *session,
+                                     char *name, char *value)
+{
+    if(session == NULL || value == NULL)
+        return -1;
+
+    int i = 0;
+    while(i < HTTP_REQUEST_HEADER_MAX)
+    {
+        if(session->rsp.rsp_h[i] == NULL)   // Find NULL request.
+        {
+            session->rsp.rsp_h[i] = (mbtk_http_header_t*)malloc(sizeof(mbtk_http_header_t));
+            if(session->rsp.rsp_h[i] == NULL)
+            {
+                RLOGD("malloc() fail.");
+                return -1;
+            }
+
+            memcpy(session->rsp.rsp_h[i]->name,name,strlen(name));
+            session->rsp.rsp_h[i]->value = (char*)malloc(strlen(value) + 1);
+            if(session->rsp.rsp_h[i]->value == NULL)
+            {
+                RLOGD("malloc() fail.");
+                return -1;
+            }
+            memset(session->rsp.rsp_h[i]->value,0x0,strlen(value) + 1);
+            memcpy(session->rsp.rsp_h[i]->value,value,strlen(value));
+
+            session->rsp.header_cnt++;
+            return 0;
+        }
+        i++;
+    }
+
+    return -1;
+}
+#endif
+
+static char* http_option_str_get(mbtk_http_option_enum option)
+{
+    switch(option)
+    {
+        case HTTP_OPTION_HEAD:
+            return "HEAD";
+        case HTTP_OPTION_GET:
+            return "GET";
+        case HTTP_OPTION_POST:
+            return "POST";
+        case HTTP_OPTION_PUT:
+            return "PUT";
+        case HTTP_OPTION_DELETE:
+            return "DELETE";
+        case HTTP_OPTION_OPTIONS:
+            return "OPTIONS";
+        case HTTP_OPTION_TRACE:
+            return "TRACE";
+        case HTTP_OPTION_CONNECT:
+            return "CONNECT";
+        case HTTP_OPTION_LINK:
+            return "LINK";
+        case HTTP_OPTION_UNLINK:
+            return "UNLINK";
+        default:
+            return "";
+    }
+}
+
+static char* http_version_str_get(mbtk_http_version_enum version)
+{
+    switch(version)
+    {
+        case HTTP_VERSION_1_0:
+            return "1.0";
+        case HTTP_VERSION_1_1:
+            return "1.1";
+        case HTTP_VERSION_2:
+            return "2";
+        case HTTP_VERSION_3:
+            return "3";
+        default:
+            return "";
+    }
+}
+
+static char* http_header_find(mbtk_http_session_t *session,char* name)
+{
+    int i = 0;
+    while(i < HTTP_REQUEST_HEADER_MAX)
+    {
+        if(session->req.req_h[i] &&
+           !strncasecmp(session->req.req_h[i]->name,name,strlen(name)))
+        {
+            return session->req.req_h[i]->value;
+        }
+
+        i++;
+    }
+    return NULL;
+}
+
+static int http_header_str_get(mbtk_http_header_t *header,char *header_str,int header_str_len)
+{
+    if(header == NULL || header->value == NULL
+       || header_str == NULL)
+        return 0;
+
+    int len = 0;
+    len = snprintf(header_str,header_str_len,"%s: %s\r\n",
+                   header->name, header->value);
+
+    return len;
+}
+
+static mbtk_http_version_enum http_version_get_by_str(char *version_str)
+{
+    if(!memcmp(version_str,"1.0",3))
+        return HTTP_VERSION_1_0;
+    else if(!memcmp(version_str,"1.1",3))
+        return HTTP_VERSION_1_1;
+    else if(!memcmp(version_str,"2",1))
+        return HTTP_VERSION_2;
+    else if(!memcmp(version_str,"3",1))
+        return HTTP_VERSION_3;
+    else
+        return HTTP_VERSION_1_1;
+}
+
+static int http_header_read(mbtk_http_session_t *session)
+{
+#define BUFFER_SIZE 2048
+    char line[BUFFER_SIZE];
+    char *ptr = NULL;
+    int len = 0;
+    while((len = mbtk_http_read_line(session->sock_fd,line,BUFFER_SIZE)) > 0)
+    {
+        if(!memcmp(line,"\r\n",2))
+        {
+            RLOGD("Read empty line.");
+            break;
+        }
+
+        // Delete "\r\n"
+        ptr = line + len - 1; // Point to last char.
+        while(http_is_space_char(*ptr))
+        {
+            *ptr = '\0';
+            len--;
+            ptr--;
+        }
+
+        RLOGD("LINE:%s",line);
+
+        if(http_handles[session->handle_id].show_rsp_header &&
+           http_handles[session->handle_id].data_cb)
+        {
+            http_handles[session->handle_id].data_cb(session->id,
+                    MBTK_HTTP_DATA_HEADER,line,len);
+        }
+
+        if(!memcmp(line,"HTTP/",5))   // "HTTP/1.1 200 OK"
+        {
+            session->rsp.state_code = atoi(line + 9);
+            session->rsp.version = http_version_get_by_str(line + 5);
+        }
+        else     // Is response header item.
+        {
+            if(!strncasecmp(line,"Content-Length",14))
+            {
+                ptr = line + 14;
+                while(ptr && !isdigit(*ptr))
+                {
+                    ptr++;
+                }
+
+                if(ptr)
+                {
+                    session->rsp.content_length = atol(ptr);
+                }
+            }
+            else if(!strncasecmp(line,"Transfer-Encoding",17))
+            {
+                ptr = line + 17;
+                while(ptr && !isalpha(*ptr))
+                {
+                    ptr++;
+                }
+
+                if(ptr && !memcmp(ptr,"chunked",7))
+                {
+                    session->rsp.is_chunked = TRUE;
+                }
+            }
+        }
+    }
+#undef BUFFER_SIZE
+
+    RLOGD("RSP:HTTP/%s %d, is_chunked:%d,Content-Length:%d",http_version_str_get(session->rsp.version),
+         session->rsp.state_code,session->rsp.is_chunked,session->rsp.content_length);
+
+    return 0;
+}
+
+static int http_session_start_write(mbtk_http_session_t *session)
+{
+    RLOGD("Start HTTP write.");
+
+#define BUFFER_SIZE 1024
+    session->state = HTTP_SESSION_STATE_WRITE_HEADER;
+    char buff[BUFFER_SIZE];
+    int len = 0;
+    int index = 0;
+    len += snprintf(buff + len,BUFFER_SIZE - len,"%s %s HTTP/%s\r\n",
+                    http_option_str_get(session->option),
+                    session->uri,
+                    http_version_str_get(session->version));
+
+    // if no set "Host",should set default host.
+    char *host = http_header_find(session,"Host");
+    if(!host)
+    {
+        len += snprintf(buff + len,BUFFER_SIZE - len,"Host: %s\r\n", session->host);
+    }
+
+    if(mbtk_http_write(session->sock_fd,buff,len) != len)
+    {
+        RLOGD("mbtk_http_write() fail.");
+        return -1;
+    }
+
+    char header_str[BUFFER_SIZE];
+    int header_str_len = 0;
+    while(index < HTTP_REQUEST_HEADER_MAX)
+    {
+        if(session->req.req_h[index] &&
+           (header_str_len = http_header_str_get(session->req.req_h[index], header_str, BUFFER_SIZE)) > 0)
+        {
+            if(mbtk_http_write(session->sock_fd,header_str,header_str_len) != header_str_len)
+            {
+                RLOGD("mbtk_http_write() fail.");
+                return -1;
+            }
+        }
+        index++;
+    }
+
+    // Write request header success.
+    RLOGD("HTTP write header complete.");
+
+#undef BUFFER_SIZE
+
+    // Write "\r\n"
+    if(mbtk_http_write(session->sock_fd,"\r\n",2) != 2)
+    {
+        RLOGD("mbtk_http_write() fail.");
+        return -1;
+    }
+
+    RLOGD("Start write HTTPsession->option. %d", session->option);
+    if(session->option == HTTP_OPTION_POST)
+    {
+        session->state = HTTP_SESSION_STATE_WRITE_CONTENT;
+        RLOGD("Start write HTTP content data.");
+
+        if(session->req.content && session->req.content_len > 0)
+        {
+            if(mbtk_http_write(session->sock_fd,session->req.content,session->req.content_len) != session->req.content_len)
+            {
+                RLOGD("mbtk_http_write() fail.");
+                return -1;
+            }
+
+            session->state = HTTP_SESSION_STATE_WRITE_END;
+        }
+    }
+    else
+    {
+        session->state = HTTP_SESSION_STATE_WRITE_END;
+
+        RLOGD("HTTP write complete.");
+    }
+    return 0;
+}
+
+/*static int http_session_read_by_chunk(mbtk_http_session_t *session)
+{
+#undef BUFFER_SIZE
+#define BUFFER_SIZE 2048
+    http_chunk_code chunk_code;
+    http_chunker_t chunker;
+    char read_buf[BUFFER_SIZE + 1];
+    int read_len = 0;
+    char chunk_buf[BUFFER_SIZE + 1];
+    int chunk_len;
+    http_chunk_init(&chunker);
+    while(TRUE)
+    {
+        read_len = mbtk_http_read(session->sock_fd,read_buf,BUFFER_SIZE,3000);
+        //read_len = mbtk_http_read_line(session->sock_file,read_buf,BUFFER_SIZE);
+        if(read_len <= 0)
+        {
+            RLOGD("Read fail.");
+            return -1;
+        }
+
+        chunk_code = http_chunk_parse(&chunker, read_buf, read_len, chunk_buf, &chunk_len);
+        if(chunk_code > CHUNKE_OK)   // Fail.
+        {
+            RLOGD("http_chunk_parse() fail[err - %d].",chunk_code);
+            return -1;
+        }
+
+        RLOGD("Read chunk_len:%d",chunk_len);
+        chunk_buf[chunk_len] = '\0';
+
+        if(http_handles[session->handle_id].data_cb)
+            http_handles[session->handle_id].data_cb(session->id,
+                    MBTK_HTTP_DATA_CONTENT,chunk_buf,chunk_len);
+
+        if(CHUNKE_STOP == chunk_code)
+        {
+            if(http_handles[session->handle_id].data_cb)
+                http_handles[session->handle_id].data_cb(session->id,
+                        MBTK_HTTP_DATA_COMPLETE,NULL,0);
+
+            break;
+        }
+    }
+
+    RLOGD("Chunk read success.");
+
+    return 0;
+}*/
+
+static int http_session_read_by_length(mbtk_http_session_t *session)
+{
+#undef BUFFER_SIZE
+#define BUFFER_SIZE 2048
+    char read_buf[BUFFER_SIZE + 1];
+    int read_len = 0;
+    int64 read_count = 0;
+    while(TRUE)
+    {
+        memset(read_buf,0x0,BUFFER_SIZE + 1);
+        read_len = mbtk_http_read(session->sock_fd,read_buf,BUFFER_SIZE,3000);
+        if(read_len <= 0)
+        {
+            RLOGD("Read fail.");
+            return -1;
+        }
+
+        if(read_count + read_len >= session->rsp.content_length)   // Read data complete.
+        {
+            if(http_handles[session->handle_id].data_cb)
+            {
+                http_handles[session->handle_id].data_cb(session->id,
+                        MBTK_HTTP_DATA_CONTENT,read_buf,session->rsp.content_length - read_count);
+
+                http_handles[session->handle_id].data_cb(session->id,
+                        MBTK_HTTP_DATA_COMPLETE,NULL,0);
+            }
+            break;
+        }
+
+        if(http_handles[session->handle_id].data_cb)
+            http_handles[session->handle_id].data_cb(session->id,
+                    MBTK_HTTP_DATA_CONTENT,read_buf,read_len);
+
+        read_count += read_len;
+    }
+
+    return 0;
+}
+
+static int http_session_read_by_general(mbtk_http_session_t *session)
+{
+#undef BUFFER_SIZE
+#define BUFFER_SIZE 2048
+    char read_buf[BUFFER_SIZE + 1];
+    int read_len = 0;
+    while(TRUE)
+    {
+        read_len = mbtk_http_read(session->sock_fd,read_buf,BUFFER_SIZE,1000);
+        if(read_len <= 0)
+        {
+            if(read_len == -2 || read_len == 0) // Timeout or end
+                break;
+
+            RLOGD("Read end[read_len - %d].",read_len);
+            //return -1;
+            break;
+        }
+
+        read_buf[read_len] = '\0';
+
+        if(http_handles[session->handle_id].data_cb)
+            http_handles[session->handle_id].data_cb(session->id,
+                    MBTK_HTTP_DATA_CONTENT,read_buf,read_len);
+    }
+
+    if(http_handles[session->handle_id].data_cb)
+        http_handles[session->handle_id].data_cb(session->id,
+                MBTK_HTTP_DATA_COMPLETE,NULL,0);
+
+    return 0;
+}
+
+static int http_session_start_read(mbtk_http_session_t *session)
+{
+    RLOGD("Start HTTP read.");
+    int result = 0;
+//    usleep(500000);
+    session->state = HTTP_SESSION_STATE_READ_HEADER;
+    if(http_header_read(session))
+    {
+        result = -1;
+        goto read_end;
+    }
+
+    if(session->option != HTTP_OPTION_HEAD)
+    {
+        session->state = HTTP_SESSION_STATE_READ_CONTENT;
+        /*if(session->rsp.is_chunked)
+        {
+            if(http_session_read_by_chunk(session))
+            {
+                result = -1;
+                goto read_end;
+            }
+        }*/
+        if(session->rsp.content_length > 0)
+        {
+            if(http_session_read_by_length(session))
+            {
+                result = -1;
+                goto read_end;
+            }
+        }
+        else
+        {
+            if(http_session_read_by_general(session))
+            {
+                result = -1;
+                goto read_end;
+            }
+        }
+    }
+    else
+    {
+        if(http_handles[session->handle_id].data_cb)
+            http_handles[session->handle_id].data_cb(session->id,
+                    MBTK_HTTP_DATA_COMPLETE,NULL,0);
+    }
+
+read_end:
+    session->state = HTTP_SESSION_STATE_READ_END;
+
+    RLOGD("HTTP request complete[result - %d].",result);
+    if(http_session_close(session))
+    {
+        return -1;
+    }
+
+#if 0
+    // Free session after HTTP request complete.
+    http_session_free(session);
+    http_handles[handle_id].session[session_id] = NULL;
+    http_handles[handle_id].session_cnt--;
+#endif
+
+    return result;
+}
+
+static bool http_session_req_check(mbtk_http_session_t *session)
+{
+    if(session == NULL || session->port == 0 ||
+       strlen(session->host) == 0)
+    {
+        RLOGD("Session not set host or port.");
+        return FALSE;
+    }
+
+    if(session->option != HTTP_OPTION_HEAD &&
+       session->option != HTTP_OPTION_POST &&
+       session->option != HTTP_OPTION_GET)
+    {
+        RLOGD("Only support HEAD/GET/POST");
+        return FALSE;
+    }
+
+#if 0
+    if(session->version != HTTP_VERSION_1_0 &&
+       session->version != HTTP_VERSION_1_1)
+    {
+        RLOGD("Only support HTTP 1.0/1.1");
+        return FALSE;
+    }
+#endif
+
+    if(session->option == HTTP_OPTION_POST)
+    {
+        char *value = NULL;
+        value = http_header_find(session, "Content-Length");
+        if(!value)
+        {
+            RLOGD("POST must set 'Content-Length'");
+            return FALSE;
+        }
+        if(session->req.content_len != atoi(value))
+        {
+            RLOGD("POST 'Content-Length' error.");
+            return FALSE;
+        }
+
+        value = http_header_find(session, "Content-Type");
+        if(!value)
+        {
+            RLOGD("POST must set 'Content-Type'");
+            return FALSE;
+        }
+    }
+
+    return TRUE;
+}
+
+
+/*************************************************************
+    Public Function Definitions
+*************************************************************/
+int mbtk_http_handle_get(bool show_rsp_header,mbtk_http_data_callback_func data_cb)
+{
+    int index = 0;
+    int i = 0;
+    for(; index < HTTP_HANDLE_MAX; index++)
+    {
+        if(http_handles[index].id < 0)   // Find free handle
+        {
+            break;
+        }
+    }
+
+    if(index == HTTP_HANDLE_MAX)
+    {
+        RLOGD("HTTP Handle is full.");
+        return -1;
+    }
+
+    memset(&(http_handles[index]),0x0,sizeof(mbtk_http_handle_t));
+    http_handles[index].id = index;
+    http_handles[index].show_rsp_header = show_rsp_header;
+    http_handles[index].data_cb = data_cb;
+    http_handles[index].session_cnt = 0;
+    for(i = 0; i < HTTP_SESSION_MAX; i++)
+    {
+        http_handles[index].session[i] = NULL;
+    }
+
+    if(mbtk_http_init())
+    {
+        RLOGD("mbtk_http_init() fail.");
+        return -1;
+    }
+
+    return http_handles[index].id;
+}
+
+int mbtk_http_handle_free(int handle_id)
+{
+    int i = 0;
+    if(!http_handle_check(handle_id))
+    {
+        RLOGD("Handle error.");
+        return -1;
+    }
+
+    http_handles[handle_id].id = -1;
+    http_handles[handle_id].data_cb = NULL;
+    if(http_handles[handle_id].session_cnt > 0)
+    {
+        for(i = 0; i < HTTP_SESSION_MAX; i++)
+        {
+            if(http_handles[handle_id].session[i] != NULL)
+            {
+                if(http_handles[handle_id].session[i]->state != HTTP_SESSION_STATE_NON)
+                {
+                    if(http_session_close(http_handles[handle_id].session[i]))
+                    {
+                        return -1;
+                    }
+                }
+
+                http_session_free(http_handles[handle_id].session[i]);
+                http_handles[handle_id].session[i] = NULL;
+            }
+        }
+
+        http_handles[handle_id].session_cnt = 0;
+    }
+
+    if(mbtk_http_deinit())
+    {
+        RLOGD("mbtk_http_deinit() fail.");
+        return -1;
+    }
+
+    return 0;
+}
+
+int mbtk_http_session_create(int handle_id, mbtk_http_option_enum option,
+                             mbtk_http_version_enum version)
+{
+    int handle_index = 0;
+    int session_index = 0;
+    if(!http_handle_check(handle_id))
+    {
+        RLOGD("Handle error.");
+        return -1;
+    }
+
+    for(; handle_index < HTTP_HANDLE_MAX; handle_index++)
+    {
+        if(http_handles[handle_index].id == handle_id)   // Find handle
+        {
+            break;
+        }
+    }
+
+    if(handle_index == HTTP_HANDLE_MAX)
+    {
+        RLOGD("No found handle[handle - %d].",handle_id);
+        return -1;
+    }
+
+    if(http_handles[handle_index].session_cnt >= HTTP_SESSION_MAX)
+    {
+        RLOGD("Session is full.");
+        return -1;
+    }
+
+    for(; session_index < HTTP_SESSION_MAX; session_index++)
+    {
+        if(http_handles[handle_index].session[session_index] == NULL)   // Find first NULL session
+        {
+            break;
+        }
+    }
+
+    if(session_index == HTTP_SESSION_MAX)
+    {
+        RLOGD("Session is full.");
+        return -1;
+    }
+
+    mbtk_http_session_t* session = (mbtk_http_session_t*)malloc(sizeof(mbtk_http_session_t));
+    if(session == NULL)
+    {
+        RLOGD("malloc() fail.");
+        return -1;
+    }
+    memset(session,0x0,sizeof(mbtk_http_session_t));
+    session->sock_fd = -1;
+    session->sock_file = NULL;
+    session->handle_id = handle_id;
+    session->id = session_index;
+    session->state = HTTP_SESSION_STATE_NON;
+    session->is_ssl = FALSE;
+    session->version = version;
+    session->option = option;
+    session->req.content_len = 0;
+    session->req.content_len_send = 0;
+    session->rsp.is_chunked = FALSE;
+    session->rsp.content_length = 0;
+    session->rsp.header_cnt = 0;
+    http_handles[handle_index].session[session_index] = session;
+    http_handles[handle_index].session_cnt++;
+
+    return session->id;
+}
+
+int mbtk_http_session_option_reset(int handle_id, int session_id, mbtk_http_option_enum option)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return -1;
+    }
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state != HTTP_SESSION_STATE_NON)
+    {
+        RLOGD("Session state error.[%d]",session->state);
+        return -1;
+    }
+
+    session->option = option;
+    return 0;
+}
+
+int mbtk_http_session_free(int handle_id,int session_id)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return -1;
+    }
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state != HTTP_SESSION_STATE_NON)
+    {
+        if(http_session_close(session))
+        {
+            return -1;
+        }
+    }
+
+    http_session_free(session);
+    http_handles[handle_id].session[session_id] = NULL;
+    http_handles[handle_id].session_cnt--;
+    return 0;
+}
+
+int mbtk_http_session_url_set(int handle_id,int session_id,void *url)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return -1;
+    }
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state == HTTP_SESSION_STATE_NON)
+        return http_url_parse(url, session->host,session->uri,&(session->port),&(session->is_ssl));
+    else
+    {
+        RLOGD("Currenr session is process[state - %d].",session->state);
+        return -1;
+    }
+}
+
+int mbtk_http_session_head_add(int handle_id,int session_id,
+                               char *name, char *value)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return -1;
+    }
+
+    if(http_str_empty(name) || http_str_empty(value))
+    {
+        RLOGD("Param error.");
+        return -1;
+    }
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state == HTTP_SESSION_STATE_NON)
+    {
+        int result = http_session_req_head_add(session,TRUE,name,value);
+        if(!result && !strncasecmp(name,"Content-Length",14))
+        {
+            session->req.content_len = atoi(value);
+        }
+        return result;
+    }
+    else
+    {
+        RLOGD("Currenr session is process[state - %d].",session->state);
+        return -1;
+    }
+}
+
+int mbtk_http_session_content_set(int handle_id,int session_id,
+                                  char *content,uint32 content_len)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return -1;
+    }
+
+    if(content_len <= 0 || content_len > HTTP_CONTENT_LEN_MAX)
+    {
+        RLOGD("Content lenght error[%d].",content_len);
+        return -1;
+    }
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state == HTTP_SESSION_STATE_NON)
+    {
+        if(session->option != HTTP_OPTION_POST)
+        {
+            RLOGD("Content only for post.");
+            return -1;
+        }
+
+        if(session->req.content)
+        {
+            free(session->req.content);
+            session->req.content_len = 0;
+        }
+
+        session->req.content = (char*)malloc(content_len);
+        if(session->req.content == NULL)
+        {
+            RLOGD("malloc() fail.");
+            return -1;
+        }
+
+        char *content_type = NULL;
+        if(strlen(content) == content_len)   //
+        {
+            content_type = "text/plain";
+        }
+        else
+        {
+            content_type = "application/octet-stream";
+        }
+
+        if(http_session_req_head_add(session, FALSE, "Content-Type", content_type))
+        {
+            RLOGD("Set 'Content-Type' fail.");
+            return -1;
+        }
+
+        memcpy(session->req.content,content,content_len);
+        session->req.content_len = content_len;
+
+        char len_str[20] = {0};
+        snprintf(len_str,20,"%d",content_len);
+        if(http_session_req_head_add(session,FALSE,"Content-Length",len_str))
+        {
+            RLOGD("Set 'Content-Length' fail.");
+            return -1;
+        }
+
+
+        return 0;
+    }
+    else
+    {
+        RLOGD("Currenr session is process[state - %d].",session->state);
+        return -1;
+    }
+}
+
+int mbtk_http_session_start(int handle_id,int session_id)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        printf("Session error.");
+        return -1;
+    }
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state == HTTP_SESSION_STATE_NON)
+    {
+        if(!http_session_req_check(session))
+        {
+            printf("http_session_req_check() fail.");
+            return -1;
+        }
+
+        // Must set "Connection" for post.
+        if(session->option == HTTP_OPTION_POST)
+        {
+            if(http_session_req_head_add(session,FALSE,"Connection","KeepAlive"))
+            {
+                printf("Set 'Content-Length' fail.");
+                return -1;
+            }
+        }
+
+        printf("HTTP request start.\n");
+        printf("host:%s\n, port:%d\n, uri:%s\n",session->host,session->port,session->uri);
+        printf("is_ssl:%d\n, version:%d\n, option:%d\n, content_len:%d\n",session->is_ssl,
+             session->version,session->option,session->req.content_len);
+
+        int sock_fd = mbtk_http_open(session->host,&(session->port));//session->is_ssl,TRUE,
+        if(sock_fd < 0)
+        {
+            printf("open fail\n");
+            return -1;
+        }
+        session->sock_fd = sock_fd;
+//        int fd = mbtk_sock_fd_get(sock_fd);
+//        if(fd < 0) {
+//            LOGE("mbtk_sock_fd_get() fail.");
+//            return -1;
+//        }
+        // session->sock_file = fdopen(sock_fd,"r");
+        session->state = HTTP_SESSION_STATE_CONN;
+
+//        if(!session->sock_file) {
+//            LOGE("fdopen() fail.");
+//            return -1;
+//        }
+
+        printf("HTTP connected.");
+
+        if(http_session_start_write(session))
+        {
+            return -1;
+        }
+
+        if(session->state == HTTP_SESSION_STATE_WRITE_END)
+        {
+            if(http_session_start_read(session))
+            {
+                return -1;
+            }
+        }
+        else
+        {
+            printf("Waitting post content data...");
+        }
+
+        return 0;
+    }
+    else
+    {
+        printf("Currenr session is process[state - %d].",session->state);
+        return -1;
+    }
+}
+
+int mbtk_http_session_content_send(int handle_id,int session_id,
+                                   char *data,int data_len)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return -1;
+    }
+
+    if(data_len <= 0 || data_len > HTTP_CONTENT_LEN_MAX)
+    {
+        RLOGD("Content lenght error[%d].",data_len);
+        return -1;
+    }
+
+    RLOGD("Post send:%d - %s",data_len,data);
+
+    mbtk_http_session_t *session = http_handles[handle_id].session[session_id];
+    if(session->state == HTTP_SESSION_STATE_WRITE_CONTENT)
+    {
+        if(session->option != HTTP_OPTION_POST)
+        {
+            RLOGD("Content only for post.");
+            return -1;
+        }
+
+        if(session->req.content || session->req.content_len <= 0)
+        {
+            RLOGD("This post not spit package.");
+            return -1;
+        }
+
+        // Discard excess data.
+        if(session->req.content_len_send + data_len > session->req.content_len)
+            data_len = session->req.content_len - session->req.content_len_send;
+
+        if(data_len != mbtk_http_write(session->sock_fd,data,data_len))
+        {
+            return -1;
+        }
+
+        session->req.content_len_send += data_len;
+
+        RLOGD("HTTP post data send: %d / %d",session->req.content_len_send,
+             session->req.content_len);
+
+        // Post data send complete.
+        if(session->req.content_len_send >= session->req.content_len)
+        {
+            session->state = HTTP_SESSION_STATE_WRITE_END;
+
+            RLOGD("HTTP write complete.");
+            if(http_session_start_read(session))
+            {
+                return -1;
+            }
+        }
+
+        return 0;
+    }
+    else
+    {
+        RLOGD("Currenr session state error[%d].",session->state);
+        return -1;
+    }
+}
+
+const mbtk_http_session_t* mbtk_http_session_get(int handle_id,int session_id)
+{
+    if(!http_session_check(handle_id,session_id))
+    {
+        RLOGD("Session error.");
+        return NULL;
+    }
+
+    return http_handles[handle_id].session[session_id];
+}
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_http_base.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_http_base.cpp
new file mode 100755
index 0000000..607a199
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-gnss/src/mbtk_http_base.cpp
@@ -0,0 +1,240 @@
+#include <sys/epoll.h>
+#include <string.h>
+#include <log/log.h>
+#include <liblog/lynq_deflog.h>
+//#include "mbtk_log.h"
+#include "mbtk_http_base.h"
+#include "mbtk_http.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+static bool http_sock_inited = FALSE;
+static int http_handle = -1;
+static int http_fd = -1;
+//static void http_sock_cb_func(int handle, int fd, int event);
+
+/*static mbtk_init_info =
+{
+    MBTK_NET_LINUX,
+    NULL,
+    http_sock_cb_func
+} http_init_info;*/
+
+
+
+/*static void http_sock_cb_func(int handle, int fd, int event)
+{
+    if(http_handle == handle && http_fd == fd) {
+        if(event & EPOLLIN) { // READ
+
+        } else if(event & EPOLLRDHUP) { // Close
+
+        } else {
+            RLOGD("Unknown event:%x",event);
+        }
+    }
+}*/
+
+int mbtk_sock_open()
+{
+
+    return 0;
+}
+
+int mbtk_http_init()
+{
+    if(http_sock_inited) {
+        RLOGD("HTTP has inited.");
+        return -1;
+    }
+
+    http_handle = socket(AF_INET,SOCK_STREAM,0);
+    if(http_handle < 0)
+    {
+        RLOGD("mbtk_sock_init() fail.");
+        return -1;
+    }
+
+    http_sock_inited = TRUE;
+    return 0;
+}
+
+int mbtk_http_deinit()
+{
+    if(!http_sock_inited) {
+        RLOGD("HTTP not inited.");
+        return -1;
+    }
+
+    close(http_handle);
+    http_handle = -1;
+    http_sock_inited = FALSE;
+    return 0;
+}
+
+
+int mbtk_http_open
+(
+    const void *host,
+    int *port
+)
+{
+    struct addrinfo server;
+    struct addrinfo* serverInfo;
+    int ret;
+
+    server.ai_family = AF_INET;
+    server.ai_socktype = SOCK_STREAM;
+    server.ai_protocol = IPPROTO_TCP;
+    server.ai_flags = AI_PASSIVE;
+    char portStr[6];
+    snprintf(portStr, sizeof(portStr), "%d", *port);
+    memset(&server, 0, sizeof(server));
+    ret = getaddrinfo(host, portStr, &server, &serverInfo);
+    if (ret != 0)
+    {
+        printf("ret = %s\n",gai_strerror(ret));
+        printf("getaddrinfo error: \n");
+        return -1;
+    }
+    ret = connect(http_handle, serverInfo->ai_addr, serverInfo->ai_addrlen);
+    if(ret < 0)
+    {
+        printf("connect fail http_handle:%d\n",http_handle);
+        close(http_handle);
+        freeaddrinfo(serverInfo);
+        return -1;
+    }
+    printf("http_handle: %d\n",http_handle);
+    return http_handle;
+}
+
+/*=============================================
+FUNCTION
+    mbtk_http_read
+
+DESCRIPTION
+    read content from socket.
+
+DEPENDENCIES
+    None
+
+PARAMETERS
+    *buf      Store read content.
+    len       the length of Content.
+    timeout   Set timeout
+
+RETURN VALUE
+    Length of read content
+
+SIDE EFFECTS
+    None
+=============================================*/
+int mbtk_http_read
+(
+    int sock_fd,
+    void *buf,
+    uint16_t len,
+    int timeout_ms
+)
+{
+    sleep(timeout_ms / 1000);
+    int read_len = recv(sock_fd, buf, len, 0);
+    if(read_len < 0)
+    {
+            return -1;
+    }
+    else
+    {
+        return read_len;
+    }
+}
+
+
+int mbtk_http_read_line
+(
+    int sock_fd,
+    void *buf,
+    uint16_t len
+)
+{
+    if(sock_fd > 0) {
+        char *buf_ptr = (char*)buf;
+        char read_buf[1];
+        int read_len = 0;
+        while(TRUE) {
+            if(recv(sock_fd, read_buf, 1, 0) == 1) {
+                *buf_ptr++ = read_buf[0];
+                read_len++;
+
+                if(read_buf[0] == '\n' || read_len >= len) {
+                    return read_len;
+                }
+            } else {
+                return -1;
+            }
+        }
+    }
+
+
+    return -1;
+}
+
+
+/*=============================================
+FUNCTION
+    mbtk_http_write
+
+DESCRIPTION
+    Write content to socket.
+
+DEPENDENCIES
+    None
+
+PARAMETERS
+    *buf    Content to be transferred
+    len     the length of Content.
+
+RETURN VALUE
+    Length of written content
+
+SIDE EFFECTS
+    None
+=============================================*/
+int mbtk_http_write(int sock_fd, void *buf, uint16_t len)
+{
+    RLOGD("Write[%d]:%s",len,(char*)buf);
+    return send(sock_fd, buf, len, 0);
+}
+
+/*=============================================
+FUNCTION
+    mbtk_http_close
+
+DESCRIPTION
+    close HTTP service.
+
+DEPENDENCIES
+    None
+
+PARAMETERS
+    *err    Error number
+
+RETURN VALUE
+    TURE or FALSE
+
+SIDE EFFECTS
+    None
+=============================================*/
+int mbtk_http_close(int sock_fd)
+{
+
+    close(sock_fd);
+    sock_fd = -1;
+    return 0;
+}
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
index b65e428..0e571fa 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
@@ -35,6 +35,35 @@
     E_QSER_NW_ROAM_STATE_TYPE_T   roaming_pref;       /**<   Roaming preference.*/
 }QSER_NW_CONFIG_INFO_T;
 
+/** Configures the OOS (out of service)  settings that define the MCM network interface. */
+#define QSER_NW_OOS_CFG_TYPE_FAST_SCAN          0x00    /**<  fast net scan */
+#define QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN     0x01    /**<  full band scan */
+
+typedef struct 
+{
+    /*    Configuration parameters for MCM network fast network scan when OOS (out of service)*/
+    char                        enable;
+    uint16_t                    time_interval;
+}QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T;
+
+typedef struct 
+{
+    /*    Configuration parameters for MCM network full band network scan when OOS (out of service)*/
+    int t_min;
+    int t_step;
+    int t_num;
+    int t_max;
+}QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T;
+
+
+typedef struct 
+{    
+    char                        type;  /**<   QSER_NW_OOS_CFG_TYPE_xxxx.*/
+    union {
+    QSER_NW_OOS_CONFIG_FAST_SCAN_INFO_T  fast_can_info;       // 00
+    QSER_NW_OOS_CONFIG_FULL_BAND_SCAN_INFO_T full_band_scan_info;     // 01   
+  } u;
+}QSER_NW_OOS_CONFIG_INFO_T;
 
 //defined for QSER_NW_EventRegister
 #define     NW_IND_VOICE_REG_EVENT_IND_FLAG               (1 << 0)    /**< msg format : QSER_NW_VOICE_REG_EVENT_IND_T */
@@ -346,6 +375,18 @@
     QSER_NW_CONFIG_INFO_T     *pt_info 
 );
 
+int qser_nw_set_oos_config
+(
+    nw_client_handle_type       h_nw,
+    QSER_NW_OOS_CONFIG_INFO_T     *pt_info 
+);
+
+int qser_nw_get_oos_config
+(
+    nw_client_handle_type       h_nw,
+    QSER_NW_OOS_CONFIG_INFO_T     *pt_info 
+);
+
 int qser_nw_event_register
 (
     nw_client_handle_type       h_nw,
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
index 0a32515..b1539a7 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
@@ -273,6 +273,101 @@
     return RESULT_OK;
 }
 
+int qser_nw_set_oos_config(    nw_client_handle_type       h_nw,QSER_NW_OOS_CONFIG_INFO_T     *pt_info
+)
+{
+    if(NULL == pt_info)
+     {
+         LYERRLOG("invalid client parameters incoming");
+         return RESULT_ERROR;
+     }
+     
+     if(h_nw != g_ph_hw || h_nw == INVALID_CLIENT_HANDLE)
+     {
+         LYERRLOG("h_nw not right %d %d",h_nw,g_ph_hw);
+         return RESULT_ERROR;
+     }    
+
+     int config_list[MAX_OOS_CFG_ITEM_NUMBER];
+     int valid_num;
+
+     if(pt_info->type==QSER_NW_OOS_CFG_TYPE_FAST_SCAN)
+     {
+         config_list[0]=QSER_NW_OOS_CFG_TYPE_FAST_SCAN;
+         config_list[1]=pt_info->u.fast_can_info.enable;
+         config_list[2]=pt_info->u.fast_can_info.time_interval;
+         return lynq_set_oos_net_scan_cfg(config_list, 3);
+     }
+     else if(pt_info->type==QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN)
+     {
+         config_list[0]=QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN;
+         config_list[1]=pt_info->u.full_band_scan_info.t_min;
+         config_list[2]=pt_info->u.full_band_scan_info.t_step;
+         config_list[3]=pt_info->u.full_band_scan_info.t_num;
+         config_list[4]=pt_info->u.full_band_scan_info.t_max;
+         return lynq_set_oos_net_scan_cfg(config_list, 5);
+     }
+     else
+     {
+        LYERRLOG("invalid client parameters %d incoming", pt_info->type);
+        return RESULT_ERROR;
+     }     
+}
+
+int qser_nw_get_oos_config(    nw_client_handle_type   h_nw, QSER_NW_OOS_CONFIG_INFO_T *pt_info)
+{
+    if(NULL == pt_info)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    
+    if(h_nw != g_ph_hw || h_nw == INVALID_CLIENT_HANDLE)
+    {
+        LYERRLOG("h_nw not right %d %d",h_nw,g_ph_hw);
+        return RESULT_ERROR;
+    }  
+
+    int config_list[MAX_OOS_CFG_ITEM_NUMBER];
+    int valid_num;
+    int ret;
+
+    if(pt_info->type==QSER_NW_OOS_CFG_TYPE_FAST_SCAN)
+    {
+        config_list[0]=QSER_NW_OOS_CFG_TYPE_FAST_SCAN;        
+        ret=lynq_get_oos_net_scan_cfg(config_list, &valid_num);
+        if(ret==RESULT_OK || valid_num > 1)
+        {
+            pt_info->u.fast_can_info.enable=config_list[0];
+            pt_info->u.fast_can_info.time_interval=config_list[1];
+            return RESULT_OK;
+        }
+        LYERRLOG("type %d invalid return value %d %d",pt_info->type,ret,valid_num);
+        return RESULT_ERROR;         
+     }
+     else if(pt_info->type==QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN)
+     {
+         config_list[0]=QSER_NW_OOS_CFG_TYPE_FULL_BAND_SCAN;        
+         ret=lynq_get_oos_net_scan_cfg(config_list, &valid_num);
+         if(ret==RESULT_OK || valid_num > 3)
+         {
+             pt_info->u.full_band_scan_info.t_min=config_list[0];
+             pt_info->u.full_band_scan_info.t_step=config_list[1];            
+             pt_info->u.full_band_scan_info.t_num=config_list[2];
+             pt_info->u.full_band_scan_info.t_max=config_list[3];
+             return RESULT_OK;
+         }
+         LYERRLOG("type %d invalid return value %d %d",pt_info->type,ret,valid_num);
+         return RESULT_ERROR;        
+     }
+     else
+     {
+        LYERRLOG("invalid client parameters %d incoming", pt_info->type);
+        return RESULT_ERROR;
+     }     
+    
+}
+
 /*To Do*/
 int qser_nw_event_register(nw_client_handle_type h_nw,uint32_t bitmask)
 {
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile
index 5e40ec5..d28dbcb 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-sim/makefile
@@ -14,7 +14,7 @@
 
 
 ifeq ($(strip $(TARGET_PLATFORM)), T106)
-LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0 -DMOBILETEK_TARGET_PLATFORM_T106 
 endif
 
 $(warning ################# lynq sim ROOT: $(ROOT),includedir:$(includedir))
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp
index 433764a..a32d152 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-sim/src/lynq_sim.cpp
@@ -788,6 +788,29 @@
     return;
 }
 
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+
+int lynq_reset_modem(void)
+{
+    if(g_lynq_sim_init_flag == 0)
+    {
+        return -1;
+    }
+
+    Parcel p;
+    int res = lynq_send_common_request(&p,RIL_REQUEST_RESET_RADIO,0,1,"");
+
+    if(res != 0)
+    {
+        RLOGD("function %s execute error", __FUNCTION__);
+        return res;
+    }
+
+    return res;
+
+}
+
+#else
 int lynq_reset_modem(void)
 {
     if(g_lynq_sim_init_flag == 0)
@@ -814,7 +837,7 @@
     RLOGD("function %s ret %d",__FUNCTION__, ret);
     return ret;
 }
-
+#endif
 /**
  * @brief                   handle shutdown buf
  * @param  options          type: [IN]My Param doc
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
index 690c0d0..d898f9d 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-systime/lynq_systime.cpp
@@ -364,8 +364,7 @@
     }
     sprintf(buf, "%s.%s.%s=%d", LYNQ_UCI_FILE, LYNQ_SYNC_TIME_SECTION, LYNQ_MODEM_TIME_KEY, enable);
     ret = lynq_uci_set(buf);
-    if (ret == 4)
-        ret = 0;
+
     return ret;
 }
 
@@ -389,8 +388,7 @@
     }
     sprintf(buf, "%s.%s.%s=%d", LYNQ_UCI_FILE, LYNQ_SYNC_TIME_SECTION, LYNQ_GNSS_TIME_KEY, enable);
     ret = lynq_uci_set(buf);
-    if (ret == 4)
-        ret = 0;
+
     return ret;
 }
 
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
index f77fd37..b3eb4bc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/lynq_uci.config
@@ -9,7 +9,7 @@
         option gateway '192.168.11.1'
 
 config  lynq_sync_time_rw  'lynq_sync_time'
-        option lynq_modem_sync_time_enable '0'
+        option lynq_modem_sync_time_enable '1'
         option lynq_gnss_sync_time_enable '0'
 config  lynq_autosuspend  'lynq_autosuspend'
         option auto_enable '0'
@@ -27,3 +27,6 @@
 
 config  rndis_status 'rndis'
         option status '0'
+        
+config  lynq_led_rw  'lynq_led'
+        option lynq_statusled_on '0'
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/src/lynq_uci.c b/cap/zx297520v3/src/lynq/lib/liblynq-uci/src/lynq_uci.c
index b557c08..a50eed1 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/src/lynq_uci.c
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/src/lynq_uci.c
@@ -5,7 +5,6 @@
 #define UCI_SUPPORT 1
 int lynq_del(char *option)
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
     int ret;
     char buf[LYNQ_UCI_MAX_LEN];
@@ -30,7 +29,6 @@
 #if UCI_SUPPORT
 static int uci_get_value(struct uci_option *o, char *out_buf)
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
 	struct uci_element *e;
 	const char *delimiter = " ";
@@ -61,7 +59,6 @@
 #endif //#if UCI_SUPPORT
 int lynq_uci_get(const char *arg, char *out_buf)
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
 	struct uci_context *ctx;
 	struct uci_element *e;
@@ -115,7 +112,6 @@
 
 int lynq_uci_set(const char *arg)
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
 	struct uci_context *ctx;
 	struct uci_element *e;
@@ -173,7 +169,6 @@
 
 int lynq_add_section(char *section_type, char *section)//rita add @2021.7.30 for adding section
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
 	char buf[128] = "";
 	sprintf(buf,"lynq_uci.%s=%s", section, section_type);
@@ -187,7 +182,6 @@
 
 int lynq_set_value(char *section, char *key, char *value)//rita add @2021.7.30 for setting value
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
 	char buf[LYNQ_UCI_MAX_LEN] = "";
 
@@ -202,7 +196,6 @@
 
 int lynq_get_value(char *file, char *section, char *key, char *tmp)//rita add @2021.7.30 for getting value
 {
-    printf("this is lynq uci module,fun:%s,line:%d\n",__FUNCTION__,__LINE__);
     #if UCI_SUPPORT
 	char buf[LYNQ_UCI_MAX_LEN] = "";
 	int ret = 0;
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
index 0862651..a096d09 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
@@ -23,6 +23,8 @@
 #define LYNQ_LIST_SMS LYNQ_SMS + 5
 #define LYNQ_DELETE_SMS LYNQ_SMS + 6
 #define LYNQ_WAIT_SMS LYNQ_SMS + 7
+#define LYNQ_GET_SMSC_ADDRESS LYNQ_SMS + 8
+#define LYNQ_SET_SMSC_ADDRESS  LYNQ_SMS + 9
 
 #define LYNQ_NETWORK LYNQ_BASE + 30
 #define LYNQ_NETWORK_INIT LYNQ_NETWORK + 1
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
index 2151052..7254719 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
@@ -11,6 +11,8 @@
     {"LYNQ_LIST_SMS",list_sms, "list short message", LYNQ_LIST_SMS},
     {"LYNQ_DELETE_SMS",delete_sms, "delete short messsage", LYNQ_DELETE_SMS},
     {"LYNQ_WAIT_SMS",wait_sms, "wait short messsage", LYNQ_WAIT_SMS},
+    {"LYNQ_GET_SMSC_ADDRESS",get_smsc_address, "get smsc address", LYNQ_GET_SMSC_ADDRESS},
+    {"LYNQ_SET_SMSC_ADDRESS",set_smsc_address, "set smsc address", LYNQ_SET_SMSC_ADDRESS},
 //NETWORK
     {"LYNQ_NETWORK_INIT",init_network, "init the network lib", LYNQ_NETWORK_INIT},
     {"LYNQ_NETWORK_DEINIT",deinit_network, "deinit the network lib", LYNQ_NETWORK_DEINIT},
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp
index ab1e4e7..cc1e461 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp
@@ -47,7 +47,8 @@
     char iccid[SIM_BUF] = "";
     ret = lynq_get_iccid(iccid);
     printf("%s%d\n",TEST_RESULT,ret);
-    printf("[%s-%d] ICCID:%d\n", __FUNCTION__, __LINE__, iccid);
+    if(!ret)
+        printf("[%s-%d] ICCID:%s\n", __FUNCTION__, __LINE__, iccid);
 
     return ret;
 }
@@ -189,6 +190,15 @@
     return ret;
 }
 
+int reset_modem(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    char buf[128] = "";
+    int ret = -1;
+    ret = lynq_reset_modem();
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
 
 //qser api
 sim_client_handle_type  ph_sim;
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h
index 93fd530..ce6a254 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h
@@ -17,6 +17,7 @@
 int query_phone_number_test(int argc, char *argv[], int sp_test);
 int deinit_sim(int argc, char *argv[], int sp_test);
 int get_version(int argc, char *argv[], int sp_test);
+int reset_modem(int argc, char *argv[], int sp_test);
 
 //QSER SIM
 int qser_init_sim(int argc, char *argv[], int sp_test);
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp
index 819fd38..c78a285 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp
@@ -82,6 +82,30 @@
     return ret;
 }
 
+int get_smsc_address(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //int handle = atoi(argv[1]);
+    char service_num[22] = "";
+    ret = lynq_get_smsc_address(service_num);
+    printf("%s%d\n",TEST_RESULT,ret);
+    printf("LYNQ_GET_SMSC_ADDRESS: %s\n", service_num);
+    return ret;
+}
+
+int set_smsc_address(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //int handle = atoi(argv[1]);
+    char service_num[22] = "";
+    strncpy(service_num, argv[1], 22);
+    ret = lynq_set_smsc_address(service_num);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
 //QSER API
 sms_client_handle_type  ph_sms;
 int qser_init_sms(int argc, char *argv[], int sp_test)
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h
index 8dcb735..307ff56 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h
@@ -6,7 +6,8 @@
 int list_sms(int argc, char *argv[], int sp_test);
 int delete_sms(int argc, char *argv[], int sp_test);
 int wait_sms(int argc, char *argv[], int sp_test);
-
+int get_smsc_address(int argc, char *argv[], int sp_test);
+int set_smsc_address(int argc, char *argv[], int sp_test);
 //QSER SMS
 int qser_init_sms(int argc, char *argv[], int sp_test);
 int qser_deinit_sms(int argc, char *argv[], int sp_test);
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/lynq_led-demo.c b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/lynq_led-demo.c
new file mode 100755
index 0000000..706aa6f
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/lynq_led-demo.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <strings.h>
+#include<stdlib.h>
+#include <include/lynq_uci.h>
+
+
+
+
+int main(int argc, const char *argv[])
+{
+    int ret = 0;
+    ret = lynq_set_netled_on(1);
+    if(ret){
+        printf("[%s-%d] lynq_set_netled_on error\n", __FUNCTION__, __LINE__);
+        return -1;
+    }
+    ret = lynq_set_statusled_on(1);
+    if(ret){
+        printf("[%s-%d] lynq_set_statusled_on error\n", __FUNCTION__, __LINE__);
+        return -1;
+    }
+    
+    return 0;
+}
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/makefile b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/makefile
new file mode 100755
index 0000000..bfab13c
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-led-demo/makefile
@@ -0,0 +1,48 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -g -Os \
+                -flto \
+                -fpermissive \
+                -fPIC \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+LOCAL_CFLAGS += -DLYNQ_SW_INSIDE_VERSION=\"$(LYNQ_CONFIG_VERSION)\"
+LOCAL_CFLAGS += -DLYNQ_SW_VERSION=\"$(LYNQ_CONFIG_SW_VERSION)\"
+
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+
+
+
+
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lpthread \
+    -llynq-uci \
+	-llynq-led \
+
+SOURCES = $(wildcard *.c)
+
+EXECUTABLE = lynq-led-demo
+
+OBJECTS=$(SOURCES:.c=.o)
+all: $(EXECUTABLE)
+
+$(EXECUTABLE): $(OBJECTS)
+	$(CXX) $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.c
+	$(CC) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+.PHONY: clean
+clean:
+	$(RM) $(OBJECTS) $(EXECUTABLE)
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-pinctrl.dtsi b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-pinctrl.dtsi
index 3da6c4e..f9f558d 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-pinctrl.dtsi
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-pinctrl.dtsi
@@ -346,7 +346,7 @@
 	};
 
 	sc_ext_int10: sc_ext_int10 {
-		pins = "EXT_INT10";
+		pins = "GPIO129";   /*jb.qi add for EXT_INIT10 success*/
 		function = "EXT_INT10";
 		bias-disable;
 	};
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-vehicle_dc_ref.dts b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-vehicle_dc_ref.dts
index f2fef72..da48fcc 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-vehicle_dc_ref.dts
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3-vehicle_dc_ref.dts
@@ -130,14 +130,14 @@
 //	status = "okay";
 };
 &codec_ti3104 {
-//	status = "okay";
+	status = "okay";
 };	
 &zx29_ti3104 {
 	pinctrl-0 = <&i2s0_pins>;
-//	status = "okay";
+	status = "okay";
 };
 &codec_nau8810 {
-	status = "okay";
+//	status = "okay";
 };	
 &zx29_nau8810 {
 	pinctrl-0 = <&i2s0_pins>;
@@ -155,11 +155,11 @@
 //	status = "okay";
 };
 &codec_es8311 {
-	status = "okay";
+//	status = "okay";
 };	
 &zx29_es8311 {
 	pinctrl-0 = <&i2s0_pins>;
-	status = "okay";
+//	status = "okay";
 };
 &gmac {
     port-nums = <1>;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi
index 24faec9..b5d4bc6 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/arch/arm/boot/dts/zx297520v3.dtsi
@@ -488,13 +488,13 @@
 			codec_ti3104: ti3104@18 {         
 				compatible = "ti,tlv320aic3104";
 				reg = <0x18>;		
-				reset-gpios = <&bgpio 122 GPIO_ACTIVE_HIGH>;/*RST*/
+				//reset-gpios = <&bgpio 119 GPIO_ACTIVE_HIGH>;/*RST*/
 				ai3x-micbias-vg = <MICBIAS_2_0V>;
 
-				clocks = <&clkc CLKOUT1_CLK>;
+				clocks = <&clkc CLKOUT2_CLK>;
 				clock-names = "clk_out";			
 				pinctrl-names = "clk_out","reset_gpio122";			
-				pinctrl-0 = <&clk1_func_pins>;
+				pinctrl-0 = <&clk2_func_pins>;
 				pinctrl-1 = <&codec_reset_pins>;
 				status = "disabled";
 			};
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/tlv320aic3x.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/tlv320aic3x.c
index 4f01cbc..09ef085 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/tlv320aic3x.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/tlv320aic3x.c
@@ -1018,6 +1018,15 @@
 	struct aic3x_priv *info = dev_get_drvdata(dev);
 	struct device_node *np = dev->of_node;
 
+        #if 1
+        unsigned tmp;
+        void __iomem 	*reg_base;
+        reg_base = ioremap(0x13B000+0x94 ,4);
+        tmp  = ioread32(reg_base);
+        tmp |= (1<<0)|(1<<2);
+        iowrite32(tmp,reg_base);
+        #endif
+
 	dev_info(dev, "%s:start!\n", __func__);
 
 	if(dev == NULL){
@@ -1059,7 +1068,7 @@
 	
 	clk = of_clk_get_by_name(np, "clk_out");	
 	if (IS_ERR(clk)) {
-		dev_err(dev, "Could not get clk_out\n");
+		dev_err(dev, "Could not get clk_out0\n");
 		ret = PTR_ERR(clk);
 		goto err_put_pinctrl;
 	}			
@@ -1203,7 +1212,7 @@
 		regmap_read(info->regmap, AIC3X_PAGE_SELECT, &pre_page);
 	
 		regmap_write(info->regmap, AIC3X_PAGE_SELECT, 0);
-		for (i = regmin; i < regmax; i++) {
+		for (i = regmin; i <= regmax; i++) {
 	
 			//val = snd_soc_component_read(info->component, i); 	
 			regmap_read(info->regmap, i, &val);
@@ -1260,6 +1269,7 @@
 		if( ret == 0)
 		{
 			dev_info(dev, "reg_read start\n");
+			/*
 			if(param1 > 1){
 				dev_err(dev, "reg_read param invalidate fail,param1=%d \n",param1);
 				return -1;		
@@ -1268,10 +1278,14 @@
 			if(param2 > regmax){
 				dev_err(dev, "reg_read param invalidate fail,param2=%d \n",param2);
 				return -1;		
-			}	
-	
+			}
+		        */
 
-			
+                        if(param1 < 0 || param1 > 109){
+				dev_err(dev, "reg_read param invalidate fail,param1=%d \n",param1);
+				return -1;
+			}
+
 			regmap_read(info->regmap, AIC3X_PAGE_SELECT, &pre_page);
 			
 			regmap_write(info->regmap, AIC3X_PAGE_SELECT, regpage);
@@ -1295,6 +1309,8 @@
 			//u32 offset = param1;
 			//u32 mask = param2;
 			dev_info(dev, "reg_write start\n");  
+
+			/*
 			if(param1 > 1){
 				dev_err(dev, "reg_write param invalidate fail,param1=%d \n",param1);
 				return -1;		
@@ -1303,9 +1319,14 @@
 			if(param2 > regmax){
 				dev_err(dev, "reg_write param invalidate fail,param1=%d \n",param1);
 				return -1;		
-			}	
+			}
+			*/
 
-			
+			if(param1 < 0 || param1 > 109){
+				dev_err(dev, "reg_write param invalidate fail,param1=%d \n",param1);
+				return -1;
+			}
+
 			regmap_read(info->regmap, AIC3X_PAGE_SELECT, &pre_page);
 			
 			regmap_write(info->regmap, AIC3X_PAGE_SELECT, regpage);
@@ -1846,13 +1867,15 @@
 	.name = "tlv320aic3x-hifi",
 	.playback = {
 		.stream_name = "Playback",
-		.channels_min = 2,
+		//.channels_min = 2,
+		.channels_min = 1,
 		.channels_max = 2,
 		.rates = AIC3X_RATES,
 		.formats = AIC3X_FORMATS,},
 	.capture = {
 		.stream_name = "Capture",
-		.channels_min = 2,
+		//.channels_min = 2,
+		.channels_min = 1,
 		.channels_max = 2,
 		.rates = AIC3X_RATES,
 		.formats = AIC3X_FORMATS,},
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_normal.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_normal.c
index caac23e..83a78d5 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_normal.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atconfig/ps_normal.c
@@ -22,6 +22,11 @@
 //bsim
 #include <openssl/aes.h>
 
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone.
+#define _XOPEN_SOURCE
+extern long timezone;
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone end.
+
 typedef struct
 {
 	unsigned int pubKeyRsaE[32];
@@ -115,13 +120,13 @@
 	void *p[5] = {&timeinfo.time_zone,&timeinfo.sav_time,temp1,temp2,timeinfo.univer_time};
 	int time_zone = 0;
 	
-	//>>>sj.zhang add @2023-08-10 for systime NITZ sync enable/disenable.
+//>>>sj.zhang add @2023-08-10 for systime NITZ sync enable/disenable.
 	if(0 != system("uci get lynq_uci.lynq_sync_time.lynq_modem_sync_time_enable | grep -E \'^1$\'"))
 	{
 		at_print(AT_ERR,"zmmi_auto_act: nitz disenabled. \n");
 		return AT_END;
 	}
-	//>>>sj.zhang add @2023-08-10 end.
+//>>>sj.zhang add @2023-08-10 end.
 
     sc_cfg_get("sntp_time_set_mode", mode, sizeof(mode));
 	if(strcmp(mode, "manual") == 0)
@@ -158,7 +163,10 @@
 	set_tm.tm_mon = set_tm.tm_mon - 1;	
 
 	time_tv.tv_sec = mktime(&set_tm);
-	time_tv.tv_sec = time_tv.tv_sec +	time_zone * 3600 /4;
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone.
+	tzset();
+	time_tv.tv_sec = time_tv.tv_sec - timezone;
+//>>>sj.zhang add @2023-10-08 for fix the issue of timezone end.
 		
 	
 	if (0 != settimeofday(&time_tv,NULL))
diff --git a/update_version.sh b/update_version.sh
index f536468..e7bbf67 100644
--- a/update_version.sh
+++ b/update_version.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 #export LYNQ_VERSION="T106_lynq_version_ap_build_sh"
-LYNQ_AP_VERSION="T106CN-ZS03.V2.01.01.02P50U04.AP.08.06"
-LYNQ_CAP_INSIDE_VERSION="CAP.08.06"
-LYNQ_CAP_VERSION="CAP.08.06"
+LYNQ_AP_VERSION="T106CN-ZS03.V2.01.01.02P50U04.AP.08.07"
+LYNQ_CAP_INSIDE_VERSION="CAP.08.07"
+LYNQ_CAP_VERSION="CAP.08.07"
 COMMIT_ID="$(git rev-parse HEAD)"
 
 LYNQ_SW_INSIDE_VERSION="LYNQ_CONFIG_VERSION = \"${LYNQ_AP_VERSION}_${LYNQ_CAP_INSIDE_VERSION}\""
