* RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
* New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
* RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
- * RIL_VERSION = 15 : New commands added: RIL_UNSOL_MODEM_RESTART
+ *
+ * RIL_VERSION = 15 : New commands added:
+ * RIL_UNSOL_MODEM_RESTART,
+ * RIL_REQUEST_SEND_DEVICE_STATE,
+ * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER,
+ * RIL_REQUEST_SET_SIM_CARD_POWER
* The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
* Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
- * New commands added: RIL_REQUEST_SEND_DEVICE_STATE,
- * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
+ * New data structure RIL_DataRegistrationStateResponse,
+ * RIL_VoiceRegistrationStateResponse same is
+ * used in RIL_REQUEST_DATA_REGISTRATION_STATE and
+ * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
*/
#define RIL_VERSION 12
#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
#define MAX_RILDS 3
-#define MAX_SOCKET_NAME_LENGTH 6
+#define MAX_SERVICE_NAME_LENGTH 6
#define MAX_CLIENT_ID_LENGTH 2
#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
#define MAX_QEMU_PIPE_NAME_LENGTH 11
RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
- RIL_E_INTERNAL_ERR = 38, /* Hit unexpected vendor internal error scenario */
+ RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
+ this request */
RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
- RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
+ RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
+ from modem for this request */
RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
RIL_E_SIM_ERR = 43, /* Received error from SIM card */
CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
+ CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
+ CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
+ CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
+ CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
+ CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
+ CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
+ CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
+ CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
+ CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
+ CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
+ CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
+ CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
+ CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
+ CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
+ CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
CALL_FAIL_CDMA_DROP = 1001,
CALL_FAIL_CDMA_INTERCEPT = 1002,
CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
during emergency callback mode */
CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
+
+ /* OEM specific error codes. Used to distinguish error from
+ * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
+ CALL_FAIL_OEM_CAUSE_1 = 0xf001,
+ CALL_FAIL_OEM_CAUSE_2 = 0xf002,
+ CALL_FAIL_OEM_CAUSE_3 = 0xf003,
+ CALL_FAIL_OEM_CAUSE_4 = 0xf004,
+ CALL_FAIL_OEM_CAUSE_5 = 0xf005,
+ CALL_FAIL_OEM_CAUSE_6 = 0xf006,
+ CALL_FAIL_OEM_CAUSE_7 = 0xf007,
+ CALL_FAIL_OEM_CAUSE_8 = 0xf008,
+ CALL_FAIL_OEM_CAUSE_9 = 0xf009,
+ CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
+ CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
+ CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
+ CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
+ CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
+ CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
+
CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
vendor code should make sure to map error
code to specific error */
RIL_APPTYPE_ISIM = 5
} RIL_AppType;
+/*
+ * Please note that registration state UNKNOWN is
+ * treated as "out of service" in the Android telephony.
+ * Registration state REG_DENIED must be returned if Location Update
+ * Reject (with cause 17 - Network Failure) is received
+ * repeatedly from the network, to facilitate
+ * "managed roaming"
+ */
+typedef enum {
+ RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
+ // a new operator to register
+ RIL_REG_HOME = 1, // Registered, home network
+ RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
+ // a new operator to register
+ RIL_REG_DENIED = 3, // Registration denied
+ RIL_UNKNOWN = 4, // Unknown
+ RIL_REG_ROAMING = 5, // Registered, roaming
+ RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
+ // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
+ // emergency calls are enabled.
+ RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
+ // but indicates that
+ // emergency calls are enabled.
+ RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
+ // emergency calls are enabled.
+ RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
+ // emergency calls are enabled.
+} RIL_RegState;
+
typedef struct
{
RIL_AppType app_type;
// Must be the same as CellInfo.TYPE_XXX
typedef enum {
+ RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
RIL_CELL_INFO_TYPE_GSM = 1,
RIL_CELL_INFO_TYPE_CDMA = 2,
RIL_CELL_INFO_TYPE_LTE = 3,
} CellInfo;
} RIL_CellInfo_v12;
+typedef struct {
+ RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
+ union {
+ RIL_CellIdentityGsm_v12 cellIdentityGsm;
+ RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
+ RIL_CellIdentityLte_v12 cellIdentityLte;
+ RIL_CellIdentityTdscdma cellIdentityTdscdma;
+ RIL_CellIdentityCdma cellIdentityCdma;
+ };
+}RIL_CellIdentity_v16;
+
+typedef struct {
+ RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
+ // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
+ // UNKNOWN, REG_ROAMING defined in RegState
+ RIL_RadioTechnology rat; // indicates the available voice radio technology,
+ // valid values as defined by RadioTechnology.
+ int32_t cssSupported; // concurrent services support indicator. if
+ // registered on a CDMA system.
+ // 0 - Concurrent services not supported,
+ // 1 - Concurrent services supported
+ int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
+ // on a CDMA or EVDO system or -1 if not.
+ // Valid values are 0-255.
+ int32_t systemIsInPrl; // indicates whether the current system is in the
+ // PRL if registered on a CDMA or EVDO system or -1 if
+ // not. 0=not in the PRL, 1=in the PRL
+ int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
+ // if registered on a CDMA or EVDO system or -1 if not.
+ // Valid values are 0-255.
+ int32_t reasonForDenial; // reasonForDenial if registration state is 3
+ // (Registration denied) this is an enumerated reason why
+ // registration was denied. See 3GPP TS 24.008,
+ // 10.5.3.6 and Annex G.
+ // 0 - General
+ // 1 - Authentication Failure
+ // 2 - IMSI unknown in HLR
+ // 3 - Illegal MS
+ // 4 - Illegal ME
+ // 5 - PLMN not allowed
+ // 6 - Location area not allowed
+ // 7 - Roaming not allowed
+ // 8 - No Suitable Cells in this Location Area
+ // 9 - Network failure
+ // 10 - Persistent location update reject
+ // 11 - PLMN not allowed
+ // 12 - Location area not allowed
+ // 13 - Roaming not allowed in this Location Area
+ // 15 - No Suitable Cells in this Location Area
+ // 17 - Network Failure
+ // 20 - MAC Failure
+ // 21 - Sync Failure
+ // 22 - Congestion
+ // 23 - GSM Authentication unacceptable
+ // 25 - Not Authorized for this CSG
+ // 32 - Service option not supported
+ // 33 - Requested service option not subscribed
+ // 34 - Service option temporarily out of order
+ // 38 - Call cannot be identified
+ // 48-63 - Retry upon entry into a new cell
+ // 95 - Semantically incorrect message
+ // 96 - Invalid mandatory information
+ // 97 - Message type non-existent or not implemented
+ // 98 - Message type not compatible with protocol state
+ // 99 - Information element non-existent or
+ // not implemented
+ // 100 - Conditional IE error
+ // 101 - Message not compatible with protocol state;
+ RIL_CellIdentity_v16 cellIdentity; // current cell information
+}RIL_VoiceRegistrationStateResponse;
+
+
+typedef struct {
+ RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
+ // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
+ // UNKNOWN, REG_ROAMING defined in RegState
+ RIL_RadioTechnology rat; // indicates the available data radio technology,
+ // valid values as defined by RadioTechnology.
+ int32_t reasonDataDenied; // if registration state is 3 (Registration
+ // denied) this is an enumerated reason why
+ // registration was denied. See 3GPP TS 24.008,
+ // Annex G.6 "Additional cause codes for GMM".
+ // 7 == GPRS services not allowed
+ // 8 == GPRS services and non-GPRS services not allowed
+ // 9 == MS identity cannot be derived by the network
+ // 10 == Implicitly detached
+ // 14 == GPRS services not allowed in this PLMN
+ // 16 == MSC temporarily not reachable
+ // 40 == No PDP context activated
+ int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
+ // must be established using setupDataCall().
+ RIL_CellIdentity_v16 cellIdentity; // Current cell information
+}RIL_DataRegistrationStateResponse;
+
/* Names of the CDMA info records (C.S0005 section 3.7.5) */
typedef enum {
RIL_CDMA_DISPLAY_INFO_REC,
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* PASSWORD_INCORRECT
* (PUK is invalid)
*/
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* PASSWORD_INCORRECT
*/
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* PASSWORD_INCORRECT
* (PUK2 is invalid)
*/
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* PASSWORD_INCORRECT
* (old PIN is invalid)
*
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* PASSWORD_INCORRECT
* (old PIN2 is invalid)
*
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* PASSWORD_INCORRECT
* (code is invalid)
*/
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* NO_MEMORY
- * GENERIC_FAILURE
* (request will be made again in a few hundred msec)
*/
* DEVICE_IN_USE
* MODE_NOT_SUPPORTED
* ABORTED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_DIAL 10
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_IMSI 11
* NO_MEMORY
* INVALID_CALL_ID
* INVALID_ARGUMENTS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_HANGUP 12
* NO_RESOURCES
* OPERATION_NOT_ALLOWED
* INVALID_ARGUMENTS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
* OPERATION_NOT_ALLOWED
* INVALID_ARGUMENTS
* NO_RESOURCES
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
* INVALID_ARGUMENTS
* INVALID_CALL_ID
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
* INVALID_CALL_ID
* INVALID_ARGUMENTS
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_CONFERENCE 16
* INVALID_CALL_ID
* OPERATION_NOT_ALLOWED
* INVALID_ARGUMENTS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_UDUB 17
* Requests the failure cause code for the most recently terminated call
*
* "data" is NULL
- * "response" is a "int *"
- * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
- * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
- * failure reasons are derived from the possible call failure scenarios
+ * "response" is a const RIL_LastCallFailCauseInfo *
+ * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
+ * The vendor cause code must be used for debugging purpose only.
+ * The implementation must return one of the values of LastCallFailCause
+ * as mentioned below.
+ *
+ * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
+ * where possible.
+ * CDMA failure reasons codes for the possible call failure scenarios
* described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
- *
- * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
- * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
+ * Any of the following reason codes if the call is failed or dropped due to reason
+ * mentioned with in the braces.
+ *
+ * CALL_FAIL_RADIO_OFF (Radio is OFF)
+ * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
+ * CALL_FAIL_NO_VALID_SIM (No valid SIM)
+ * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
+ * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
+ * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
+ * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
+ * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
+ * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
+ * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
+ * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
+ * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
+ * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
+ * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
+ * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
+ *
+ * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
*
* If the implementation does not have access to the exact cause codes,
* then it should return one of the values listed in RIL_LastCallFailCause,
* SUCCESS
* RADIO_NOT_AVAILABLE
* NO_MEMORY
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
*/
* Request current registration state
*
* "data" is NULL
- * "response" is a "char **"
- * ((const char **)response)[0] is registration state 0-6,
- * 0 - Not registered, MT is not currently searching
- * a new operator to register
- * 1 - Registered, home network
- * 2 - Not registered, but MT is currently searching
- * a new operator to register
- * 3 - Registration denied
- * 4 - Unknown
- * 5 - Registered, roaming
- * 10 - Same as 0, but indicates that emergency calls
- * are enabled.
- * 12 - Same as 2, but indicates that emergency calls
- * are enabled.
- * 13 - Same as 3, but indicates that emergency calls
- * are enabled.
- * 14 - Same as 4, but indicates that emergency calls
- * are enabled.
- *
- * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
- * NULL if not.Valid LAC are 0x0000 - 0xffff
- * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
- * NULL if not.
- * Valid CID are 0x00000000 - 0xffffffff
- * In GSM, CID is Cell ID (see TS 27.007)
- * in 16 bits
- * In UMTS, CID is UMTS Cell Identity
- * (see TS 25.331) in 28 bits
- * ((const char **)response)[3] indicates the available voice radio technology,
- * valid values as defined by RIL_RadioTechnology.
- * ((const char **)response)[4] is Base Station ID if registered on a CDMA
- * system or NULL if not. Base Station ID in
- * decimal format
- * ((const char **)response)[5] is Base Station latitude if registered on a
- * CDMA system or NULL if not. Base Station
- * latitude is a decimal number as specified in
- * 3GPP2 C.S0005-A v6.0. It is represented in
- * units of 0.25 seconds and ranges from -1296000
- * to 1296000, both values inclusive (corresponding
- * to a range of -90 to +90 degrees).
- * ((const char **)response)[6] is Base Station longitude if registered on a
- * CDMA system or NULL if not. Base Station
- * longitude is a decimal number as specified in
- * 3GPP2 C.S0005-A v6.0. It is represented in
- * units of 0.25 seconds and ranges from -2592000
- * to 2592000, both values inclusive (corresponding
- * to a range of -180 to +180 degrees).
- * ((const char **)response)[7] is concurrent services support indicator if
- * registered on a CDMA system 0-1.
- * 0 - Concurrent services not supported,
- * 1 - Concurrent services supported
- * ((const char **)response)[8] is System ID if registered on a CDMA system or
- * NULL if not. Valid System ID are 0 - 32767
- * ((const char **)response)[9] is Network ID if registered on a CDMA system or
- * NULL if not. Valid System ID are 0 - 65535
- * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
- * on a CDMA or EVDO system or NULL if not. Valid values
- * are 0-255.
- * ((const char **)response)[11] indicates whether the current system is in the
- * PRL if registered on a CDMA or EVDO system or NULL if
- * not. 0=not in the PRL, 1=in the PRL
- * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
- * if registered on a CDMA or EVDO system or NULL if not.
- * Valid values are 0-255.
- * ((const char **)response)[13] if registration state is 3 (Registration
- * denied) this is an enumerated reason why
- * registration was denied. See 3GPP TS 24.008,
- * 10.5.3.6 and Annex G.
- * 0 - General
- * 1 - Authentication Failure
- * 2 - IMSI unknown in HLR
- * 3 - Illegal MS
- * 4 - Illegal ME
- * 5 - PLMN not allowed
- * 6 - Location area not allowed
- * 7 - Roaming not allowed
- * 8 - No Suitable Cells in this Location Area
- * 9 - Network failure
- * 10 - Persistent location update reject
- * 11 - PLMN not allowed
- * 12 - Location area not allowed
- * 13 - Roaming not allowed in this Location Area
- * 15 - No Suitable Cells in this Location Area
- * 17 - Network Failure
- * 20 - MAC Failure
- * 21 - Sync Failure
- * 22 - Congestion
- * 23 - GSM Authentication unacceptable
- * 25 - Not Authorized for this CSG
- * 32 - Service option not supported
- * 33 - Requested service option not subscribed
- * 34 - Service option temporarily out of order
- * 38 - Call cannot be identified
- * 48-63 - Retry upon entry into a new cell
- * 95 - Semantically incorrect message
- * 96 - Invalid mandatory information
- * 97 - Message type non-existent or not implemented
- * 98 - Message type not compatible with protocol state
- * 99 - Information element non-existent or not implemented
- * 100 - Conditional IE error
- * 101 - Message not compatible with protocol state
- * 111 - Protocol error, unspecified
- * ((const char **)response)[14] is the Primary Scrambling Code of the current
- * cell as described in TS 25.331, in hexadecimal
- * format, or NULL if unknown or not registered
- * to a UMTS network.
- *
- * Please note that registration state 4 ("unknown") is treated
- * as "out of service" in the Android telephony system
- *
- * Registration state 3 can be returned if Location Update Reject
- * (with cause 17 - Network Failure) is received repeatedly from the network,
- * to facilitate "managed roaming"
+ * "response" is a const RIL_VoiceRegistrationStateResponse *
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
* Request current DATA registration state
*
* "data" is NULL
- * "response" is a "char **"
- * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
- * ((const char **)response)[1] is LAC if registered or NULL if not
- * ((const char **)response)[2] is CID if registered or NULL if not
- * ((const char **)response)[3] indicates the available data radio technology,
- * valid values as defined by RIL_RadioTechnology.
- * ((const char **)response)[4] if registration state is 3 (Registration
- * denied) this is an enumerated reason why
- * registration was denied. See 3GPP TS 24.008,
- * Annex G.6 "Additonal cause codes for GMM".
- * 7 == GPRS services not allowed
- * 8 == GPRS services and non-GPRS services not allowed
- * 9 == MS identity cannot be derived by the network
- * 10 == Implicitly detached
- * 14 == GPRS services not allowed in this PLMN
- * 16 == MSC temporarily not reachable
- * 40 == No PDP context activated
- * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
- * established using RIL_REQUEST_SETUP_DATA_CALL.
- *
- * The values at offsets 6..10 are optional LTE location information in decimal.
- * If a value is unknown that value may be NULL. If all values are NULL,
- * none need to be present.
- * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
- * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
- * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
- * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
- * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
- *
- * LAC and CID are in hexadecimal format.
- * valid LAC are 0x0000 - 0xffff
- * valid CID are 0x00000000 - 0x0fffffff
- *
- * Please note that registration state 4 ("unknown") is treated
- * as "out of service" in the Android telephony system
+ * "response" is a const RIL_DataRegistrationStateResponse *
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_OPERATOR 22
* SUCCESS
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_RADIO_POWER 23
* MODEM_ERR
* INTERNAL_ERR
* INVALID_CALL_ID
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
*
* MODEM_ERR
* NETWORK_ERR
* MODE_NOT_SUPPORTED
- * GENERIC_FAILURE
*
* FIXME how do we specify TP-Message-Reference if we need to resend?
*/
* ENCODING_ERR
* INVALID_SMSC_ADDRESS
* MODE_NOT_SUPPORTED
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
* SIM_PIN2
* SIM_PUK2
*/
* ABORTED
* SYSTEM_ERR
* INVALID_STATE
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
*/
* INTERNAL_ERR
* NO_MEMORY
* INVALID_STATE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_CANCEL_USSD 30
* INTERNAL_ERR
* FDN_CHECK_FAILURE
* SYSTEM_ERR
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_CLIR 31
* SS_MODIFIED_TO_SS
* INVALID_ARGUMENTS
* SYSTEM_ERR
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CLIR 32
* INTERNAL_ERR
* NO_MEMORY
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
* INTERNAL_ERR
* INVALID_STATE
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CALL_FORWARD 34
* NO_MEMORY
* FDN_CHECK_FAILURE
* INVALID_ARGUMENTS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CALL_WAITING 35
* INTERNAL_ERR
* INVALID_STATE
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CALL_WAITING 36
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SMS_ACKNOWLEDGE 37
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_IMEI 38
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_IMEISV 39
* MODEM_ERR
* INTERNAL_ERR
* INVALID_CALL_ID
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_ANSWER 40
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_SETUP_DATA_CALL
*/
* SYSTEM_ERR
* MODEM_ERR
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_QUERY_FACILITY_LOCK 42
* MODEM_ERR
* INVALID_STATE
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_SET_FACILITY_LOCK 43
* INTERNAL_ERR
* SYSTEM_ERR
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
* RADIO_NOT_AVAILABLE
* ILLEGAL_SIM_OR_ME
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*
* Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
* no retries needed, such as illegal SIM or ME.
* RADIO_NOT_AVAILABLE
* ILLEGAL_SIM_OR_ME
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*
* Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
* no retries needed, such as illegal SIM or ME.
* "current"
* "forbidden"
*
- * This request must not respond until the new operator is selected
- * and registered
- *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
+ * ABORTED
+ * DEVICE_IN_USE
+ * INTERNAL_ERR
+ * NO_MEMORY
+ * MODEM_ERR
*
*/
#define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
* MODEM_ERR
* INTERNAL_ERR
* INVALID_CALL_ID
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
*/
* MODEM_ERR
* INTERNAL_ERR
* INVALID_CALL_ID
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
*/
* SUCCESS
* RADIO_NOT_AVAILABLE
* EMPTY_RECORD
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_BASEBAND_VERSION 51
* INVALID_CALL_ID
* INVALID_STATE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SEPARATE_CONNECTION 52
* INVALID_ARGUMENTS
* NO_MEMORY
* REQUEST_RATE_LIMITED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_MUTE 53
* SS_MODIFIED_TO_SS
* NO_MEMORY
* REQUEST_RATE_LIMITED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_MUTE 54
* MODEM_ERR
* INTERNAL_ERR
* FDN_CHECK_FAILURE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CLIP 55
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
*
* See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* REQUEST_NOT_SUPPORTED
*/
*
* Valid errors:
* SUCCESS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SCREEN_STATE 61
* SYSTEM_ERR
* MODEM_ERR
* INTERNAL_ERR
- * GENERIC_FAILURE
*
* See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
*/
* INVALID_MODEM_STATE
* MODE_NOT_SUPPORTED
* INVALID_SMSC_ADDRESS
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_WRITE_SMS_TO_SIM 63
* SYSTEM_ERR
* MODEM_ERR
* NO_SUCH_ENTRY
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_DELETE_SMS_ON_SIM 64
* SUCCESS
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_SET_BAND_MODE
*/
* INVALID_CALL_ID
* INVALID_STATE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* OPERATION_NOT_ALLOWED
* MODE_NOT_SUPPORTED
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
* See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
* SIM_ABSENT
* SUBSCRIPTION_NOT_AVAILABLE
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
* MODEM_ERR
* INTERNAL_ERR
* NO_MEMORYY
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_TTY_MODE 80
* INTERNAL_ERR
* NO_MEMORY
* INVALID_ARGUMENTS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_TTY_MODE 81
* INTERNAL_ERR
* NO_MEMORY
* INVALID_CALL_ID
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
* INTERNAL_ERR
* NO_MEMORY
* INVALID_ARGUMENTS
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
* INTERNAL_ERR
* INVALID_CALL_ID
* INVALID_STATE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_FLASH 84
* MODEM_ERR
* INTERNAL_ERR
* INVALID_CALL_ID
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_BURST_DTMF 85
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
* ENCODING_ERR
* INVALID_SMSC_ADDRESS
* MODE_NOT_SUPPORTED
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_SEND_SMS 87
* MODE_NOT_SUPPORTED
* NETWORK_NOT_READY
* INVALID_MODEM_STATE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
* NO_RESOURCES
* MODEM_ERR
* SYSTEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
* REQUEST_RATE_LIMITED
* MODEM_ERR
* SYSTEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
* SYSTEM_ERR
* REQUEST_RATE_LIMITED
* MODEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
* NO_RESOURCES
* MODEM_ERR
* SYSTEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
* REQUEST_RATE_LIMITED
* MODEM_ERR
* SYSTEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
* SYSTEM_ERR
* REQUEST_RATE_LIMITED
* MODEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
* INVALID_MODEM_STATE
* MODE_NOT_SUPPORTED
* INVALID_SMSC_ADDRESS
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
* SYSTEM_ERR
* MODEM_ERR
* NO_SUCH_ENTRY
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_DEVICE_IDENTITY 98
* SUCCESS
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
* INVALID_ARGUMENTS
* INVALID_MODEM_STATE
* NOT_PROVISIONED
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_GET_SMSC_ADDRESS 100
* REQUEST_RATE_LIMITED
* MODEM_ERR
* NO_RESOURCES
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_SET_SMSC_ADDRESS 101
* SYSTEM_ERR
* REQUEST_RATE_LIMITED
* MODEM_ERR
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
* SUBSCRIPTION_NOT_AVAILABLE
*
* See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_ISIM_AUTHENTICATION 105
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_VOICE_RADIO_TECH 108
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* SUBSCRIPTION_NOT_AVAILABLE
*/
#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
* ENCODING_ERR
* INVALID_SMSC_ADDRESS
* MODE_NOT_SUPPORTED
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_IMS_SEND_SMS 113
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
* MISSING_RESOURCE
* NO_SUCH_ELEMENT
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_NV_READ_ITEM 118
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_NV_WRITE_ITEM 119
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_NV_RESET_CONFIG 121
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* SUBSCRIPTION_NOT_SUPPORTED
*
*/
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
*
*/
#define RIL_REQUEST_ALLOW_DATA 123
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
*
* See also: RIL_UNSOL_DC_RT_INFO_CHANGED
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
- * GENERIC_FAILURE
* SUBSCRIPTION_NOT_AVAILABLE
*/
#define RIL_REQUEST_SET_DATA_PROFILE 128
* SUCCESS
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SHUTDOWN 129
* SUCCESS
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
* SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
* RADIO_NOT_AVAILABLE
* OPERATION_NOT_ALLOWED
- * GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_RADIO_CAPABILITY 131
*/
#define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
+ /**
+ * RIL_REQUEST_SET_SIM_CARD_POWER
+ *
+ * Set SIM card power up or down
+ *
+ * Request is equivalent to inserting and removing the card, with
+ * an additional effect where the ability to detect card removal/insertion
+ * is disabled when the SIM card is powered down.
+ *
+ * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
+ * as if the SIM had been inserted or removed.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is 1 for "SIM POWER UP"
+ * ((int *)data)[0] is 0 for "SIM POWER DOWN"
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * REQUEST_NOT_SUPPORTED
+ * SIM_ABSENT
+ * INVALID_ARGUMENTS
+ */
+#define RIL_REQUEST_SET_SIM_CARD_POWER 140
/***********************************************************************/
/**