Merge "[Bugfix][T106BUG-70][T106BUG-71]fix can't get pdp_type infomation"
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..998c592 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-call/lynq_call.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
index d1e2293..bee6e5e 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
@@ -1016,7 +1016,9 @@
{
cleanCallList(lynq_call_id);
}
-
+
+ //fix bug T106BUG-56
+ send_call_state_change();
return RESULT_OK;
}
int lynq_call_hungup_all()
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/lib/liblynq-qser-voice/include/lynq-qser-voice.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
old mode 100644
new mode 100755
index 528acc0..13622db
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/include/lynq-qser-voice.h
@@ -86,9 +86,7 @@
int qser_voice_call_answer(voice_client_handle_type h_voice,
int call_id );
-int qser_voice_call_hold( voice_client_handle_type h_voice);
-
-int qser_voice_call_unhold(voice_client_handle_type h_voice);
+int qser_voice_call_switch_waiting_or_holding_and_active(voice_client_handle_type h_voice);
//Set voice call waiting
int qser_voice_call_setwaiting
@@ -98,7 +96,7 @@
);
//Get voice call waiting status
-int qser_voice_call_getwaitingsatus
+int qser_voice_call_getwaitingstatus
(
int h_voice,
qser_voice_call_waiting_service_t *pe_service
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
index faa1a1b..1799ea1 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-voice/lynq-qser-voice.cpp
@@ -99,7 +99,7 @@
int qser_voice_call_client_deinit(voice_client_handle_type h_voice)
{
- if (NULL == h_voice)
+ if (0 == h_voice)
{
LYERRLOG("init first");
return RESULT_ERROR;
@@ -150,7 +150,7 @@
s_lynq_voice_tid = -1;
}
s_voice_thread_status = 0;
- s_voice_cb == NULL;
+ s_voice_cb = NULL;
return RESULT_OK;
}
@@ -187,7 +187,7 @@
return lynq_call_answer();
}
-int qser_voice_call_getwaitingsatus(int h_voice,qser_voice_call_waiting_service_t *pe_service)
+int qser_voice_call_getwaitingstatus(int h_voice,qser_voice_call_waiting_service_t *pe_service)
{
LYINFLOG("To be completed");
return RESULT_OK;
@@ -199,17 +199,8 @@
return RESULT_OK;
}
-int qser_voice_call_hold(voice_client_handle_type h_voice)
-{
- if (h_voice == 0)
- {
- LYERRLOG("init first");
- return RESULT_ERROR;
- }
- return lynq_switch_waiting_or_holding_and_active();
-}
-int qser_voice_call_unhold(voice_client_handle_type h_voice)
+int qser_voice_call_switch_waiting_or_holding_and_active(voice_client_handle_type h_voice)
{
if (h_voice == 0)
{
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..62a64aa 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,46 @@
#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_GET_IMEI LYNQ_SIM + 15
+
+
+
+#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..ce61de2 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,11 @@
-llynq-qser-network \
-llynq-qser-data \
-llynq-qser-voice \
+ -llynq-qser-sim \
+ -llynq-qser-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/req_commands.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
index 5551f4d..941c754 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,48 @@
{"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},
+ //GET_SIM_STATUS, /*radiooptions 11 1 0*/
+ {"LYNQ_GET_ICCID",get_iccid_test, "get iccid", LYNQ_GET_ICCID},
+ //QUERY_ICCID, /*radiooptions 30 1 0*/
+ {"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},
+ //QUERY_FACILITY_LOCK, /*radiooptions 35 fac 1 0*/
+ {"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 ,at cmd
+ {"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},
+ //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..1a9da4a
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/sim.cpp
@@ -0,0 +1,319 @@
+#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;
+}
+//#error rita
+
+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..819fd38 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 1
+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