优化demo代码解决NW部分参数处理错误

Change-Id: I4db3c717b535160ff7dc12bc9723d0d03ef303e8
diff --git a/mbtk/include/mbtk/mbtk_info_api.h b/mbtk/include/mbtk/mbtk_info_api.h
index ffc7654..7af2d75 100755
--- a/mbtk/include/mbtk/mbtk_info_api.h
+++ b/mbtk/include/mbtk/mbtk_info_api.h
@@ -120,6 +120,8 @@
     mbtk_info_callback_func radio_state_cb;
     mbtk_info_callback_func sim_state_cb;
     mbtk_info_callback_func pdp_state_cb;
+    //add signal by xr
+    mbtk_info_callback_func signal_state_cb;
 } mbtk_info_handle_t;
 
 typedef struct
@@ -967,6 +969,12 @@
 */
 int mbtk_sim_state_change_cb_reg(mbtk_info_handle_t* handle, mbtk_info_callback_func cb);
 
+/*
+* Set signal state change callback function.
+*/
+int mbtk_signal_state_change_cb_reg(mbtk_info_handle_t* handle, mbtk_info_callback_func cb);
+
+
 int mbtk_sms_cnmi_set(mbtk_info_handle_t* handle);
 
 #endif /* _MBTK_INFO_API_H */
diff --git a/mbtk/liblynq_lib/src/lynq_network.c b/mbtk/liblynq_lib/src/lynq_network.c
index 98bf359..86bd562 100755
--- a/mbtk/liblynq_lib/src/lynq_network.c
+++ b/mbtk/liblynq_lib/src/lynq_network.c
@@ -6,6 +6,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+
 mbtk_info_handle_t* lynq_nw_info_handle = NULL;
 uint64_t tmp_mode = 0xFF;
 
@@ -49,8 +50,197 @@
     {"China Telecom","CT",46011}
 };
 
