You are on page 1of 16

Qualcomm Technologies, Inc.

Configuring Emergency Call Origination on


CDMA Network in China
Application Note
80-NA121-1 B
July 27, 2015

Confidential and Proprietary – Qualcomm Technologies, Inc.

© 2012, 2015 Qualcomm Technologies, Inc. and/or its affiliated companies. All rights reserved.

NO PUBLIC DISCLOSURE PERMITTED: Please report postings of this document on public servers or websites to:
DocCtrlAgent@qualcomm.com.
Not to be used, copied, reproduced, or modified in whole or in part, nor its contents revealed in any manner to others without the
express written permission of Qualcomm Technologies, Inc.
Restricted Distribution: Not to be distributed to anyone who is not an employee of either Qualcomm Technologies, Inc. or its
affiliated companies without the express approval of Qualcomm Configuration Management.
Qualcomm is a trademark of Qualcomm Incorporated, registered in the United States and other countries. Other product and brand
names may be trademarks or registered trademarks of their respective owners.
This technical data may be subject to U.S. and international export, re-export, or transfer (“export”) laws. Diversion contrary to U.S.
and international law is strictly prohibited.
Qualcomm Technologies, Inc.
5775 Morehouse Drive
San Diego, CA 92121
U.S.A.
Revision history

Revision Date Description


A March 2012 Initial release
B July 2015 Title change and numerous changes in Chapter 2

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 3


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Contents

1 Introduction...................................................................................................... 5
1.1 Purpose.......................................................................................................................... 5
1.2 Conventions .................................................................................................................. 5
1.3 Technical assistance ...................................................................................................... 5

2 Software Update Description.......................................................................... 6


2.1 Problem description ...................................................................................................... 6
2.2 Analysis ........................................................................................................................ 7
2.3 Change description ....................................................................................................... 7
2.4 Code change .................................................................................................................. 7
2.4.1 Change 1 ............................................................................................................ 7
2.4.2 Change 2 .......................................................................................................... 10
2.4.3 Change 3 .......................................................................................................... 11
2.5 Side effects of the change ........................................................................................... 16

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 4


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
1 Introduction

1.1 Purpose
This document describes the code changes needed to force a device to make an emergency call on
CDMA when there is no RUIM card in the device. If CDMA emergency call origination fails, the
device should then try another radio access technology. This requirement is specific to China
Telecom.
This document is for software engineers who are currently using multimode AMSS software and
who encounter this issue. This is not an official fix. The code changes described in this document
will not be released in an official build.

1.2 Conventions
Function declarations, function names, type declarations, attributes, and code samples appear in a
different font, for example, #include.
Function declarations, function names, type declarations, and code samples appear in a different
font, e.g., #include. If you are viewing this document using a color monitor, or if you print this
document to a color printer, red boldface indicates code that is to be added, and blue
strikethrough indicates code that is to be replaced or removed.
Shading indicates content that has been added or changed in this revision of the document.

1.3 Technical assistance


For assistance or clarification on information in this document, submit a case to Qualcomm
Technologies, Inc. (QTI) at https://support.cdmatech.com/.
If you do not have access to the CDMATech Support website, register for access or send email to
support.cdmatech@qti.qualcomm.com.

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 5


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
2 Software Update Description

NOTE: Numerous changes were made in this chapter.

2.1 Problem description


In China, when an emergency call is originated without a SIM card, the following scenarios
describe the expected behavior and the actual result.

Expected behavior
Scenario 1
1. Phone mode = CDMA
2. Remove SIM card
Call 110 > Connect to 110 call center
Call 120 > Connect to 120 call center
Call 119 > Connect to 119 call center
Scenario 2
1. Phone mode = Global
2. Remove SIM card
Call 110 > Connected to 110 call center via CDMA bearer
Call 120 > Connected to 120 call center via CDMA bearer
Call 119 > Connected to 119 call center via CDMA bearer
The actual result is different than what is expected.

