Merge "[feature][T106ZXW-51]add liblynq-qser-network"
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 0b1ba0e..99b1fda 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
@@ -157,6 +157,7 @@
         liblynq-qser-sim \
         liblynq-qser-sms \
         liblynq-qser-data \
+        liblynq-qser-network \
 	"
 zxic_lib += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'libbinder libril', 'libtelsvr', d)}"
 
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-network/liblynq-qser-network.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-network/liblynq-qser-network.bb
new file mode 100755
index 0000000..0ee995a
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-network/liblynq-qser-network.bb
@@ -0,0 +1,55 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-qser-network"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS += "liblynq-log liblynq-network"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-network/"
+
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+          file://liblynq-qser-network\
+          "
+
+SRC-DIR = "${S}/../liblynq-qser-network"
+
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+
+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"
+FILES_${PN} += "${bindir}/ /data"
+
+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 -DTELEPHONYWARE"
+}
+
+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
+}
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/LICENSE
new file mode 100755
index 0000000..8aaabff
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/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 ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK 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 MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK 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 MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
\ 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
new file mode 100755
index 0000000..29f5004
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/include/lynq_qser_network.h
@@ -0,0 +1,385 @@
+/**
+ *@file     QSER_nw.h
+ *@date     2018-02-22
+ *@author   
+ *@brief    
+ */   
+#ifndef __LYNQ_QSER_NETWORK_H__
+#define __LYNQ_QSER_NETWORK_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef uint32_t nw_client_handle_type;
+
+
+#define QSER_NW_MODE_NONE     0x00    /**<  No network. */
+#define QSER_NW_MODE_GSM      0x01    /**<  Include GSM networks. */
+#define QSER_NW_MODE_WCDMA    0x02    /**<  Include WCDMA networks. */
+#define QSER_NW_MODE_CDMA     0x04    /**<  Include CDMA networks. */
+#define QSER_NW_MODE_EVDO     0x08    /**<  Include EVDO networks. */
+#define QSER_NW_MODE_LTE      0x10    /**<  Include LTE networks. */
+#define QSER_NW_MODE_TDSCDMA  0x20    /**<  Include TDSCDMA networks. */
+
+typedef enum 
+{
+    E_QSER_NW_ROAM_STATE_OFF  = 0,    /**<  None, or roaming indicator off. */
+    E_QSER_NW_ROAM_STATE_ON   = 1     /**<  Roaming indicator on. */
+}E_QSER_NW_ROAM_STATE_TYPE_T;
+
+/** Configures the settings that define the MCM network interface. */
+typedef struct 
+{
+    /*  Configuration parameters for MCM network registration Network registration details Technology dependent network registration details */
+    uint64_t                        preferred_nw_mode;  /**<   Preferred network mode for connections; a bitmask of QSER_NW_MODE_xxxx.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming_pref;       /**<   Roaming preference.*/
+}QSER_NW_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 */
+#define     NW_IND_DATA_REG_EVENT_IND_FLAG                (1 << 1)    /**< msg format : QSER_NW_DATA_REG_EVENT_IND_T */ 
+#define     NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG         (1 << 2)    /**< msg format : QSER_NW_SINGNAL_EVENT_IND_T */ 
+
+typedef struct 
+{
+    char long_eons[512 + 1];    /**<   Long EONS.*/
+    char short_eons[512 + 1];   /**<   Short EONS.*/
+    char mcc[3 + 1];            /**<   Mobile country code.*/
+    char mnc[3 + 1];            /**<   Mobile network code.*/
+}QSER_NW_OPERATOR_NAME_INFO_T;
+
+typedef enum 
+{
+    E_QSER_NW_RADIO_TECH_TD_SCDMA = 1,
+    E_QSER_NW_RADIO_TECH_GSM      = 2,    /**<  GSM; only supports voice. */
+    E_QSER_NW_RADIO_TECH_HSPAP    = 3,    /**<  HSPA+. */
+    E_QSER_NW_RADIO_TECH_LTE      = 4,    /**<  LTE. */
+    E_QSER_NW_RADIO_TECH_EHRPD    = 5,    /**<  EHRPD. */
+    E_QSER_NW_RADIO_TECH_EVDO_B   = 6,    /**<  EVDO B. */
+    E_QSER_NW_RADIO_TECH_HSPA     = 7,    /**<  HSPA. */
+    E_QSER_NW_RADIO_TECH_HSUPA    = 8,    /**<  HSUPA. */
+    E_QSER_NW_RADIO_TECH_HSDPA    = 9,    /**<  HSDPA. */
+    E_QSER_NW_RADIO_TECH_EVDO_A   = 10,   /**<  EVDO A. */
+    E_QSER_NW_RADIO_TECH_EVDO_0   = 11,   /**<  EVDO 0. */
+    E_QSER_NW_RADIO_TECH_1xRTT    = 12,   /**<  1xRTT. */
+    E_QSER_NW_RADIO_TECH_IS95B    = 13,   /**<  IS95B. */
+    E_QSER_NW_RADIO_TECH_IS95A    = 14,   /**<  IS95A. */
+    E_QSER_NW_RADIO_TECH_UMTS     = 15,   /**<  UMTS. */
+    E_QSER_NW_RADIO_TECH_EDGE     = 16,   /**<  EDGE. */
+    E_QSER_NW_RADIO_TECH_GPRS     = 17,   /**<  GPRS. */
+    E_QSER_NW_RADIO_TECH_NONE     = 18    /**<  No technology selected. */
+}E_QSER_NW_RADIO_TECH_TYPE_T;
+
+
+typedef enum 
+{
+    E_QSER_NW_TECH_DOMAIN_NONE    = 0,    /**<  None. */
+    E_QSER_NW_TECH_DOMAIN_3GPP    = 1,    /**<  3GPP. */
+    E_QSER_NW_TECH_DOMAIN_3GPP2   = 2,    /**<  3GPP2. */
+}E_QSER_NW_TECH_DOMAIN_TYPE_T;
+
+typedef enum 
+{
+    E_QSER_NW_IMSI_UNKNOWN_HLR_DENY_REASON                    = 1, /**<  IMSI unknown in HLR. */
+    E_QSER_NW_ILLEGAL_MS_DENY_REASON                          = 2, /**<  Illegal MS. */
+    E_QSER_NW_IMSI_UNKNOWN_VLR_DENY_REASON                    = 3, /**<  IMSI unknown in VLR. */
+    E_QSER_NW_IMEI_NOT_ACCEPTED_DENY_REASON                   = 4, /**<  IMEI not accepted. */
+    E_QSER_NW_ILLEGAL_ME_DENY_REASON                          = 5, /**<  Illegal ME. */
+    E_QSER_NW_PLMN_NOT_ALLOWED_DENY_REASON                    = 6, /**<  PLMN not allowed. */
+    E_QSER_NW_LA_NOT_ALLOWED_DENY_REASON                      = 7, /**<  Location area not allowed. */
+    E_QSER_NW_ROAMING_NOT_ALLOWED_LA_DENY_REASON              = 8, /**<  Roaming not allowed in this location area. */
+    E_QSER_NW_NO_SUITABLE_CELLS_LA_DENY_REASON                = 9, /**<  No suitable cells in location area. */
+    E_QSER_NW_NETWORK_FAILURE_DENY_REASON                     = 10, /**<  Network failure. */
+    E_QSER_NW_MAC_FAILURE_DENY_REASON                         = 11, /**<  MAC failure. */
+    E_QSER_NW_SYNCH_FAILURE_DENY_REASON                       = 12, /**<  Sync failure. */
+    E_QSER_NW_CONGESTION_DENY_REASON                          = 13, /**<  Congestion. */
+    E_QSER_NW_GSM_AUTHENTICATION_UNACCEPTABLE_DENY_REASON     = 14, /**<  GSM authentication unacceptable. */
+    E_QSER_NW_NOT_AUTHORIZED_CSG_DENY_REASON                  = 15, /**<  Not authorized in this CSG. */
+    E_QSER_NW_SERVICE_OPTION_NOT_SUPPORTED_DENY_REASON        = 16, /**<  Service option not supported. */
+    E_QSER_NW_REQ_SERVICE_OPTION_NOT_SUBSCRIBED_DENY_REASON   = 17, /**<  Requested service option not subscribed. */
+    E_QSER_NW_CALL_CANNOT_BE_IDENTIFIED_DENY_REASON           = 18, /**<  Call cannot be identified. */
+    E_QSER_NW_SEMANTICALLY_INCORRECT_MSG_DENY_REASON          = 19, /**<  Semantically incorrect message. */
+    E_QSER_NW_INVALID_MANDATORY_INFO_DENY_REASON              = 20, /**<  Invalid mandatory information. */
+    E_QSER_NW_MSG_TYPE_NON_EXISTENT_DENY_REASON               = 21, /**<  Message type non-existent or not implemented. */
+    E_QSER_NW_INFO_ELEMENT_NON_EXISTENT_DENY_REASON           = 22, /**<  Message type not compatible with the protocol state. */
+    E_QSER_NW_CONDITIONAL_IE_ERR_DENY_REASON                  = 23, /**<  Conditional IE error. */
+    E_QSER_NW_MSG_INCOMPATIBLE_PROTOCOL_STATE_DENY_REASON     = 24, /**<  Message not compatible with the protocol state. */
+    E_QSER_NW_PROTOCOL_ERROR_DENY_REASON                      = 25, /**<  Unspecified protocol error. */
+}E_QSER_NW_DENY_REASON_TYPE_T;
+
+
+typedef enum 
+{
+    E_QSER_NW_SERVICE_NONE     = 0x0000,  /**<  Not registered or no data. */
+    E_QSER_NW_SERVICE_LIMITED  = 0x0001,  /**<  Registered; emergency service only. */
+    E_QSER_NW_SERVICE_FULL     = 0x0002,  /**<  Registered, full service. */
+}E_QSER_NW_SERVICE_TYPE_T;
+
+typedef struct 
+{
+    E_QSER_NW_TECH_DOMAIN_TYPE_T  tech_domain;        /**<   Technology, used to determine the structure type  tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
+    E_QSER_NW_RADIO_TECH_TYPE_T   radio_tech;         /**<   Radio technology; see #nw_radio_tech_t_v01.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming;            /**<   0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/
+    E_QSER_NW_DENY_REASON_TYPE_T  deny_reason;        /**<   Set when registration state is #nw_deny_reason_t_v01.*/
+    E_QSER_NW_SERVICE_TYPE_T      registration_state; /**<   Registration state.*/
+}QSER_NW_COMMON_REG_INFO_T;
+
+
+typedef struct 
+{
+    E_QSER_NW_TECH_DOMAIN_TYPE_T  tech_domain;        /**<   Technology, used to determine the structure type  tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
+    E_QSER_NW_RADIO_TECH_TYPE_T   radio_tech;         /**<   Radio technology; see #nw_radio_tech_t_v01.*/
+    char                            mcc[3+1];           /**<   Mobile country code.*/
+    char                            mnc[3+1];           /**<   Mobile network code.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming;            /**<   0 -- Off, 1 -- Roaming (3GPP2 has extended values).*/
+    uint8_t                         forbidden;          /**<   Forbidden: 0 -- No, 1 -- Yes.*/
+    uint32_t                        cid;                /**<   Cell ID for the registered 3GPP system.*/
+    uint16_t                        lac;                /**<   Locatin area code for the registered 3GPP system.*/
+    uint16_t                        psc;                /**<   Primary scrambling code (WCDMA only); 0 -- None.*/
+    uint16_t                        tac;                /**<   Tracking area code information for LTE.*/
+}QSER_NW_3GPP_REG_INFO_T;
+
+
+typedef struct 
+{
+    E_QSER_NW_TECH_DOMAIN_TYPE_T  tech_domain;        /**<   Technology, used to determine structure type  tech: 0 -- None, 1 -- 3GPP, 2 -- 3GPP2.*/
+    E_QSER_NW_RADIO_TECH_TYPE_T   radio_tech;         /**<   Radio technology; see #nw_radio_tech_t_v01.*/
+    char                            mcc[3+1];           /**<   Mobile country code.*/
+    char                            mnc[3+1];           /**<   Mobile network code.*/
+    E_QSER_NW_ROAM_STATE_TYPE_T   roaming;            /**<   Roaming status; see #nw_roam_state_t_v01.*/
+    uint8_t                         forbidden;          /**<   Forbidden: 0 -- No, 1 -- Yes.*/
+    uint8_t                         inPRL;              /**<   0 -- Not in PRL, 1 -- In PRL.*/
+    uint8_t                         css;                /**<   Concurrent services supported: 0 -- No, 1 -- Yes.*/
+    uint16_t                        sid;                /**<   CDMA system ID.*/
+    uint16_t                        nid;                /**<   CDMA network ID.*/
+    uint16_t                        bsid;               /**<   Base station ID. @newpagetable */
+}QSER_NW_3GPP2_REG_INFO_T;
+
+/** Gets the status associated with the connection of \<id\>. */
+typedef struct 
+{
+    uint8_t                         voice_registration_valid;               /**< Must be set to TRUE if voice_registration is being passed. */
+    QSER_NW_COMMON_REG_INFO_T     voice_registration;                     /**<   Voice registration. */
+
+    uint8_t                         data_registration_valid;                /**< Must be set to TRUE if data_registration is being passed. */
+    QSER_NW_COMMON_REG_INFO_T     data_registration;                      /**<   Data registration. */
+
+    uint8_t                         voice_registration_details_3gpp_valid;  /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */
+    QSER_NW_3GPP_REG_INFO_T       voice_registration_details_3gpp;        /**<   Voice registration details for 3GPP. */
+
+    uint8_t                         data_registration_details_3gpp_valid;   /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */
+    QSER_NW_3GPP_REG_INFO_T       data_registration_details_3gpp;         /**<   Data registration details for 3GPP. */
+
+    uint8_t                         voice_registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */
+    QSER_NW_3GPP2_REG_INFO_T      voice_registration_details_3gpp2;       /**<   Voice registration details for 3GPP2. */
+
+    uint8_t                         data_registration_details_3gpp2_valid;  /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */
+    QSER_NW_3GPP2_REG_INFO_T      data_registration_details_3gpp2;        /**<   Data registration details for 3GPP2. */
+}QSER_NW_REG_STATUS_INFO_T;
+
+
+typedef struct 
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates received signal strength. A signed value; -125 or lower indicates no signal.*/
+}QSER_NW_GSM_SIGNAL_INFO_T;
+
+
+typedef struct 
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+}QSER_NW_WCDMA_SIGNAL_INFO_T;
+
+typedef struct 
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Ec.    a signed value; -125 or lower indicates no signal.*/
+    int8_t      rscp;       /**<   RSCP in dBm.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+    int8_t      sinr;       /**<   Measured SINR in dB. @newpagetable */
+}QSER_NW_TDSCDMA_SIGNAL_INFO_T;
+
+typedef struct 
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Ec. A signed value; -125 or lower indicates no signal.*/
+    int8_t      rsrq;       /**<   RSRQ value in dB (signed integer value), as measured by L1. Range: -3 to -20 (-3 equals -3 dB, -20 equals -20 dB).*/
+    int16_t      rsrp;       /**<   Current RSRP in dBm, as measured by L1. Range: -44 to -140 (-44 equals -44 dBm, -140 equals -140 dBm).*/
+    int16_t      snr;        /**<   SNR level as a scaled integer in units of 0.1 dB; e.g., -16 dB has a value of -160 and 24.6 dB has a value of 246.*/
+}QSER_NW_LTE_SIGNAL_INFO_T;
+
+typedef struct 
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+}QSER_NW_CDMA_SIGNAL_INFO_T;
+
+typedef struct 
+{
+    int8_t      rssi;       /**<   RSSI in dBm. Indicates forward link pilot Power (AGC) + Ec/Io. A signed value; -125 or lower indicates no signal.*/
+    int16_t     ecio;       /**<   Ec/Io value representing negative 0.5 dB increments, e.g., 2 equals -1 dbm.*/
+    int8_t      sinr;       /**<   SINR level.*/
+    int32_t     io;         /**<   Received IO in dBm. */
+}QSER_NW_HDR_SIGNAL_INFO_T;
+
+typedef struct
+{
+    int16_t     ssRsrp;   /* SS(Synchronization Signal) reference signal received power, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [44, 140], INT_MAX means invalid/unreported.*/
+    int16_t     ssRsrq;   /* SS reference signal received quality, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [3, 20], INT_MAX means invalid/unreported.*/
+    int16_t     ssSinr;   /* SS signal-to-noise and interference ratio.
+                      * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
+                      * Range [-23, 40], INT_MAX means invalid/unreported.*/
+    int16_t     csiRsrp;  /* CSI reference signal received power, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [44, 140], INT_MAX means invalid/unreported.*/
+    int16_t     csiRsrq;  /* CSI reference signal received quality, multipled by -1.
+                      * Reference: 3GPP TS 38.215.
+                      * Range [3, 20], INT_MAX means invalid/unreported.*/
+    int16_t     csiSinr;  /* CSI signal-to-noise and interference ratio.
+                      * Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
+                      * Range [-23, 40], INT_MAX means invalid/unreported.*/
+}QSER_NW_NR_SIGNAL_INFO_T;
+
+
+/** Gets signal strength information. */
+typedef struct 
+{
+    uint8_t                         gsm_sig_info_valid;         /**< Must be set to TRUE if gsm_sig_info is being passed. */
+    QSER_NW_GSM_SIGNAL_INFO_T     gsm_sig_info;               /**<   GSM signal information. */
+    uint8_t                         wcdma_sig_info_valid;       /**< Must be set to TRUE if wcdma_sig_info is being passed. */
+    QSER_NW_WCDMA_SIGNAL_INFO_T   wcdma_sig_info;             /**<   WCDMA signal information. */
+    uint8_t                         tdscdma_sig_info_valid;     /**< Must be set to TRUE if tdscdma_sig_info is being passed. */
+    QSER_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info;           /**<   TDSCDMA signal information. */
+    uint8_t                         lte_sig_info_valid;         /**< Must be set to TRUE if lte_sig_info is being passed. */
+    QSER_NW_LTE_SIGNAL_INFO_T     lte_sig_info;               /**<   LTE signal information. */
+    uint8_t                         cdma_sig_info_valid;        /**< Must be set to TRUE if cdma_sig_info is being passed. */
+    QSER_NW_CDMA_SIGNAL_INFO_T    cdma_sig_info;              /**<   CDMA signal information. */
+    uint8_t                         hdr_sig_info_valid;         /**< Must be set to TRUE if hdr_sig_info is being passed. */
+    QSER_NW_HDR_SIGNAL_INFO_T     hdr_sig_info;               /**<   HDR signal information. */
+    uint8_t                         nr_sig_info_valid;
+    QSER_NW_NR_SIGNAL_INFO_T      nr_sig_info;
+}QSER_NW_SIGNAL_STRENGTH_INFO_T;
+
+
+
+
+
+/* @bridef Callback function registered to QSER_NW_AddRxMsgHandler 
+ * map of ind_flag and ind_msg_buf as bellow :
+ *  NW_IND_VOICE_REG_EVENT_IND_FLAG : QSER_NW_VOICE_REG_EVENT_IND_T
+ *  NW_IND_DATA_REG_EVENT_IND_FLAG : QSER_NW_DATA_REG_EVENT_IND_T
+ *  NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG : QSER_NW_SINGNAL_EVENT_IND_T
+ *  NW_IND_CELL_ACCESS_STATE_CHG_EVENT_IND_FLAG : QSER_NW_CELL_ACCESS_STATE_EVENT_IND_T
+ *  NW_IND_NITZ_TIME_UPDATE_EVENT_IND_FLAG : QSER_NW_NITZ_TIME_EVENT_IND_T 
+ * */
+typedef void (*QSER_NW_RxMsgHandlerFunc_t)(
+    nw_client_handle_type h_nw, 
+    uint32_t ind_flag, 
+    void                  *ind_msg_buf, 
+    uint32_t              ind_msg_len, 
+    void                  *contextPtr
+);
+
+
+/** Indication message; Indication for the corresponding registered event flag NW_IND_VOICE_REG_EVENT_IND_FLAG */
+typedef struct {
+
+  uint8_t                         registration_valid;               /**< Must be set to TRUE if voice_registration is being passed. */
+  QSER_NW_COMMON_REG_INFO_T     registration;                     /**< Voice registration. */
+
+  uint8_t                         registration_details_3gpp_valid;  /**< Must be set to TRUE if voice_registration_details_3gpp is being passed. */
+  QSER_NW_3GPP_REG_INFO_T       registration_details_3gpp;        /**< Voice registration details for 3GPP. */
+
+  uint8_t                         registration_details_3gpp2_valid; /**< Must be set to TRUE if voice_registration_details_3gpp2 is being passed. */
+  QSER_NW_3GPP2_REG_INFO_T      registration_details_3gpp2;       /**< Voice registration details for 3GPP2. */
+}QSER_NW_VOICE_REG_EVENT_IND_T; 
+
+/** Indication message; Indication for the corresponding registered event flag NW_IND_DATA_REG_EVENT_IND_FLAG */
+typedef struct {
+
+  uint8_t                         registration_valid;               /**< Must be set to TRUE if data_registration is being passed. */
+  QSER_NW_COMMON_REG_INFO_T     registration;                     /**< Data registration. */
+  
+  uint8_t                         registration_details_3gpp_valid;  /**< Must be set to TRUE if data_registration_details_3gpp is being passed. */
+  QSER_NW_3GPP_REG_INFO_T       registration_details_3gpp;        /**< Data registration details for 3GPP. */
+
+  uint8_t                         registration_details_3gpp2_valid; /**< Must be set to TRUE if data_registration_details_3gpp2 is being passed. */
+  QSER_NW_3GPP2_REG_INFO_T      registration_details_3gpp2;       /**< Data registration details for 3GPP2. */
+}QSER_NW_DATA_REG_EVENT_IND_T;
+
+
+/** Indication message; Indication for the corresponding registered event flag NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG */
+typedef struct {
+    uint8_t gsm_sig_info_valid;                       /**< Must be set to TRUE if gsm_sig_info is being passed. */
+    QSER_NW_GSM_SIGNAL_INFO_T       gsm_sig_info;   /**< GSM singal information. */
+
+    uint8_t wcdma_sig_info_valid;                     /**< Must be set to TRUE if wcdma_sig_info is being passed. */
+    QSER_NW_WCDMA_SIGNAL_INFO_T wcdma_sig_info;     /**< WCDMA singal information. */
+
+    uint8_t tdscdma_sig_info_valid;                   /**< Must be set to TRUE if tdscdma_sig_info is being passed. */
+    QSER_NW_TDSCDMA_SIGNAL_INFO_T tdscdma_sig_info; /**< TDSCDMA singal information. */
+
+    uint8_t lte_sig_info_valid;                       /**< Must be set to TRUE if lte_sig_info is being passed. */
+    QSER_NW_LTE_SIGNAL_INFO_T lte_sig_info;         /**< LTE singal information. */
+
+    uint8_t cdma_sig_info_valid;                      /**< Must be set to TRUE if cdma_sig_info is being passed. */
+    QSER_NW_CDMA_SIGNAL_INFO_T cdma_sig_info;       /**< CDMA singal information. */
+
+    uint8_t hdr_sig_info_valid;                       /**< Must be set to TRUE if hdr_sig_info is being passed. */
+    QSER_NW_HDR_SIGNAL_INFO_T hdr_sig_info;         /**< HDR singal information. */
+    
+    uint8_t                         nr_sig_info_valid;
+    QSER_NW_NR_SIGNAL_INFO_T      nr_sig_info;
+}QSER_NW_SINGNAL_EVENT_IND_T;
+
+
+int qser_nw_client_init(nw_client_handle_type  *ph_nw);
+
+int qser_nw_client_deinit(nw_client_handle_type  h_nw);
+
+int qser_nw_set_config
+(
+    nw_client_handle_type       h_nw,
+    QSER_NW_CONFIG_INFO_T     *pt_info 
+);
+
+int qser_nw_eventregister
+(
+    nw_client_handle_type       h_nw,
+    uint32_t                    bitmask // bit OR of NW_IND_xxxx_EVENT_ON
+);
+
+int qser_nw_get_operator_name
+(
+    nw_client_handle_type           h_nw,
+    QSER_NW_OPERATOR_NAME_INFO_T  *pt_info //You should malloc this or may cause stack overflow
+);
+
+int qser_nw_get_reg_status
+(
+    nw_client_handle_type               h_nw,
+    QSER_NW_REG_STATUS_INFO_T         *pt_info 
+);
+
+int qser_nw_get_signal_strength
+(
+    nw_client_handle_type               h_nw,
+    QSER_NW_SIGNAL_STRENGTH_INFO_T    *pt_info
+);
+
+
+
+int qser_nw_addrxmsghandler
+(
+    nw_client_handle_type        h_nw,
+    QSER_NW_RxMsgHandlerFunc_t handlerPtr, 
+    void* contextPtr
+);
+
+#ifdef __cplusplus
+}
+#endif
+#endif//__QSER_NW_H__
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
new file mode 100755
index 0000000..b2967a7
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
@@ -0,0 +1,468 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <string.h>
+#include <lynq_network.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <unistd.h>
+#include <liblog/lynq_deflog.h>
+#include "lynq_qser_network.h"
+
+#define USER_LOG_TAG "LYNQ_QSER_NETWORK"
+#define RESULT_OK (0)
+#define RESULT_ERROR (-1)
+#define INVALID_PREFER_TYPE (0xffff)
+
+static QSER_NW_RxMsgHandlerFunc_t s_handlerPtr;
+static void* s_contextPtr;
+static pthread_t s_new_network_tid =-1;
+
+nw_client_handle_type g_ph_hw = 0;
+
+int switch_preferred_nw_mode(const uint64_t preferred_nw_mode)
+{
+    int map[13]={
+            0xffff,    // "0 : GSM/WCDMA (WCDMA preferred)"
+            QSER_NW_MODE_GSM, // "1 : GSM only"
+            QSER_NW_MODE_WCDMA, // "2 : WCDMA"
+            QSER_NW_MODE_GSM | QSER_NW_MODE_WCDMA, // "3 : GSM/WCDMA (auto mode, according to PRL)"
+            QSER_NW_MODE_CDMA | QSER_NW_MODE_EVDO, // "4 : CDMA and EvDo (auto mode, according to PRL)"
+            QSER_NW_MODE_CDMA, // "5 : CDMA only"
+            QSER_NW_MODE_EVDO, // "6 : EvDo only"
+            QSER_NW_MODE_GSM | QSER_NW_MODE_WCDMA | QSER_NW_MODE_CDMA | QSER_NW_MODE_EVDO, // "7 : GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)"
+            QSER_NW_MODE_LTE | QSER_NW_MODE_CDMA | QSER_NW_MODE_EVDO, // "8 : LTE, CDMA and EvDo"
+            QSER_NW_MODE_LTE | QSER_NW_MODE_GSM | QSER_NW_MODE_WCDMA, // "9 : LTE, GSM/WCDMA"
+            QSER_NW_MODE_LTE | QSER_NW_MODE_CDMA | QSER_NW_MODE_EVDO| QSER_NW_MODE_GSM | QSER_NW_MODE_WCDMA, // "10: LTE, CDMA, EvDo, GSM/WCDMA"
+            QSER_NW_MODE_LTE , // "11: LTE only"
+            QSER_NW_MODE_LTE | QSER_NW_MODE_WCDMA, // "12: LTE/WCDMA"            
+    };
+    int array_length=sizeof (map)/ sizeof (map[0]);
+
+    for(int i=0;i<array_length;i++)
+    {
+        if(map[i]==preferred_nw_mode)
+        {
+            return i;
+        }
+    }
+    
+    return INVALID_PREFER_TYPE;
+}
+
+void urc_msg_process_voice_reg()
+{
+    if(s_handlerPtr!=NULL)
+    {
+        s_handlerPtr(g_ph_hw,NW_IND_VOICE_REG_EVENT_IND_FLAG,NULL,0,s_contextPtr);
+    }
+}
+
+void urc_msg_process_data_reg()
+{
+    if(s_handlerPtr!=NULL)
+    {
+        s_handlerPtr(g_ph_hw,NW_IND_DATA_REG_EVENT_IND_FLAG,NULL,0,s_contextPtr);
+    }  
+}
+
+
+void urc_msg_process_signal_strength()
+{
+    signalStrength_t signalstrength;
+    int slot_id;
+
+    int ret = lynq_get_urc_info(1009,&signalstrength,&slot_id);
+    if (ret == 0)
+    {
+        QSER_NW_SINGNAL_EVENT_IND_T msg_buf;
+        msg_buf.gsm_sig_info_valid = signalstrength.gw_sig_valid;
+        msg_buf.gsm_sig_info.rssi = signalstrength.rssi;
+        msg_buf.wcdma_sig_info_valid = signalstrength.wcdma_sig_valid;
+        msg_buf.wcdma_sig_info.rssi = signalstrength.rscp;
+        msg_buf.wcdma_sig_info.ecio = signalstrength.ecno;
+        msg_buf.tdscdma_sig_info_valid = 0;
+        msg_buf.lte_sig_info_valid = signalstrength.lte_sig_valid;
+        msg_buf.lte_sig_info.rssi = -125;
+        msg_buf.lte_sig_info.rsrp = signalstrength.rsrp;
+        msg_buf.lte_sig_info.rsrq = signalstrength.rsrq;
+        msg_buf.lte_sig_info.snr = signalstrength.rssnr;
+        msg_buf.cdma_sig_info_valid = 0;
+        msg_buf.hdr_sig_info_valid = 0;
+        msg_buf.nr_sig_info_valid = signalstrength.nr_sig_valid;
+        msg_buf.nr_sig_info.ssRsrp = signalstrength.ssRsrp;
+        msg_buf.nr_sig_info.ssRsrq = signalstrength.ssRsrq;
+        msg_buf.nr_sig_info.ssSinr = signalstrength.ssSinr;
+        msg_buf.nr_sig_info.csiRsrp = signalstrength.csiRsrp;
+        msg_buf.nr_sig_info.csiRsrq = signalstrength.csiRsrq;
+        msg_buf.nr_sig_info.csiSinr = signalstrength.csiSinr;
+        void *ind_msg_buf= &msg_buf;
+        if(s_handlerPtr!=NULL)
+        {
+            s_handlerPtr(g_ph_hw,NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG,ind_msg_buf,sizeof (msg_buf) ,s_contextPtr);
+        }         
+   }   
+}
+
+
+void *new_network_thread_recv(void *context)
+{
+    int handle = -1;
+    int ret = 0;
+    int slot_id = 0;
+    uint32_t ind_flag = 0;
+
+    while (1)
+    {
+        lynq_wait_signalchanges(&handle);
+
+        switch(handle)
+        {
+            case 1002: //RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED:
+            {
+                urc_msg_process_voice_reg();
+               
+                break;
+            }
+            case 3015://RIL_UNSOL_RESPONSE_PS_NETWORK_STATE_CHANGED:
+            {   
+                urc_msg_process_data_reg();               
+                break;
+            }        
+            case 1009://RIL_UNSOL_SIGNAL_STRENGTH:
+            {   
+                urc_msg_process_signal_strength();
+                break;
+            }
+        }        
+    }
+    return NULL;
+}
+
+int qser_nw_client_init(nw_client_handle_type  *ph_nw)
+{
+    if(NULL == ph_nw)
+    {
+        LYERRLOG("input  error\n");
+        return RESULT_ERROR;
+    }
+    *ph_nw = (nw_client_handle_type)getpid();
+    
+    int ret=lynq_network_init(*ph_nw);
+    
+    if (ret != RESULT_OK)
+    {
+        LYERRLOG("lynq_network_init failed ret is %d",ret);
+        return RESULT_ERROR;
+    }
+    g_ph_hw = *ph_nw;
+    return RESULT_OK;    
+}
+
+int qser_nw_client_deinit(nw_client_handle_type h_nw)
+{
+    if(h_nw != g_ph_hw)
+    {
+        LYERRLOG("not init %d %d",g_ph_hw,h_nw);
+        return RESULT_ERROR;
+    }    
+
+    int ret;
+    
+    if(s_new_network_tid!=-1)
+    {
+        ret = pthread_cancel(s_new_network_tid);
+        LYINFLOG("pthread cancel waiting urc thread, ret = %d",ret);            
+  
+        ret = pthread_join(s_new_network_tid,NULL);
+        LYINFLOG("pthread join waiting urc thread ret = %d",ret);
+        s_new_network_tid =-1;
+    }
+
+    ret=lynq_network_deinit();
+    
+    if (ret != RESULT_OK)
+    {
+        LYERRLOG("lynq_network_deinit failed ret is %d",ret);
+        return RESULT_ERROR;
+    }
+
+    g_ph_hw=0;
+  
+    return RESULT_OK;      
+}
+
+int qser_nw_set_config(nw_client_handle_type h_nw,QSER_NW_CONFIG_INFO_T *pt_info)
+{
+    int pretype = 0;
+    if(h_nw == 0 || NULL == pt_info)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    pretype = switch_preferred_nw_mode(pt_info->preferred_nw_mode);
+    if (pretype ==INVALID_PREFER_TYPE)
+    {
+        LYERRLOG("invalid client parameters incoming %d",pt_info->preferred_nw_mode);
+        return RESULT_ERROR;
+    }
+
+    int ret = lynq_set_prefferred_networktype(pretype);
+    if (ret != RESULT_OK)
+    {
+        LYERRLOG("lynq_set_prefferred_networktype failed ret is %d",ret);
+        return RESULT_ERROR;
+    }
+    return RESULT_OK;
+}
+
+/*To Do*/
+int qser_nw_eventregister(nw_client_handle_type h_nw,uint32_t bitmask)
+{
+    if(h_nw == 0)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    LYINFLOG("To be complie API");
+    return RESULT_OK;
+}
+
+int qser_nw_get_operator_name(nw_client_handle_type h_nw,QSER_NW_OPERATOR_NAME_INFO_T  *pt_info)
+{
+    if(h_nw == 0 || NULL == pt_info)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    int ret = 0;
+    char op_FN[128];
+    char op_SN[128];
+    char mccmnc[8];
+    memset(op_FN,0,sizeof(op_FN));
+    memset(op_SN,0,sizeof(op_SN));
+    memset(mccmnc,0,sizeof(mccmnc));
+    ret = lynq_query_operater(op_FN,op_SN,mccmnc);
+    if (ret != RESULT_OK)
+    {
+        LYERRLOG("lynq_query_operater failed ret is %d",ret);
+        return RESULT_ERROR;
+    }
+    strcpy(pt_info->long_eons,op_FN);
+    strcpy(pt_info->short_eons,op_SN);
+    strncpy(pt_info->mcc,mccmnc,3);
+    pt_info->mcc[3] = '\0';
+    strcpy(pt_info->mnc,mccmnc+3);
+    pt_info->mnc[3] = '\0';
+    return RESULT_OK;
+}
+
+/*
+        E_QL_MCM_NW_RADIO_TECH_NONE, //RADIO_TECH_UNKNOWN = 0,
+        E_QL_MCM_NW_RADIO_TECH_GPRS , //RADIO_TECH_GPRS = 1,
+        E_QL_MCM_NW_RADIO_TECH_EDGE, //RADIO_TECH_EDGE = 2,
+        E_QL_MCM_NW_RADIO_TECH_UMTS, //RADIO_TECH_UMTS = 3,
+        E_QL_MCM_NW_RADIO_TECH_IS95A, //RADIO_TECH_IS95A = 4,
+        E_QL_MCM_NW_RADIO_TECH_IS95B, //RADIO_TECH_IS95B = 5,
+        E_QL_MCM_NW_RADIO_TECH_1xRTT, //RADIO_TECH_1xRTT =  6,
+        E_QL_MCM_NW_RADIO_TECH_EVDO_0, //RADIO_TECH_EVDO_0 = 7,
+        E_QL_MCM_NW_RADIO_TECH_EVDO_A, //RADIO_TECH_EVDO_A = 8,
+        E_QL_MCM_NW_RADIO_TECH_HSDPA, //RADIO_TECH_HSDPA = 9,
+        E_QL_MCM_NW_RADIO_TECH_HSUPA, //RADIO_TECH_HSUPA = 10,
+        E_QL_MCM_NW_RADIO_TECH_HSPA, //RADIO_TECH_HSPA = 11,
+        E_QL_MCM_NW_RADIO_TECH_EVDO_B, //RADIO_TECH_EVDO_B = 12,
+        E_QL_MCM_NW_RADIO_TECH_EHRPD, //RADIO_TECH_EHRPD = 13,
+        E_QL_MCM_NW_RADIO_TECH_LTE, //RADIO_TECH_LTE = 14,
+        E_QL_MCM_NW_RADIO_TECH_HSPAP, //RADIO_TECH_HSPAP = 15, // HSPA+
+        E_QL_MCM_NW_RADIO_TECH_GSM, //RADIO_TECH_GSM = 16, // Only supports voice
+        E_QL_MCM_NW_RADIO_TECH_TD_SCDMA, //RADIO_TECH_TD_SCDMA = 17,
+        E_QL_MCM_NW_RADIO_TECH_NONE, //RADIO_TECH_IWLAN = 18,
+        E_QL_MCM_NW_RADIO_TECH_NONE, //RADIO_TECH_LTE_CA = 19,
+        E_QL_MCM_NW_RADIO_TECH_NONE, //RADIO_TECH_NR = 20
+
+        E_QL_MCM_NW_RADIO_TECH_TD_SCDMA = 1,
+        E_QL_MCM_NW_RADIO_TECH_GSM      = 2,    /**<  GSM; only supports voice. 
+        E_QL_MCM_NW_RADIO_TECH_HSPAP    = 3,    /**<  HSPA+. 
+        E_QL_MCM_NW_RADIO_TECH_LTE      = 4,    /**<  LTE. 
+        E_QL_MCM_NW_RADIO_TECH_EHRPD    = 5,    /**<  EHRPD. 
+        E_QL_MCM_NW_RADIO_TECH_EVDO_B   = 6,    /**<  EVDO B. 
+        E_QL_MCM_NW_RADIO_TECH_HSPA     = 7,    /**<  HSPA. 
+        E_QL_MCM_NW_RADIO_TECH_HSUPA    = 8,    /**<  HSUPA. 
+        E_QL_MCM_NW_RADIO_TECH_HSDPA    = 9,    /**<  HSDPA. 
+        E_QL_MCM_NW_RADIO_TECH_EVDO_A   = 10,   /**<  EVDO A. 
+        E_QL_MCM_NW_RADIO_TECH_EVDO_0   = 11,   /**<  EVDO 0. 
+        E_QL_MCM_NW_RADIO_TECH_1xRTT    = 12,   /**<  1xRTT. 
+        E_QL_MCM_NW_RADIO_TECH_IS95B    = 13,   /**<  IS95B. 
+        E_QL_MCM_NW_RADIO_TECH_IS95A    = 14,   /**<  IS95A. 
+        E_QL_MCM_NW_RADIO_TECH_UMTS     = 15,   /**<  UMTS. 
+        E_QL_MCM_NW_RADIO_TECH_EDGE     = 16,   /**<  EDGE. 
+        E_QL_MCM_NW_RADIO_TECH_GPRS     = 17,   /**<  GPRS. 
+        E_QL_MCM_NW_RADIO_TECH_NONE     = 18    /**<  No technology selected. */
+int qser_radio_tech_qurey(int radiotechfam)
+{
+    int qser_radiotech = -1;
+    if (qser_radiotech <18 && qser_radiotech >0)
+    {
+        qser_radiotech = 18 - radiotechfam;
+    }
+    else
+    {
+        qser_radiotech = E_QSER_NW_RADIO_TECH_NONE;
+    }
+    return qser_radiotech;
+}
+
+E_QSER_NW_SERVICE_TYPE_T switch_nw_regstate(int regstate)
+{
+    E_QSER_NW_SERVICE_TYPE_T state = E_QSER_NW_SERVICE_NONE;
+    switch (regstate)
+    {
+    case 1:
+    case 5:
+        state = E_QSER_NW_SERVICE_FULL;
+        break;
+    case 10:
+    case 12:
+    case 13:
+    case 14:
+        state = E_QSER_NW_SERVICE_LIMITED;
+        break;  
+    }
+    return state;  
+}
+
+
+int qser_nw_get_reg_status(nw_client_handle_type h_nw,QSER_NW_REG_STATUS_INFO_T *pt_info)
+{
+    if(h_nw == 0 || NULL == pt_info)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    int ret = 0;
+    int regState = 0;
+    int imsRegState = 0;
+    char CID[128]={0};
+    char LAC[128]={0};
+    int netType = 0;
+    int radioTechFam = 0;
+    int netreject = 0;
+    pt_info->voice_registration_valid = 1;
+    ret = lynq_query_registration_state("VOICE",&regState,&imsRegState,LAC,CID,&netType,&radioTechFam,&netreject);
+    if(ret == 0)
+    {
+        pt_info->voice_registration_valid = 1;
+        pt_info->voice_registration.tech_domain = E_QSER_NW_TECH_DOMAIN_NONE;
+        pt_info->voice_registration.radio_tech = qser_radio_tech_qurey(radioTechFam);
+        if (regState == 5)
+        {
+            pt_info->voice_registration.roaming = E_QSER_NW_ROAM_STATE_ON;
+        }
+        else
+        {
+            pt_info->voice_registration.roaming = E_QSER_NW_ROAM_STATE_OFF;
+        }
+        pt_info->voice_registration.registration_state = switch_nw_regstate(regState);
+    }
+    else
+    {
+        pt_info->voice_registration_valid = 0;
+        LYERRLOG("get voice regstate fail");
+    }
+    ret = lynq_query_registration_state("DATA",&regState,&imsRegState,LAC,CID,&netType,&radioTechFam,&netreject);
+    if(ret == 0)
+    {
+        pt_info->voice_registration_valid = 1;
+        pt_info->voice_registration.tech_domain = E_QSER_NW_TECH_DOMAIN_NONE;
+        pt_info->voice_registration.radio_tech = qser_radio_tech_qurey(radioTechFam);
+        if (regState == 5)
+        {
+            pt_info->voice_registration.roaming = E_QSER_NW_ROAM_STATE_ON;
+        }
+        else
+        {
+            pt_info->voice_registration.roaming = E_QSER_NW_ROAM_STATE_OFF;
+        }
+        pt_info->voice_registration.registration_state = switch_nw_regstate(regState);
+    }
+    else
+    {
+        pt_info->data_registration_valid = 0;
+        LYERRLOG("get data regstate fail");
+    }
+    pt_info->voice_registration_details_3gpp_valid = 0;
+    pt_info->data_registration_details_3gpp_valid = 0;
+    pt_info->voice_registration_details_3gpp2_valid = 0;
+    pt_info->data_registration_details_3gpp2_valid = 0;
+    return RESULT_OK;
+}
+
+int qser_nw_setlowpowermode(nw_client_handle_type h_nw,uint32_t low_power_mode_on)
+{
+    if(h_nw == 0)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    LYINFLOG("To be complie API");
+    return RESULT_OK;
+}
+
+int qser_nw_get_signal_strength(nw_client_handle_type h_nw,QSER_NW_SIGNAL_STRENGTH_INFO_T *pt_info)
+{
+    if(h_nw == 0 || NULL == pt_info)
+    {
+        LYERRLOG("invalid client parameters incoming");
+        return RESULT_ERROR;
+    }
+    signalStrength_t lib_info;
+    int ret = 0;
+    ret = lynq_solicited_signal_strength(&lib_info);
+    if(ret != 0)
+    {
+        LYERRLOG("get signal strength fail");
+        return RESULT_ERROR;
+    }
+    pt_info->gsm_sig_info_valid = lib_info.gw_sig_valid;
+    pt_info->gsm_sig_info.rssi = lib_info.rssi;
+    pt_info->wcdma_sig_info_valid = lib_info.wcdma_sig_valid;
+    pt_info->wcdma_sig_info.rssi = lib_info.wcdma_signalstrength;
+    pt_info->wcdma_sig_info.ecio = lib_info.ecno;
+    pt_info->tdscdma_sig_info_valid = 0;
+    pt_info->lte_sig_info_valid = lib_info.lte_sig_valid;
+    pt_info->lte_sig_info.rssi = lib_info.lte_signalstrength;
+    pt_info->lte_sig_info.rsrp = lib_info.rsrp;
+    pt_info->lte_sig_info.rsrq = lib_info.rsrq;
+    pt_info->lte_sig_info.snr = lib_info.rssnr;
+    pt_info->cdma_sig_info_valid = 0;
+    pt_info->hdr_sig_info_valid = 0;
+    pt_info->nr_sig_info_valid = lib_info.nr_sig_valid;
+    pt_info->nr_sig_info.ssRsrp = lib_info.ssRsrp;
+    pt_info->nr_sig_info.ssRsrq = lib_info.ssRsrq;
+    pt_info->nr_sig_info.ssSinr = lib_info.ssSinr;
+    pt_info->nr_sig_info.csiRsrp = lib_info.csiRsrp;
+    pt_info->nr_sig_info.csiRsrq = lib_info.csiRsrq;
+    pt_info->nr_sig_info.csiSinr = lib_info.csiSinr;
+    return RESULT_OK;
+}
+
+
+
+int qser_nw_add_rx_msg_handler(nw_client_handle_type h_nw,QSER_NW_RxMsgHandlerFunc_t handlerPtr,void* contextPtr)
+{  
+    s_handlerPtr = handlerPtr;
+    s_contextPtr = contextPtr;
+    if(s_handlerPtr!=NULL)
+    {       
+        int rt = pthread_create(&s_new_network_tid, NULL, new_network_thread_recv, NULL);
+        if(rt < 0)
+        {
+            LYDBGLOG("%s pthread_create error!!!",__func__);
+            s_handlerPtr=NULL;
+            s_contextPtr=NULL;
+            return RESULT_ERROR;
+        }
+    }
+   
+    return RESULT_OK;
+}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/makefile
new file mode 100755
index 0000000..ce6255a
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/makefile
@@ -0,0 +1,63 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+                -std=gnu++14 \
+                -g -Os \
+                -flto \
+                -fPIC \
+                -fpermissive \
+
+
+
+$(warning ################# lynq qser sms demo ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH   = .
+
+LOCAL_C_INCLUDES = \
+  -I. \
+  -I$(LOCAL_PATH)/include/ \
+  -I$(ROOT)$(includedir)/logger \
+  -I$(ROOT)$(includedir)/liblog \
+  -I$(ROOT)$(includedir)/lynq_network/lynq_network \
+
+LOCAL_LIBS := \
+    -L. \
+    -ldl \
+    -lstdc++ \
+    -lpthread \
+    -llynq-log \
+    -llynq-network \
+
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-qser-network.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
\ No newline at end of file