-void lynq_nw_state_change_cb(const void* data, int data_len)
+#if 0
+//T106的实现
+/*Used to wait for an update signal*/
+int lynq_wait_signalchanges(int *handle)
 {
+    LYDBGLOG("start wait signalchanges info");
+    if(NULL == handle)
+    {
+        LYERRLOG("illegal input");
+        return LYNQ_E_PARAMETER_ANONALY;
+    }
+    wait_urc_signal_changes();
+    LYDBGLOG("get signalchanges");
+    *handle = s_module_wait_urc_id;
+    return RESULT_OK;   
+}
+
+bool is_support_urc(int urc_id)
+{
+    switch(urc_id)
+    {
+        case RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED:
+        case RIL_UNSOL_RESPONSE_PS_NETWORK_STATE_CHANGED:
+        case RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED:
+        case RIL_UNSOL_SIGNAL_STRENGTH:
+            return true;                
+        default:
+            return false;
+    }    
+}
+
+/*Used to get urc info*/
+int lynq_get_urc_info(const int handle,signalStrength_t *solSigStren,int *slot_id)
+{
+    if(g_module_init_flag != MODULE_RUNNING)
+    {
+        LYERRLOG("%s module state %d error",__func__,g_module_init_flag);
+        return -1;
+    }
+    LYDBGLOG("start get urc info");
+    if(is_support_urc(handle)==false)
+    {
+        LYINFLOG("invalid handle!!!");
+        return -1;
+    }
+    if((handle ==RIL_UNSOL_SIGNAL_STRENGTH && NULL == solSigStren) || 
+        (handle !=RIL_UNSOL_SIGNAL_STRENGTH && NULL == slot_id))
+    {
+        LYINFLOG("incoming solSigStren or slot_id is NULL!!!");
+        return -1;
+    }
+    switch(handle)
+    {        
+        case RIL_UNSOL_SIGNAL_STRENGTH: //1009
+        {
+            LYDBGLOG("get state update to signal info");
+            solSigStren->gw_sig_valid = s_network_urc_solSigStren.gw_sig_valid;
+            solSigStren->rssi = s_network_urc_solSigStren.rssi;
+            solSigStren->wcdma_signalstrength = s_network_urc_solSigStren.wcdma_signalstrength;
+            solSigStren->wcdma_sig_valid = s_network_urc_solSigStren.wcdma_sig_valid;
+            solSigStren->rscp = s_network_urc_solSigStren.rscp;
+            solSigStren->ecno = s_network_urc_solSigStren.ecno;
+            solSigStren->lte_signalstrength = s_network_urc_solSigStren.lte_signalstrength;
+            solSigStren->lte_sig_valid = s_network_urc_solSigStren.lte_sig_valid;
+            solSigStren->rsrp = s_network_urc_solSigStren.rsrp;
+            solSigStren->rsrq = s_network_urc_solSigStren.rsrq;
+            solSigStren->rssnr = s_network_urc_solSigStren.rssnr;
+            solSigStren->nr_sig_valid = s_network_urc_solSigStren.nr_sig_valid;
+            solSigStren->ssRsrp = s_network_urc_solSigStren.ssRsrp;
+            solSigStren->ssRsrq = s_network_urc_solSigStren.ssRsrq;
+            solSigStren->ssSinr = s_network_urc_solSigStren.ssSinr;
+            solSigStren->csiRsrp = s_network_urc_solSigStren.csiRsrp;
+            solSigStren->csiRsrq = s_network_urc_solSigStren.csiRsrq;
+            solSigStren->csiSinr = s_network_urc_solSigStren.csiSinr;
+            break;
+        }
+        default:
+        {
+            *slot_id = s_module_urc_slot_id;
+            LYINFLOG("slot_id = %d",s_module_urc_slot_id);
+        }        
+    }
+    return 0;   
+}
+
+
+void urc_msg_process_voice_reg()
+{
+    if(s_handlerPtr != NULL)
+    {
+        s_handlerPtr(g_nw_val,NW_IND_VOICE_REG_EVENT_IND_FLAG,NULL,0,s_contextPtr);
+    }
+}
+
+void urc_msg_process_data_reg()
+{
+    if(s_handlerPtr != NULL)
+    {
+        s_handlerPtr(g_nw_val,NW_IND_DATA_REG_EVENT_IND_FLAG,NULL,0,s_contextPtr);
+    }  
+}
+
+void urc_msg_process_ims_reg()
+{
+    if(s_handlerPtr != NULL)
+    {
+        s_handlerPtr(g_nw_val,NW_IND_IMS_REG_EVENT_IND_FLAG,NULL,0,s_contextPtr);
+    }
+}
+
+void *new_network_thread_recv(void *context)
+{
+    int handle = -1;  
+    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;
+            }
+            case 1037://RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED:
+            {   
+                urc_msg_process_ims_reg();
+                break;
+            }
+        }        
+    }
+    return NULL;
+}
+
+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_nw_val,NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG,ind_msg_buf,sizeof (msg_buf) ,s_contextPtr);
+        }         
+   }   
+}
+
+#endif
+
+
+
+void lynq_signal_state_change_cb(const void* data, int data_len)
+{
+#if 0
 
 /*
     uint8 *net_data = NULL;
@@ -74,10 +264,87 @@
     }
 */
 
-    if(lynq_func_cb_handle.handlerPtr != NULL)//数据原样输出
+    if(s_handlerPtr != NULL)//数据原样输出
     {
-        lynq_func_cb_handle.handlerPtr(g_nw_val, NW_IND_DATA_REG_EVENT_IND_FLAG, data, data_len, NULL);
+        s_handlerPtr(g_nw_val, NW_IND_DATA_REG_EVENT_IND_FLAG, data, data_len, NULL);
     }
+#endif
+
+    /*
+    data_signal[0] = signal.type;
+    data_signal[1] = signal.rssi;
+    data_signal[2] = signal.rxlev;
+    data_signal[3] = signal.ber;
+    data_signal[4] = signal.rscp;
+    data_signal[5] = signal.ecno;
+    data_signal[6] = signal.rsrq;
+    data_signal[7] = signal.rsrp;
+    */
+
+    uint8 *net_data = NULL;
+    QSER_NW_SINGNAL_EVENT_IND_T msg_buf;
+
+    if(data && data_len > 0)
+    {
+        net_data = (uint8*)data;
+        //printf("net_data[0] => *net_data =%d\n",*net_data);
+        msg_buf.gsm_sig_info_valid = FALSE;
+        msg_buf.lte_sig_info_valid = FALSE;
+        msg_buf.wcdma_sig_info_valid = FALSE;
+
+        if(*net_data == MBTK_RADIO_TECH_GSM || *net_data == MBTK_RADIO_TECH_GSM_COMPACT || \
+           *net_data == MBTK_RADIO_TECH_GSM_EGPRS)              //GSM
+        {
+            msg_buf.gsm_sig_info_valid = TRUE;
+        }
+        else if(*net_data == MBTK_RADIO_TECH_E_UTRAN)     //LTE
+        {
+            msg_buf.lte_sig_info_valid = TRUE;
+        }
+        else if (*net_data == MBTK_RADIO_TECH_UTRAN || *net_data == MBTK_RADIO_TECH_UTRAN_HSDPA || \
+                 *net_data == MBTK_RADIO_TECH_UTRAN_HSUPA || *net_data == MBTK_RADIO_TECH_UTRAN_HSDPA_HSUPA ||  \
+                 *net_data == MBTK_RADIO_TECH_UTRAN_HSPA )//WCDMA
+        {
+            msg_buf.wcdma_sig_info_valid = TRUE;
+        }
+
+        //msg_buf.gsm_sig_info_valid = TRUE;//signalstrength.gw_sig_valid;
+        msg_buf.gsm_sig_info.rssi = *(net_data + 1);//signalstrength.rssi;
+        printf("rssi = %d\n", *(net_data + 1));
+        //msg_buf.wcdma_sig_info_valid = TRUE;//.wcdma_sig_valid;
+        msg_buf.wcdma_sig_info.rssi = *(net_data + 4);//signalstrength.rscp;
+        printf("rscp = %d\n", *(net_data + 4));
+        msg_buf.wcdma_sig_info.ecio = *(net_data + 5);//signalstrength.ecno;
+        printf("ecno = %d\n", *(net_data + 5));
+        msg_buf.tdscdma_sig_info_valid = FALSE;
+        //msg_buf.lte_sig_info_valid = TRUE;//signalstrength.lte_sig_valid;
+        msg_buf.lte_sig_info.rssi = -125;
+        msg_buf.lte_sig_info.rsrp = *(net_data + 7);//signalstrength.rsrp;
+        printf("rsrp = %d\n", *(net_data + 7));
+        msg_buf.lte_sig_info.rsrq = *(net_data + 6);//signalstrength.rsrq;
+        printf("rsrq = %d\n", *(net_data + 6));
+        msg_buf.lte_sig_info.snr = 0x7FFFFFFFF; //signalstrength.rssnr;(当前mbtk没有该参数)
+        msg_buf.cdma_sig_info_valid = FALSE;
+        msg_buf.hdr_sig_info_valid = FALSE;
+        msg_buf.nr_sig_info_valid = FALSE;//(当前mbtk没有该参数)
+        msg_buf.nr_sig_info.ssRsrp = 0;
+        msg_buf.nr_sig_info.ssRsrq = 0;
+        msg_buf.nr_sig_info.ssSinr = 0;
+        msg_buf.nr_sig_info.csiRsrp = 0;
+        msg_buf.nr_sig_info.csiRsrq = 0;
+        msg_buf.nr_sig_info.csiSinr = 0;
+
+        void *ind_msg_buf= &msg_buf;
+        if(lynq_func_cb_handle.handlerPtr != NULL)
+        {
+            lynq_func_cb_handle.handlerPtr(g_nw_val, NW_IND_SIGNAL_STRENGTH_EVENT_IND_FLAG, ind_msg_buf, sizeof (msg_buf), lynq_func_cb_handle.contextPtr);
+        }
+    }
+    else
+    {
+        LOGE("lynq_nw_state_change_cb : NULL");
+    }
+
 }
 
 
