Merge "[Feature][T106]version update to T106CN-ZS03.V2.01.01.02P49.AP.05.00_CAP.05.00"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb
index 4e2e7ec..0242380 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb
@@ -5,7 +5,7 @@
 LICENSE = "CLOSED"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
 
-DEPENDS += "liblynq-call liblynq-sms liblynq-network liblynq-sim liblynq-data liblynq-qser-data liblynq-qser-network liblynq-qser-voice"
+DEPENDS += "liblynq-call liblynq-sms liblynq-network liblynq-sim liblynq-data liblynq-qser-data liblynq-qser-network liblynq-qser-voice   liblynq-qser-sim liblynq-qser-sms"
 
 #inherit workonsrc
 WORKONSRC = "${TOPDIR}/../src/lynq/packages/apps/Mobiletek_Tester_RDIT"
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h
index 0192db5..0895f45 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h
@@ -3,6 +3,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
+#include <stdint.h>
 
 #define QSER_SIM_IMSI_LEN_MAX     16  /**  Maximum length of IMSI data. */
 #define QSER_SIM_ICCID_LEN_MAX    20  /**  Maximum length of ICCID data. */
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h
index 5f0f0c3..3dfbffa 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h
@@ -5,7 +5,7 @@
 #endif
 
 #include <sys/types.h>
-
+#include <stdint.h>
 
 #define MIN_MSM_PARAM_NUM 4
 #define MIN_IMS_MSM_PARAM_NUM 6
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/dispatch.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/dispatch.cpp
index ee4453e..21ec7a7 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/dispatch.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/dispatch.cpp
@@ -13,7 +13,7 @@
 #include "network.h"
 #include "data.h"
 #include "qser-voice.h"
