Professional Documents
Culture Documents
© 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
1 Introduction...................................................................................................... 5
1.1 Purpose.......................................................................................................................... 5
1.2 Conventions .................................................................................................................. 5
1.3 Technical assistance ...................................................................................................... 5
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.
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
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.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:
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;
}
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
{
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)
{
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:
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_e_type;
2.4.3 Change 3
File: sdssscr.c
Function: 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 */
Function: 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
};
Function: 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
*/
Function: 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 */
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
};
/*-------------------------------------------------------------------------
--
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[] = {
File: sdssscr.h
Add a new enum in sdssscr_e_type.
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 */
};