*
* Supp Service Notification (+CSSN)
* GPRS PDP context deactivate notification
- *
+ *
*/
-#ifndef ANDROID_RIL_H
+#ifndef ANDROID_RIL_H
#define ANDROID_RIL_H 1
#include <stdlib.h>
extern "C" {
#endif
-#define RIL_VERSION 2
+#define RIL_VERSION 4
+
+#define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
+#define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
typedef void * RIL_Token;
card absent */
RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
location */
- RIL_E_MODE_NOT_SUPPORTED = 13 /* HW does not support preferred network type */
+ 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
+ illegal SIM or ME */
} RIL_Errno;
typedef enum {
RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
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
+ RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
personalization locked, or SIM absent */
RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
- RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
+ 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 */
} RIL_RadioState;
- /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
+/* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
+typedef enum {
+ RIL_UUS_TYPE1_IMPLICIT = 0,
+ RIL_UUS_TYPE1_REQUIRED = 1,
+ RIL_UUS_TYPE1_NOT_REQUIRED = 2,
+ RIL_UUS_TYPE2_REQUIRED = 3,
+ RIL_UUS_TYPE2_NOT_REQUIRED = 4,
+ RIL_UUS_TYPE3_REQUIRED = 5,
+ RIL_UUS_TYPE3_NOT_REQUIRED = 6
+} RIL_UUS_Type;
+
+/* User-to-User Signaling Information data coding schemes. Possible values for
+ * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
+ * specified in section 10.5.4.25 of 3GPP TS 24.008 */
+typedef enum {
+ RIL_UUS_DCS_USP = 0, /* User specified protocol */
+ RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
+ RIL_UUS_DCS_X244 = 2, /* X.244 */
+ RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
+ convergence function */
+ RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
+} RIL_UUS_DCS;
+
+/* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
+ * This data is passed in RIL_ExtensionRecord and rec contains this
+ * structure when type is RIL_UUS_INFO_EXT_REC */
+typedef struct {
+ RIL_UUS_Type uusType; /* UUS Type */
+ RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
+ int uusLength; /* Length of UUS Data */
+ char * uusData; /* UUS Data */
+} RIL_UUS_Info;
+
+/* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
typedef struct {
char isPresent; /* non-zero if signal information record is present */
char signalType; /* as defined 3.7.5.5-1 */
int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
char * name; /* Remote party name */
int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
+ RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
} RIL_Call;
typedef struct {
int cid; /* Context ID */
int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
- char * type; /* X.25, IP, IPV6, etc. */
+ 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;
+ 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;
typedef struct {
- int messageRef; /*TP-Message-Reference*/
+ int messageRef; /* TP-Message-Reference for GSM,
+ and BearerData MessageId for CDMA
+ (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
char *ackPDU; /* or NULL if n/a */
+ int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
+ 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
+ -1 if unknown or not applicable*/
} RIL_SMS_Response;
/** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
* clir == 1 on "CLIR invocation" (restrict CLI presentation)
* clir == 2 on "CLIR suppression" (allow CLI presentation)
*/
+ RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
} RIL_Dial;
typedef struct {
}RIL_CallForwardInfo;
typedef struct {
- char * cid; /* Cell Id (as described in TS 27.005) in 16 bits in GSM
+ char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
+ * Upper 16 bits is LAC and lower 16 bits
+ * is CID (as described in TS 27.005)
* Primary Scrambling Code (as described in TS 25.331)
- * in 9 bits in UMTS
- * Valid values are hexadecimal 0x0000 - 0xffff.
+ * in 9 bits in UMTS
+ * Valid values are hexadecimal 0x0000 - 0xffffffff.
*/
- int rssi; /* Received RSSI in 2G,
- * Level index of CPICH Received Signal Code Power in 3G
+ int rssi; /* Received RSSI in GSM,
+ * Level index of CPICH Received Signal Code Power in UMTS
*/
} RIL_NeighboringCell;
/* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
typedef enum {
+ CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
CALL_FAIL_NORMAL = 16,
CALL_FAIL_BUSY = 17,
CALL_FAIL_CONGESTION = 34,
CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
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_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
CALL_FAIL_CDMA_DROP = 1001,
CALL_FAIL_CDMA_INTERCEPT = 1002,
CALL_FAIL_CDMA_PREEMPTED = 1007,
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
} RIL_LastCallFailCause;
/* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
typedef enum {
- PDP_FAIL_BARRED = 8, /* no retry; prompt user */
- PDP_FAIL_BAD_APN = 27, /* no retry; prompt user */
- PDP_FAIL_USER_AUTHENTICATION = 29, /* no retry; prompt user */
- PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32, /*no retry; prompt user */
- PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33, /*no retry; prompt user */
- PDP_FAIL_ERROR_UNSPECIFIED = 0xffff /* This and all other cases: retry silently */
+ PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
+ PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
+ PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
+ PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
+ PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
+ PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
+ PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
+ 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 */
+ /* Not mentioned in the specification */
+ PDP_FAIL_REGISTRATION_FAIL = -1,
+ PDP_FAIL_GPRS_REGISTRATION_FAIL = -2,
} RIL_LastDataCallActivateFailCause;
+/* 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_DataProfile;
+
/* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
typedef struct {
int notificationType; /*
(MT only, may be NULL). */
} RIL_SuppSvcNotification;
-#define RIL_SIM_ABSENT 0
-#define RIL_SIM_NOT_READY 1
-/* RIL_SIM_READY means that the radio state is RADIO_STATE_SIM_READY.
- * This is more
- * than "+CPIN: READY". It also means the radio is ready for SIM I/O
- */
-#define RIL_SIM_READY 2
-#define RIL_SIM_PIN 3
-#define RIL_SIM_PUK 4
-#define RIL_SIM_NETWORK_PERSONALIZATION 5
-
-/* see RIL_REQUEST_GET_SIM_STATUS */
-
#define RIL_CARD_MAX_APPS 8
typedef enum {
typedef enum {
RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
- RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
- since each app can only have 1 active perso
+ RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
+ since each app can only have 1 active perso
involved */
RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
RIL_APPSTATE_DETECTED = 1,
RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
- RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
+ RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
when app_state is assigned to this value */
RIL_APPSTATE_READY = 5
} RIL_AppState;
typedef struct
{
- RIL_AppType app_type;
- RIL_AppState app_state;
- RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
+ RIL_AppType app_type;
+ RIL_AppState app_state;
+ RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
RIL_APPSTATE_SUBSCRIPTION_PERSO */
- char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
+ 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 */
- RIL_PinState pin1;
- RIL_PinState pin2;
+ RIL_PinState pin1;
+ RIL_PinState pin2;
} RIL_AppStatus;
typedef struct
{
- RIL_CardState card_state;
+ 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 */
RIL_CDMA_SignalInfoRecord signalInfoRecord;
} RIL_CDMA_CallWaiting;
-/* Used by RIL_REQUEST_GET_BROADCAST_CONFIG and RIL_REQUEST_SET_BROADCAST_CONFIG */
-
-typedef struct {
- int uFromServiceID;
- int uToserviceID;
- unsigned char bSelected;
-} RIL_BroadcastServiceInfo;
-
+/**
+ * Which types of Cell Broadcast Message (CBM) are to be received by the ME
+ *
+ * uFromServiceID - uToServiceID defines a range of CBM message identifiers
+ * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
+ * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
+ * CBM message ID.
+ *
+ * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
+ * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
+ * and 9.4.4.2.3 for UMTS.
+ * All other values can be treated as empty CBM data coding scheme.
+ *
+ * selected 0 means message types specified in <fromServiceId, toServiceId>
+ * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
+ *
+ * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
+ * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
+ */
typedef struct {
- int size;
- RIL_BroadcastServiceInfo *entries;
-} RIL_BroadcastSMSConfig;
+ int fromServiceId;
+ int toServiceId;
+ int fromCodeScheme;
+ int toCodeScheme;
+ unsigned char selected;
+} RIL_GSM_BroadcastSmsConfigInfo;
/* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
#define RIL_RESTRICTED_STATE_NONE 0x00
#define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
/* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
#define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
-/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
+/* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
#define RIL_RESTRICTED_STATE_CS_ALL 0x04
/* Block packet data access due to restriction. */
#define RIL_RESTRICTED_STATE_PS_ALL 0x10
typedef struct {
char alpha_len;
- char alpha_buf[64];
+ char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
} RIL_CDMA_DisplayInfoRecord;
/* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
typedef struct {
char len;
- char buf[81];
+ char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
char number_type;
char number_plan;
char pi;
RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
} RIL_CDMA_InformationRecords;
-/**
+/**
* RIL_REQUEST_GET_SIM_STATUS
*
* Requests status of the SIM interface and the SIM card
- *
+ *
* "data" is NULL
*
* "response" is const RIL_CardStatus *
-
- *
- * If the radio is off or unavailable, return RIL_SIM_NOT_READY
- *
- * Please note: RIL_SIM_READY means that the radio state
- * is RADIO_STATE_SIM_READY. This is more than "+CPIN: READY".
- * It also means the radio is ready for SIM I/O
*
* Valid errors:
* Must never fail
/**
* RIL_REQUEST_ENTER_SIM_PIN
*
- * Supplies SIM PIN. Only called if SIM status is RIL_SIM_PIN
+ * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
*
* "data" is const char **
* ((const char **)data)[0] is PIN value
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
/**
* RIL_REQUEST_ENTER_SIM_PUK
*
- * Supplies SIM PUK and new PIN.
+ * Supplies SIM PUK and new PIN.
*
* "data" is const char **
* ((const char **)data)[0] is PUK value
* ((const char **)data)[1] is new PIN value
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
* "data" is const char **
* ((const char **)data)[0] is PIN2 value
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
/**
* RIL_REQUEST_ENTER_SIM_PUK2
*
- * Supplies SIM PUK2 and new PIN2.
+ * Supplies SIM PUK2 and new PIN2.
*
* "data" is const char **
* ((const char **)data)[0] is PUK2 value
* ((const char **)data)[1] is new PIN2 value
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
/**
* RIL_REQUEST_CHANGE_SIM_PIN
*
- * Supplies old SIM PIN and new PIN.
+ * Supplies old SIM PIN and new PIN.
*
* "data" is const char **
* ((const char **)data)[0] is old PIN value
* ((const char **)data)[1] is new PIN value
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
* (old PIN is invalid)
- *
+ *
*/
#define RIL_REQUEST_CHANGE_SIM_PIN 6
/**
* RIL_REQUEST_CHANGE_SIM_PIN2
*
- * Supplies old SIM PIN2 and new PIN2.
+ * Supplies old SIM PIN2 and new PIN2.
*
* "data" is const char **
* ((const char **)data)[0] is old PIN2 value
* ((const char **)data)[1] is new PIN2 value
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
* (old PIN2 is invalid)
- *
+ *
*/
#define RIL_REQUEST_CHANGE_SIM_PIN2 7
* "data" is const char **
* ((const char **)(data))[0]] is network depersonlization code
*
- * "response" must be NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* PASSWORD_INCORRECT
#define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
/**
- * RIL_REQUEST_GET_CURRENT_CALLS
+ * RIL_REQUEST_GET_CURRENT_CALLS
*
* Requests current call list
*
* "data" is NULL
*
* "response" must be a "const RIL_Call **"
- *
+ *
* Valid errors:
- *
- * SUCCESS
+ *
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* (request will be made again in a few hundred msec)
#define RIL_REQUEST_GET_CURRENT_CALLS 9
-/**
+/**
* RIL_REQUEST_DIAL
*
* Initiate voice call
*
* "data" is const RIL_Dial *
* "response" is NULL
- *
+ *
* This method is never used for supplementary service codes
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is a const char * containing the IMSI
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
*
* Hang up a specific line (like AT+CHLD=1x)
*
- * "data" is an int *
+ * After this HANGUP request returns, RIL should show the connection is NOT
+ * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
+ *
+ * "data" is an int *
* (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
*
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
*
* Hang up waiting or held (like AT+CHLD=0)
*
+ * After this HANGUP request returns, RIL should show the connection is NOT
+ * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
+ *
* "data" is NULL
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
*
* Hang up waiting or held (like AT+CHLD=1)
*
+ * After this HANGUP request returns, RIL should show the connection is NOT
+ * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
+ *
* "data" is NULL
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
/**
* RIL_REQUEST_UDUB
*
- * Send UDUB (user determined used busy) to ringing or
+ * Send UDUB (user determined used busy) to ringing or
* waiting call answer)(RIL_BasicRequest r);
*
* "data" is NULL
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "data" is NULL
* "response" is a "int *"
* ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
- * mapped to cause codes defined in TS 24.008 Annex H where possible.
+ * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
+ * failure reasons are derived from the possible call failure scenarios
+ * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
*
* The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
* MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
* 3 - Registration denied
* 4 - Unknown
* 5 - Registered, roaming
+ * 10 - Same as 0, but indicates that emergency calls
+ * are enabled.
+ * 12 - Same as 2, but indicates that emergency calls
+ * are enabled.
+ * 13 - Same as 3, but indicates that emergency calls
+ * are enabled.
+ * 14 - Same as 4, but indicates that emergency calls
+ * are enabled.
+ *
* ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
* NULL if not.Valid LAC are 0x0000 - 0xffff
* ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
* ((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
+ * 7 - EvDo Rev. 0, 8 - EvDo Rev. A,
+ * 9 - HSDPA, 10 - HSUPA, 11 - HSPA,
+ * 12 - EVDO Rev B
* ((const char **)response)[4] is Base Station ID if registered on a CDMA
* system or NULL if not. Base Station ID in
- * hexadecimal format
+ * decimal format
* ((const char **)response)[5] is Base Station latitude if registered on a
* CDMA system or NULL if not. Base Station
- * latitude in hexadecimal format
+ * 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°).
* ((const char **)response)[6] is Base Station longitude if registered on a
* CDMA system or NULL if not. Base Station
- * longitude in hexadecimal format
+ * 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°).
* ((const char **)response)[7] is concurrent services support indicator if
* registered on a CDMA system 0-1.
* 0 - Concurrent services not supported,
* ((const char **)response)[9] is Network ID if registered on a CDMA system or
* NULL if not. Valid System ID are 0 - 65535
* ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
- * on a CDMA system or NULL if not. Valid values
+ * on a CDMA or EVDO system or NULL if not. Valid values
* are 0-255.
* ((const char **)response)[11] indicates whether the current system is in the
- * PRL if registered on a CDMA system or NULL if
+ * PRL if registered on a CDMA or EVDO system or NULL if
* not. 0=not in the PRL, 1=in the PRL
* ((const char **)response)[12] is the default Roaming Indicator from the PRL,
- * if registered on a CDMA system or NULL if not.
+ * if registered on a CDMA or EVDO system or NULL if not.
* Valid values are 0-255.
* ((const char **)response)[13] if registration state is 3 (Registration
* denied) this is an enumerated reason why
- * registration was denied.
- * 0-General, 1-Authentication Failure
+ * registration was denied. See 3GPP TS 24.008,
+ * 10.5.3.6 and Annex G.
+ * 0 - General
+ * 1 - Authentication Failure
+ * 2 - IMSI unknown in HLR
+ * 3 - Illegal MS
+ * 4 - Illegal ME
+ * 5 - PLMN not allowed
+ * 6 - Location area not allowed
+ * 7 - Roaming not allowed
+ * 8 - No Suitable Cells in this Location Area
+ * 9 - Network failure
+ * 10 - Persistent location update reject
+ * ((const char **)response)[14] is the Primary Scrambling Code of the current
+ * cell as described in TS 25.331, in hexadecimal
+ * format, or NULL if unknown or not registered
+ * to a UMTS network.
*
* Please note that registration state 4 ("unknown") is treated
* as "out of service" in the Android telephony system
*
* "data" is NULL
* "response" is a "char **"
- * ((const char **)response)[0] is registration state 0-5 from TS 27.007 7.2
+ * ((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:
* 1 == GPRS only
* 2 == EDGE
* 3 == UMTS
+ * 9 == HSDPA
+ * 10 == HSUPA
+ * 11 == HSPA
*
* LAC and CID are in hexadecimal format.
* valid LAC are 0x0000 - 0xffff
* valid CID are 0x00000000 - 0x0fffffff
- *
- * Please note that registration state 4 ("unknown") is treated
+ *
+ * Please note that registration state 4 ("unknown") is treated
* as "out of service" in the Android telephony system
*
* Valid errors:
*
* "data" is NULL
* "response" is a "const char **"
- * ((const char **)response)[0] is long alpha ONS or EONS
+ * ((const char **)response)[0] is long alpha ONS or EONS
* or NULL if unregistered
*
- * ((const char **)response)[1] is short alpha ONS or EONS
+ * ((const char **)response)[1] is short alpha ONS or EONS
* or NULL if unregistered
* ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
* or NULL if unregistered
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
* should be played instead
*
- * "data" is a char *
- * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
- * ((char *)data)[1] is a single character with one of 3 values:
- * 'S' -- tone should be played for a short time
- * 'L' -- tone should be played for a long time
+ * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
* "response" is NULL
- *
+ *
* FIXME should this block/mute microphone?
* How does this interact with local DTMF feedback?
*
/**
* RIL_REQUEST_SEND_SMS
- *
+ *
* Send an SMS message
*
* "data" is const char **
* "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 (i.e. error cause is 332)
+ * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
* and GENERIC_FAILURE means no retry (i.e. error cause is 500)
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* SMS_SEND_FAIL_RETRY
+ * FDN_CHECK_FAILURE
* GENERIC_FAILURE
*
* FIXME how do we specify TP-Message-Reference if we need to resend?
/**
* RIL_REQUEST_SEND_SMS_EXPECT_MORE
- *
+ *
* Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
* except that more messages are expected to be sent soon. If possible,
* keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
* "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 (i.e. error cause is 332)
+ * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
* and GENERIC_FAILURE means no retry (i.e. error cause is 500)
*
* Valid errors:
* Setup a packet data connection
*
* "data" is a const char **
- * ((const char **)data)[0] indicates whether to setup connection on radio technology CDMA
+ * ((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)[1] Profile Number or NULL to indicate default profile
- * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
+ *
+ * ((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.
* ((const char **)data)[3] is the username for APN, or NULL
* ((const char **)data)[4] is the password for APN, or NULL
+ * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
+ * 0 => PAP and CHAP is never performed.
+ * 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.
+ * For example, "IP", "IPV6", "IPV4V6", or "PPP".
*
* "response" is a char **
- * ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
- * used in GSM/UMTS and CDMA
- * ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA
- * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
- * and NULL for CDMA
- *
- * FIXME may need way to configure QoS settings
+ * ((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".
*
- * replaces RIL_REQUEST_SETUP_DEFAULT_PDP
+ * 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].
*
* Valid errors:
* SUCCESS
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * FDN_CHECK_FAILURE
* GENERIC_FAILURE
*
* See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
/**
* RIL_REQUEST_CANCEL_USSD
- *
+ *
* Cancel the current USSD session if one exists
*
* "data" is null
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
- * GENERIC_FAILURE
+ * GENERIC_FAILURE
*/
#define RIL_REQUEST_CANCEL_USSD 30
-/**
+/**
* RIL_REQUEST_GET_CLIR
*
* Gets current CLIR status
*
* For example, if data is forwarded to +18005551212 and voice is forwarded
* to +18005559999, then two separate RIL_CallForwardInfo's should be returned
- *
+ *
* If, however, both data and voice are forwarded to +18005551212, then
* a single RIL_CallForwardInfo can be returned with the service class
* set to "data + voice = 3")
*
* "data" is const RIL_CallForwardInfo *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* must follow, with the TS 27.007 service class bit vector of services
* for which call waiting is enabled.
*
- * For example, if ((const int *)response)[0] is 1 and
+ * For example, if ((const int *)response)[0] is 1 and
* ((const int *)response)[1] is 3, then call waiting is enabled for data
* and voice and disabled for everything else
*
* RIL_REQUEST_SMS_ACKNOWLEDGE
*
* Acknowledge successful or failed receipt of SMS previously indicated
- * via RIL_UNSOL_RESPONSE_NEW_SMS
+ * via RIL_UNSOL_RESPONSE_NEW_SMS
*
* "data" is int *
- * ((int *)data)[0] is "1" on successful receipt
+ * ((int *)data)[0] is 1 on successful receipt
* (basically, AT+CNMA=1 from TS 27.005
- * ((int *)data)[0] is "0" on failed receipt
+ * is 0 on failed receipt
* (basically, AT+CNMA=2 from TS 27.005)
+ * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
+ * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
+ * capacity exceeded) and 0xFF (unspecified error) are
+ * reported.
*
* "response" is NULL
*
* "response" is a const char * containing the IMEI
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is a const char * containing the IMEISV
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
*
* "data" is const char **
* ((char**)data)[0] indicating CID
- *
+ * ((char**)data)[1] indicating Disconnect Reason
+ * 0 => No specific reason specified
+ * 1 => Radio shutdown requested
+ *
* "response" is NULL
*
* Valid errors:
* Query the status of a facility lock state
*
* "data" is const char **
- * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
+ * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
* (eg "AO" for BAOC, "SC" for SIM lock)
* ((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
*
* "response" is an int *
* ((const int *)response) 0 is the TS 27.007 service class bit vector of
- * services for which the specified barring facility
+ * services for which the specified barring facility
* is active. "0" means "disabled for all"
- *
+ *
*
* Valid errors:
* SUCCESS
* service class bit vector. Eg, the string
* "1" means "set this facility for voice services"
*
- * "response" is NULL
+ * "response" is int *
+ * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
*
* Valid errors:
* SUCCESS
* ((const char **)data)[1] = old password
* ((const char **)data)[2] = new password
*
- * "response" is NULL
+ * "response" is NULL
*
* Valid errors:
* SUCCESS
* "data" is NULL
* "response" is NULL
*
- * This request must not respond until the new operator is selected
+ * This request must not respond until the new operator is selected
* and registered
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * ILLEGAL_SIM_OR_ME
* GENERIC_FAILURE
*
+ * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
+ * no retries needed, such as illegal SIM or ME.
+ * Returns GENERIC_FAILURE for all other causes that might be
+ * fixed by retries.
+ *
*/
#define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
*
* Manually select a specified network.
*
- * The radio baseband/RIL implementation is expected to fall back to
- * automatic selection mode if the manually selected network should go
- * out of range in the future.
- *
* "data" is const char * specifying MCCMNC of network to select (eg "310170")
* "response" is NULL
*
- * This request must not respond until the new operator is selected
+ * This request must not respond until the new operator is selected
* and registered
*
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
+ * ILLEGAL_SIM_OR_ME
* GENERIC_FAILURE
*
+ * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
+ * no retries needed, such as illegal SIM or ME.
+ * Returns GENERIC_FAILURE for all other causes that might be
+ * fixed by retries.
+ *
*/
#define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
* n is the number of available networks
* For each available network:
*
- * ((const char **)response)[n+0] is long alpha ONS or EONS
- * ((const char **)response)[n+1] is short alpha ONS or EONS
+ * ((const char **)response)[n+0] is long alpha ONS or EONS
+ * ((const char **)response)[n+1] is short alpha ONS or EONS
* ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
* ((const char **)response)[n+3] is a string value of the status:
* "unknown"
* "current"
* "forbidden"
*
- * This request must not respond until the new operator is selected
+ * This request must not respond until the new operator is selected
* and registered
*
* Valid errors:
/**
* RIL_REQUEST_DTMF_START
*
- * Start playing a DTMF tone. Continue playing DTMF tone until
- * RIL_REQUEST_DTMF_STOP is received
+ * Start playing a DTMF tone. Continue playing DTMF tone until
+ * RIL_REQUEST_DTMF_STOP is received
*
* If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
* it should cancel the previous tone and play the new one.
- *
+ *
* "data" is a char *
* ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* RIL_REQUEST_DTMF_STOP
*
* Stop playing a currently playing DTMF tone.
- *
+ *
* "data" is NULL
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
*
* Return string value indicating baseband version, eg
* response from AT+CGMR
- *
+ *
* "data" is NULL
* "response" is const char * containing version string for log reporting
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* RIL_REQUEST_SEPARATE_CONNECTION
*
* Separate a party from a multiparty call placing the multiparty call
- * (less the specified party) on hold and leaving the specified party
+ * (less the specified party) on hold and leaving the specified party
* as the only other member of the current (active) call
*
* Like AT+CHLD=2x
* See TS 22.084 1.3.8.2 (iii)
* TS 22.030 6.5.5 "Entering "2X followed by send"
* TS 27.007 "AT+CHLD=2x"
- *
- * "data" is an int *
+ *
+ * "data" is an int *
* (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
*
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
*
* "data" is NULL
* "response" is an int *
- * (int *)response)[0] is 1 for "CLIP provisioned"
+ * (int *)response)[0] is 1 for "CLIP provisioned"
* and 0 for "CLIP not provisioned"
- * and 2 for "unknown, e.g. no network etc"
+ * and 2 for "unknown, e.g. no network etc"
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
/**
* RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
- *
- * Requests the failure cause code for the most recently failed PDP
+ *
+ * Requests the failure cause code for the most recently failed PDP
* context or CDMA data connection active
* replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
*
* section 6.1.3.1.3 or close approximation
*
* 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
+ * then it should return one of the values listed in
+ * RIL_LastDataCallActivateFailCause, as the UI layer needs to distinguish these
* cases for error notification
* and potential retries.
*
* GENERIC_FAILURE
*
* See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
- *
- */
+ *
+ */
#define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
* "response" is an array of RIL_Data_Call_Response
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
* REQUEST_NOT_SUPPORTED
* This request reserved for OEM-specific uses. It passes raw byte arrays
* back and forth.
*
- * It can be invoked on the Java side from
+ * It can be invoked on the Java side from
* com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
*
* "data" is a char * of bytes copied from the byte[] data argument in java
* "response" is a char * of bytes that will returned via the
- * caller's "response" Message here:
+ * caller's "response" Message here:
* (byte[])(((AsyncResult)response.obj).result)
*
- * An error response here will result in
- * (((AsyncResult)response.obj).result) == null and
+ * An error response here will result in
+ * (((AsyncResult)response.obj).result) == null and
* (((AsyncResult)response.obj).exception) being an instance of
* com.android.internal.telephony.gsm.CommandException
*
* This request reserved for OEM-specific uses. It passes strings
* back and forth.
*
- * It can be invoked on the Java side from
+ * It can be invoked on the Java side from
* com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
*
* "data" is a const char **, representing an array of null-terminated UTF-8
*
* (String[])(((AsyncResult)response.obj).result)
*
- * An error response here will result in
- * (((AsyncResult)response.obj).result) == null and
+ * An error response here will result in
+ * (((AsyncResult)response.obj).result) == null and
* (((AsyncResult)response.obj).exception) being an instance of
* com.android.internal.telephony.gsm.CommandException
*
*
* Indicates the current state of the screen. When the screen is off, the
* RIL should notify the baseband to suppress certain notifications (eg,
- * signal strength and changes in LAC or CID) in an effort to conserve power.
- * These notifications should resume when the screen is on.
+ * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
+ * in an effort to conserve power. These notifications should resume when the
+ * screen is on.
*
* "data" is int *
* ((int *)data)[0] is == 1 for "Screen On"
* RIL_REQUEST_EXPLICIT_CALL_TRANSFER
*
* Connects the two calls and disconnects the subscriber from both calls.
- *
+ *
* "data" is NULL
* "response" is NULL
*
* Valid errors:
- * SUCCESS
+ * SUCCESS
* RADIO_NOT_AVAILABLE (radio resetting)
* GENERIC_FAILURE
*/
* (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)
+ * ((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
* RIL_REQUEST_SET_LOCATION_UPDATES
*
* Enables/disables network state change notifications due to changes in
- * LAC and/or CID (basically, +CREG=2 vs. +CREG=1).
+ * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
+ * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
*
* Note: The RIL implementation should default to "updates enabled"
* when the screen is on and "updates disabled" when the screen is off.
/**
* RIL_REQUEST_CDMA_SET_SUBSCRIPTION
- *
+ *
* Request to set the location where the CDMA subscription shall
* be retrieved
*
/**
* RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
- *
+ *
* Request to set the roaming preferences in CDMA
*
* "data" is int *
* ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
* ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
* ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
/**
* RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
- *
+ *
* Request the actual setting of the roaming preferences in CDMA in the modem
*
* "data" is NULL
- *
+ *
* "response" is int *
* ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
* ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
* ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
/**
* RIL_REQUEST_SET_TTY_MODE
- *
+ *
* Request to set the TTY mode
*
* "data" is int *
* ((int *)data)[0] is == 1 for TTY Full
* ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
* ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
/**
* RIL_REQUEST_QUERY_TTY_MODE
- *
+ *
* Request the setting of TTY mode
*
* "data" is NULL
- *
+ *
* "response" is int *
* ((int *)response)[0] is == 0 for TTY off
* ((int *)response)[0] is == 1 for TTY Full
* ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
*
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* "data" is int *
* ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
* ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
/**
* RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
- *
+ *
* Request the setting of preferred voice privacy mode
*
* "data" is NULL
- *
+ *
* "response" is int *
* ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
* ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
*
* "data" is const char *
* ((const char *)data)[0] is a FLASH string
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
*
* Send DTMF string
*
- * "data" is const char *
- * ((const char *)data)[0] is a DTMF string
- *
+ * "data" is const char **
+ * ((const char **)data)[0] is a DTMF string
+ * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
+ * default
+ * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
+ * default
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
#define RIL_REQUEST_CDMA_BURST_DTMF 85
/**
- * RIL_REQUEST_CDMA_VALIDATE_AKEY
+ * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
*
- * Validate AKey.
+ * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
+ * If the checksum is valid the 20 digit AKEY is written to NV,
+ * replacing the existing AKEY no matter what it was before.
*
* "data" is const char *
- * ((const char *)data)[0] is a AKey string
- *
+ * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
+ * where the last 6 digits are a checksum of the
+ * first 20, as specified in TR45.AHAG
+ * "Common Cryptographic Algorithms, Revision D.1
+ * Section 2.2"
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_CDMA_VALIDATE_AKEY 86
+#define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
/**
* RIL_REQUEST_CDMA_SEND_SMS
* Send a CDMA SMS message
*
* "data" is const RIL_CDMA_SMS_Message *
- *
+ *
* "response" is a const RIL_SMS_Response *
- *
+ *
+ * Based on the return error, caller decides to resend if sending sms
+ * fails. The CDMA error class is derived as follows,
+ * SUCCESS is error class 0 (no error)
+ * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
+ * and GENERIC_FAILURE is error class 3 (permanent and no retry)
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
*
* "data" is const RIL_CDMA_SMS_Ack *
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
#define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
/**
- * RIL_REQUEST_GET_BROADCAST_CONFIG
+ * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
+ *
+ * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
*
- * Request the setting of GSM/WCDMA Cell Broadcast SMS config
- *
* "data" is NULL
- *
- * "response" is const RIL_BroadcastSMSConfig *
- *
+ *
+ * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
+ * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_GET_BROADCAST_CONFIG 89
+#define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
/**
- * RIL_REQUEST_SET_BROADCAST_CONFIG
+ * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
*
* Set GSM/WCDMA Cell Broadcast SMS config
*
- * "data" is const RIL_BroadcastSMSConfig *
- *
+ * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
+ * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_SET_BROADCAST_CONFIG 90
+#define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
/**
- * RIL_REQUEST_BROADCAST_ACTIVATION
+ * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
*
- * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
+* Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
*
* "data" is const int *
* (const int *)data[0] indicates to activate or turn off the
* reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
* 0 - Activate, 1 - Turn off
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_BROADCAST_ACTIVATION 91
+#define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
/**
- * RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG
+ * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
*
* Request the setting of CDMA Broadcast SMS config
*
* "data" is NULL
- *
- * "response" is const RIL_CDMA_BroadcastSMSConfig *
- *
+ *
+ * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
+ * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_CDMA_GET_BROADCAST_CONFIG 92
+#define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
/**
- * RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG
+ * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
*
* Set CDMA Broadcast SMS config
*
- * "data" is const RIL_CDMA_BroadcastSMSConfig *
- *
+ * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
+ * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_CDMA_SET_BROADCAST_CONFIG 93
+#define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
/**
- * RIL_REQUEST_CDMA_BROADCAST_ACTIVATION
+ * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
*
* Enable or disable the reception of CDMA Broadcast SMS
*
* (const int *)data[0] indicates to activate or turn off the
* reception of CDMA Broadcast SMS, 0-1,
* 0 - Activate, 1 - Turn off
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
* GENERIC_FAILURE
*
*/
-#define RIL_REQUEST_CDMA_BROADCAST_ACTIVATION 94
+#define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
/**
* RIL_REQUEST_CDMA_SUBSCRIPTION
*
* "response" is const char **
* ((const char **)response)[0] is MDN if CDMA subscription is available
- * ((const char **)response)[1] is H_SID (Home SID) if CDMA subscription is available
- * ((const char **)response)[2] is H_NID (Home NID) if CDMA subscription is available
+ * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
+ * CDMA subscription is available, in decimal format
+ * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
+ * CDMA subscription is available, in decimal format
* ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
+ * ((const char **)response)[4] is PRL version if CDMA subscription is available
*
* Valid errors:
* SUCCESS
* completely exited from Emergency Callback Mode.
*
* "data" is NULL
- *
+ *
* "response" is NULL
- *
+ *
* Valid errors:
* SUCCESS
* RADIO_NOT_AVAILABLE
*/
#define RIL_REQUEST_SET_SMSC_ADDRESS 101
+/**
+ * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
+ *
+ * Indicates whether there is storage available for new SMS messages.
+ *
+ * "data" is int *
+ * ((int *)data)[0] is 1 if memory is available for storing new messages
+ * is 0 if memory capacity is exceeded
+ *
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ *
+ */
+#define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
+
+/**
+ * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
+ *
+ * Indicates that the StkSerivce is running and is
+ * ready to receive RIL_UNSOL_STK_XXXXX commands.
+ *
+ * "data" is NULL
+ * "response" is NULL
+ *
+ * Valid errors:
+ * SUCCESS
+ * RADIO_NOT_AVAILABLE
+ * GENERIC_FAILURE
+ *
+ */
+#define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
/***********************************************************************/
*
* "data" is NULL
*
- * Response should be invoked on, for example,
+ * Response should be invoked on, for example,
* "RING", "BUSY", "NO CARRIER", and also call state
* transitions (DIALING->ALERTING ALERTING->ACTIVE)
*
/**
- * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
+ * RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
*
* Called when network state, operator name, or GPRS state has changed
* Basically on, +CREG and +CGREG
* RIL_UNSOL_RESPONSE_NEW_SMS
*
* Called when new SMS is received.
- *
+ *
* "data" is const char *
* This is a pointer to a string containing the PDU of an SMS-DELIVER
* as an ascii string of hex digits. The PDU starts with the SMSC address
* Callee will subsequently confirm the receipt of thei SMS with a
* RIL_REQUEST_SMS_ACKNOWLEDGE
*
- * No new RIL_UNSOL_RESPONSE_NEW_SMS
+ * No new RIL_UNSOL_RESPONSE_NEW_SMS
* or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
* RIL_REQUEST_SMS_ACKNOWLEDGE has been received
*/
* RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
*
* Called when new SMS Status Report is received.
- *
+ *
* "data" is const char *
* This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
* as an ascii string of hex digits. The PDU starts with the SMSC address
* Callee will subsequently confirm the receipt of the SMS with a
* RIL_REQUEST_SMS_ACKNOWLEDGE
*
- * No new RIL_UNSOL_RESPONSE_NEW_SMS
+ * No new RIL_UNSOL_RESPONSE_NEW_SMS
* or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
* RIL_REQUEST_SMS_ACKNOWLEDGE has been received
*/
* RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
*
* Called when new SMS has been stored on SIM card
- *
+ *
* "data" is const int *
* ((const int *)data)[0] contains the slot index on the SIM that contains
* the new message
* Called when a new USSD message is received.
*
* "data" is const char **
- * ((const char **)data)[0] points to a type code, which is
+ * ((const char **)data)[0] points to a type code, which is
* one of these string values:
* "0" USSD-Notify -- text in ((const char **)data)[1]
* "1" USSD-Request -- text in ((const char **)data)[1]
*
* Obsolete. Send via RIL_UNSOL_ON_USSD
*/
-#define RIL_UNSOL_ON_USSD_REQUEST 1007
+#define RIL_UNSOL_ON_USSD_REQUEST 1007
/**
* RIL_UNSOL_CALL_RING
*
* Ring indication for an incoming call (eg, RING or CRING event).
+ * There must be at least one RIL_UNSOL_CALL_RING at the beginning
+ * of a call and sending multiple is optional. If the system property
+ * ro.telephony.call_ring.multiple is false then the upper layers
+ * will generate the multiple events internally. Otherwise the vendor
+ * ril must generate multiple RIL_UNSOL_CALL_RING if
+ * ro.telephony.call_ring.multiple is true or if it is absent.
+ *
+ * The rate of these events is controlled by ro.telephony.call_ring.delay
+ * and has a default value of 3000 (3 seconds) if absent.
*
* "data" is null for GSM
* "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
* RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
*
* 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
* Called when CDMA radio receives a call waiting indication.
*
* "data" is const RIL_CDMA_CallWaiting *
- *
+ *
*/
#define RIL_UNSOL_CDMA_CALL_WAITING 1025
*/
#define RIL_UNSOL_OEM_HOOK_RAW 1028
+/**
+ * RIL_UNSOL_RINGBACK_TONE
+ *
+ * Indicates that nework doesn't have in-band information, need to
+ * play out-band tone.
+ *
+ * "data" is an int *
+ * ((int *)data)[0] == 0 for stop play ringback tone.
+ * ((int *)data)[0] == 1 for start play ringback tone.
+ */
+#define RIL_UNSOL_RINGBACK_TONE 1029
+
+/**
+ * RIL_UNSOL_RESEND_INCALL_MUTE
+ *
+ * Indicates that framework/application need reset the uplink mute state.
+ *
+ * There may be situations where the mute state becomes out of sync
+ * between the application and device in some GSM infrastructures.
+ *
+ * "data" is null
+ */
+#define RIL_UNSOL_RESEND_INCALL_MUTE 1030
/***********************************************************************/
* @param datalen the length of data
*
*/
-typedef void (*RIL_RequestFunc) (int request, void *data,
+typedef void (*RIL_RequestFunc) (int request, void *data,
size_t datalen, RIL_Token t);
/**
typedef int (*RIL_Supports)(int requestCode);
/**
- * This function is called from a separate thread--not the
+ * This function is called from a separate thread--not the
* thread that calls RIL_RequestFunc--and indicates that a pending
* request should be cancelled.
- *
+ *
* On cancel, the callee should do its best to abandon the request and
* call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
*
*
* RIL_Cancel calls should return immediately, and not wait for cancellation
*
- * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
+ * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
* interface
*
* @param t token wants to be canceled
*
* If "e" != SUCCESS, then response can be null/is ignored
*
- * "response" is owned by caller, and should not be modified or
+ * "response" is owned by caller, and should not be modified or
* freed by callee
*
* RIL_onRequestComplete will return as soon as possible
*/
- void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
+ void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
void *response, size_t responselen);
/**
* "data" is owned by caller, and should not be modified or freed by callee
*/
- void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
+ void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
size_t datalen);
/**
- * Call user-specifed "callback" function on on the same thread that
+ * Call user-specifed "callback" function on on the same thread that
* RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
* a relative time value at which the callback is invoked. If relativeTime is
* NULL or points to a 0-filled structure, the callback will be invoked as
* soon as possible
*/
- void (*RequestTimedCallback) (RIL_TimedCallback callback,
- void *param, const struct timeval *relativeTime);
+ void (*RequestTimedCallback) (RIL_TimedCallback callback,
+ void *param, const struct timeval *relativeTime);
};
-/**
- * RIL implementations must defined RIL_Init
+/**
+ * RIL implementations must defined RIL_Init
* argc and argv will be command line arguments intended for the RIL implementation
* Return NULL on error
*
* freed by callee
* @param responselen the length of response in byte
*/
-void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
+void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
void *response, size_t responselen);
/**
* @param datalen the length of data in byte
*/
-void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
+void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
size_t datalen);
/**
- * Call user-specifed "callback" function on on the same thread that
+ * Call user-specifed "callback" function on on the same thread that
* RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
* a relative time value at which the callback is invoked. If relativeTime is
* NULL or points to a 0-filled structure, the callback will be invoked as
* @param relativeTime a relative time value at which the callback is invoked
*/
-void RIL_requestTimedCallback (RIL_TimedCallback callback,
+void RIL_requestTimedCallback (RIL_TimedCallback callback,
void *param, const struct timeval *relativeTime);