@@ -154,24 +421,24 @@
     } else {
         switch(net_mode)
         {
-            //只做234G的下配 MBTK_NET_PREF_GSM_ONLY/MBTK_NET_PREF_GSM_UMTS_UMTS_PREF/MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF
+            //只做234G的下配 MBTK_NET_PREF_GSM_ONLY/MBTK_NET_PREF_UMTS_ONLY/MBTK_NET_PREF_LTE_ONLY
             case QSER_NW_MODE_GSM:
                 mbtk_net_pre = MBTK_NET_PREF_GSM_ONLY;
                 break;
             case QSER_NW_MODE_WCDMA:
-                mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
+                mbtk_net_pre = MBTK_NET_PREF_UMTS_ONLY;
                 break;
             case QSER_NW_MODE_CDMA:
-                mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
+                //mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
                 break;
             case QSER_NW_MODE_EVDO:
-                mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
+                //mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
                 break;
             case QSER_NW_MODE_LTE:
-                mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_LTE_LTE_PREF;
+                mbtk_net_pre = MBTK_NET_PREF_LTE_ONLY;
                 break;
             case QSER_NW_MODE_TDSCDMA:
-                mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
+                //mbtk_net_pre = MBTK_NET_PREF_GSM_UMTS_UMTS_PREF;
                 break;
             default:
                 mbtk_net_pre = 0xFF;
@@ -213,6 +480,8 @@
         return -1;
     }
 
+    mbtk_signal_state_change_cb_reg(lynq_nw_info_handle, NULL);
+
     if(lynq_nw_info_handle)
     {
         mbtk_info_handle_free(&lynq_nw_info_handle);
@@ -406,11 +675,35 @@
         //暂时未知是否其他也被使用,现根据ql模块的传输情况,
         //只配置3gpp,涉及call,data状态没有对应的匹配的就没有赋值
 
-        pt_info->voice_registration_valid = FALSE;
-        //pt_info->voice_registration
+        pt_info->voice_registration_valid = TRUE;
+        pt_info->voice_registration.deny_reason = 0;
+        pt_info->voice_registration.roaming = 0;
+        pt_info->voice_registration.tech_domain = 0;
 
-        pt_info->data_registration_valid = FALSE;
-        //pt_info->data_registration
+
+        pt_info->data_registration_valid = TRUE;
+        pt_info->data_registration.deny_reason = 0;
+        pt_info->data_registration.roaming = 0;
+        pt_info->data_registration.tech_domain = 0;
+
+        if (reg.call_state == 1 || reg.call_state == 5)
+        {
+            pt_info->voice_registration.registration_state = E_QSER_NW_SERVICE_FULL;
+        }
+        else if (reg.call_state == 0 || reg.call_state == 2 || reg.call_state == 3 || reg.call_state == 4)
+        {
+            pt_info->voice_registration.registration_state = E_QSER_NW_SERVICE_NONE;
+        }
+        
+        if (reg.data_state == 1 || reg.data_state == 5)
+        {
+            pt_info->data_registration.registration_state = E_QSER_NW_SERVICE_FULL;
+        }
+        else if (reg.data_state == 0 || reg.data_state == 2 || reg.data_state == 3 || reg.data_state == 4)
+        {
+            pt_info->data_registration.registration_state = E_QSER_NW_SERVICE_NONE;
+        }
+
 
         pt_info->voice_registration_details_3gpp_valid = TRUE;
         pt_info->voice_registration_details_3gpp.lac = reg.lac;
@@ -449,6 +742,8 @@
             {
                 pt_info->data_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_GPRS;
                 pt_info->voice_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_GSM;
+                pt_info->data_registration.radio_tech = E_QSER_NW_RADIO_TECH_GPRS;
+                pt_info->voice_registration.radio_tech = E_QSER_NW_RADIO_TECH_GSM;
                 break;
             }
             case MBTK_RADIO_TECH_UTRAN:
@@ -458,18 +753,26 @@
             {
                 pt_info->data_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_UMTS;
                 pt_info->voice_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_UMTS;
+                pt_info->data_registration.radio_tech = E_QSER_NW_RADIO_TECH_UMTS;
+                pt_info->voice_registration.radio_tech = E_QSER_NW_RADIO_TECH_UMTS;
                 break;
             }
             case MBTK_RADIO_TECH_E_UTRAN:
             {
                 pt_info->data_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_LTE;
                 pt_info->voice_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_LTE;
+                pt_info->data_registration.radio_tech = E_QSER_NW_RADIO_TECH_LTE;
+                pt_info->voice_registration.radio_tech = E_QSER_NW_RADIO_TECH_LTE;
                 break;
             }
             default:
             {
                 pt_info->data_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_NONE;
                 pt_info->voice_registration_details_3gpp.radio_tech = E_QSER_NW_RADIO_TECH_NONE;
+                pt_info->data_registration.radio_tech = E_QSER_NW_RADIO_TECH_NONE;
+                pt_info->voice_registration.radio_tech = E_QSER_NW_RADIO_TECH_NONE;
+                pt_info->data_registration.registration_state = E_QSER_NW_SERVICE_NONE;
+                pt_info->voice_registration.registration_state = E_QSER_NW_SERVICE_NONE;
                 break;
             }
         }
@@ -510,6 +813,7 @@
     else
     {
         memset(pt_info, 0x0, sizeof(QSER_NW_SIGNAL_STRENGTH_INFO_T));
+        
         if(signal.type == MBTK_RADIO_TECH_GSM || signal.type == MBTK_RADIO_TECH_GSM_COMPACT || \
            signal.type == MBTK_RADIO_TECH_GSM_EGPRS)              //GSM
         {
@@ -521,21 +825,44 @@
             pt_info->lte_sig_info_valid = TRUE;
             pt_info->lte_sig_info.rsrp = signal.rsrp;
             pt_info->lte_sig_info.rsrq = signal.rsrq;
-            pt_info->lte_sig_info.snr = 0;                  //->MBTK接口无该参数,写死值为0
-            pt_info->lte_sig_info.rssi = signal.rssi;
+            pt_info->lte_sig_info.snr = 0x7FFFFFFFF;                  //->MBTK接口无该参数(对应参数为rssnr,该值INT_MAX:0x7FFFFFFFF表示无效值),写死值为0x7FFFFFFFF 
+            pt_info->lte_sig_info.rssi = -125;
         }
         else if (signal.type == MBTK_RADIO_TECH_UTRAN || signal.type == MBTK_RADIO_TECH_UTRAN_HSDPA || \
                  signal.type == MBTK_RADIO_TECH_UTRAN_HSUPA || signal.type == MBTK_RADIO_TECH_UTRAN_HSDPA_HSUPA ||  \
                  signal.type == MBTK_RADIO_TECH_UTRAN_HSPA )//WCDMA
         {
             pt_info->wcdma_sig_info_valid = TRUE;
-            pt_info->wcdma_sig_info.rssi = signal.rssi;
-            pt_info->wcdma_sig_info.ecio = 0;               //->MBTK接口无该参数,写死值为0
+            pt_info->wcdma_sig_info.rssi = signal.rscp;
+            pt_info->wcdma_sig_info.ecio = signal.ecno;
         }
         else
         {
             return -1;
         }
+        /*
+        pt_info->gsm_sig_info_valid = 1//signal.gw_sig_valid;
+        pt_info->gsm_sig_info.rssi = signal.rssi;//signal.rssi-110;
+        pt_info->wcdma_sig_info_valid = 1//signal.wcdma_sig_valid;
+        pt_info->wcdma_sig_info.rssi = signal.rscp;//signal.wcdma_signalstrength-110;
+        pt_info->wcdma_sig_info.ecio = //signal.ecno/5;
+        pt_info->tdscdma_sig_info_valid = 0;
+        pt_info->lte_sig_info_valid = 1//signal.lte_sig_valid;
+        pt_info->lte_sig_info.rssi = -125;//signal.lte_signalstrength-110;
+        pt_info->lte_sig_info.rsrp = signal.rsrp;//signal.rsrp*(-1);
+        pt_info->lte_sig_info.rsrq = signal.rsrq;//signal.rsrq*(-1);
+        pt_info->lte_sig_info.snr = 0x7FFFFFFFF;//signal.rssnr;
+        pt_info->cdma_sig_info_valid = 0;
+        pt_info->hdr_sig_info_valid = 0;
+        //mbtk 无nr
+        pt_info->nr_sig_info_valid = 0//signal.nr_sig_valid;
+        pt_info->nr_sig_info.ssRsrp = 0//signal.ssRsrp;
+        pt_info->nr_sig_info.ssRsrq = 0//signal.ssRsrq;
+        pt_info->nr_sig_info.ssSinr = 0//signal.ssSinr;
+        pt_info->nr_sig_info.csiRsrp = 0//signal.csiRsrp;
+        pt_info->nr_sig_info.csiRsrq = 0//signal.csiRsrq;
+        pt_info->nr_sig_info.csiSinr = 0//signal.csiSinr;
+        */
     }
 
     return 0;
@@ -562,7 +889,7 @@
     lynq_func_cb_handle.handlerPtr = handlerPtr;
     lynq_func_cb_handle.contextPtr = contextPtr;
 
-    mbtk_net_state_change_cb_reg(lynq_nw_info_handle, lynq_nw_state_change_cb);
+    mbtk_signal_state_change_cb_reg(lynq_nw_info_handle, lynq_signal_state_change_cb);
 
     return 0;
 }