Actual result
Scenario 1
1. Phone mode = CDMA
2. Remove SIM card
Call 110 > Connected to auto responder via GSM, i.e., same as 112
Call 120 > Connected to auto responder via GSM, i.e., same as 112
Call 119 > Connected to auto responder via GSM, i.e., same as 112

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 6


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

When there is no SIM and because it is a multimode device, it attempts to acquire GSM limited
service and the emergency call goes through GSM. In China, if the emergency call is made to
GSM, the call connects to an auto responder.
Scenario 2
1. Phone mode = Global
2. Remove SIM card
Call 110 > Connected to auto responder via GSM via GSM, i.e., same as 112
Call 120 > Connected to auto responder via GSM via GSM, i.e., same as 112
Call 119 > Connected to auto responder via GSM via GSM, i.e., same as 112

2.2 Analysis
When the device does not contain a SIM card, some OEMs may want the phone to originate an
emergency call on CDMA first. The SD code changes described in this document implement this
behavior.

2.3 Change description


MMODE is attempting the emergency call on CDMA first and later on other RATs, such as GW.
For this, SD uses a default PRL that is guaranteed to have CDMA systems listed that can be
attempted. A new script, ssscr_called_srv_lost_emerg_mode, and a new construct,
ANY_SUBSCRIPTION_AVAILABLE, were added. A few existing scripts were modified to use this
construct.

2.4 Code change


If you are viewing this document using a color monitor, or if you print this document to a color
printer, red boldface indicates code that is to be added, and blue strikethrough indicates code
that is to be replaced or removed
Total number of files: 5
File list: sdss.c, sdss.h, sdssscr.c, sdssscr.h, sdssscrtables.h

2.4.1 Change 1
File: sdss.c
Function: sdss_is_if_cond( )
Add the following code at the end of the function. Code in red boldface is to be added.

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
case SDSS_IF_COND_IS_MMSS_OP:
switch( cmp_criteria )
{
case SDSS_CMP_CRITERIA_EQUAL_TO:

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 7


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

return BOOLEAN(ss_ptr->is_mmss_operation==(byte)TO_WORD(para1,
para2));

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

case SDSS_CMP_CRITERIA_NOT_EQUAL_TO:
return BOOLEAN(ss_ptr->is_mmss_operation!=(byte)TO_WORD(para1,
para2));

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/

case SDSS_CMP_CRITERIA_NONE:
case SDSS_CMP_CRITERIA_MAX:
default:
QSR_SD_MSG_HIGH( 2037324469ULL, "Invalid cmp_criteria %d",
cmp_criteria, 0, 0 );//auto-gen, to change remove 'QSR_' and first param
return FALSE;
}

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/

