Merge "[Feature][T106]version update to T106CN-ZS03.V2.01.01.02P49.AP.06.02_CAP.06.02"
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 d5acfcc..eff00e8 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
@@ -223,6 +223,7 @@
         lynq-qser-voice-demo \
         lynq-qser-fota-demo \
         lynq-qser-gnss-demo \
+        lynq-qser-network-demo \
 	"
 
 zxic_app_open += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'rild', '', d)}"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/lynq-qser-network-demo.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/lynq-qser-network-demo.bb
new file mode 100755
index 0000000..f2f1f04
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-qser-network-demo/lynq-qser-network-demo.bb
@@ -0,0 +1,35 @@
+#inherit externalsrc package
+#inherit externalsrc package systemd
+DESCRIPTION = "lynq-qser-network-demo"
+LICENSE = "CLOSED"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+#DEPENDS += "liblynq-qser-fota"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/packages/apps/lynq-qser-network-demo"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/packages/apps:"
+SRC_URI = " \
+          file://lynq-qser-network-demo \
+          "
+
+SRC-DIR = "${S}/../lynq-qser-network-demo"
+TARGET_CC_ARCH += "${LDFLAGS}"
+SYSTEMD_PACKAGES = "${PN}"
+#Parameters passed to do_compile()
+EXTRA_OEMAKE = "'TARGET_PLATFORM = ${TARGET_PLATFORM}'\"
+EXTRA_OEMAKE += "'MOBILETEK_RIL_CFG = ${MOBILETEK_RIL_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-qser-network-demo ${D}${bindir}/
+}
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 97744ac..b90ff63 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
@@ -62,7 +62,8 @@
 static pthread_mutex_t loc_cond_mutex_r = PTHREAD_MUTEX_INITIALIZER;
 static pthread_cond_t loc_sync_cond = PTHREAD_COND_INITIALIZER;
 #endif