diff --git a/mbtk/liblynq_lib/src/lynq_sms.c b/mbtk/liblynq_lib/src/lynq_sms.c
index 519d21a..2c56e35 100755
--- a/mbtk/liblynq_lib/src/lynq_sms.c
+++ b/mbtk/liblynq_lib/src/lynq_sms.c
@@ -103,6 +103,8 @@
         return -1;
     }
 
+    mbtk_sms_state_change_cb_reg(sms_info_handle, NULL);
+
     if(sms_info_handle)
     {
         mbtk_info_handle_free(&sms_info_handle);
diff --git a/mbtk/libmbtk_ril/mbtk_info.c b/mbtk/libmbtk_ril/mbtk_info.c
index 7627c08..d7ea54f 100755
--- a/mbtk/libmbtk_ril/mbtk_info.c
+++ b/mbtk/libmbtk_ril/mbtk_info.c
@@ -323,6 +323,9 @@
         // <uint8>  State
         case MBTK_INFO_ID_IND_SERVER_STATE_CHANGE:
             return "IND_SERVER_STATE";
+        // <uint8>  State
+        case MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE:
+            return "IND_SIGNAL_STATE";
         default:
         {
             return "UNKNOWN";
diff --git a/mbtk/libmbtk_ril/mbtk_info.h b/mbtk/libmbtk_ril/mbtk_info.h
old mode 100644
new mode 100755
index 9bbf844..1ba7ab8
--- a/mbtk/libmbtk_ril/mbtk_info.h
+++ b/mbtk/libmbtk_ril/mbtk_info.h
@@ -261,6 +261,9 @@
     MBTK_INFO_ID_IND_PDP_STATE_CHANGE,
     // <uint8> State
     MBTK_INFO_ID_IND_SERVER_STATE_CHANGE,////mbtk wyq for server_ready_status add
+    // <uint8> State
+    MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE,
+
 
     MBTK_INFO_ID_IND_END,
     MBTK_INFO_ID_REQ_UNKNOWN        // Unknown information.
diff --git a/mbtk/libmbtk_ril/mbtk_info_api.c b/mbtk/libmbtk_ril/mbtk_info_api.c
old mode 100644
new mode 100755
index ac21898..e987275
--- a/mbtk/libmbtk_ril/mbtk_info_api.c
+++ b/mbtk/libmbtk_ril/mbtk_info_api.c
@@ -105,6 +105,14 @@
                     LOG("handshake message recv ok.");
                     break;
                 }
+                //mbtk xr for signal_status add start
+                case MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE:
+                {
+                    if(handle->signal_state_cb)
+                        handle->signal_state_cb(pack->data, pack->data_len);
+                    break;
+                }
+
                 //mbtk wyq for server_ready_status add end
                 default:
                 {
@@ -2382,3 +2390,22 @@
         return 0;
     }
 }