-
+#include "sim.h"
 
 #define SOCKET_BUF_SIZE 512
 typedef struct {
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
index 177aed8..243af1b 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
@@ -78,5 +78,43 @@
 #define LYNQ_QSER_CALL_HOLD       LYNQ_QSER + 8
 #define LYNQ_QSER_CALL_UNHOLD     LYNQ_QSER + 9
 
+#define LYNQ_SIM LYNQ_BASE + 120
+#define LYNQ_SIM_INIT LYNQ_SIM + 1
+#define LYNQ_GET_IMSI LYNQ_SIM + 2
+#define LYNQ_GET_SIM_STATUS LYNQ_SIM + 3
+#define LYNQ_GET_ICCID LYNQ_SIM + 4
+#define LYNQ_ENABLE_PIN LYNQ_SIM + 5
+#define LYNQ_DISABLE_PIN LYNQ_SIM + 6
+#define LYNQ_SIM_POWER LYNQ_SIM + 7
+#define LYNQ_QUERY_PIN_LOCK LYNQ_SIM + 8
+#define LYNQ_VERIFY_PIN LYNQ_SIM + 9
+#define LYNQ_CHANGE_PIN LYNQ_SIM + 10
+#define LYNQ_UNLOCK_PIN LYNQ_SIM + 11
+#define LYNQ_GET_IMEI_AND_SV LYNQ_SIM + 12
+#define LYNQ_RIL_REQUEST_OEM_HOOK_RAW LYNQ_SIM + 13
+#define LYNQ_SIM_DEINIT LYNQ_SIM + 14
+
+#define LYNQ_QSER_SIM LYNQ_BASE + 140
+#define LYNQ_QSER_SIM_INIT LYNQ_QSER_SIM + 1
+#define LYNQ_QSER_GET_IMSI LYNQ_QSER_SIM + 2
+#define LYNQ_QSER_GET_ICCID LYNQ_QSER_SIM + 3
+#define LYNQ_QSER_GETPHONENUMBER LYNQ_QSER_SIM + 4
+#define LYNQ_QSER_VERIFY_PIN LYNQ_QSER_SIM + 5
+#define LYNQ_QSER_CHANGE_PIN LYNQ_QSER_SIM + 6
+#define LYNQ_QSER_UNLOCK_PIN LYNQ_QSER_SIM + 7
+#define LYNQ_QSER_ENABLE_PIN LYNQ_QSER_SIM + 8
+#define LYNQ_QSER_DISABLE_PIN LYNQ_QSER_SIM + 9
+#define LYNQ_QSER_GET_SIM_STATUS LYNQ_QSER_SIM + 10
+#define LYNQ_QSER_SIM_DEINIT LYNQ_QSER_SIM + 11
+
+#define LYNQ_QSER_SMS LYNQ_BASE + 160
+#define LYNQ_QSER_SMS_INIT LYNQ_QSER_SMS + 1
+#define LYNQ_QSER_SEND_SMS LYNQ_QSER_SMS + 2
+#define LYNQ_QSER_READ_SMS LYNQ_QSER_SMS + 3
+#define LYNQ_QSER_LIST_SMS LYNQ_QSER_SMS + 4
+#define LYNQ_QSER_DELETE_SMS LYNQ_QSER_SMS + 5
+#define LYNQ_QSER_WAIT_SMS LYNQ_QSER_SMS + 6
+#define LYNQ_QSER_SMS_DEINIT LYNQ_QSER_SMS + 7
+
 
 int create_socket(const int domain, const int type, const int protocol,const int port,const char *IP,const char *socket_name,void * addr,int backlog,int cs);
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile
index fe0b8c0..be3b953 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile
@@ -31,9 +31,12 @@
     -llynq-qser-network \
     -llynq-qser-data \
     -llynq-qser-voice \
+    -llynq-qser-sim \
+    -llynq-qser-sms \
+    -llynq-sms \  
 
 
-SOURCES = main.cpp cc.cpp dispatch.cpp sms.cpp network.cpp data.cpp qser-voice.cpp
+SOURCES = main.cpp cc.cpp dispatch.cpp sms.cpp network.cpp data.cpp qser-voice.cpp sim.cpp
 SOURCES_TOOL = dispatch.cpp socket-tool.cpp
 
 EXECUTABLE = Mobiletek-Tester-RDIT
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/network.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/network.h
index 4d4a582..c7791b1 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/network.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/network.h
@@ -9,4 +9,10 @@
 int query_prefferred_networktype(int argc, char *argv[], int sp_test);

 int set_prefferred_networktype(int argc, char *argv[], int sp_test);

 int solicited_signal_strength(int argc, char *argv[], int sp_test);

-int set_ims(int argc, char *argv[], int sp_test);
\ No newline at end of file
+int set_ims(int argc, char *argv[], int sp_test);

+int qser_network_init(int argc, char *argv[], int sp_test);

+int qser_network_deinit(int argc, char *argv[], int sp_test);

+int qser_network_set_config(int argc, char *argv[], int sp_test);

+int qser_network_get_operator_name(int argc, char *argv[], int sp_test);

+int qser_network_get_reg_status(int argc, char *argv[], int sp_test);

+int qser_network_solicited_signal_strength(int argc, char *argv[], int sp_test);
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
index 5551f4d..fabbb5a 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
@@ -60,6 +60,44 @@
     {"LYNQ_QSER_CALL_HOLD",qser_voice_call_hold_test,"qser_voice_call_hold_test",LYNQ_QSER_CALL_HOLD},
     {"LYNQ_QSER_CALL_UNHOLD",qser_voice_call_unhold_test,"qser_voice_call_unhold_test",LYNQ_QSER_CALL_UNHOLD},
 
+//SIM
+    {"LYNQ_SIM_INIT",init_sim, "init sim lib", LYNQ_SIM_INIT},
+    {"LYNQ_GET_IMSI",get_imsi_test, "get imsi", LYNQ_GET_IMSI},
+    {"LYNQ_GET_SIM_STATUS",get_sim_status_test, "get sim status", LYNQ_GET_SIM_STATUS}, 
+    {"LYNQ_GET_ICCID",get_iccid_test, "get iccid", LYNQ_GET_ICCID},
+    {"LYNQ_ENABLE_PIN",enable_pin_test, "enable pin", LYNQ_ENABLE_PIN},
+    {"LYNQ_SIM_POWER",sim_power_test, "sim power", LYNQ_SIM_POWER},
+    {"LYNQ_DISABLE_PIN",disable_pin_test, "disable pin", LYNQ_DISABLE_PIN},
+    {"LYNQ_QUERY_PIN_LOCK",query_pin_lock_test, "query pin lock", LYNQ_QUERY_PIN_LOCK},
+    {"LYNQ_VERIFY_PIN",verify_pin_test, "verify pin", LYNQ_VERIFY_PIN},
+    {"LYNQ_CHANGE_PIN",change_pin_test, "change pin", LYNQ_CHANGE_PIN},
+    {"LYNQ_UNLOCK_PIN",unlock_pin_test, "unlock pin", LYNQ_UNLOCK_PIN},
+    {"LYNQ_GET_IMEI",get_imei_test, "get imei", LYNQ_GET_IMEI},
+    {"LYNQ_GET_IMEI_AND_SV",get_imei_and_sv_test, "get imei and sv", LYNQ_GET_IMEI_AND_SV},
+    {"LYNQ_SWITCH_CARD",switch_card_test, "switch card", LYNQ_GET_IMEI_AND_SV},
+    {"LYNQ_RIL_REQUEST_OEM_HOOK_RAW",query_phone_number_test, "query phone num", LYNQ_RIL_REQUEST_OEM_HOOK_RAW},
+    {"LYNQ_SIM_DEINIT",deinit_sim, "deinit sim lib", LYNQ_SIM_DEINIT},
+//QSER SIM
+    {"LYNQ_QSER_SIM_INIT",qser_init_sim, "init sim lib", LYNQ_QSER_SIM_INIT},
+    {"LYNQ_QSER_GET_IMSI",qser_get_imsi_test, "get imsi", LYNQ_QSER_GET_IMSI},
+    {"LYNQ_QSER_GET_ICCID",qser_get_iccid_test, "get iccid", LYNQ_QSER_GET_ICCID},
+    {"LYNQ_QSER_GETPHONENUMBER",qser_get_phonenumber_test, "get phonenumber", LYNQ_QSER_GETPHONENUMBER},
+    {"LYNQ_QSER_VERIFY_PIN",qser_verify_pin_test, "verify pin", LYNQ_QSER_VERIFY_PIN},
+    {"LYNQ_QSER_CHANGE_PIN",qser_change_pin_test, "change pin", LYNQ_QSER_CHANGE_PIN},
+    {"LYNQ_QSER_UNLOCK_PIN",qser_unlock_pin_test, "unlock pin", LYNQ_QSER_UNLOCK_PIN},
+    {"LYNQ_QSER_ENABLE_PIN",qser_enable_pin_test, "enable pin", LYNQ_QSER_ENABLE_PIN},
+    {"LYNQ_QSER_DISABLE_PIN",qser_disable_pin_test, "disable pin", LYNQ_QSER_DISABLE_PIN},
+    {"LYNQ_QSER_GET_SIM_STATUS",qser_get_sim_status_test, "get sim status", LYNQ_QSER_GET_SIM_STATUS},
+    {"LYNQ_SIM_DEINIT",qser_deinit_sim, "deinit sim lib", LYNQ_QSER_SIM_DEINIT},
+//QSER SMS
+    {"LYNQ_QSER_SMS_INIT",qser_init_sms, "init the sms lib", LYNQ_QSER_SMS_INIT},
+    {"LYNQ_QSER_SMS_DEINIT",qser_deinit_sms, "deinit the sms lib", LYNQ_QSER_SMS_DEINIT},
+    {"LYNQ_QSER_SEND_SMS",qser_send_sms, "send short message", LYNQ_QSER_SEND_SMS},
+    //{"LYNQ_QSER_READ_SMS",qser_read_sms, "read short message", LYNQ_QSER_READ_SMS},
+    //{"LYNQ_QSER_LIST_SMS",qser_list_sms, "list short message", LYNQ_QSER_LIST_SMS},
+    {"LYNQ_QSER_DELETE_SMS",qser_delete_sms, "delete short messsage", LYNQ_QSER_DELETE_SMS},
+    //{"LYNQ_QSER_WAIT_SMS",qser_wait_sms, "wait short messsage", LYNQ_QSER_WAIT_SMS},
+
     {(char *)NULL, NULL, (char *)NULL , -1},
 
 
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp
new file mode 100755
index 0000000..ad0c33b
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp
@@ -0,0 +1,318 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <include/lynq_sim.h>
+#include <include/lynq_qser_sim.h>
+#include "sim.h"
+#define TEST_RESULT "lynq_result="
+
+static int handle = 0;
+
+
+int init_sim(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    int uToken = atoi(argv[1]);
+    ret = lynq_sim_init(uToken);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int get_imsi_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char imsi_buf[SIM_BUF] = "";
+    ret = lynq_get_imsi(imsi_buf);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int get_sim_status_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    int sim_status = -1;
+    ret = lynq_get_sim_status(&sim_status);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int get_iccid_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char iccid[SIM_BUF] = "";
+    ret = lynq_get_iccid(iccid);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int enable_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char pin[SIM_BUF] = "";
+    ret = lynq_enable_pin(pin);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int sim_power_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    int mode = 0;
+    ret = lynq_sim_power(mode);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int disable_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char pin[SIM_BUF] = "";
+    ret = lynq_disable_pin(pin);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int query_pin_lock_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char pin[SIM_BUF] = "";
+    int lock[SIM_BUF] = {0};
+    ret = lynq_query_pin_lock(pin,lock);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int verify_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char pin[SIM_BUF] = "";
+    ret = lynq_verify_pin(pin);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int change_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char old_pin[SIM_BUF] = "";
+    char new_pin[SIM_BUF] = "";
+    ret = lynq_change_pin(old_pin, new_pin);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int unlock_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char puk[SIM_BUF] = "";
+    char new_pin[SIM_BUF] = "";
+    ret = lynq_unlock_pin(puk, new_pin);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int get_imei_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char buf[SIM_BUF] = "";
+    ret = lynq_get_imei(buf);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int get_imei_and_sv_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char imei[SIM_BUF] = "";
+    char sv[SIM_BUF] = "";
+    ret = lynq_get_imei_and_sv(imei, sv);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int switch_card_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char solt = 0;
+    ret = lynq_switch_card(solt);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int query_phone_number_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char buf[SIM_BUF] = "";
+    ret = lynq_query_phone_number(buf);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int deinit_sim(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    ret = lynq_sim_deinit();
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+//qser api
+sim_client_handle_type  ph_sim;
+int qser_init_sim(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    ph_sim = (sim_client_handle_type)atoi(argv[1]);
+    ret = qser_sim_client_init(&ph_sim);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_get_imsi_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char imsi_buf[SIM_BUF] = "";
+    //sim_client_handle_type h_sim = ph_sim;
+    QSER_SIM_APP_ID_INFO_T pt_info; 
+    size_t imsiLen = 0;
+    ret = qser_sim_getimsi(ph_sim, &pt_info, imsi_buf, imsiLen);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_get_iccid_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char iccid[SIM_BUF] = "";
+    int uToken = atoi(argv[1]);
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_SLOT_ID_TYPE_T simId;
+    int iccidLen = 0;
+    ret = qser_sim_geticcid(ph_sim, simId, iccid, iccidLen);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_get_phonenumber_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    char phone_num[SIM_BUF] = "";
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_APP_ID_INFO_T pt_info; 
+    int phoneLen = 0;
+    ret = qser_sim_getphonenumber(ph_sim, &pt_info, phone_num, phoneLen);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_verify_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_VERIFY_PIN_INFO_T pt_info;
+    strcpy(pt_info.pin_value, argv[1]);
+    ret =  qser_sim_verifypin(ph_sim, &pt_info);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_change_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_CHANGE_PIN_INFO_T pt_info;
+
+    strcpy(pt_info.old_pin_value, argv[1]);
+    strcpy(pt_info.new_pin_value, argv[2]);
+    ret =  qser_sim_changepin(ph_sim, &pt_info);
+    
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_unlock_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_UNBLOCK_PIN_INFO_T pt_info;
+
+    strcpy(pt_info.puk_value, argv[1]);
+    strcpy(pt_info.new_pin_value, argv[2]);
+    ret =  qser_sim_unblockpin(ph_sim, &pt_info);
+    
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_enable_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_ENABLE_PIN_INFO_T pt_info;
+
+    strcpy(pt_info.pin_value, argv[1]);
+    ret =  qser_sim_enablepin(ph_sim, &pt_info);
+    
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_disable_pin_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_DISABLE_PIN_INFO_T pt_info;
+
+    strcpy(pt_info.pin_value, argv[1]);
+    ret =  qser_sim_disablepin(ph_sim, &pt_info);
+    
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_get_sim_status_test(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    //sim_client_handle_type h_sim = gtoken;
+    QSER_SIM_SLOT_ID_TYPE_T simId;
+    QSER_SIM_CARD_STATUS_INFO_T pt_info;
+
+    ret =  qser_sim_getcardstatus(ph_sim, simId, &pt_info);
+    
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
+
+int qser_deinit_sim(int argc, char *argv[], int sp_test)
+{
+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);
+    int ret = -1;
+    ret = qser_sim_client_deinit(ph_sim);
+    printf("%s%d\n",TEST_RESULT,ret);
+    return ret;
+}
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h
new file mode 100755
index 0000000..98522ea
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.h
@@ -0,0 +1,32 @@
+//SIM
+#define SIM_BUF 32
+int init_sim(int argc, char *argv[], int sp_test);
+int get_imsi_test(int argc, char *argv[], int sp_test);
+int get_sim_status_test(int argc, char *argv[], int sp_test);
+int get_iccid_test(int argc, char *argv[], int sp_test);
+int enable_pin_test(int argc, char *argv[], int sp_test);
+int sim_power_test(int argc, char *argv[], int sp_test);
+int disable_pin_test(int argc, char *argv[], int sp_test);
+int query_pin_lock_test(int argc, char *argv[], int sp_test);
+int verify_pin_test(int argc, char *argv[], int sp_test);
+int change_pin_test(int argc, char *argv[], int sp_test);
+int unlock_pin_test(int argc, char *argv[], int sp_test);
+int get_imei_test(int argc, char *argv[], int sp_test);
+int get_imei_and_sv_test(int argc, char *argv[], int sp_test);
+int switch_card_test(int argc, char *argv[], int sp_test);
+int query_phone_number_test(int argc, char *argv[], int sp_test);
+int deinit_sim(int argc, char *argv[], int sp_test);
+
+//QSER SIM
+int qser_init_sim(int argc, char *argv[], int sp_test);
+int qser_get_imsi_test(int argc, char *argv[], int sp_test);
+int qser_get_iccid_test(int argc, char *argv[], int sp_test);
+int qser_get_phonenumber_test(int argc, char *argv[], int sp_test);
+int qser_verify_pin_test(int argc, char *argv[], int sp_test);
+int qser_change_pin_test(int argc, char *argv[], int sp_test);
+int qser_unlock_pin_test(int argc, char *argv[], int sp_test);
+int qser_enable_pin_test(int argc, char *argv[], int sp_test);
+int qser_disable_pin_test(int argc, char *argv[], int sp_test);
+int qser_get_sim_status_test(int argc, char *argv[], int sp_test);
+int qser_deinit_sim(int argc, char *argv[], int sp_test);
+
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp
index 3f2b865..96374c6 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.cpp
@@ -1,6 +1,8 @@
 #include <stdio.h>

 #include <stdlib.h>

+#include <string.h>

 #include <libsms/lynq_sms.h>

+#include <include/lynq_qser_sms.h>

 #include "sms.h"

 #define TEST_RESULT "lynq_result="

 

@@ -80,3 +82,52 @@
     return ret;

 }

 

+//QSER API

+sms_client_handle_type  ph_sms;

+int qser_init_sms(int argc, char *argv[], int sp_test)

+{

+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);

+    int ret = -1;

+    ph_sms = atoi(argv[1]);

+    ret = qser_sms_client_init(&ph_sms);

+    printf("%s%d\n",TEST_RESULT,ret);

+    return ret;

+}

+

+int qser_deinit_sms(int argc, char *argv[], int sp_test)

+{

+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);

+    int ret = -1;

+    ret = qser_sms_client_deinit(ph_sms);

+    printf("%s%d\n",TEST_RESULT,ret);

+    return ret;

+}

+

+int qser_send_sms(int argc, char *argv[], int sp_test)

+{

+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);

+    int ret = -1;

+    QSER_sms_info_t pt_sms_info;

+    

+    strcpy(pt_sms_info.src_addr, argv[1]);

+    pt_sms_info.type = (QSER_SMS_TYPT)atoi(argv[2]);

+    strcpy(pt_sms_info.sms_data, argv[3]);

+    pt_sms_info.sms_data_len = atoi(argv[4]);

+    

+    ret = qser_sms_send_sms(ph_sms, &pt_sms_info);

+    printf("%s%d\n",TEST_RESULT,ret);

+    return ret;

+}

+#if 0

+int qser_delete_sms(int argc, char *argv[], int sp_test)

+{

+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);

+    int ret = -1;

+    QSER_sms_storage_info_t  pt_sms_storage;

+    

+    pt_sms_storage.storage_idx= atoi(argv[1]));

+    ret = qser_sms_deletefromstorage(ph_sms, &pt_sms_storage);

+    printf("%s%d\n",TEST_RESULT,ret);

+    return ret;

+}

+#endif

diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h
index 3185e4a..8dcb735 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sms.h
@@ -6,3 +6,9 @@
 int list_sms(int argc, char *argv[], int sp_test);

 int delete_sms(int argc, char *argv[], int sp_test);

 int wait_sms(int argc, char *argv[], int sp_test);

+

+//QSER SMS

+int qser_init_sms(int argc, char *argv[], int sp_test);

+int qser_deinit_sms(int argc, char *argv[], int sp_test);

+int qser_send_sms(int argc, char *argv[], int sp_test);

+int qser_delete_sms(int argc, char *argv[], int sp_test);
\ No newline at end of file
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
index ddbba54..6df77ce 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
Binary files differ