Add DS support.
Change-Id: Ib8bc4e171dd5ca526f8e151ff3d467097582a8cb
diff --git a/mbtk/test/libmbtk_ril/mbtk_ril_test.c b/mbtk/test/libmbtk_ril/mbtk_ril_test.c
index db7fff2..f8bedb6 100755
--- a/mbtk/test/libmbtk_ril/mbtk_ril_test.c
+++ b/mbtk/test/libmbtk_ril/mbtk_ril_test.c
@@ -123,7 +123,8 @@
{
if(data) {
mbtk_ril_net_reg_state_info_t *state = (mbtk_ril_net_reg_state_info_t*)data;
- printf("net reg state change : type - %d, tech - %d, reg_state - %d, TAG - %llx, ci - %llx\n", state->type,
+ printf("net reg state change : sim_id - %d, type - %d, tech - %d, reg_state - %d, TAG - %llx, ci - %llx\n",
+ state->sim_id, state->type,
state->tech, state->reg_state, state->tac, state->ci);
}
}
@@ -132,7 +133,8 @@
{
if(data) {
mbtk_ril_call_state_info_t *state = (mbtk_ril_call_state_info_t*)data;
- printf("call state change : call_id-%d, dir-%d, state-%d, num_type-%d,number-%s\n", state->call_id,
+ printf("call state change : sim_id - %d, call_id-%d, dir-%d, state-%d, num_type-%d, number-%s\n",
+ state->sim_id, state->call_id,
state->dir, state->state, state->num_type, state->call_number);
}
}
@@ -141,7 +143,7 @@
{
if(data) {
mbtk_ril_sms_state_info_t *state = (mbtk_ril_sms_state_info_t*)data;
- printf("SMS PDU(%d) : %s\n", state->pdu_len, state->pdu);
+ printf("sms state change : sim_id - %d, SMS PDU(%d) : %s\n", state->sim_id, state->pdu_len, state->pdu);
}
}
@@ -149,7 +151,7 @@
{
if(data) {
mbtk_ril_radio_state_info_t *state = (mbtk_ril_radio_state_info_t*)data;
- printf("radio state change : %d\n", state->radio_state);
+ printf("radio state change : sim_id - %d, radio_state - %d\n", state->sim_id, state->radio_state);
}
}
@@ -157,7 +159,7 @@
{
if(data) {
mbtk_ril_sim_state_info_t *state = (mbtk_ril_sim_state_info_t*)data;
- printf("sim state change : type - %d, state - %d\n", state->sim_type, state->sim_state);
+ printf("sim state change : sim_id - %d, type - %d, state - %d\n", state->sim_id, state->sim_type, state->sim_state);
}
}
@@ -165,8 +167,8 @@
{
if(data) {
mbtk_ril_pdp_state_info_t *state = (mbtk_ril_pdp_state_info_t*)data;
- printf("pdp state change : cid - %d, action - %d, reason-%d, auto_change - %d\n",
- state->cid, state->action, state->reason, state->auto_change);
+ printf("pdp state change : sim_id - %d, cid - %d, action - %d, reason-%d, auto_change - %d\n",
+ state->sim_id, state->cid, state->action, state->reason, state->auto_change);
if(state->ip_info_valid) {
if(state->ip_info.ipv4.valid) {
// log_hex("IPv4", &ipv4, sizeof(mbtk_ipv4_info_t));
@@ -261,7 +263,7 @@
if(data)
{
mbtk_ril_ecall_state_info_t *ecall_data = (mbtk_ril_ecall_state_info_t*)data;
- printf("ecall state change : urc_id - %d, urc_data - %s\n", ecall_data->urc_id, ecall_data->urc_data);
+ printf("ecall state change : sim_id - %d, urc_id - %d, urc_data - %s\n", ecall_data->sim_id, ecall_data->urc_id, ecall_data->urc_data);
}
}
@@ -278,7 +280,7 @@
thread_exit_with_wait();
#endif
mbtk_ril_close(MBTK_AT_PORT_DEF);
- mbtk_ril_close(ATPORTTYPE_1);
+ mbtk_ril_close(MBTK_AT_PORT_VOICE);
exit(0);
}
case SIGQUIT: // Ctrl + \ (类似 SIGINT ,但要产生core文件)
@@ -288,7 +290,7 @@
thread_exit_with_wait();
#endif
mbtk_ril_close(MBTK_AT_PORT_DEF);
- mbtk_ril_close(ATPORTTYPE_1);
+ mbtk_ril_close(MBTK_AT_PORT_VOICE);
exit(0);
}
case SIGTERM:// 默认kill (同 SIGKILL ,但 SIGKILL 不可捕获)
@@ -298,7 +300,7 @@
thread_exit_with_wait();
#endif
mbtk_ril_close(MBTK_AT_PORT_DEF);
- mbtk_ril_close(ATPORTTYPE_1);
+ mbtk_ril_close(MBTK_AT_PORT_VOICE);
exit(0);
}
case SIGTSTP:// Ctrl + Z (同 SIGSTOP ,但 SIGSTOP 不可捕获)
@@ -384,7 +386,7 @@
return -1;
}
- mbtk_ril_handle* handle_1 = mbtk_ril_open(ATPORTTYPE_1);
+ mbtk_ril_handle* handle_1 = mbtk_ril_open(MBTK_AT_PORT_VOICE);
if(handle_1 == NULL) {
printf("mbtk_ril_open(ATPORTTYPE_1) fail.");
return -1;
@@ -1629,7 +1631,7 @@
thread_exit_with_wait();
exit:
#endif
- mbtk_ril_close(ATPORTTYPE_1);
+ mbtk_ril_close(MBTK_AT_PORT_VOICE);
mbtk_ril_close(MBTK_AT_PORT_DEF);
LOG("Client exec complete.");