+
+/*
+* Set signal state change callback function.
+*/
+int mbtk_signal_state_change_cb_reg(mbtk_info_handle_t* handle, mbtk_info_callback_func cb)
+{
+    if(handle == NULL)
+    {
+        LOGE("ARG error.");
+        return -1;
+    }
+    if(info_item_process(handle, MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE, NULL, 0, NULL) < 0) {
+        return handle->info_err;
+    } else {
+        handle->signal_state_cb = cb;
+        return 0;
+    }
+}
+
diff --git a/mbtk/mbtk_rild/src/mbtk_info_server.c b/mbtk/mbtk_rild/src/mbtk_info_server.c
old mode 100644
new mode 100755
index 5fca1ea..5a2e721
--- a/mbtk/mbtk_rild/src/mbtk_info_server.c
+++ b/mbtk/mbtk_rild/src/mbtk_info_server.c
@@ -61,6 +61,8 @@
 static char server_ready_status = 0;
 //mbtk wyq for server_ready_status add end
 
+static mbtk_signal_info_t signal_globe;
+
 
 /*
 AT*POWERIND=0"
@@ -5675,6 +5677,26 @@
     }
 }
 
+static void signal_state_change(void *data, int data_len)
+{
+    sock_client_info_t *cli = NULL;
+    list_first(sock_client_list);
+    while ((cli = (sock_client_info_t*) list_next(sock_client_list)))
+    {
+        if(cli->ind_num > 0) {
+            int i;
+            for(i = 0; i < IND_REGISTER_MAX; i++) {
+                // Registe MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE
+                if(cli->ind_register[i] == MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE) {
+                    pack_rsp_send(cli->fd , MBTK_INFO_ID_IND_SIGNAL_STATE_CHANGE, data, data_len);
+                    break;
+                }
+            }
+        }
+    }
+}
+
+
 int urc_msg_distribute(bool async_process, info_urc_msg_id_enum msg, void *data, int data_len)
 {
 #if 0
@@ -6363,6 +6385,7 @@
         {
             // Get network state and signal.
             char buff[256] = {0};
+            uint8 data_signal[7];
             mbtk_signal_info_t signal;
             memset(&signal, 0xFF, sizeof(mbtk_signal_info_t));
             if(!req_net_signal_get(&signal, NULL)) {
@@ -6374,8 +6397,37 @@
                 snprintf(buff, sizeof(buff), "%s:%d,%d,%d,%d,%d,%d,%d,%d", tmp, signal.type, signal.rssi, signal.rxlev, signal.ber, signal.rscp, signal.ecno,
                     signal.rsrq, signal.rsrp);
                 mbtk_signal_log(buff);
+                
+                signal_globe.type = signal.type;
+                signal_globe.rssi = signal.rssi;
+                signal_globe.rxlev = signal.rxlev;
+                signal_globe.ber = signal.ber;
+                signal_globe.rscp = signal.rscp;
+                signal_globe.ecno = signal.ecno;
+                signal_globe.rsrq = signal.rsrq;
+                signal_globe.rsrp = signal.rsrp;
+
+                if( (signal_globe.type != signal.type) || (signal_globe.rssi != signal.rssi) || (signal_globe.rxlev != signal.rxlev) ||
+                    (signal_globe.ber != signal.ber) || (signal_globe.rscp != signal.rscp) || (signal_globe.ecno != signal.ecno) ||
+                    (signal_globe.rsrq != signal.rsrq) || (signal_globe.rsrp != signal.rsrp) )
+                
+                {
+                    //ADD SIGANLE CB
+                    data_signal[0] = signal.type;
+                    data_signal[1] = signal.rssi;
+                    data_signal[2] = signal.rxlev;
+                    data_signal[3] = signal.ber;
+                    data_signal[4] = signal.rscp;
+                    data_signal[5] = signal.ecno;
+                    data_signal[6] = signal.rsrq;
+                    data_signal[7] = signal.rsrp;
+                    /*
+                    LOGE("data[0]=%d data[1]=%d data[2]=%d data[3]=%d data[4]=%d data[5]=%d data[6]=%d data[7]=%d",
+                    data_signal[0],data_signal[1],data_signal[2],data_signal[3],data_signal[4],data_signal[5],data_signal[6],data_signal[7]);
+                    */
+                    signal_state_change(data_signal, sizeof(data_signal));
+                }
             }