case SDSS_IF_COND_ANY_SUBSCRIPTION_AVAILABLE: /* Currently handling


only GW and 1x subscriptions */
{
boolean bEvalAgainst = TO_WORD(para1, para2); /* if cond. to be
evaluated against true or false */
SD_MSG_HIGH("SDSS_IF_COND_ANY_SUBSCRIPTION_AVAILABLE cmp_criteria
%d, bEvalAgainst %d", cmp_criteria,bEvalAgainst,0);
SD_MSG_HIGH("SDSS_IF_COND_ANY_SUBSCRIPTION_AVAILABLE ss_ptr-
>is_gw_subsc_avail %d, ss_ptr->is_1x_subsc_avail %d", \
ss_ptr->is_gw_subsc_avail, ss_ptr->is_1x_subsc_avail, 0);
switch( cmp_criteria )
{
case SDSS_CMP_CRITERIA_EQUAL_TO:
if(TRUE == bEvalAgainst)
{
if((TRUE == ss_ptr->is_gw_subsc_avail ||
TRUE == ss_ptr->is_1x_subsc_avail) &&
ss == SD_SS_MAIN)
{
return TRUE;
}
else

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 8


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

{
return FALSE;
}
}
else /* bEvalAgainst is FALSE */
{
/* This means no subscription is available */
if(FALSE == ss_ptr->is_gw_subsc_avail &&
FALSE == ss_ptr->is_1x_subsc_avail &&
ss == SD_SS_MAIN)
{
return TRUE;
}
else
{
return FALSE;
}
}

/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -*/

case SDSS_CMP_CRITERIA_NOT_EQUAL_TO:
if(TRUE == bEvalAgainst) /* means the any subs avail is not
equal to true, i.e. no subscription is available. */
{
/* This means no subscription is available */
if(FALSE == ss_ptr->is_gw_subsc_avail &&
FALSE == ss_ptr->is_1x_subsc_avail &&
ss == SD_SS_MAIN)
{
return TRUE;
}
else
{
return FALSE;
}
}
else /* bEvalAgainst is FALSE */
{
/* means if any subs avail is not equal to false i.e.
some subscription is available. */
if((TRUE == ss_ptr->is_gw_subsc_avail ||
TRUE == ss_ptr->is_1x_subsc_avail) &&
ss == SD_SS_MAIN)

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 9


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

{
return TRUE;
}
else
{
return FALSE;
}
}
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -*/

case SDSS_CMP_CRITERIA_NONE:
case SDSS_CMP_CRITERIA_MAX:
default:
SD_MSG_HIGH("Invalid cmp_criteria %d", cmp_criteria, 0, 0 );
return FALSE;
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -*/
}
}
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/

case SDSS_IF_COND_NONE:
case SDSS_IF_COND_MAX:
default:

SD_CASE_ERR("Invalid if_cond %d", if_cond, 0, 0 );

return FALSE;

2.4.2 Change 2
File: sdss.h
Enum type: sdss_if_cond_e_type
Add a new enum, SDSS_IF_COND_ANY_SUBSCRIPTION_AVAILABLE, as follows:

SDSS_IF_COND_MAIN_STACK_ON_BSR,/* If the main stack is on BSR for fusion


*/

SDSS_IF_COND_ANY_SUBSCRIPTION_AVAILABLE, /* If any subscription


available (1x/HDR/GW/LTE etc.) */

SDSS_IF_COND_MAX /* For Internal SD USE


*/

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 10


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

} sdss_if_cond_e_type;

2.4.3 Change 3
File: sdssscr.c
Function: ssscr_user_ss_pref_opr_gw_emerg

static const sdssscr_elem_u_type ssscr_user_ss_pref_opr_gw_emerg[] = {

/* Condition */
IS_EVENT( USER_SS_PREF ) /* User changes the SS-Preference */
IS_STATE( OPR ) /* State is operation */
IS_MODE_PREF( SRV_SYS, GW ) /* Srv sys is a GW system */
IS_ORIG_MODE( EMERG_ORIG_OR_NONE_OR_MAN_IDLE )
/* Emergency orig or end of any call */
IS_PREF_REAS( ORIG_START_OR_END )
/* Orig or end of any call */

NOT IS_PREF_CHGD( DOMAIN_ACQ_ORDER )


#ifdef FEATURE_EOOS
RESET_EOOS_TIMER
#endif
/* Script */
IF(ANY_SUBSCRIPTION_AVAILABLE, EQUAL_TO, FALSE)
NEST_IF( CAP_3GPP_PREF_3GPP_ONLY, EQUAL_TO, FALSE )
/* No subscription available. Try as per systems in emerg. list
order as per prl list */
ACT_SCR(NO_SUBS_EMERG_MODE)
NEST_ELSE
RESEL_STT( SS_PREF ) /* Set reselection state to SS_PREF
*/
PROC_EVT( GWL_OPR_SRV_INFO ) /* Do GWL srv info event processing
*/
PROC_EVT( GWL_OPR_SYS_LOST ) /* Do system lost processing */
NEST_ENDIF
ELSE
RESEL_STT( SS_PREF ) /* Set reselection state to SS_PREF */
PROC_EVT( GWL_OPR_SRV_INFO ) /* Do GWL srv info event processing */
PROC_EVT( GWL_OPR_SYS_LOST ) /* Do system lost processing */
ENDIF
END
};

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 11


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

Function: ssscr_user_ss_pref_opr_gw_emerg_call_orig_ltd

static const sdssscr_elem_u_type


ssscr_user_ss_pref_opr_gw_emerg_call_orig_ltd[] = {

/* Condition */
NOT IS_ECALL_MODE(ECALL_ONLY) /* eCall modem NOT in ECALL_ONLY mode */
IS_EVENT( USER_SS_PREF ) /* User changes the SS-Preference */
IS_MODE_PREF( SRV_SYS, GW ) /* Srv sys is a GW system */
IS_ORIG_MODE( EMERG_ORIG ) /* Trying to originate an emergency call
*/
IS_SRV_STATUS( LIMITED_ANY ) /* Currently, have limited service */
IS_PREF_REAS( ORIG_START)

/* Script */
RESEL_STT( NONE ) /* Set reselection state to SS_PREF */
IF(ANY_SUBSCRIPTION_AVAILABLE, EQUAL_TO, FALSE)
NEST_IF( CAP_3GPP_PREF_3GPP_ONLY, EQUAL_TO, FALSE )
/* No subscription available. Try as per systems in emerg. list order
as per prl list */
ACT_SCR(NO_SUBS_EMERG_MODE)
NEST_ELSE
/* some subscription available - go ahead with normal behaviour */
RESEL_STT( SS_PREF ) /* Set reselection state to SS_PREF
*/
NEW_ACQ /* Start a new acquisition */
ACQ( GWL_LTD_LST, ANY) /* Try acq any system */
ACT_SCR( SRV_LOST_NORM_SLNT ) /* Do service lost normal silent */
NEST_ENDIF
ELSE
/* some subscription available - go ahead with normal behaviour */
RESEL_STT( SS_PREF ) /* Set reselection state to SS_PREF */
NEW_ACQ /* Start a new acquisition */
ACQ( GWL_LTD_LST, ANY) /* Try acq any system */
ACT_SCR( SRV_LOST_NORM_SLNT ) /* Do service lost normal silent */
ENDIF
END
};

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 12


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

Function: ssscr_int_srv_lost_emerg_orig

static const sdssscr_elem_u_type ssscr_int_srv_lost_emerg_orig[] = {

/* Condition */
IS_EVENT( INT_SRV_LOST ) /* Service is lost */
IS_ORIG_MODE( EMERG_ORIG ) /* Trying to originate an emergency call
*/

IF(ANY_SUBSCRIPTION_AVAILABLE, EQUAL_TO, TRUE)


ACT_SCR( SRV_LOST_EMERG_MODE ) /* Failed acq srv_sys,try all sys
forever */
ELSE
ACT_SCR(NO_SUBS_EMERG_MODE)
ENDIF
END
};

Function: ssscr_int_srv_lost_emerg_cb

static const sdssscr_elem_u_type ssscr_int_srv_lost_emerg_cb[] = {

/* Condition */
IS_EVENT( INT_SRV_LOST ) /* Service is lost */
IS_ORIG_MODE( EMERG_CB ) /* In emergency callback mode */
IS_CNT( SRV_SYS, 1, OR_MORE, ALL ) /* Serving system is not empty */

/* Script */
NEW_ACQ /* Start a new acquisition */

LOOP_TIME_CFG(EMERG_CB_TIME) /* Try to acquire the srv_sys for config


** duration */
SRV_STATUS( NO_SRV ) /* 1. Set service status to NO_SRV */
CLR( SCHED_LST ) /* 2. Cancel all reacq schedules */
AVOID_CANCEL( SRV_SYS ) /* 3. Cancel acq avoid of srv system */
ACQ_MODE( FULL ) /* 4. Do full acquisitions */
ACQ_ALL( SRV_SYS, ANY ) /* 5. Try reacquiring the serving
system */
LOOP /* Loop back */

IF(ANY_SUBSCRIPTION_AVAILABLE, EQUAL_TO, TRUE)


ACT_SCR( SRV_LOST_EMERG_MODE ) /* Failed acq srv_sys,try all sys
forever */

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 13


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

ELSE
NEST_IF( CAP_3GPP_PREF_3GPP_ONLY, EQUAL_TO, TRUE )
ACT_SCR(NO_SUBS_EMERG_MODE)
NEST_ELSE
ACT_SCR(NO_SUBS_EMERG_MODE)
NEST_ENDIF
ENDIF

END
};

Add a new function, ssscr_called_no_subs_emerg_mode, after


ssscr_called_srv_lost_emerg_mode script.
New function: ssscr_called_no_subs_emerg_mode

/*-------------------------------------------------------------------------
--
SDSSSCR_NO_SUBS_EMERG_MODE
---------------------------------------------------------------------------
*/
/* Service lost in emerg mode script. This script is invoked when:
** 1. MS is in Emergency orig/CB Mode
** 2. No subscription available and
** 3. Previous serving system is not available
** This script tries to acquire any system in EMERG_LST forever until
success
*/
static const sdssscr_elem_u_type ssscr_called_no_subs_emerg_mode[] = {

ACT_SCR( CLR_ACQ_SCHED_LSTS ) /* Clear acq process and sched lists */


LOOP_FOREVER /* loop forever and: */
SRV_STATUS( NO_SRV ) /* 1. Set service status to NO_SRV
*/
CPY( TEMP_LST, TBL_LST )
DEL_SYS( TEMP_LST, HDR )
AVOID_CANCEL( TEMP_LST ) /* 2. Cancel acq avoid for all
systems */

CPY( SRCH_LST, EMERG_LST ) /* Copy EMERG list into SRCH list */


ORDER( SRCH_LST, PRL_LST ) /* Order avail systems according to
PRL */

ACQ_CNT( SRCH_LST, ANY, 0, CNT_ALL )


/* 3. Try acq any system */

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 14


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

NEW_ACQ /* 4. Start a new acquisition */


ACQ_MODE( FULL ) /* 5. Do full acquisitions */
ACQ_FAIL /* 6. Indicate that acquisition
failed */
LOOP /* Loop back */

ACT_SCR( PWR_SAVE ) /* Nothing to acq - activate pwr-save


scr*/
END
};

File: sdssscr.h
Add a new enum in sdssscr_e_type.

SDSSSCR_SRV_LOST_EMERG_MODE, /* Service lost in emerg mode script */

SDSSSCR_NO_SUBS_EMERG_MODE, /* emerg mode no subscription script */

SDSSSCR_MAX

} sdssscr_e_type;

File: sdssscrtables.h
Add the following macro at the end of the file:

SD_ENUM_ELEMENT(ssscr_called_acq_gw_ltd), /*
SDSSSCR_ACQ_GW_LTD */

SD_ENUM_ELEMENT(ssscr_called_srv_lost_emerg_mode), /*
SDSSSCR_SRV_LOST_EMERG_MODE */

SD_ENUM_ELEMENT(ssscr_called_no_subs_emerg_mode) /*
SDSSSCR_NO_SUBS_EMERG_MODE */
};

NOTE: There is no code removed in this code change.

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 15


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION
Configuring Emergency Call Origination on CDMA Network in China Software Update Description

2.5 Side effects of the change


The side effect is that the emergency call logic now differs for China as requested and does not
follow the standard QTI emergency call origination algorithm.
1. When CDMA is not available or while roaming, the emergency call connect may take a little
longer based on network conditions.
2. The UE overrides the user preference and remains in No Service without any SIM instead of
remaining in Limited Service on GSM.

80-NA121-1 B Confidential and Proprietary – Qualcomm Technologies, Inc. 16


MAY CONTAIN U.S. AND INTERNATIONAL EXPORT CONTROLLED INFORMATION

You might also like