* limitations under the License.
*/
- /* ISSUES:
- * - SMS retransmit (specifying TP-Message-ID)
- *
- */
-
-/**
- * TODO
- *
- * Supp Service Notification (+CSSN)
- * GPRS PDP context deactivate notification
- *
- */
-
-
#ifndef ANDROID_RIL_H
#define ANDROID_RIL_H 1
#include <stdlib.h>
+#include <stdint.h>
+#include <telephony/ril_cdma_sms.h>
+#include <telephony/ril_nv_items.h>
+#include <telephony/ril_msim.h>
+
#ifndef FEATURE_UNIT_TEST
#include <sys/time.h>
#endif /* !FEATURE_UNIT_TEST */
extern "C" {
#endif
-#define RIL_VERSION 4
+
+#if defined(ANDROID_SIM_COUNT_2)
+#define SIM_COUNT 2
+#elif defined(ANDROID_SIM_COUNT_3)
+#define SIM_COUNT 3
+#elif defined(ANDROID_SIM_COUNT_4)
+#define SIM_COUNT 4
+#else
+#define SIM_COUNT 1
+#endif
+
+#ifndef ANDROID_MULTI_SIM
+#define SIM_COUNT 1
+#endif
+
+/*
+ * RIL version.
+ * Value of RIL_VERSION should not be changed in future. Here onwards,
+ * when a new change is supposed to be introduced which could involve new
+ * schemes added like Wakelocks, data structures added/updated, etc, we would
+ * just document RIL version associated with that change below. When OEM updates its
+ * RIL with those changes, they would return that new RIL version during RIL_REGISTER.
+ * We should make use of the returned version by vendor to identify appropriate scheme
+ * or data structure version to use.
+ *
+ * Documentation of RIL version and associated changes
+ * RIL_VERSION = 12 : This version corresponds to updated data structures namely
+ * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
+ * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
+ * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12
+ * RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12,
+ * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
+ *
+ * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
+ * strongly versioned version it enforces structure use.
+ */
+#define RIL_VERSION 12
+#define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
+#define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
+#define MAX_RILDS 3
+#define MAX_SOCKET_NAME_LENGTH 6
+#define MAX_CLIENT_ID_LENGTH 2
+#define MAX_DEBUG_SOCKET_NAME_LENGTH 12
+#define MAX_QEMU_PIPE_NAME_LENGTH 11
+#define MAX_UUID_LENGTH 64
+
+
typedef void * RIL_Token;
typedef enum {
+ RIL_SOCKET_1,
+#if (SIM_COUNT >= 2)
+ RIL_SOCKET_2,
+#if (SIM_COUNT >= 3)
+ RIL_SOCKET_3,
+#endif
+#if (SIM_COUNT >= 4)
+ RIL_SOCKET_4,
+#endif
+#endif
+ RIL_SOCKET_NUM
+} RIL_SOCKET_ID;
+
+
+typedef enum {
RIL_E_SUCCESS = 0,
RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
RIL_E_GENERIC_FAILURE = 2,
location */
RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
- RIL_E_ILLEGAL_SIM_OR_ME = 15 /* network selection failed due to
+ RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
illegal SIM or ME */
+ RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
+ RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
+ RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
+ RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
+ RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
+ data */
+ RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
+ RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
+ RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
+ request */
+ RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
+ RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
+ RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
+ 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_SYSTEM_ERR = 39, /* Hit platform or system error */
+ RIL_E_MODEM_ERR = 40, /* Hit unexpected modem error */
+ RIL_E_INVALID_STATE = 41, /* Can not process the request as vendor RIL is in
+ invalid state. */
+ RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
+ RIL_E_SIM_ERR = 43, /* Received error from SIM card */
+ RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
+ RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
+ RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
+ RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
+ RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
+ RIL_E_NETWORK_ERR = 49, /* Received error from network */
+ RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
+ RIL_E_SIM_BUSY = 51, /* SIM is busy */
+ RIL_E_SIM_FULL = 52, /* The target EF is full */
+ RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
+ RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
+ RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
+ // OEM specific error codes. To be used by OEM when they don't want to reveal
+ // specific error codes which would be replaced by Generic failure.
+ RIL_E_OEM_ERROR_1 = 501,
+ RIL_E_OEM_ERROR_2 = 502,
+ RIL_E_OEM_ERROR_3 = 503,
+ RIL_E_OEM_ERROR_4 = 504,
+ RIL_E_OEM_ERROR_5 = 505,
+ RIL_E_OEM_ERROR_6 = 506,
+ RIL_E_OEM_ERROR_7 = 507,
+ RIL_E_OEM_ERROR_8 = 508,
+ RIL_E_OEM_ERROR_9 = 509,
+ RIL_E_OEM_ERROR_10 = 510,
+ RIL_E_OEM_ERROR_11 = 511,
+ RIL_E_OEM_ERROR_12 = 512,
+ RIL_E_OEM_ERROR_13 = 513,
+ RIL_E_OEM_ERROR_14 = 514,
+ RIL_E_OEM_ERROR_15 = 515,
+ RIL_E_OEM_ERROR_16 = 516,
+ RIL_E_OEM_ERROR_17 = 517,
+ RIL_E_OEM_ERROR_18 = 518,
+ RIL_E_OEM_ERROR_19 = 519,
+ RIL_E_OEM_ERROR_20 = 520,
+ RIL_E_OEM_ERROR_21 = 521,
+ RIL_E_OEM_ERROR_22 = 522,
+ RIL_E_OEM_ERROR_23 = 523,
+ RIL_E_OEM_ERROR_24 = 524,
+ RIL_E_OEM_ERROR_25 = 525
} RIL_Errno;
typedef enum {
typedef enum {
RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
+ /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
personalization locked, or SIM absent */
RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
personalization locked, or RUIM absent */
RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
- RADIO_STATE_NV_READY = 9 /* Radio is on and the NV interface is available */
+ RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
+ RADIO_STATE_ON = 10 /* Radio is on */
} RIL_RadioState;
+typedef enum {
+ RADIO_TECH_UNKNOWN = 0,
+ RADIO_TECH_GPRS = 1,
+ RADIO_TECH_EDGE = 2,
+ RADIO_TECH_UMTS = 3,
+ RADIO_TECH_IS95A = 4,
+ RADIO_TECH_IS95B = 5,
+ RADIO_TECH_1xRTT = 6,
+ RADIO_TECH_EVDO_0 = 7,
+ RADIO_TECH_EVDO_A = 8,
+ RADIO_TECH_HSDPA = 9,
+ RADIO_TECH_HSUPA = 10,
+ RADIO_TECH_HSPA = 11,
+ RADIO_TECH_EVDO_B = 12,
+ RADIO_TECH_EHRPD = 13,
+ RADIO_TECH_LTE = 14,
+ RADIO_TECH_HSPAP = 15, // HSPA+
+ RADIO_TECH_GSM = 16, // Only supports voice
+ RADIO_TECH_TD_SCDMA = 17,
+ RADIO_TECH_IWLAN = 18
+} RIL_RadioTechnology;
+
+typedef enum {
+ RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
+ RAF_GPRS = (1 << RADIO_TECH_GPRS),
+ RAF_EDGE = (1 << RADIO_TECH_EDGE),
+ RAF_UMTS = (1 << RADIO_TECH_UMTS),
+ RAF_IS95A = (1 << RADIO_TECH_IS95A),
+ RAF_IS95B = (1 << RADIO_TECH_IS95B),
+ RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
+ RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
+ RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
+ RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
+ RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
+ RAF_HSPA = (1 << RADIO_TECH_HSPA),
+ RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
+ RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
+ RAF_LTE = (1 << RADIO_TECH_LTE),
+ RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
+ RAF_GSM = (1 << RADIO_TECH_GSM),
+ RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
+} RIL_RadioAccessFamily;
+
+typedef enum {
+ BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
+ BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
+ BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
+ BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
+ BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
+ BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
+ BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
+ BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
+ BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
+ BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
+ BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
+ BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
+ BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
+ BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
+ BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
+ BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
+ BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
+ BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
+ BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
+} RIL_RadioBandMode;
+
+typedef enum {
+ RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
+ RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
+ // forthcoming with these same parameters
+ RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
+ // RIL_RadioCapability.status = 0, if any START's fail no
+ // APPLY will be sent
+ RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
+ RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
+ // occurs in any previous command the RIL_RadioAccessesFamily and
+ // logicalModemUuid fields will be the prior configuration thus
+ // restoring the configuration to the previous value. An error
+ // returned by this command will generally be ignored or may
+ // cause that logical modem to be removed from service.
+} RadioCapabilityPhase;
+
+typedef enum {
+ RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
+ // RC_PHASE_APPLY
+ RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
+ // capability was success with RC_PHASE_FINISH
+ RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
+ // capability is fail with RC_PHASE_FINISH.
+} RadioCapabilityStatus;
+
+#define RIL_RADIO_CAPABILITY_VERSION 1
+typedef struct {
+ int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
+ int session; // Unique session value defined by framework returned in all "responses/unsol"
+ int phase; // CONFIGURED, START, APPLY, FINISH
+ int rat; // RIL_RadioAccessFamily for the radio
+ char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
+ int status; // Return status and an input parameter for RC_PHASE_FINISH
+} RIL_RadioCapability;
+
+// Do we want to split Data from Voice and the use
+// RIL_RadioTechnology for get/setPreferredVoice/Data ?
+typedef enum {
+ PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
+ PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
+ PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
+ PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
+ PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
+ PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
+ PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
+ PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
+ PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
+ PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
+ PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
+ PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
+ PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
+} RIL_PreferredNetworkType;
+
+/* Source for cdma subscription */
+typedef enum {
+ CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
+ CDMA_SUBSCRIPTION_SOURCE_NV = 1
+} RIL_CdmaSubscriptionSource;
+
/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
typedef enum {
RIL_UUS_TYPE1_IMPLICIT = 0,
RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
} RIL_Call;
+/* Deprecated, use RIL_Data_Call_Response_v6 */
typedef struct {
- int cid; /* Context ID */
+ int cid; /* Context ID, uniquely identifies this call */
int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
For example, "IP", "IPV6", "IPV4V6", or "PPP". */
- char * apn;
- char * address; /* The IPv4 or IPv6 address assigned to the call, e.g., "192.0.1.3"
- or "2001:db8::1". */
-} RIL_Data_Call_Response;
+ char * apn; /* ignored */
+ char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
+} RIL_Data_Call_Response_v4;
+
+/*
+ * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
+ * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
+ */
+typedef struct {
+ int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+ int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+ back-off timer value RIL wants to override the one
+ pre-configured in FW.
+ The unit is miliseconds.
+ The value < 0 means no value is suggested.
+ The value 0 means retry should be done ASAP.
+ The value of INT_MAX(0x7fffffff) means no retry. */
+ int cid; /* Context ID, uniquely identifies this call */
+ int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
+ char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
+ For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
+ PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
+ such as "IP" or "IPV6" */
+ char * ifname; /* The network interface name */
+ char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
+ e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
+ May not be empty, typically 1 IPv4 or 1 IPv6 or
+ one of each. If the prefix length is absent the addresses
+ are assumed to be point to point with IPv4 having a prefix
+ length of 32 and IPv6 128. */
+ char * dnses; /* A space-delimited list of DNS server addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty. */
+ char * gateways; /* A space-delimited list of default gateway addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty in which case the addresses represent point
+ to point connections. */
+} RIL_Data_Call_Response_v6;
+
+typedef struct {
+ int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+ int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+ back-off timer value RIL wants to override the one
+ pre-configured in FW.
+ The unit is miliseconds.
+ The value < 0 means no value is suggested.
+ The value 0 means retry should be done ASAP.
+ The value of INT_MAX(0x7fffffff) means no retry. */
+ int cid; /* Context ID, uniquely identifies this call */
+ int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
+ char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
+ For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
+ PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
+ such as "IP" or "IPV6" */
+ char * ifname; /* The network interface name */
+ char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
+ e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
+ May not be empty, typically 1 IPv4 or 1 IPv6 or
+ one of each. If the prefix length is absent the addresses
+ are assumed to be point to point with IPv4 having a prefix
+ length of 32 and IPv6 128. */
+ char * dnses; /* A space-delimited list of DNS server addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty. */
+ char * gateways; /* A space-delimited list of default gateway addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty in which case the addresses represent point
+ to point connections. */
+ char * pcscf; /* the Proxy Call State Control Function address
+ via PCO(Protocol Configuration Option) for IMS client. */
+} RIL_Data_Call_Response_v9;
+
+typedef struct {
+ int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
+ int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
+ back-off timer value RIL wants to override the one
+ pre-configured in FW.
+ The unit is miliseconds.
+ The value < 0 means no value is suggested.
+ The value 0 means retry should be done ASAP.
+ The value of INT_MAX(0x7fffffff) means no retry. */
+ int cid; /* Context ID, uniquely identifies this call */
+ int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
+ char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
+ For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
+ PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
+ such as "IP" or "IPV6" */
+ char * ifname; /* The network interface name */
+ char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
+ e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
+ May not be empty, typically 1 IPv4 or 1 IPv6 or
+ one of each. If the prefix length is absent the addresses
+ are assumed to be point to point with IPv4 having a prefix
+ length of 32 and IPv6 128. */
+ char * dnses; /* A space-delimited list of DNS server addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty. */
+ char * gateways; /* A space-delimited list of default gateway addresses,
+ e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ May be empty in which case the addresses represent point
+ to point connections. */
+ char * pcscf; /* the Proxy Call State Control Function address
+ via PCO(Protocol Configuration Option) for IMS client. */
+ int mtu; /* MTU received from network
+ Value <= 0 means network has either not sent a value or
+ sent an invalid value */
+} RIL_Data_Call_Response_v11;
+
+typedef enum {
+ RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
+ RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
+} RIL_RadioTechnologyFamily;
+
+typedef struct {
+ RIL_RadioTechnologyFamily tech;
+ unsigned char retry; /* 0 == not retry, nonzero == retry */
+ int messageRef; /* Valid field if retry is set to nonzero.
+ Contains messageRef from RIL_SMS_Response
+ corresponding to failed MO SMS.
+ */
+
+ union {
+ /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
+ RIL_CDMA_SMS_Message* cdmaMessage;
+
+ /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
+ char** gsmMessage;
+ } message;
+} RIL_IMS_SMS_Message;
typedef struct {
int messageRef; /* TP-Message-Reference for GSM,
int p3;
char *data; /* May be NULL*/
char *pin2; /* May be NULL*/
-} RIL_SIM_IO;
+} RIL_SIM_IO_v5;
+
+typedef struct {
+ int command; /* one of the commands listed for TS 27.007 +CRSM*/
+ int fileid; /* EF id */
+ char *path; /* "pathid" from TS 27.007 +CRSM command.
+ Path is in hex asciii format eg "7f205f70"
+ Path must always be provided.
+ */
+ int p1;
+ int p2;
+ int p3;
+ char *data; /* May be NULL*/
+ char *pin2; /* May be NULL*/
+ char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
+} RIL_SIM_IO_v6;
+
+/* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
+ * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
+typedef struct {
+ int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
+ ignored for +CSIM command. */
+
+ /* Following fields are used to derive the APDU ("command" and "length"
+ values in TS 27.007 +CSIM and +CGLA commands). */
+ int cla;
+ int instruction;
+ int p1;
+ int p2;
+ int p3; /* A negative P3 implies a 4 byte APDU. */
+ char *data; /* May be NULL. In hex string format. */
+} RIL_SIM_APDU;
typedef struct {
int sw1;
int sw2;
- char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
+ char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
+ response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
} RIL_SIM_IO_Response;
/* See also com.android.internal.telephony.gsm.CallForwardInfo */
*/
} RIL_NeighboringCell;
+typedef struct {
+ char lce_status; /* LCE service status:
+ * -1 = not supported;
+ * 0 = stopped;
+ * 1 = active.
+ */
+ unsigned int actual_interval_ms; /* actual LCE reporting interval,
+ * meaningful only if LCEStatus = 1.
+ */
+} RIL_LceStatusInfo;
+
+typedef struct {
+ unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
+ unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
+ unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
+ * moves to inactive state or network type change)
+ * 1 = suspended;
+ * 0 = not suspended.
+ */
+} RIL_LceDataInfo;
+
/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
typedef enum {
CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
+ CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
+ CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
+ CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
CALL_FAIL_NORMAL = 16,
CALL_FAIL_BUSY = 17,
+ CALL_FAIL_NO_USER_RESPONDING = 18,
+ CALL_FAIL_NO_ANSWER_FROM_USER = 19,
+ CALL_FAIL_CALL_REJECTED = 21,
+ CALL_FAIL_NUMBER_CHANGED = 22,
+ CALL_FAIL_PREEMPTION = 25,
+ CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
+ CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
+ CALL_FAIL_FACILITY_REJECTED = 29,
+ CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
+ CALL_FAIL_NORMAL_UNSPECIFIED = 31,
CALL_FAIL_CONGESTION = 34,
+ CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
+ CALL_FAIL_TEMPORARY_FAILURE = 41,
+ CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
+ CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
+ CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
+ CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
+ CALL_FAIL_QOS_UNAVAILABLE = 49,
+ CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
+ CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
+ CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
+ CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
+ CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
+ CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
+ CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
+ CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
+ CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
+ CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
+ CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
+ CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
+ CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
+ CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
+ CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
+ CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
+ CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
+ CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
+ CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
+ CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
+ CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
+ CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
+ CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
CALL_FAIL_CALL_BARRED = 240,
CALL_FAIL_FDN_BLOCKED = 241,
CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
+ 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_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 */
- CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
+ CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
+ vendor code should make sure to map error
+ code to specific error */
} RIL_LastCallFailCause;
+typedef struct {
+ RIL_LastCallFailCause cause_code;
+ char * vendor_cause;
+} RIL_LastCallFailCauseInfo;
+
/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
typedef enum {
+ PDP_FAIL_NONE = 0, /* No error, connection ok */
+
+ /* an integer cause code defined in TS 24.008
+ section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
+ If the implementation does not have access to the exact cause codes,
+ then it should return one of the following values,
+ as the UI layer needs to distinguish these
+ cases for error notification and potential retries. */
PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
+ PDP_FAIL_NAS_SIGNALLING = 0x0E,
+ PDP_FAIL_LLC_SNDCP = 0x19,
PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
- PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
- PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
- PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* This and all other cases: retry silently */
+ PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
+ PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
+ based on framework config */
+ PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
+ PDP_FAIL_NETWORK_FAILURE = 0x26,
+ PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
+ PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
+ PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
+ PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
+ PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
+ PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
+ PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
+ PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
+ PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
+ PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
+ PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
+ PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
+ PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
+ PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
+ PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
+ PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
+ PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
+ PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
+ PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
+ PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
+ PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
+ PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
+ PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
+ PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
+ PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
+ PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
+ PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
+ PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
+ PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
+ PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
+ PDP_FAIL_IFACE_MISMATCH = 0x75,
+ PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
+ PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
+ PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
+ PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
+ PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
+
+ // OEM specific error codes. To be used by OEMs when they don't want to
+ // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
+ PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
+ PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
+ PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
+ PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
+ PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
+ PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
+ PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
+ PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
+ PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
+ PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
+ PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
+ PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
+ PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
+ PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
+ PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
+
/* Not mentioned in the specification */
- PDP_FAIL_REGISTRATION_FAIL = -1,
- PDP_FAIL_GPRS_REGISTRATION_FAIL = -2,
-} RIL_LastDataCallActivateFailCause;
+ PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
+ PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
+
+ /* reasons for data call drop - network/modem disconnect */
+ PDP_FAIL_SIGNAL_LOST = -3,
+ PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
+ with parameters appropriate for new technology */
+ PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
+ powered off - no retry */
+ PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
+ mode was up on same APN/data profile - no retry until
+ tethered call is off */
+
+ PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
+ new error codes are added making this unnecessary */
+} RIL_DataCallFailCause;
/* See RIL_REQUEST_SETUP_DATA_CALL */
typedef enum {
RIL_DATA_PROFILE_DEFAULT = 0,
RIL_DATA_PROFILE_TETHERED = 1,
- RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
+ RIL_DATA_PROFILE_IMS = 2,
+ RIL_DATA_PROFILE_FOTA = 3,
+ RIL_DATA_PROFILE_CBS = 4,
+ RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
+ RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
} RIL_DataProfile;
/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
RIL_APPTYPE_SIM = 1,
RIL_APPTYPE_USIM = 2,
RIL_APPTYPE_RUIM = 3,
- RIL_APPTYPE_CSIM = 4
+ RIL_APPTYPE_CSIM = 4,
+ RIL_APPTYPE_ISIM = 5
} RIL_AppType;
typedef struct
char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
0x30, 0x30, 0x30 */
char *app_label_ptr; /* null terminated string */
- int pin1_replaced; /* applicable to USIM and CSIM */
+ int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
RIL_PinState pin1;
RIL_PinState pin2;
} RIL_AppStatus;
+/* Deprecated, use RIL_CardStatus_v6 */
typedef struct
{
RIL_CardState card_state;
RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
- int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
- int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS */
+ int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
+ int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
int num_applications; /* value <= RIL_CARD_MAX_APPS */
RIL_AppStatus applications[RIL_CARD_MAX_APPS];
-} RIL_CardStatus;
+} RIL_CardStatus_v5;
-/* The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH */
+typedef struct
+{
+ RIL_CardState card_state;
+ RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
+ int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
+ int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
+ int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
+ int num_applications; /* value <= RIL_CARD_MAX_APPS */
+ RIL_AppStatus applications[RIL_CARD_MAX_APPS];
+} RIL_CardStatus_v6;
+
+/** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
+ * or as part of RIL_SimRefreshResponse_v7
+ */
typedef enum {
/* A file on SIM has been updated. data[1] contains the EFID. */
SIM_FILE_UPDATE = 0,
} RIL_SimRefreshResult;
typedef struct {
+ RIL_SimRefreshResult result;
+ int ef_id; /* is the EFID of the updated file if the result is */
+ /* SIM_FILE_UPDATE or 0 for any other result. */
+ char * aid; /* is AID(application ID) of the card application */
+ /* See ETSI 102.221 8.1 and 101.220 4 */
+ /* For SIM_FILE_UPDATE result it can be set to AID of */
+ /* application in which updated EF resides or it can be */
+ /* NULL if EF is outside of an application. */
+ /* For SIM_INIT result this field is set to AID of */
+ /* application that caused REFRESH */
+ /* For SIM_RESET result it is NULL. */
+} RIL_SimRefreshResponse_v7;
+
+/* Deprecated, use RIL_CDMA_CallWaiting_v6 */
+typedef struct {
+ char * number; /* Remote party number */
+ int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
+ char * name; /* Remote party name */
+ RIL_CDMA_SignalInfoRecord signalInfoRecord;
+} RIL_CDMA_CallWaiting_v5;
+
+typedef struct {
char * number; /* Remote party number */
int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
char * name; /* Remote party name */
RIL_CDMA_SignalInfoRecord signalInfoRecord;
-} RIL_CDMA_CallWaiting;
+ /* Number type/Number plan required to support International Call Waiting */
+ int number_type; /* 0=Unknown, 1=International, 2=National,
+ 3=Network specific, 4=subscriber */
+ int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
+} RIL_CDMA_CallWaiting_v6;
/**
* Which types of Cell Broadcast Message (CBM) are to be received by the ME
int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
} RIL_GW_SignalStrength;
+typedef struct {
+ int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
+ int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
+ int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
+ * INT_MAX denotes invalid value */
+} RIL_GSM_SignalStrength_v12;
+
+typedef struct {
+ int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
+ int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
+} RIL_SignalStrengthWcdma;
typedef struct {
int dbm; /* Valid values are positive integers. This value is the actual RSSI value
int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
} RIL_EVDO_SignalStrength;
+typedef struct {
+ int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
+ int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
+ * Range: 44 to 140 dBm
+ * INT_MAX: 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.133 9.1.4 */
+ int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
+ * Range: 20 to 3 dB.
+ * INT_MAX: 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.133 9.1.7 */
+ int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
+ * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
+ * INT_MAX : 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.101 8.1.1 */
+ int cqi; /* The current Channel Quality Indicator.
+ * Range: 0 to 15.
+ * INT_MAX : 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
+} RIL_LTE_SignalStrength;
+
+typedef struct {
+ int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
+ int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
+ * Range: 44 to 140 dBm
+ * INT_MAX: 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.133 9.1.4 */
+ int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
+ * Range: 20 to 3 dB.
+ * INT_MAX: 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.133 9.1.7 */
+ int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
+ * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
+ * INT_MAX : 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.101 8.1.1 */
+ int cqi; /* The current Channel Quality Indicator.
+ * Range: 0 to 15.
+ * INT_MAX : 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
+ int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
+ * Approximate distance can be calculated using 300m/us * timingAdvance.
+ * Range: 0 to 0x7FFFFFFE
+ * INT_MAX : 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP 36.321 section 6.1.3.5
+ * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
+} RIL_LTE_SignalStrength_v8;
+
+typedef struct {
+ int rscp; /* The Received Signal Code Power in dBm multipled by -1.
+ * Range : 25 to 120
+ * INT_MAX: 0x7FFFFFFF denotes invalid value.
+ * Reference: 3GPP TS 25.123, section 9.1.1.1 */
+} RIL_TD_SCDMA_SignalStrength;
+
+/* Deprecated, use RIL_SignalStrength_v6 */
+typedef struct {
+ RIL_GW_SignalStrength GW_SignalStrength;
+ RIL_CDMA_SignalStrength CDMA_SignalStrength;
+ RIL_EVDO_SignalStrength EVDO_SignalStrength;
+} RIL_SignalStrength_v5;
typedef struct {
RIL_GW_SignalStrength GW_SignalStrength;
RIL_CDMA_SignalStrength CDMA_SignalStrength;
RIL_EVDO_SignalStrength EVDO_SignalStrength;
-} RIL_SignalStrength;
+ RIL_LTE_SignalStrength LTE_SignalStrength;
+} RIL_SignalStrength_v6;
+
+typedef struct {
+ RIL_GW_SignalStrength GW_SignalStrength;
+ RIL_CDMA_SignalStrength CDMA_SignalStrength;
+ RIL_EVDO_SignalStrength EVDO_SignalStrength;
+ RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
+} RIL_SignalStrength_v8;
+
+typedef struct {
+ RIL_GW_SignalStrength GW_SignalStrength;
+ RIL_CDMA_SignalStrength CDMA_SignalStrength;
+ RIL_EVDO_SignalStrength EVDO_SignalStrength;
+ RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
+ RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
+} RIL_SignalStrength_v10;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
+ int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
+} RIL_CellIdentityGsm;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
+ int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
+ int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
+ uint8_t bsic;/* 6-bit Base Station Identity Code */
+} RIL_CellIdentityGsm_v12;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
+ int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
+ int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
+} RIL_CellIdentityWcdma;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
+ int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
+ int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
+ int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
+} RIL_CellIdentityWcdma_v12;
+
+typedef struct {
+ int networkId; /* Network Id 0..65535, INT_MAX if unknown */
+ int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
+ int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
+ int longitude; /* 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). INT_MAX if unknown */
+
+ int latitude; /* 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). INT_MAX if unknown */
+} RIL_CellIdentityCdma;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
+ int pci; /* physical cell id 0..503, INT_MAX if unknown */
+ int tac; /* 16-bit tracking area code, INT_MAX if unknown */
+} RIL_CellIdentityLte;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
+ int pci; /* physical cell id 0..503, INT_MAX if unknown */
+ int tac; /* 16-bit tracking area code, INT_MAX if unknown */
+ int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
+} RIL_CellIdentityLte_v12;
+
+typedef struct {
+ int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
+ int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
+ int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
+ int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
+ int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
+} RIL_CellIdentityTdscdma;
+
+typedef struct {
+ RIL_CellIdentityGsm cellIdentityGsm;
+ RIL_GW_SignalStrength signalStrengthGsm;
+} RIL_CellInfoGsm;
+
+typedef struct {
+ RIL_CellIdentityGsm_v12 cellIdentityGsm;
+ RIL_GSM_SignalStrength_v12 signalStrengthGsm;
+} RIL_CellInfoGsm_v12;
+
+typedef struct {
+ RIL_CellIdentityWcdma cellIdentityWcdma;
+ RIL_SignalStrengthWcdma signalStrengthWcdma;
+} RIL_CellInfoWcdma;
+
+typedef struct {
+ RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
+ RIL_SignalStrengthWcdma signalStrengthWcdma;
+} RIL_CellInfoWcdma_v12;
+
+typedef struct {
+ RIL_CellIdentityCdma cellIdentityCdma;
+ RIL_CDMA_SignalStrength signalStrengthCdma;
+ RIL_EVDO_SignalStrength signalStrengthEvdo;
+} RIL_CellInfoCdma;
+
+typedef struct {
+ RIL_CellIdentityLte cellIdentityLte;
+ RIL_LTE_SignalStrength_v8 signalStrengthLte;
+} RIL_CellInfoLte;
+
+typedef struct {
+ RIL_CellIdentityLte_v12 cellIdentityLte;
+ RIL_LTE_SignalStrength_v8 signalStrengthLte;
+} RIL_CellInfoLte_v12;
+
+typedef struct {
+ RIL_CellIdentityTdscdma cellIdentityTdscdma;
+ RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
+} RIL_CellInfoTdscdma;
+
+// Must be the same as CellInfo.TYPE_XXX
+typedef enum {
+ RIL_CELL_INFO_TYPE_GSM = 1,
+ RIL_CELL_INFO_TYPE_CDMA = 2,
+ RIL_CELL_INFO_TYPE_LTE = 3,
+ RIL_CELL_INFO_TYPE_WCDMA = 4,
+ RIL_CELL_INFO_TYPE_TD_SCDMA = 5
+} RIL_CellInfoType;
+
+// Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
+typedef enum {
+ RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
+ RIL_TIMESTAMP_TYPE_ANTENNA = 1,
+ RIL_TIMESTAMP_TYPE_MODEM = 2,
+ RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
+ RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
+} RIL_TimeStampType;
+
+typedef struct {
+ RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
+ int registered; /* !0 if this cell is registered 0 if not registered */
+ RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
+ uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
+ union {
+ RIL_CellInfoGsm gsm;
+ RIL_CellInfoCdma cdma;
+ RIL_CellInfoLte lte;
+ RIL_CellInfoWcdma wcdma;
+ RIL_CellInfoTdscdma tdscdma;
+ } CellInfo;
+} RIL_CellInfo;
+
+typedef struct {
+ RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
+ int registered; /* !0 if this cell is registered 0 if not registered */
+ RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
+ uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
+ union {
+ RIL_CellInfoGsm_v12 gsm;
+ RIL_CellInfoCdma cdma;
+ RIL_CellInfoLte_v12 lte;
+ RIL_CellInfoWcdma_v12 wcdma;
+ RIL_CellInfoTdscdma tdscdma;
+ } CellInfo;
+} RIL_CellInfo_v12;
/* Names of the CDMA info records (C.S0005 section 3.7.5) */
typedef enum {
RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
} RIL_CDMA_InformationRecords;
+/* See RIL_REQUEST_NV_READ_ITEM */
+typedef struct {
+ RIL_NV_Item itemID;
+} RIL_NV_ReadItem;
+
+/* See RIL_REQUEST_NV_WRITE_ITEM */
+typedef struct {
+ RIL_NV_Item itemID;
+ char * value;
+} RIL_NV_WriteItem;
+
+typedef enum {
+ HANDOVER_STARTED = 0,
+ HANDOVER_COMPLETED = 1,
+ HANDOVER_FAILED = 2,
+ HANDOVER_CANCELED = 3
+} RIL_SrvccState;
+
+/* hardware configuration reported to RILJ. */
+typedef enum {
+ RIL_HARDWARE_CONFIG_MODEM = 0,
+ RIL_HARDWARE_CONFIG_SIM = 1,
+} RIL_HardwareConfig_Type;
+
+typedef enum {
+ RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
+ RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
+ RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
+} RIL_HardwareConfig_State;
+
+typedef struct {
+ int rilModel;
+ uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
+ int maxVoice;
+ int maxData;
+ int maxStandby;
+} RIL_HardwareConfig_Modem;
+
+typedef struct {
+ char modemUuid[MAX_UUID_LENGTH];
+} RIL_HardwareConfig_Sim;
+
+typedef struct {
+ RIL_HardwareConfig_Type type;
+ char uuid[MAX_UUID_LENGTH];
+ RIL_HardwareConfig_State state;
+ union {
+ RIL_HardwareConfig_Modem modem;
+ RIL_HardwareConfig_Sim sim;
+ } cfg;
+} RIL_HardwareConfig;
+
+typedef enum {
+ SS_CFU,
+ SS_CF_BUSY,
+ SS_CF_NO_REPLY,
+ SS_CF_NOT_REACHABLE,
+ SS_CF_ALL,
+ SS_CF_ALL_CONDITIONAL,
+ SS_CLIP,
+ SS_CLIR,
+ SS_COLP,
+ SS_COLR,
+ SS_WAIT,
+ SS_BAOC,
+ SS_BAOIC,
+ SS_BAOIC_EXC_HOME,
+ SS_BAIC,
+ SS_BAIC_ROAMING,
+ SS_ALL_BARRING,
+ SS_OUTGOING_BARRING,
+ SS_INCOMING_BARRING
+} RIL_SsServiceType;
+
+typedef enum {
+ SS_ACTIVATION,
+ SS_DEACTIVATION,
+ SS_INTERROGATION,
+ SS_REGISTRATION,
+ SS_ERASURE
+} RIL_SsRequestType;
+
+typedef enum {
+ SS_ALL_TELE_AND_BEARER_SERVICES,
+ SS_ALL_TELESEVICES,
+ SS_TELEPHONY,
+ SS_ALL_DATA_TELESERVICES,
+ SS_SMS_SERVICES,
+ SS_ALL_TELESERVICES_EXCEPT_SMS
+} RIL_SsTeleserviceType;
+
+#define SS_INFO_MAX 4
+#define NUM_SERVICE_CLASSES 7
+
+typedef struct {
+ int numValidIndexes; /* This gives the number of valid values in cfInfo.
+ For example if voice is forwarded to one number and data
+ is forwarded to a different one then numValidIndexes will be
+ 2 indicating total number of valid values in cfInfo.
+ Similarly if all the services are forwarded to the same
+ number then the value of numValidIndexes will be 1. */
+
+ RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
+ for SS request to query call
+ forward status. see
+ RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
+} RIL_CfData;
+
+typedef struct {
+ RIL_SsServiceType serviceType;
+ RIL_SsRequestType requestType;
+ RIL_SsTeleserviceType teleserviceType;
+ int serviceClass;
+ RIL_Errno result;
+
+ union {
+ int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
+ RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
+ two ints, so first two values of ssInfo[] will be
+ used for response if serviceType is SS_CLIR and
+ requestType is SS_INTERROGATION */
+
+ RIL_CfData cfData;
+ };
+} RIL_StkCcUnsolSsResponse;
+
+/**
+ * Data connection power state
+ */
+typedef enum {
+ RIL_DC_POWER_STATE_LOW = 1, // Low power state
+ RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
+ RIL_DC_POWER_STATE_HIGH = 3, // High power state
+ RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
+} RIL_DcPowerStates;
+
+/**
+ * Data connection real time info
+ */
+typedef struct {
+ uint64_t time; // Time in nanos as returned by ril_nano_time
+ RIL_DcPowerStates powerState; // Current power state
+} RIL_DcRtInfo;
+
+/**
+ * Data profile to modem
+ */
+typedef struct {
+ /* id of the data profile */
+ int profileId;
+ /* the APN to connect to */
+ char* apn;
+ /** one of the PDP_type values in TS 27.007 section 10.1.1.
+ * For example, "IP", "IPV6", "IPV4V6", or "PPP".
+ */
+ char* protocol;
+ /** authentication protocol used for this PDP context
+ * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
+ */
+ int authType;
+ /* the username for APN, or NULL */
+ char* user;
+ /* the password for APN, or NULL */
+ char* password;
+ /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
+ int type;
+ /* the period in seconds to limit the maximum connections */
+ int maxConnsTime;
+ /* the maximum connections during maxConnsTime */
+ int maxConns;
+ /** the required wait time in seconds after a successful UE initiated
+ * disconnect of a given PDN connection before the device can send
+ * a new PDN connection request for that given PDN
+ */
+ int waitTime;
+ /* true to enable the profile, 0 to disable, 1 to enable */
+ int enabled;
+} RIL_DataProfileInfo;
+
+/* Tx Power Levels */
+#define RIL_NUM_TX_POWER_LEVELS 5
+
+typedef struct {
+
+ /* period (in ms) when modem is power collapsed */
+ uint32_t sleep_mode_time_ms;
+
+ /* period (in ms) when modem is awake and in idle mode*/
+ uint32_t idle_mode_time_ms;
+
+ /* period (in ms) for which Tx is active */
+ uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
+
+ /* period (in ms) for which Rx is active */
+ uint32_t rx_mode_time_ms;
+} RIL_ActivityStatsInfo;
+
/**
* RIL_REQUEST_GET_SIM_STATUS
*
*
* "data" is NULL
*
- * "response" is const RIL_CardStatus *
+ * "response" is const RIL_CardStatus_v6 *
*
* Valid errors:
* Must never fail
*
* "data" is const char **
* ((const char **)data)[0] is PIN value
+ * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
#define RIL_REQUEST_ENTER_SIM_PIN 2
-
/**
* RIL_REQUEST_ENTER_SIM_PUK
*
* "data" is const char **
* ((const char **)data)[0] is PUK value
* ((const char **)data)[1] is new PIN value
+ * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* "data" is const char **
* ((const char **)data)[0] is PIN2 value
+ * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
* "data" is const char **
* ((const char **)data)[0] is PUK2 value
* ((const char **)data)[1] is new PIN2 value
+ * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
* "data" is const char **
* ((const char **)data)[0] is old PIN value
* ((const char **)data)[1] is new PIN value
+ * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
* "data" is const char **
* ((const char **)data)[0] is old PIN2 value
* ((const char **)data)[1] is new PIN2 value
+ * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
+ * DIAL_MODIFIED_TO_USSD
+ * DIAL_MODIFIED_TO_SS
+ * DIAL_MODIFIED_TO_DIAL
* GENERIC_FAILURE
*/
#define RIL_REQUEST_DIAL 10
*
* Get the SIM IMSI
*
- * Only valid when radio state is "RADIO_STATE_SIM_READY"
+ * Only valid when radio state is "RADIO_STATE_ON"
*
- * "data" is NULL
+ * "data" is const char **
+ * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
* "response" is a const char * containing the IMSI
*
* Valid errors:
#define RIL_REQUEST_SIGNAL_STRENGTH 19
/**
- * RIL_REQUEST_REGISTRATION_STATE
+ * RIL_REQUEST_VOICE_REGISTRATION_STATE
*
* Request current registration state
*
* in 16 bits
* In UMTS, CID is UMTS Cell Identity
* (see TS 25.331) in 28 bits
- * ((const char **)response)[3] indicates the available radio technology 0-7,
- * 0 - Unknown, 1 - GPRS, 2 - EDGE, 3 - UMTS,
- * 4 - IS95A, 5 - IS95B, 6 - 1xRTT,
- * 7 - EvDo Rev. 0, 8 - EvDo Rev. A,
- * 9 - HSDPA, 10 - HSUPA, 11 - HSPA,
- * 12 - EVDO Rev B
+ * ((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
* 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°).
+ * 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°).
+ * 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,
* 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 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
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*/
-#define RIL_REQUEST_REGISTRATION_STATE 20
+#define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
/**
- * RIL_REQUEST_GPRS_REGISTRATION_STATE
+ * RIL_REQUEST_DATA_REGISTRATION_STATE
*
- * Request current GPRS registration state
+ * 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 radio technology, where:
- * 0 == unknown
- * 1 == GPRS only
- * 2 == EDGE
- * 3 == UMTS
- * 9 == HSDPA
- * 10 == HSUPA
- * 11 == HSPA
+ * ((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
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*/
-#define RIL_REQUEST_GPRS_REGISTRATION_STATE 21
+#define RIL_REQUEST_DATA_REGISTRATION_STATE 21
/**
* RIL_REQUEST_OPERATOR
* RIL_REQUEST_RADIO_POWER
*
* Toggle radio on and off (for "airplane" mode)
+ * If the radio is is turned off/on the radio modem subsystem
+ * is expected return to an initialized state. For instance,
+ * any voice and data calls will be terminated and all associated
+ * lists emptied.
+ *
* "data" is int *
* ((int *)data)[0] is > 0 for "Radio On"
* ((int *)data)[0] is == 0 for "Radio Off"
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*/
#define RIL_REQUEST_RADIO_POWER 23
* RADIO_NOT_AVAILABLE
* SMS_SEND_FAIL_RETRY
* FDN_CHECK_FAILURE
+ * NETWORK_REJECT
* GENERIC_FAILURE
*
* FIXME how do we specify TP-Message-Reference if we need to resend?
* SUCCESS
* RADIO_NOT_AVAILABLE
* SMS_SEND_FAIL_RETRY
+ * NETWORK_REJECT
* GENERIC_FAILURE
*
*/
/**
* RIL_REQUEST_SETUP_DATA_CALL
*
- * Setup a packet data connection
+ * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
+ * return success it is added to the list of data calls and a
+ * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
+ * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
+ * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
+ * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
+ *
+ * The RIL is expected to:
+ * - Create one data call context.
+ * - Create and configure a dedicated interface for the context
+ * - The interface must be point to point.
+ * - The interface is configured with one or more addresses and
+ * is capable of sending and receiving packets. The prefix length
+ * of the addresses must be /32 for IPv4 and /128 for IPv6.
+ * - Must NOT change the linux routing table.
+ * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
+ * number of simultaneous data call contexts.
*
* "data" is a const char **
- * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
- * or GSM/UMTS, 0-1. 0 - CDMA, 1-GSM/UMTS
- *
+ * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
+ * for values above 2 this is RIL_RadioTechnology + 2.
* ((const char **)data)[1] is a RIL_DataProfile (support is optional)
* ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
* override the one in the profile. NULL indicates no APN overrride.
* 1 => PAP may be performed; CHAP is never performed.
* 2 => CHAP may be performed; PAP is never performed.
* 3 => PAP / CHAP may be performed - baseband dependent.
- * ((const char **)data)[6] is the PDP type to request if the radio technology is GSM/UMTS.
- * Must be one of the PDP_type values in TS 27.007 section 10.1.1.
+ * ((const char **)data)[6] is the connection type to request must be one of the
+ * PDP_type values in TS 27.007 section 10.1.1.
* For example, "IP", "IPV6", "IPV4V6", or "PPP".
+ * ((const char **)data)[7] Optional connection property parameters, format to be defined.
*
- * "response" is a char **
- * ((char **)response)[0] the Connection ID, CID, which is generated by RIL.
- * ((char **)response)[1] the network interface name.
- * ((char **)response)[2] a numeric IPv4 or IPv6 address that has been assigned to the interface.
- * ((char **)response)[3] a space-separated list of numeric IPv4 or IPv6 DNS addresses.
- * Ignored on Android platforms before 3.0 and instead two DNS IP addresses
- * are retrieved from system properties "net.$IN.dns1" and "net.$IN.dns2".
- * ((char **)response)[4] the numeric IPv4 or IPv6 address of the default gateway.
- * Ignored on Android platforms before 3.0 and instead an IP address
- * is retrieved from system property "net.$IN.gw".
+ * "response" is a RIL_Data_Call_Response_v11
*
- * Notes:
- * 1) Numeric addresses must be in the Java InetAddress parsable representation.
- * 2) $IN in the above comments is the interface name from response[1].
+ * FIXME may need way to configure QoS settings
*
* Valid errors:
- * SUCCESS
- * RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
+ * SUCCESS should be returned on both success and failure of setup with
+ * the RIL_Data_Call_Response_v6.status containing the actual status.
+ * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
+ *
+ * Other errors could include:
+ * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
+ * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
*
* See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
*/
#define RIL_REQUEST_SETUP_DATA_CALL 27
-
/**
* RIL_REQUEST_SIM_IO
*
* where it assumes all of the EF selection will be done by the
* callee.
*
- * "data" is a const RIL_SIM_IO *
+ * "data" is a const RIL_SIM_IO_v6 *
* Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
* or may specify a PIN2 for operations that require a PIN2 (eg
* updating FDN records)
* SUCCESS
* RADIO_NOT_AVAILABLE
* FDN_CHECK_FAILURE
+ * USSD_MODIFIED_TO_DIAL
+ * USSD_MODIFIED_TO_SS
+ * USSD_MODIFIED_TO_USSD
+ * SIM_BUSY
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*
* See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SIM_BUSY
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_GET_CLIR 31
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CLIR 32
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CALL_FORWARD 34
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CALL_WAITING 35
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_SET_CALL_WAITING 36
/**
* RIL_REQUEST_DEACTIVATE_DATA_CALL
*
- * Deactivate packet data connection
- * replaces RIL_REQUEST_DEACTIVATE_DEFAULT_PDP
+ * Deactivate packet data connection and remove from the
+ * data call list if SUCCESS is returned. Any other return
+ * values should also try to remove the call from the list,
+ * but that may not be possible. In any event a
+ * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
+ * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
+ * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
*
* "data" is const char **
* ((char**)data)[0] indicating CID
* ((const char **)data)[1] is the password, or "" if not required
* ((const char **)data)[2] is the TS 27.007 service class bit vector of
* services to query
+ * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
+ * This is only applicable in the case of Fixed Dialing Numbers
+ * (FDN) requests.
*
* "response" is an int *
* ((const int *)response) 0 is the TS 27.007 service class bit vector of
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*
*/
* ((const char **)data)[3] = string representation of decimal TS 27.007
* service class bit vector. Eg, the string
* "1" means "set this facility for voice services"
+ * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
+ * This is only applicable in the case of Fixed Dialing Numbers
+ * (FDN) requests.
*
* "response" is int *
* ((int *)response)[0] is the number of retries remaining, or -1 if unknown
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*
*/
* SUCCESS
* RADIO_NOT_AVAILABLE
* ILLEGAL_SIM_OR_ME
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*
* Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
* SUCCESS
* RADIO_NOT_AVAILABLE
* ILLEGAL_SIM_OR_ME
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*
* Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*
* See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * EMPTY_RECORD
* GENERIC_FAILURE
*
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
+ * SS_MODIFIED_TO_DIAL
+ * SS_MODIFIED_TO_USSD
+ * SS_MODIFIED_TO_SS
* GENERIC_FAILURE
*/
#define RIL_REQUEST_QUERY_CLIP 55
/**
- * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
+ * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
+ * field in RIL_Data_Call_Response_v6.
*
* Requests the failure cause code for the most recently failed PDP
* context or CDMA data connection active
*
* If the implementation does not have access to the exact cause codes,
* then it should return one of the values listed in
- * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
+ * RIL_DataCallFailCause, as the UI layer needs to distinguish these
* cases for error notification
* and potential retries.
*
*
* See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
*
+ * Deprecated use the status field in RIL_Data_Call_Response_v6.
*/
#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
/**
* RIL_REQUEST_DATA_CALL_LIST
*
- * Queries the status of PDP contexts, returning for each
- * its CID, whether or not it is active, and its PDP type,
- * APN, and PDP adddress.
- * replaces RIL_REQUEST_PDP_CONTEXT_LIST
+ * Returns the data call list. An entry is added when a
+ * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
+ * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
+ * when RIL_REQUEST_RADIO_POWER off/on is issued.
*
* "data" is NULL
- * "response" is an array of RIL_Data_Call_Response
+ * "response" is an array of RIL_Data_Call_Response_v6
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
+ *
+ * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
*/
#define RIL_REQUEST_DATA_CALL_LIST 57
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SIM_BUSY
* GENERIC_FAILURE
*
* See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
*
* Valid errors:
* SUCCESS
+ * SIM_FULL
* GENERIC_FAILURE
*
*/
*
* Valid errors:
* SUCCESS
+ * SIM_FULL
* GENERIC_FAILURE
*
*/
* Assign a specified band for RF configuration.
*
* "data" is int *
- * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
- * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
- * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
- * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
- * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
- * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
- * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
- * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
- * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
- * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
- * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
- * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
- * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
- * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
- * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
- * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
- * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
- * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
- * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
+ * ((int *)data)[0] is a RIL_RadioBandMode
*
* "response" is NULL
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
+ *
+ * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
*/
#define RIL_REQUEST_SET_BAND_MODE 65
* "data" is NULL
*
* "response" is int *
- * "response" points to an array of int's, the int[0] is the size of array, reset is one for
- * each available band mode.
- *
- * 0 for "unspecified" (selected by baseband automatically)
- * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
- * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
- * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
- * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
- * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
- * 6 for "Cellular (800-MHz Band)"
- * 7 for "PCS (1900-MHz Band)"
- * 8 for "Band Class 3 (JTACS Band)"
- * 9 for "Band Class 4 (Korean PCS Band)"
- * 10 for "Band Class 5 (450-MHz Band)"
- * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
- * 12 for "Band Class 7 (Upper 700-MHz Band)"
- * 13 for "Band Class 8 (1800-MHz Band)"
- * 14 for "Band Class 9 (900-MHz Band)"
- * 15 for "Band Class 10 (Secondary 800-MHz Band)"
- * 16 for "Band Class 11 (400-MHz European PAMR Band)"
- * 17 for "Band Class 15 (AWS Band)"
- * 18 for "Band Class 16 (US 2.5-GHz Band)"
+ * "response" points to an array of int's, the int[0] is the size of array;
+ * subsequent values are a list of RIL_RadioBandMode listing supported modes.
*
* Valid errors:
* SUCCESS
* Valid errors:
* RIL_E_SUCCESS
* RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
+ * SIM_BUSY
+ * OPERATION_NOT_ALLOWED
* RIL_E_GENERIC_FAILURE
*/
#define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
* Valid errors:
* RIL_E_SUCCESS
* RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
+ * RIL_E_OPERATION_NOT_ALLOWED
* RIL_E_GENERIC_FAILURE
*/
#define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
* Valid errors:
* RIL_E_SUCCESS
* RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
+ * RIL_E_OPERATION_NOT_ALLOWED
* RIL_E_GENERIC_FAILURE
*/
#define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
* Requests to set the preferred network type for searching and registering
* (CS/PS domain, RAT, and operation mode)
*
- * "data" is int *
- *
- * ((int *)data)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
- * ((int *)data)[0] is == 1 for GSM only
- * ((int *)data)[0] is == 2 for WCDMA only
- * ((int *)data)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
- * ((int *)data)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
- * ((int *)data)[0] is == 5 for CDMA only
- * ((int *)data)[0] is == 6 for EvDo only
- * ((int *)data)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
+ * "data" is int * which is RIL_PreferredNetworkType
*
* "response" is NULL
*
* SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
+ * OPERATION_NOT_ALLOWED
* MODE_NOT_SUPPORTED
*/
#define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
* "data" is NULL
*
* "response" is int *
- * ((int *)response)[0] is == 0 for GSM/WCDMA (WCDMA preferred)
- * ((int *)response)[0] is == 1 for GSM only
- * ((int *)response)[0] is == 2 for WCDMA only
- * ((int *)response)[0] is == 3 for GSM/WCDMA (auto mode, according to PRL)
- * ((int *)response)[0] is == 4 for CDMA and EvDo (auto mode, according to PRL)
- * ((int *)response)[0] is == 5 for CDMA only
- * ((int *)response)[0] is == 6 for EvDo only
- * ((int *)response)[0] is == 7 for GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL)
+ * ((int *)reponse)[0] is == RIL_PreferredNetworkType
*
* Valid errors:
* SUCCESS
#define RIL_REQUEST_SET_LOCATION_UPDATES 76
/**
- * RIL_REQUEST_CDMA_SET_SUBSCRIPTION
+ * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
*
* Request to set the location where the CDMA subscription shall
* be retrieved
*
* "data" is int *
- * ((int *)data)[0] is == 0 from RUIM/SIM (default)
- * ((int *)data)[0] is == 1 from NV
+ * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
*
* "response" is NULL
*
* GENERIC_FAILURE
* SIM_ABSENT
* SUBSCRIPTION_NOT_AVAILABLE
+ *
+ * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
*/
-#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION 77
+#define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
/**
* RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
* SUCCESS
* RADIO_NOT_AVAILABLE
* SMS_SEND_FAIL_RETRY
+ * NETWORK_REJECT
* GENERIC_FAILURE
*
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * SIM_FULL
* GENERIC_FAILURE
*
*/
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
* GENERIC_FAILURE
*
*/
*/
#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
-/***********************************************************************/
-
-
-#define RIL_UNSOL_RESPONSE_BASE 1000
-
/**
- * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
+ * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
*
- * Indicate when value of RIL_RadioState has changed.
- *
- * Callee will invoke RIL_RadioStateRequest method on main thread
+ * Request to query the location where the CDMA subscription shall
+ * be retrieved
*
* "data" is NULL
+ *
+ * "response" is int *
+ * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ * SUBSCRIPTION_NOT_AVAILABLE
+ *
+ * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
*/
-
-#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
-
+#define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
/**
- * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
+ * RIL_REQUEST_ISIM_AUTHENTICATION
*
- * Indicate when call state has changed
+ * Request the ISIM application on the UICC to perform AKA
+ * challenge/response algorithm for IMS authentication
*
- * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
+ * "data" is a const char * containing the challenge string in Base64 format
+ * "response" is a const char * containing the response in Base64 format
*
- * "data" is NULL
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_ISIM_AUTHENTICATION 105
+
+/**
+ * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
+ *
+ * Acknowledge successful or failed receipt of SMS previously indicated
+ * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
+ * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
+ *
+ * "data" is const char **
+ * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
+ * is "0" on failed receipt (send RP-ERROR)
+ * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
+
+/**
+ * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
+ *
+ * Requests to send a SAT/USAT envelope command to SIM.
+ * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
+ *
+ * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
+ * the SW1 and SW2 status bytes from the UICC response are returned along with
+ * the response data, using the same structure as RIL_REQUEST_SIM_IO.
+ *
+ * The RIL implementation shall perform the normal processing of a '91XX'
+ * response in SW1/SW2 to retrieve the pending proactive command and send it
+ * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
+ *
+ * "data" is a const char * containing the SAT/USAT command
+ * in hexadecimal format starting with command tag
+ *
+ * "response" is a const RIL_SIM_IO_Response *
+ *
+ * Valid errors:
+ * RIL_E_SUCCESS
+ * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
+ * SIM_BUSY
+ * OPERATION_NOT_ALLOWED
+ * RIL_E_GENERIC_FAILURE
+ */
+#define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
+
+/**
+ * RIL_REQUEST_VOICE_RADIO_TECH
+ *
+ * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
+ * when radio state is RADIO_STATE_ON
+ *
+ * "data" is NULL
+ * "response" is int *
+ * ((int *) response)[0] is of type const RIL_RadioTechnology
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_VOICE_RADIO_TECH 108
+
+/**
+ * RIL_REQUEST_GET_CELL_INFO_LIST
+ *
+ * Request all of the current cell information known to the radio. The radio
+ * must a list of all current cells, including the neighboring cells. If for a particular
+ * cell information isn't known then the appropriate unknown value will be returned.
+ * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
+ *
+ * "data" is NULL
+ *
+ * "response" is an array of RIL_CellInfo_v12.
+ */
+#define RIL_REQUEST_GET_CELL_INFO_LIST 109
+
+/**
+ * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
+ *
+ * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
+ * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
+ * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
+ * a RIL_UNSOL_CELL_INFO_LIST.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is minimum time in milliseconds
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
+
+/**
+ * RIL_REQUEST_SET_INITIAL_ATTACH_APN
+ *
+ * Set an apn to initial attach network
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE (radio resetting)
+ * GENERIC_FAILURE
+ * SUBSCRIPTION_NOT_AVAILABLE
+ */
+#define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
+
+/**
+ * RIL_REQUEST_IMS_REGISTRATION_STATE
+ *
+ * Request current IMS registration state
+ *
+ * "data" is NULL
+ *
+ * "response" is int *
+ * ((int *)response)[0] is registration state:
+ * 0 - Not registered
+ * 1 - Registered
+ *
+ * If ((int*)response)[0] is = 1, then ((int *) response)[1]
+ * must follow with IMS SMS format:
+ *
+ * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_IMS_REGISTRATION_STATE 112
+
+/**
+ * RIL_REQUEST_IMS_SEND_SMS
+ *
+ * Send a SMS message over IMS
+ *
+ * "data" is const RIL_IMS_SMS_Message *
+ *
+ * "response" is a const RIL_SMS_Response *
+ *
+ * Based on the return error, caller decides to resend if sending sms
+ * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
+ * In case of retry, data is encoded based on Voice Technology available.
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * SMS_SEND_FAIL_RETRY
+ * FDN_CHECK_FAILURE
+ * NETWORK_REJECT
+ * GENERIC_FAILURE
+ *
+ */
+#define RIL_REQUEST_IMS_SEND_SMS 113
+
+/**
+ * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
+ *
+ * Request APDU exchange on the basic channel. This command reflects TS 27.007
+ * "generic SIM access" operation (+CSIM). The modem must ensure proper function
+ * of GSM/CDMA, and filter commands appropriately. It should filter
+ * channel management and SELECT by DF name commands.
+ *
+ * "data" is a const RIL_SIM_APDU *
+ * "sessionid" field should be ignored.
+ *
+ * "response" is a const RIL_SIM_IO_Response *
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
+
+/**
+ * RIL_REQUEST_SIM_OPEN_CHANNEL
+ *
+ * Open a new logical channel and select the given application. This command
+ * reflects TS 27.007 "open logical channel" operation (+CCHO).
+ *
+ * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
+ *
+ * "response" is int *
+ * ((int *)data)[0] contains the session id of the logical channel.
+ * ((int *)data)[1] onwards may optionally contain the select response for the
+ * open channel command with one byte per integer.
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ * MISSING_RESOURCE
+ * NO_SUCH_ELEMENT
+ */
+#define RIL_REQUEST_SIM_OPEN_CHANNEL 115
+
+/**
+ * RIL_REQUEST_SIM_CLOSE_CHANNEL
+ *
+ * Close a previously opened logical channel. This command reflects TS 27.007
+ * "close logical channel" operation (+CCHC).
+ *
+ * "data" is int *
+ * ((int *)data)[0] is the session id of logical the channel to close.
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
+
+/**
+ * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
+ *
+ * Exchange APDUs with a UICC over a previously opened logical channel. This
+ * command reflects TS 27.007 "generic logical channel access" operation
+ * (+CGLA). The modem should filter channel management and SELECT by DF name
+ * commands.
+ *
+ * "data" is a const RIL_SIM_APDU*
+ *
+ * "response" is a const RIL_SIM_IO_Response *
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
+
+/**
+ * RIL_REQUEST_NV_READ_ITEM
+ *
+ * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is a const RIL_NV_ReadItem *
+ *
+ * "response" is const char * containing the contents of the NV item
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_READ_ITEM 118
+
+/**
+ * RIL_REQUEST_NV_WRITE_ITEM
+ *
+ * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is a const RIL_NV_WriteItem *
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_WRITE_ITEM 119
+
+/**
+ * RIL_REQUEST_NV_WRITE_CDMA_PRL
+ *
+ * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is a const char * containing the PRL as a byte array
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
+
+/**
+ * RIL_REQUEST_NV_RESET_CONFIG
+ *
+ * Reset the radio NV configuration to the factory state.
+ * This is used for device configuration by some CDMA operators.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is 1 to reload all NV items
+ * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
+ * ((int *)data)[0] is 3 for factory reset (RTN)
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_NV_RESET_CONFIG 121
+
+ /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
+ * FIXME This API needs to have more documentation.
+ *
+ * Selection/de-selection of a subscription from a SIM card
+ * "data" is const RIL_SelectUiccSub*
+
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE (radio resetting)
+ * GENERIC_FAILURE
+ * SUBSCRIPTION_NOT_SUPPORTED
+ *
+ */
+#define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
+
+/**
+ * RIL_REQUEST_ALLOW_DATA
+ *
+ * Tells the modem whether data calls are allowed or not
+ *
+ * "data" is int *
+ * FIXME slotId and aid will be added.
+ * ((int *)data)[0] is == 0 to allow data calls
+ * ((int *)data)[0] is == 1 to disallow data calls
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ *
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE (radio resetting)
+ * GENERIC_FAILURE
+ *
+ */
+#define RIL_REQUEST_ALLOW_DATA 123
+
+/**
+ * RIL_REQUEST_GET_HARDWARE_CONFIG
+ *
+ * Request all of the current hardware (modem and sim) associated
+ * with the RIL.
+ *
+ * "data" is NULL
+ *
+ * "response" is an array of RIL_HardwareConfig.
+ */
+#define RIL_REQUEST_GET_HARDWARE_CONFIG 124
+
+/**
+ * RIL_REQUEST_SIM_AUTHENTICATION
+ *
+ * Returns the response of SIM Authentication through RIL to a
+ * challenge request.
+ *
+ * "data" Base64 encoded string containing challenge:
+ * int authContext; P2 value of authentication command, see P2 parameter in
+ * 3GPP TS 31.102 7.1.2
+ * char *authData; the challenge string in Base64 format, see 3GPP
+ * TS 31.102 7.1.2
+ * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
+ * NULL if no value
+ *
+ * "response" Base64 encoded strings containing response:
+ * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
+ * int sw2;
+ * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
+ */
+#define RIL_REQUEST_SIM_AUTHENTICATION 125
+
+/**
+ * RIL_REQUEST_GET_DC_RT_INFO
+ *
+ * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
+ * Requests the Data Connection Real Time Info
+ *
+ * "data" is NULL
+ *
+ * "response" is the most recent RIL_DcRtInfo
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ *
+ * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
+ */
+#define RIL_REQUEST_GET_DC_RT_INFO 126
+
+/**
+ * RIL_REQUEST_SET_DC_RT_INFO_RATE
+ *
+ * The request is DEPRECATED
+ * This is the minimum number of milliseconds between successive
+ * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
+ * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
+ * 0 means send as fast as possible.
+ *
+ * "data" The number of milliseconds as an int
+ *
+ * "response" is null
+ *
+ * Valid errors:
+ * SUCCESS must not fail
+ */
+#define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
+
+/**
+ * RIL_REQUEST_SET_DATA_PROFILE
+ *
+ * Set data profile in modem
+ * Modem should erase existed profiles from framework, and apply new profiles
+ * "data" is an const RIL_DataProfileInfo **
+ * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE (radio resetting)
+ * GENERIC_FAILURE
+ * SUBSCRIPTION_NOT_AVAILABLE
+ */
+#define RIL_REQUEST_SET_DATA_PROFILE 128
+
+/**
+ * RIL_REQUEST_SHUTDOWN
+ *
+ * Device is shutting down. All further commands are ignored
+ * and RADIO_NOT_AVAILABLE must be returned.
+ *
+ * "data" is null
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_SHUTDOWN 129
+
+/**
+ * RIL_REQUEST_GET_RADIO_CAPABILITY
+ *
+ * Used to get phone radio capablility.
+ *
+ * "data" is the RIL_RadioCapability structure
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * OPERATION_NOT_ALLOWED
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_GET_RADIO_CAPABILITY 130
+
+/**
+ * RIL_REQUEST_SET_RADIO_CAPABILITY
+ *
+ * Used to set the phones radio capability. Be VERY careful
+ * using this request as it may cause some vendor modems to reset. Because
+ * of the possible modem reset any RIL commands after this one may not be
+ * processed.
+ *
+ * "data" is the RIL_RadioCapability structure
+ *
+ * "response" is the RIL_RadioCapability structure, used to feedback return status
+ *
+ * Valid errors:
+ * 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
+
+/**
+ * RIL_REQUEST_START_LCE
+ *
+ * Start Link Capacity Estimate (LCE) service if supported by the radio.
+ *
+ * "data" is const int *
+ * ((const int*)data)[0] specifies the desired reporting interval (ms).
+ * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
+ *
+ * "response" is the RIL_LceStatusInfo.
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * LCE_NOT_SUPPORTED
+ */
+#define RIL_REQUEST_START_LCE 132
+
+/**
+ * RIL_REQUEST_STOP_LCE
+ *
+ * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
+ * idempotent for the radio modem.
+ *
+ * "response" is the RIL_LceStatusInfo.
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * LCE_NOT_SUPPORTED
+ */
+#define RIL_REQUEST_STOP_LCE 133
+
+/**
+ * RIL_REQUEST_PULL_LCEDATA
+ *
+ * Pull LCE service for capacity information.
+ *
+ * "response" is the RIL_LceDataInfo.
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * LCE_NOT_SUPPORTED
+ */
+#define RIL_REQUEST_PULL_LCEDATA 134
+
+/**
+ * RIL_REQUEST_GET_ACTIVITY_INFO
+ *
+ * Get modem activity statisitics info.
+ *
+ * There can be multiple RIL_REQUEST_GET_ACTIVITY_INFO calls to modem.
+ * Once the response for the request is sent modem will clear
+ * current statistics information.
+ *
+ * "data" is null
+ * "response" is const RIL_ActivityStatsInfo *
+ *
+ * Valid errors:
+ *
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE (radio resetting)
+ * GENERIC_FAILURE
+ */
+#define RIL_REQUEST_GET_ACTIVITY_INFO 135
+
+/***********************************************************************/
+
+/**
+ * RIL_RESPONSE_ACKNOWLEDGEMENT
+ *
+ * This is used by Asynchronous solicited messages and Unsolicited messages
+ * to acknowledge the receipt of those messages in RIL.java so that the ack
+ * can be used to let ril.cpp to release wakelock.
+ *
+ * Valid errors
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ */
+
+#define RIL_RESPONSE_ACKNOWLEDGEMENT 800
+
+/***********************************************************************/
+
+
+#define RIL_UNSOL_RESPONSE_BASE 1000
+
+/**
+ * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
+ *
+ * Indicate when value of RIL_RadioState has changed.
+ *
+ * Callee will invoke RIL_RadioStateRequest method on main thread
+ *
+ * "data" is NULL
+ */
+
+#define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
+
+
+/**
+ * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
+ *
+ * Indicate when call state has changed
+ *
+ * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
+ *
+ * "data" is NULL
*
* Response should be invoked on, for example,
* "RING", "BUSY", "NO CARRIER", and also call state
/**
- * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
+ * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
*
- * Called when network state, operator name, or GPRS state has changed
- * Basically on, +CREG and +CGREG
+ * Called when the voice network state changed
*
* Callee will invoke the following requests on main thread:
*
- * RIL_REQUEST_REGISTRATION_STATE
- * RIL_REQUEST_GPRS_REGISTRATION_STATE
+ * RIL_REQUEST_VOICE_REGISTRATION_STATE
* RIL_REQUEST_OPERATOR
*
* "data" is NULL
* FIXME should this happen when SIM records are loaded? (eg, for
* EONS)
*/
-#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 1002
+#define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
/**
* RIL_UNSOL_RESPONSE_NEW_SMS
*/
#define RIL_UNSOL_ON_USSD_REQUEST 1007
-
/**
* RIL_UNSOL_NITZ_TIME_RECEIVED
*
/**
* RIL_UNSOL_DATA_CALL_LIST_CHANGED
*
- * Indicate a PDP context state has changed, or a new context
- * has been activated or deactivated
- * replaces RIL_UNSOL_PDP_CONTEXT_LIST_CHANGED
- *
- * "data" is an array of RIL_Data_Call_Response identical to that
- * returned by RIL_REQUEST_DATA_CALL_LIST
+ * "data" is an array of RIL_Data_Call_Response_v6 identical to that
+ * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
+ * of current data contexts including new contexts that have been
+ * activated. A data call is only removed from this list when the
+ * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
+ * is powered off/on.
*
* See also: RIL_REQUEST_DATA_CALL_LIST
*/
* Indicates that file(s) on the SIM have been updated, or the SIM
* has been reinitialized.
*
+ * In the case where RIL is version 6 or older:
* "data" is an int *
* ((int *)data)[0] is a RIL_SimRefreshResult.
* ((int *)data)[1] is the EFID of the updated file if the result is
* SIM_FILE_UPDATE or NULL for any other result.
*
- * Note: If the radio state changes as a result of the SIM refresh (eg,
- * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
+ * In the case where RIL is version 7:
+ * "data" is a RIL_SimRefreshResponse_v7 *
+ *
+ * Note: If the SIM state changes as a result of the SIM refresh (eg,
+ * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
* should be sent.
*/
#define RIL_UNSOL_SIM_REFRESH 1017
*
* Called when new Broadcast SMS is received
*
- * "data" is const char * of 88 bytes which indicates each page
- * of a CBS Message sent to the MS by the BTS as coded in 3GPP
- * 23.041 Section 9.4.1.1
+ * "data" can be one of the following:
+ * If received from GSM network, "data" is const char of 88 bytes
+ * which indicates each page of a CBS Message sent to the MS by the
+ * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
+ * If received from UMTS network, "data" is const char of 90 up to 1252
+ * bytes which contain between 1 and 15 CBS Message pages sent as one
+ * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
*
*/
#define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
* "data" is null
*/
#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
+
+/**
+ * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
+ *
+ * Called when CDMA subscription source changed.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
+ */
+#define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
+
+/**
+ * RIL_UNSOL_CDMA_PRL_CHANGED
+ *
+ * Called when PRL (preferred roaming list) changes.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
+ */
+#define RIL_UNSOL_CDMA_PRL_CHANGED 1032
+
+/**
+ * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
+ *
+ * Called when Emergency Callback Mode Ends
+ *
+ * Indicates that the radio system selection module has
+ * proactively exited emergency callback mode.
+ *
+ * "data" is NULL
+ *
+ */
+#define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
+
+/**
+ * RIL_UNSOL_RIL_CONNECTED
+ *
+ * Called the ril connects and returns the version
+ *
+ * "data" is int *
+ * ((int *)data)[0] is RIL_VERSION
+ */
+#define RIL_UNSOL_RIL_CONNECTED 1034
+
+/**
+ * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
+ *
+ * Indicates that voice technology has changed. Contains new radio technology
+ * as a data in the message.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is of type const RIL_RadioTechnology
+ *
+ */
+#define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
+
+/**
+ * RIL_UNSOL_CELL_INFO_LIST
+ *
+ * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
+ * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
+ *
+ * "data" is NULL
+ *
+ * "response" is an array of RIL_CellInfo_v12.
+ */
+#define RIL_UNSOL_CELL_INFO_LIST 1036
+
+/**
+ * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
+ *
+ * Called when IMS registration state has changed
+ *
+ * To get IMS registration state and IMS SMS format, callee needs to invoke the
+ * following request on main thread:
+ *
+ * RIL_REQUEST_IMS_REGISTRATION_STATE
+ *
+ * "data" is NULL
+ *
+ */
+#define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
+
+/**
+ * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
+ *
+ * Indicated when there is a change in subscription status.
+ * This event will be sent in the following scenarios
+ * - subscription readiness at modem, which was selected by telephony layer
+ * - when subscription is deactivated by modem due to UICC card removal
+ * - When network invalidates the subscription i.e. attach reject due to authentication reject
+ *
+ * "data" is const int *
+ * ((const int *)data)[0] == 0 for Subscription Deactivated
+ * ((const int *)data)[0] == 1 for Subscription Activated
+ *
+ */
+#define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
+
+/**
+ * RIL_UNSOL_SRVCC_STATE_NOTIFY
+ *
+ * Called when Single Radio Voice Call Continuity(SRVCC)
+ * progress state has changed
+ *
+ * "data" is int *
+ * ((int *)data)[0] is of type const RIL_SrvccState
+ *
+ */
+
+#define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
+
+/**
+ * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
+ *
+ * Called when the hardware configuration associated with the RILd changes
+ *
+ * "data" is an array of RIL_HardwareConfig
+ *
+ */
+#define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
+
+/**
+ * RIL_UNSOL_DC_RT_INFO_CHANGED
+ *
+ * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
+ * Sent when the DC_RT_STATE changes but the time
+ * between these messages must not be less than the
+ * value set by RIL_REQUEST_SET_DC_RT_RATE.
+ *
+ * "data" is the most recent RIL_DcRtInfo
+ *
+ */
+#define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
+
+/**
+ * RIL_UNSOL_RADIO_CAPABILITY
+ *
+ * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
+ * Returns the phone radio capability exactly as
+ * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
+ * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
+ *
+ * "data" is the RIL_RadioCapability structure
+ */
+#define RIL_UNSOL_RADIO_CAPABILITY 1042
+
+/*
+ * RIL_UNSOL_ON_SS
+ *
+ * Called when SS response is received when DIAL/USSD/SS is changed to SS by
+ * call control.
+ *
+ * "data" is const RIL_StkCcUnsolSsResponse *
+ *
+ */
+#define RIL_UNSOL_ON_SS 1043
+
+/**
+ * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
+ *
+ * Called when there is an ALPHA from UICC during Call Control.
+ *
+ * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
+ *
+ */
+#define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
+
+/**
+ * RIL_UNSOL_LCEDATA_RECV
+ *
+ * Called when there is an incoming Link Capacity Estimate (LCE) info report.
+ *
+ * "data" is the RIL_LceDataInfo structure.
+ *
+ */
+#define RIL_UNSOL_LCEDATA_RECV 1045
+
/***********************************************************************/
+#if defined(ANDROID_MULTI_SIM)
+/**
+ * RIL_Request Function pointer
+ *
+ * @param request is one of RIL_REQUEST_*
+ * @param data is pointer to data defined for that RIL_REQUEST_*
+ * data is owned by caller, and should not be modified or freed by callee
+ * @param t should be used in subsequent call to RIL_onResponse
+ * @param datalen the length of data
+ *
+ */
+typedef void (*RIL_RequestFunc) (int request, void *data,
+ size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
+
+/**
+ * This function should return the current radio state synchronously
+ */
+typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
+
+#else
+/* Backward compatible */
+
/**
* RIL_Request Function pointer
*
*/
typedef RIL_RadioState (*RIL_RadioStateRequest)();
+#endif
+
+
/**
* This function returns "1" if the specified RIL_REQUEST code is
* supported and 0 if it is not
RIL_GetVersion getVersion;
} RIL_RadioFunctions;
+typedef struct {
+ char *apn;
+ char *protocol;
+ int authtype;
+ char *username;
+ char *password;
+} RIL_InitialAttachApn;
+
+typedef struct {
+ int authContext; /* P2 value of authentication command, see P2 parameter in
+ 3GPP TS 31.102 7.1.2 */
+ char *authData; /* the challenge string in Base64 format, see 3GPP
+ TS 31.102 7.1.2 */
+ char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
+ NULL if no value. */
+} RIL_SimAuthentication;
+
#ifdef RIL_SHLIB
struct RIL_Env {
/**
void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
void *response, size_t responselen);
+#if defined(ANDROID_MULTI_SIM)
/**
* "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
* "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
*
* "data" is owned by caller, and should not be modified or freed by callee
*/
-
- void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
- size_t datalen);
-
+ void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
+#else
+ /**
+ * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
+ * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
+ *
+ * "data" is owned by caller, and should not be modified or freed by callee
+ */
+ void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
+#endif
/**
* Call user-specifed "callback" function on on the same thread that
* RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
void (*RequestTimedCallback) (RIL_TimedCallback callback,
void *param, const struct timeval *relativeTime);
+ /**
+ * "t" is parameter passed in on previous call RIL_Notification routine
+ *
+ * RIL_onRequestAck will be called by vendor when an Async RIL request was received
+ * by them and an ack needs to be sent back to java ril.
+ */
+ void (*OnRequestAck) (RIL_Token t);
};
void *response, size_t responselen);
/**
+ * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
+ * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
+ * results, just that the command was received and will take a while. After sending this Ack
+ * its vendor's responsibility to make sure that AP is up whenever needed while command is
+ * being processed.
+ *
+ * @param t is parameter passed in on previous call to RIL_Notification
+ * routine.
+ */
+void RIL_onRequestAck(RIL_Token t);
+
+#if defined(ANDROID_MULTI_SIM)
+/**
* @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
* @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
* "data" is owned by caller, and should not be modified or freed by callee
*/
void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
- size_t datalen);
+ size_t datalen, RIL_SOCKET_ID socket_id);
+#else
+/**
+ * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
+ * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
+ * "data" is owned by caller, and should not be modified or freed by callee
+ * @param datalen the length of data in byte
+ */
+void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
+ size_t datalen);
+#endif
/**
* Call user-specifed "callback" function on on the same thread that