-            //
             break;
         }
         default:
diff --git a/mbtk/test/liblynq_lib/lynq_nw_test.c b/mbtk/test/liblynq_lib/lynq_nw_test.c
index 32ffc94..725ad69 100755
--- a/mbtk/test/liblynq_lib/lynq_nw_test.c
+++ b/mbtk/test/liblynq_lib/lynq_nw_test.c
@@ -19,29 +19,180 @@
     u_int32_t              ind_msg_len, 
     void                  *contextPtr)
 {
-    uint8 *net_data = NULL;
+    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;
+                }
 
-    net_data = (uint8*)ind_msg_buf;
+                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_msg_buf && ind_msg_len > 0)//无处理原始数据传输过来
-    {
-        if(*net_data == 0)
-        { // CS
-                printf("CS:act=%d, mode=%d\n", *(net_data + 1), *(net_data + 2));
-        }
-        else
-        { // PS
-                printf("PS[%s]:act=%d, mode=%d\n", *(net_data + 3) == 0 ? "GSM/WCDMA" : "LTE", *(net_data + 1), *(net_data + 2));
-        }
+                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;
+            }
+        case NW_IND_IMS_REG_EVENT_IND_FLAG:
+            {
+                printf("Recv event indication : IMS REG EVENT\n");               
+                
+                break;
+            }
+        default:
+            break;
     }
-    else
-    {
-        printf("NET_CB : NULL");
-    }
-
 }
 
 