-
+volatile int nmea_state = 0;
+volatile int nmea_reading = 0;
 static struct mbtk_gnss_cmd_msg_t mbtk_gnss_cmd_msg_map[] = {
 { 1,     "$OK",         NULL,                 0},
 { 2,     "$Fail",       NULL,                 0},
@@ -736,6 +737,7 @@
 
     memset(buf, 0, sizeof(buf));
     mbtk_gnss_handle->getap_status = 0;
+
     while(mbtk_gnss_handle->inited)
     {
         while(mbtk_gnss_handle->getap_status){
@@ -743,13 +745,18 @@
             printf("g");
             usleep(100000);
         }
-        ret = mopen_gnss_read(gnss_handle->dev_fd, buf, MBTK_UART_RECV_BUFFER_SIZE);
-        if(ret > 0) {
-            printf("read: [%d] %s\n", ret, buf);
-            ring_buffer_queue_arr(&gnss_handle->ring_buffer, buf, ret);
-            memset(buf, 0, sizeof(buf));
-        } else {
-            gnss_log("read error\n");
+        if(nmea_state == 1)
+        {
+            nmea_reading = 1;
+            ret = mopen_gnss_read(gnss_handle->dev_fd, buf, MBTK_UART_RECV_BUFFER_SIZE);
+            nmea_reading = 0;
+            if(ret > 0) {
+                printf("read: [%d] %s\n", ret, buf);
+                ring_buffer_queue_arr(&gnss_handle->ring_buffer, buf, ret);
+                memset(buf, 0, sizeof(buf));
+            } else {
+                gnss_log("read error\n");
+            }
         }
         usleep(100000);
     }
@@ -853,6 +860,15 @@
 
     if(0 == state)
     {
+        nmea_state = 0;
+        for(int cont = 0; cont < 200; cont++)
+        {
+            if (nmea_reading == 0)
+            {
+                break;
+            }
+            usleep(10000);
+        }
         ret = exec_cmd(cmd,NULL);
         if(0 != ret)
         {
@@ -863,11 +879,13 @@
         if(0 != ret)
         {
             printf("stop fail %x\n", ret);
-        }
+        }   
     }
 
     if(1 == state)
     {
+        nmea_state = 1;
+
         ret = exec_cmd(cmd,NULL);
         if(0 != ret)
         {
diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/include/lynq_qser_network.h b/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/include/lynq_qser_network.h
new file mode 100755
index 0000000..b65e428
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/include/lynq_qser_network.h
@@ -0,0 +1,383 @@
+/**
+ *@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_event_register
+(
+    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_add_rx_msg_handler
+(
+    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/packages/apps/lynq-qser-network-demo/lynq-qser-network-demo.cpp b/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/lynq-qser-network-demo.cpp
new file mode 100755
index 0000000..e3c672c
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/lynq-qser-network-demo.cpp
@@ -0,0 +1,447 @@
+#include <stdlib.h>

+#include <stdio.h>

+#include <stdint.h>

+#include <string.h>

+#include <dlfcn.h>

+#include <sys/types.h>

+//#include <pthread.h>

+#include <unistd.h>

+#include "lynq_qser_network.h"

+

+#ifndef LOG_TAG

+#define LOG_TAG "QSER_NETWORK_DEMO"

+#endif

+

+void *handle_network;

+

+int (*qser_nw_client_init_p)(nw_client_handle_type  * ph_nw);

+int (*qser_nw_client_deinit_p)(nw_client_handle_type h_nw);

+int (*qser_nw_set_config_p)(nw_client_handle_type  h_nw, QSER_NW_CONFIG_INFO_T *pt_info);

+int (*qser_nw_get_operator_name_p)(nw_client_handle_type    h_nw, QSER_NW_OPERATOR_NAME_INFO_T    *pt_info );

+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 getFunc()

+{

+    const char *lynq_libpath_network = "/lib/liblynq-qser-network.so";

+

+    handle_network = dlopen(lynq_libpath_network,RTLD_NOW);

+    if(NULL == handle_network)

+    {

+        printf("dlopen lynq_libpath_network fail:%s",dlerror());

+        exit(EXIT_FAILURE);

+    }

+

+    qser_nw_client_init_p = (int (*)(nw_client_handle_type  * ph_nw))dlsym(handle_network,"qser_nw_client_init");    

+    qser_nw_client_deinit_p = (int (*)(nw_client_handle_type h_nw))dlsym(handle_network,"qser_nw_client_deinit");

+    qser_nw_set_config_p = (int (*)(nw_client_handle_type  h_nw, QSER_NW_CONFIG_INFO_T *pt_info))dlsym(handle_network,"qser_nw_set_config");

+    qser_nw_get_operator_name_p = (int (*)(nw_client_handle_type  h_nw, QSER_NW_OPERATOR_NAME_INFO_T  *pt_info ))dlsym(handle_network,"qser_nw_get_operator_name");

+    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_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");

+        

+    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)

+    {

+        printf("get func pointer null");

+        exit(EXIT_FAILURE);

+    }    

+    return  0;    

+}

+

+static int test_nw(void);

+

+int main(int argc, char const *argv[])

+{

+    printf("--------->[%s,%d] start \n",__FUNCTION__,__LINE__);   

+    

+    if(getFunc()==0)

+    {

+        test_nw();

+    }    

+

+    return 0;

+}

+

+typedef struct

+{

+    int  cmdIdx;

+    char *funcName;

+} st_api_test_case;

+

+st_api_test_case at_nw_testlist[] = 

+{

+    {0,     "qser_nw_client_init"},

+    {1,     "qser_nw_set_config"},      

+    {2,     "qser_nw_get_operator_name"},

+    {3,     "qser_nw_get_reg_status"},        

+    {4,     "qser_nw_client_deinit"},    

+    {5,     "qser_nw_add_rx_msg_handler"},

+    {-1,    "quit"}

+};

+

+typedef int (*TEST)(void);

+

+typedef struct

+{

+    char                *group_name;

+    st_api_test_case    *test_cases;

+    TEST                pf_test;

+} func_api_test_t;

+

+func_api_test_t t_nw_test = {"nw", at_nw_testlist, test_nw};

+

+void show_group_help(func_api_test_t *pt_test)

+{

+    int i;

+

+    printf("Group Name:%s, Supported test cases:\n", pt_test->group_name);

+    for(i = 0; ; i++)

+    {

+        if(pt_test->test_cases[i].cmdIdx == -1)

+        {

+            break;

+        }

+        printf("%d:\t%s\n", pt_test->test_cases[i].cmdIdx, pt_test->test_cases[i].funcName);

+    }

+}

+

+static nw_client_handle_type h_nw = 0;

+

+char *tech_domain[] = {"NONE", "3GPP", "3GPP2"};

+char *radio_tech[] = {"unknown", 

+    "TD_SCDMA", "GSM",      "HSPAP",    "LTE",      "EHRPD",    "EVDO_B", 

+    "HSPA",     "HSUPA",    "HSDPA",    "EVDO_A",   "EVDO_0",   "1xRTT", 

+    "IS95B",    "IS95A",    "UMTS",     "EDGE",     "GPRS",     "NONE"};

+

+void nw_event_ind_handler (

+    nw_client_handle_type h_nw, 

+    u_int32_t ind_flag, 

+    void                  *ind_msg_buf, 

+    u_int32_t              ind_msg_len, 

+    void                  *contextPtr)

+{

+    switch(ind_flag) {

+        case NW_IND_VOICE_REG_EVENT_IND_FLAG:

+            {

+                QSER_NW_VOICE_REG_EVENT_IND_T *ind = (QSER_NW_VOICE_REG_EVENT_IND_T*)ind_msg_buf;

+                printf("Recv event indication : VOICE REG EVENT\n");

+                

+                if(ind==NULL)

+                {

+                     printf("ind is NULL\n");

+                     break;

+                }

+

+                if(ind->registration_valid)

+                {

+                    printf("voice_registration: \ntech_domain=%s, radio_tech=%s, roaming=%d, registration_state=%d\n", 

+                            tech_domain[ind->registration.tech_domain], 

+                            radio_tech[ind->registration.radio_tech],

+                            ind->registration.roaming,

+                            ind->registration.registration_state);

+                }

+                if(ind->registration_details_3gpp_valid)

+                {

+                    printf("voice_registration_details_3gpp: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, cid=0x%X, lac=%d, psc=%d, tac=%d\n", 

+                            tech_domain[ind->registration_details_3gpp.tech_domain], 

+                            radio_tech[ind->registration_details_3gpp.radio_tech],

+                            ind->registration_details_3gpp.mcc,

+                            ind->registration_details_3gpp.mnc,

+                            ind->registration_details_3gpp.roaming,

+                            ind->registration_details_3gpp.forbidden,                    

+                            ind->registration_details_3gpp.cid,

+                            ind->registration_details_3gpp.lac,

+                            ind->registration_details_3gpp.psc,

+                            ind->registration_details_3gpp.tac);

+                }

+

+                if(ind->registration_details_3gpp2_valid)

+                {

+                    printf("voice_registration_details_3gpp2: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, sid=%d, nid=%d, bsid=%d\n", 

+                            tech_domain[ind->registration_details_3gpp2.tech_domain], 

+                            radio_tech[ind->registration_details_3gpp2.radio_tech],

+                            ind->registration_details_3gpp2.mcc,

+                            ind->registration_details_3gpp2.mnc,

+                            ind->registration_details_3gpp2.roaming,

+                            ind->registration_details_3gpp2.forbidden,                    

+                            ind->registration_details_3gpp2.sid,

+                            ind->registration_details_3gpp2.nid,

+                            ind->registration_details_3gpp2.bsid);

+                }

+

+                break;

+            }

+        case NW_IND_DATA_REG_EVENT_IND_FLAG:

+            {

+                QSER_NW_DATA_REG_EVENT_IND_T *ind = (QSER_NW_DATA_REG_EVENT_IND_T*)ind_msg_buf;

+

+                printf("Recv event indication : DATA REG EVENT\n");

+                

+                if(ind==NULL)

+                {

+                     printf("ind is NULL\n");

+                     break;

+                }

+              

+

+                if(ind->registration_valid)

+                {

+                    printf("data_registration: \ntech_domain=%s, radio_tech=%s, roaming=%d, registration_state=%d\n", 

+                            tech_domain[ind->registration.tech_domain], 

+                            radio_tech[ind->registration.radio_tech],

+                            ind->registration.roaming,

+                            ind->registration.registration_state);

+                }

+                if(ind->registration_details_3gpp_valid)

+                {

+                    printf("data_registration_details_3gpp: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, cid=0x%X, lac=%d, psc=%d, tac=%d\n", 

+                            tech_domain[ind->registration_details_3gpp.tech_domain], 

+                            radio_tech[ind->registration_details_3gpp.radio_tech],

+                            ind->registration_details_3gpp.mcc,

+                            ind->registration_details_3gpp.mnc,

+                            ind->registration_details_3gpp.roaming,

+                            ind->registration_details_3gpp.forbidden,                    

+                            ind->registration_details_3gpp.cid,

+                            ind->registration_details_3gpp.lac,

+                            ind->registration_details_3gpp.psc,

+                            ind->registration_details_3gpp.tac);

+                }

+

+                if(ind->registration_details_3gpp2_valid)

+                {

+                    printf("data_registration_details_3gpp2: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, prl=%d, css=%d, sid=%d, nid=%d, bsid=%d\n", 

+                            tech_domain[ind->registration_details_3gpp2.tech_domain], 

+                            radio_tech[ind->registration_details_3gpp2.radio_tech],

+                            ind->registration_details_3gpp2.mcc,

+                            ind->registration_details_3gpp2.mnc,

+                            ind->registration_details_3gpp2.roaming,

+                            ind->registration_details_3gpp2.forbidden,   

+                            ind->registration_details_3gpp2.inPRL,

+                            ind->registration_details_3gpp2.css,

+                            ind->registration_details_3gpp2.sid,

+                            ind->registration_details_3gpp2.nid,

+                            ind->registration_details_3gpp2.bsid);

+                }

+

+                break;

+            }

+        case NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG:

+            {

+                QSER_NW_SINGNAL_EVENT_IND_T *ind = (QSER_NW_SINGNAL_EVENT_IND_T*)ind_msg_buf;

+

+                printf("Recv event indication : SIGNAL STRENGTH EVENT\n");

+                

+                if(ind==NULL)

+                {

+                     printf("ind is NULL\n");

+                     break;

+                }

+

+                if(ind->gsm_sig_info_valid)

+                {

+                    printf("gsm_sig_info: rssi=%d\n", 

+                            ind->gsm_sig_info.rssi);

+                } 

+

+                if(ind->wcdma_sig_info_valid)

+                {

+                    printf("wcdma_sig_info: rssi=%d, ecio=%d\n", 

+                            ind->wcdma_sig_info.rssi, 

+                            ind->wcdma_sig_info.ecio);

+                } 

+                if(ind->tdscdma_sig_info_valid)

+                {

+                    printf("tdscdma_sig_info: rssi=%d, rscp=%d, ecio=%d, sinr=%d\n", 

+                            ind->tdscdma_sig_info.rssi, 

+                            ind->tdscdma_sig_info.rscp,

+                            ind->tdscdma_sig_info.ecio,

+                            ind->tdscdma_sig_info.sinr);

+                } 

+                if(ind->lte_sig_info_valid)

+                {

+                    printf("lte_sig_info: rssi=%d, rsrq=%d, rsrp=%d, snr=%d\n", 

+                            ind->lte_sig_info.rssi, 

+                            ind->lte_sig_info.rsrq,

+                            ind->lte_sig_info.rsrp,

+                            ind->lte_sig_info.snr);

+                } 

+                if(ind->cdma_sig_info_valid)

+                {

+                    printf("cdma_sig_info: rssi=%d, ecio=%d\n", 

+                            ind->cdma_sig_info.rssi, 

+                            ind->cdma_sig_info.ecio);

+                } 

+                if(ind->hdr_sig_info_valid)

+                {

+                    printf("hdr_sig_info: rssi=%d, ecio=%d, sinr=%d, io=%d\n", 

+                            ind->hdr_sig_info.rssi, 

+                            ind->hdr_sig_info.ecio,

+                            ind->hdr_sig_info.sinr,

+                            ind->hdr_sig_info.io);

+                }

+                break;

+            }        

+        default:

+            break;

+    }

+}

+

+static int test_nw(void)

+{

+    int    cmdIdx  = 0;

+    int    ret     = 0;       

+        

+    while(1)

+    {

+        show_group_help(&t_nw_test);

+        printf("please input cmd index(-1 exit): ");

+        ret = scanf("%d", &cmdIdx);

+        if(ret != 1)

+        {

+            char c;

+            while(((c=getchar()) != '\n') && (c != EOF))

+            {

+                ;

+            }

+            continue;

+        }

+        if(cmdIdx == -1)

+        {

+            break;

+        }

+        switch(cmdIdx)

+        {

+        case 0://"qser_nw_client_init"

+        {

+            

+            ret = qser_nw_client_init_p(&h_nw);

+            printf("qser_nw_client_init ret = %d\n", ret);

+            break;

+        }

+        case 1://"qser_nw_set_config"

+        {

+            QSER_NW_CONFIG_INFO_T     t_info = {0};

+            

+            int mask = 0;

+            printf("please input event mask hex(TDSCDMA | LTE | EVDO | CDMA | WCDMA | GSM): \n");

+            scanf("%x", &mask);

+            t_info.preferred_nw_mode = mask;

+            

+            ret = qser_nw_set_config_p(h_nw, &t_info);

+            printf("qser_nw_set_config ret = %d\n", ret);

+            break;

+        }            

+        case 2://"qser_nw_get_operator_name"

+        {

+            QSER_NW_OPERATOR_NAME_INFO_T  t_info;

+            ret = qser_nw_get_operator_name_p(h_nw, &t_info);

+            printf("qser_nw_get_operator_name ret = %d, long_eons=%s, short_eons=%s, mcc=%s, mnc=%s\n", ret,

+                    t_info.long_eons, t_info.short_eons, t_info.mcc, t_info.mnc);

+            break;

+        }       

+        case 3://"qser_nw_get_reg_status"

+        {

+            QSER_NW_REG_STATUS_INFO_T         t_info;

+

+            memset(&t_info, 0, sizeof(QSER_NW_REG_STATUS_INFO_T));

+            ret = qser_nw_get_reg_status_p(h_nw, &t_info);

+            printf("qser_nw_get_reg_status ret = %d, detail info:\n", ret);

+            if(t_info.voice_registration_valid)

+            {

+                printf("voice_registration: \ntech_domain=%s, radio_tech=%s, roaming=%d, registration_state=%d\n", 

+                    tech_domain[t_info.voice_registration.tech_domain], 

+                    radio_tech[t_info.voice_registration.radio_tech],

+                    t_info.voice_registration.roaming,

+                    t_info.voice_registration.registration_state);

+            }

+            if(t_info.data_registration_valid)

+            {

+                printf("data_registration: \ntech_domain=%s, radio_tech=%s, roaming=%d, registration_state=%d\n", 

+                    tech_domain[t_info.data_registration.tech_domain], 

+                    radio_tech[t_info.data_registration.radio_tech],

+                    t_info.data_registration.roaming,

+                    t_info.data_registration.registration_state);

+            }

+            if(t_info.voice_registration_details_3gpp_valid)

+            {

+                printf("voice_registration_details_3gpp: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, cid=0x%X, lac=%d, psc=%d, tac=%d\n", 

+                    tech_domain[t_info.voice_registration_details_3gpp.tech_domain], 

+                    radio_tech[t_info.voice_registration_details_3gpp.radio_tech],

+                    t_info.voice_registration_details_3gpp.mcc,

+                    t_info.voice_registration_details_3gpp.mnc,

+                    t_info.voice_registration_details_3gpp.roaming,

+                    t_info.voice_registration_details_3gpp.forbidden,                    

+                    t_info.voice_registration_details_3gpp.cid,

+                    t_info.voice_registration_details_3gpp.lac,

+                    t_info.voice_registration_details_3gpp.psc,

+                    t_info.voice_registration_details_3gpp.tac);

+            }

+            if(t_info.data_registration_details_3gpp_valid)

+            {

+                printf("data_registration_details_3gpp: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, cid=0x%X, lac=%d, psc=%d, tac=%d\n", 

+                    tech_domain[t_info.data_registration_details_3gpp.tech_domain], 

+                    radio_tech[t_info.data_registration_details_3gpp.radio_tech],

+                    t_info.data_registration_details_3gpp.mcc,

+                    t_info.data_registration_details_3gpp.mnc,

+                    t_info.data_registration_details_3gpp.roaming,

+                    t_info.data_registration_details_3gpp.forbidden,                    

+                    t_info.data_registration_details_3gpp.cid,

+                    t_info.data_registration_details_3gpp.lac,

+                    t_info.data_registration_details_3gpp.psc,

+                    t_info.data_registration_details_3gpp.tac);

+            }

+            

+            if(t_info.voice_registration_details_3gpp2_valid)

+            {

+                printf("voice_registration_details_3gpp2: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, sid=%d, nid=%d, bsid=%d\n", 

+                    tech_domain[t_info.voice_registration_details_3gpp2.tech_domain], 

+                    radio_tech[t_info.voice_registration_details_3gpp2.radio_tech],

+                    t_info.voice_registration_details_3gpp2.mcc,

+                    t_info.voice_registration_details_3gpp2.mnc,

+                    t_info.voice_registration_details_3gpp2.roaming,

+                    t_info.voice_registration_details_3gpp2.forbidden,                    

+                    t_info.voice_registration_details_3gpp2.sid,

+                    t_info.voice_registration_details_3gpp2.nid,

+                    t_info.voice_registration_details_3gpp2.bsid);

+            }

+            

+            if(t_info.data_registration_details_3gpp2_valid)

+            {

+                printf("data_registration_details_3gpp2: \ntech_domain=%s, radio_tech=%s, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, sid=%d, nid=%d, bsid=%d\n", 

+                    tech_domain[t_info.data_registration_details_3gpp2.tech_domain], 

+                    radio_tech[t_info.data_registration_details_3gpp2.radio_tech],

+                    t_info.data_registration_details_3gpp2.mcc,

+                    t_info.data_registration_details_3gpp2.mnc,

+                    t_info.data_registration_details_3gpp2.roaming,

+                    t_info.data_registration_details_3gpp2.forbidden,                    

+                    t_info.data_registration_details_3gpp2.sid,

+                    t_info.data_registration_details_3gpp2.nid,

+                    t_info.data_registration_details_3gpp2.bsid);

+            }

+                        

+            break;

+        }                 

+        case 4://"qser_nw_client_deinit"

+        {

+            ret = qser_nw_client_deinit_p(h_nw);

+            printf("qser_nw_client_deinit ret = %d\n", ret);

+            break;

+        }       

+        case 5 :

+        {

+           ret = qser_nw_add_rx_msg_handler_p(h_nw, nw_event_ind_handler, NULL);  

+           printf("qser_nw_add_rx_msg_handler, ret=%d\n", ret);

+           break;

+        }

+        

+        default:

+            show_group_help(&t_nw_test);

+        }

+    }

+    return 0;

+}

+

+

+

+

+

diff --git a/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/makefile b/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/makefile
new file mode 100755
index 0000000..975557b
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/lynq-qser-network-demo/makefile
@@ -0,0 +1,54 @@
+SHELL = /bin/sh

+RM = rm -f

+

+LOCAL_CFLAGS := -Wall \

+                -std=gnu++14 \

+                -g -Os \

+                -flto \

+                -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 += -Werror=format-security

+

+$(warning ################# rock ROOT: $(ROOT),includedir:$(includedir),)

+

+LOCAL_PATH   = .

+

+LOCAL_C_INCLUDES = \

+  -I. \

+  -I$(LOCAL_PATH)/include/ \

+  -I$(ROOT)$(includedir)/liblog \

+

+

+

+

+LOCAL_LIBS := \

+    -L. \

+    -ldl \

+    -lstdc++ \

+

+SOURCES = lynq-qser-network-demo.cpp

+

+EXECUTABLE = lynq-qser-network-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)

+