+
 int main(int argc, char *argv[])
 {
     char operator[10];
@@ -113,16 +264,16 @@
                         t_info.preferred_nw_mode = QSER_NW_MODE_WCDMA;//3G
                         break;
                     case 4:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_CDMA;//3G
+                        t_info.preferred_nw_mode = QSER_NW_MODE_CDMA;//3G no support
                         break;
                     case 8:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_EVDO;//3G
+                        t_info.preferred_nw_mode = QSER_NW_MODE_EVDO;//3G no support
                         break;
                     case 16:
                         t_info.preferred_nw_mode = QSER_NW_MODE_LTE;//4G
                         break;
                     case 32:
-                        t_info.preferred_nw_mode = QSER_NW_MODE_TDSCDMA;//3G
+                        t_info.preferred_nw_mode = QSER_NW_MODE_TDSCDMA;//3G no support
                         break;
                     default:
                         t_info.preferred_nw_mode = QSER_NW_MODE_LTE;//4G
@@ -147,42 +298,87 @@
             break;
         case 5:
             {
-                QSER_NW_REG_STATUS_INFO_T reg;
-                int err = qser_nw_get_reg_status(handle, &reg);
+                QSER_NW_REG_STATUS_INFO_T t_info;
+                int err = qser_nw_get_reg_status(handle, &t_info);
                 if(err)
                 {
                     printf("Error : %d\n", err);
                 }
                 else
                 {
-                    if(reg.voice_registration_details_3gpp_valid)
+                    if(t_info.voice_registration_valid)
                     {
-                        printf("voice_registration_details_3gpp: tech_domain=%d, radio_tech=%d, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, cid=0x%X, lac=%d, psc=%d, tac=%d\n", 
-                        reg.voice_registration_details_3gpp.tech_domain, 
-                        reg.voice_registration_details_3gpp.radio_tech,
-                        reg.voice_registration_details_3gpp.mcc,
-                        reg.voice_registration_details_3gpp.mnc,
-                        reg.voice_registration_details_3gpp.roaming,
-                        reg.voice_registration_details_3gpp.forbidden,                    
-                        reg.voice_registration_details_3gpp.cid,
-                        reg.voice_registration_details_3gpp.lac,
-                        reg.voice_registration_details_3gpp.psc,
-                        reg.voice_registration_details_3gpp.tac);
+                        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(reg.data_registration_details_3gpp_valid)
+                    if(t_info.data_registration_valid)
                     {
-                        printf("data_registration_details_3gpp: tech_domain=%d, radio_tech=%d, mcc=%s, mnc=%s, roaming=%d, forbidden=%d, cid=0x%X, lac=%d, psc=%d, tac=%d\n", 
-                         reg.data_registration_details_3gpp.tech_domain, 
-                         reg.data_registration_details_3gpp.radio_tech,
-                         reg.data_registration_details_3gpp.mcc,
-                         reg.data_registration_details_3gpp.mnc,
-                         reg.data_registration_details_3gpp.roaming,
-                         reg.data_registration_details_3gpp.forbidden,                    
-                         reg.data_registration_details_3gpp.cid,
-                         reg.data_registration_details_3gpp.lac,
-                         reg.data_registration_details_3gpp.psc,
-                         reg.data_registration_details_3gpp.tac);
+                        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);
+                    }
+
                     //printf("Data Reg: radio_tech = %d, lac = %x, cid = %x\n", reg.data_registration_details_3gpp.radio_tech, reg.data_registration_details_3gpp.lac, reg.data_registration_details_3gpp.cid);
                     //printf("Voice Reg: radio_tech = %d, lac = %x, cid = %x\n", reg.voice_registration_details_3gpp.radio_tech, reg.voice_registration_details_3gpp.lac, reg.voice_registration_details_3gpp.cid);
                 }
@@ -190,22 +386,48 @@
             break;
         case 6:
             {
-                QSER_NW_SIGNAL_STRENGTH_INFO_T sig;
-                int err = qser_nw_get_signal_strength(handle, &sig);
+                QSER_NW_SIGNAL_STRENGTH_INFO_T t_info;
+                int err = qser_nw_get_signal_strength(handle, &t_info);
                 if(err)
                 {
                     printf("Error : %d\n", err);
                 }
                 else
                 {
-                    if (sig.gsm_sig_info_valid == TRUE)
-                        printf("Signal GSM: rssi = %d\n", sig.gsm_sig_info.rssi);
-                    else if (sig.lte_sig_info_valid == TRUE)
-                        printf("Signal LTE: rssi = %d, rsrp = %d, rsrq = %d, snr = %d\n", sig.lte_sig_info.rssi , sig.lte_sig_info.rsrp, sig.lte_sig_info.rsrq, sig.lte_sig_info.snr);
-                    else if (sig.wcdma_sig_info_valid == TRUE)
-                        printf("Signal UTRAN: rssi = %d, ecio = %d\n", sig.wcdma_sig_info.rssi , sig.wcdma_sig_info.ecio);
-                    else
-                        printf("Signal type not supported \n");
+                    printf("qser_nw_get_signal_strength, ret=%d\n", err);
+                    if(err==0)
+                    {                       
+                        printf("qser_solicited_signal_strength gsm_sig_info_valid = %d\n"
+                                   "                               gsm_sig_info.rssi = %d\n"
+                                   "                               wcdma     _sig_info_valid = %d\n" 
+                                   "                               wcdma_sig_info.rssi = %d\n"
+                                   "                               wcdma_sig_info.ecio = %d\n"
+                                   "                               tdscdma_sig_info_valid = %d\n"
+                                   "                               lte_sig_info_valid = %d\n"
+                                   "                               lte_sig_info.rssi = %d\n"
+                                   "                               lte_sig_info.rsrp = %d\n"
+                                   "                               lte_sig_info.rsrq = %d\n"
+                                   "                               lte_sig_info.snr = %d\n"
+                                   "                               cdma_sig_info_valid = %d\n"
+                                   "                               hdr_sig_info_valid = %d\n"
+                                   "                               nr_sig_info_valid = %d\n"
+                                   "                               nr_sig_info.ssRsrp = %d\n"
+                                   "                               nr_sig_info.ssRsrq = %d\n"
+                                   "                               nr_sig_info.ssSinr = %d\n"
+                                   "                               nr_sig_info.csiRsrp = %d\n"
+                                   "                               nr_sig_info.csiRsrq = %d\n"
+                                   "                               nr_sig_info.csiSinr = %d\n",
+                                  t_info.gsm_sig_info_valid, t_info.gsm_sig_info.rssi,
+                                  t_info.wcdma_sig_info_valid, t_info.wcdma_sig_info.rssi,  t_info.wcdma_sig_info.ecio,
+                                  t_info.tdscdma_sig_info_valid,
+                                  t_info.lte_sig_info_valid, t_info.lte_sig_info.rssi, t_info.lte_sig_info.rsrp, t_info.lte_sig_info.rsrq, t_info.lte_sig_info.snr,
+                                  t_info.cdma_sig_info_valid, 
+                                  t_info.hdr_sig_info_valid, 
+                                  t_info.nr_sig_info_valid, t_info.nr_sig_info.ssRsrp, t_info.nr_sig_info.ssRsrq, t_info.nr_sig_info.ssSinr,
+                                  t_info.nr_sig_info.csiRsrp, t_info.nr_sig_info.csiRsrq, t_info.nr_sig_info.csiSinr);
+                            
+                    }
+
                 }
             }
             break;
diff --git a/mbtk/test/liblynq_lib_t106/lynq-qser-network-demo.cpp b/mbtk/test/liblynq_lib_t106/lynq-qser-network-demo.cpp
index 585b3aa..ca0874a 100755
--- a/mbtk/test/liblynq_lib_t106/lynq-qser-network-demo.cpp
+++ b/mbtk/test/liblynq_lib_t106/lynq-qser-network-demo.cpp
@@ -12,6 +12,10 @@
 #define LOG_TAG "QSER_NETWORK_DEMO"

 #endif

 

+#ifdef __cplusplus
+extern "C" {
+#endif

+

 void *handle_network;

 

 int (*qser_nw_client_init_p)(nw_client_handle_type  * h_nw);

@@ -345,7 +349,7 @@
              case 0://"qser_nw_client_init"

              {

                  

-                 ret = qser_nw_client_init_p(&h_nw);

+                 ret = qser_nw_client_init(&h_nw);

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

                  break;

              }

@@ -358,14 +362,14 @@
                  scanf("%d", &mask);

                  t_info.preferred_nw_mode = mask;

                  

-                 ret = qser_nw_set_config_p(h_nw, &t_info);

+                 ret = qser_nw_set_config(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);

+                 ret = qser_nw_get_operator_name(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;

@@ -375,7 +379,7 @@
                  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);

+                 ret = qser_nw_get_reg_status(h_nw, &t_info);

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

                  if(t_info.voice_registration_valid)

                  {

@@ -454,20 +458,20 @@
              }                 

              case 12://"qser_nw_client_deinit"

              {

-                 ret = qser_nw_client_deinit_p(h_nw);

+                 ret = qser_nw_client_deinit(h_nw);

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

                  break;

              }       

              case 4 :

              {

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

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

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

                 break;

              }

               case 5 :

              {

                 QSER_NW_SIGNAL_STRENGTH_INFO_T t_info;

-                ret = qser_nw_get_signal_strength_p(h_nw, &t_info);  

+                ret = qser_nw_get_signal_strength(h_nw, &t_info);  

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

                 if(ret==0)

                 {                       

@@ -510,7 +514,7 @@
                 printf("please input you want query oos config's type (0: fast network scan config; 1: full band network scan config ) : \n");

                 scanf("%d", &type);

                 t_info.type = type;

-                ret = qser_nw_get_oos_config_p(h_nw, &t_info);  

+                ret = qser_nw_get_oos_config(h_nw, &t_info);  

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

                 if(ret==0)

                 {         

@@ -554,7 +558,7 @@
                       scanf("%d", &(t_info.u.full_band_scan_info.t_num));

                       printf("please input t_max: \n");

                       scanf("%d", &(t_info.u.full_band_scan_info.t_max));

-                      ret = qser_nw_set_oos_config_p(h_nw, &t_info);  

+                      ret = qser_nw_set_oos_config(h_nw, &t_info);  

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

                 }

                 else if(t_info.type==QSER_NW_OOS_CFG_TYPE_FAST_SCAN)

@@ -563,12 +567,12 @@
                       scanf("%d", &(t_info.u.fast_can_info.enable));

                       printf("please input time_interval: \n");

                       scanf("%d", &(t_info.u.fast_can_info.time_interval));                      

-                      ret = qser_nw_set_oos_config_p(h_nw, &t_info);  

+                      ret = qser_nw_set_oos_config(h_nw, &t_info);  

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

                 }

                 else 

                 {

-                       ret = qser_nw_set_oos_config_p(h_nw, &t_info);  

+                       ret = qser_nw_set_oos_config(h_nw, &t_info);  

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

                 }                

                 break;

@@ -576,7 +580,7 @@
              case 9://"qser_nw_get_rf_mode"

              {

                  E_QSER_NW_RF_MODE_TYPE_T  rf_mode;

-                 ret = qser_nw_get_rf_mode_p(h_nw, &rf_mode);

+                 ret = qser_nw_get_rf_mode(h_nw, &rf_mode);

                  printf("qser_nw_get_rf_mode ret = %d, rf mode=%d\n", ret, rf_mode);

                  break;

              }       

@@ -585,7 +589,7 @@
                  E_QSER_NW_RF_MODE_TYPE_T  rf_mode;

                  printf("please input you want set rf mode (0: cfun 0;  1: cfun 1; 4: flight mode \n");

                  scanf("%d", &rf_mode);

-                 ret = qser_nw_set_rf_mode_p(h_nw, rf_mode);

+                 ret = qser_nw_set_rf_mode(h_nw, rf_mode);

                  printf("qser_nw_set_rf_mode %d ret = %dn",rf_mode, ret);

                  break;

              }       

@@ -594,7 +598,7 @@
                  E_QSER_NW_IMS_MODE_TYPE_T  ims_mode;

                  printf("please input you want set ims mode (0: off;  1: volte enable \n");

                  scanf("%d", &ims_mode);

-                 ret = qser_nw_set_ims_enable_p(h_nw, ims_mode);

+                 ret = qser_nw_set_ims_enable(h_nw, ims_mode);

                  printf("qser_nw_set_ims_enable %d ret = %dn",ims_mode, ret);

                  break;

              }       

@@ -602,7 +606,7 @@
              {

                  QSER_NW_IMS_REG_STATUS_INFO_T         t_info;

                  memset(&t_info, 0, sizeof(QSER_NW_IMS_REG_STATUS_INFO_T));

-                 ret = qser_nw_get_ims_reg_status_p(h_nw, &t_info);

+                 ret = qser_nw_get_ims_reg_status(h_nw, &t_info);

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

                  if(ret == 0)

                  {

@@ -620,6 +624,9 @@
     return 0;

 }

 

+#ifdef __cplusplus
+}
+#endif