2 * Copyright (C) 2006 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #define ANDROID_RIL_H 1
22 #include <telephony/ril_cdma_sms.h>
23 #ifndef FEATURE_UNIT_TEST
25 #endif /* !FEATURE_UNIT_TEST */
31 #define RIL_VERSION 10 /* Current version */
32 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
34 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
35 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
37 typedef void * RIL_Token;
41 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
42 RIL_E_GENERIC_FAILURE = 2,
43 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
44 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
45 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
46 RIL_E_REQUEST_NOT_SUPPORTED = 6,
48 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
49 call on a Class C GPRS device */
50 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
51 registers in network */
52 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
53 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
54 shall be retrieved because of SIM or RUIM
56 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
58 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
59 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
60 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
62 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
63 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
69 RIL_CALL_DIALING = 2, /* MO call only */
70 RIL_CALL_ALERTING = 3, /* MO call only */
71 RIL_CALL_INCOMING = 4, /* MT call only */
72 RIL_CALL_WAITING = 5 /* MT call only */
76 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
77 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
78 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
79 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
80 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
81 personalization locked, or SIM absent */
82 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
83 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
84 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
85 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
86 personalization locked, or RUIM absent */
87 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
88 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
89 RADIO_STATE_ON = 10 /* Radio is on */
93 RADIO_TECH_UNKNOWN = 0,
100 RADIO_TECH_EVDO_0 = 7,
101 RADIO_TECH_EVDO_A = 8,
102 RADIO_TECH_HSDPA = 9,
103 RADIO_TECH_HSUPA = 10,
104 RADIO_TECH_HSPA = 11,
105 RADIO_TECH_EVDO_B = 12,
106 RADIO_TECH_EHRPD = 13,
108 RADIO_TECH_HSPAP = 15, // HSPA+
109 RADIO_TECH_GSM = 16 // Only supports voice
110 } RIL_RadioTechnology;
112 // Do we want to split Data from Voice and the use
113 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
115 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
116 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
117 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
118 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
119 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
120 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
121 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
122 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
123 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
124 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
125 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
126 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
127 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
128 } RIL_PreferredNetworkType;
130 /* Source for cdma subscription */
132 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
133 CDMA_SUBSCRIPTION_SOURCE_NV = 1
134 } RIL_CdmaSubscriptionSource;
136 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
138 RIL_UUS_TYPE1_IMPLICIT = 0,
139 RIL_UUS_TYPE1_REQUIRED = 1,
140 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
141 RIL_UUS_TYPE2_REQUIRED = 3,
142 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
143 RIL_UUS_TYPE3_REQUIRED = 5,
144 RIL_UUS_TYPE3_NOT_REQUIRED = 6
147 /* User-to-User Signaling Information data coding schemes. Possible values for
148 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
149 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
151 RIL_UUS_DCS_USP = 0, /* User specified protocol */
152 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
153 RIL_UUS_DCS_X244 = 2, /* X.244 */
154 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
155 convergence function */
156 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
159 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
160 * This data is passed in RIL_ExtensionRecord and rec contains this
161 * structure when type is RIL_UUS_INFO_EXT_REC */
163 RIL_UUS_Type uusType; /* UUS Type */
164 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
165 int uusLength; /* Length of UUS Data */
166 char * uusData; /* UUS Data */
169 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
171 char isPresent; /* non-zero if signal information record is present */
172 char signalType; /* as defined 3.7.5.5-1 */
173 char alertPitch; /* as defined 3.7.5.5-2 */
174 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
175 } RIL_CDMA_SignalInfoRecord;
179 int index; /* Connection Index for use with, eg, AT+CHLD */
180 int toa; /* type of address, eg 145 = intl */
181 char isMpty; /* nonzero if is mpty call */
182 char isMT; /* nonzero if call is mobile terminated */
183 char als; /* ALS line indicator if available
185 char isVoice; /* nonzero if this is is a voice call */
186 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
187 char * number; /* Remote party number */
188 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
189 char * name; /* Remote party name */
190 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
191 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
194 /* Deprecated, use RIL_Data_Call_Response_v6 */
196 int cid; /* Context ID, uniquely identifies this call */
197 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
198 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
199 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
200 char * apn; /* ignored */
201 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
202 } RIL_Data_Call_Response_v4;
205 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
206 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
209 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
210 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
211 back-off timer value RIL wants to override the one
212 pre-configured in FW.
213 The unit is miliseconds.
214 The value < 0 means no value is suggested.
215 The value 0 means retry should be done ASAP.
216 The value of INT_MAX(0x7fffffff) means no retry. */
217 int cid; /* Context ID, uniquely identifies this call */
218 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
219 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
220 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
221 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
222 such as "IP" or "IPV6" */
223 char * ifname; /* The network interface name */
224 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
225 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
226 May not be empty, typically 1 IPv4 or 1 IPv6 or
227 one of each. If the prefix length is absent the addresses
228 are assumed to be point to point with IPv4 having a prefix
229 length of 32 and IPv6 128. */
230 char * dnses; /* A space-delimited list of DNS server addresses,
231 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
233 char * gateways; /* A space-delimited list of default gateway addresses,
234 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
235 May be empty in which case the addresses represent point
236 to point connections. */
237 } RIL_Data_Call_Response_v6;
240 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
241 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
242 } RIL_RadioTechnologyFamily;
245 RIL_RadioTechnologyFamily tech;
246 unsigned char retry; /* 0 == not retry, nonzero == retry */
247 int messageRef; /* Valid field if retry is set to nonzero.
248 Contains messageRef from RIL_SMS_Response
249 corresponding to failed MO SMS.
253 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
254 RIL_CDMA_SMS_Message* cdmaMessage;
256 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
259 } RIL_IMS_SMS_Message;
262 int messageRef; /* TP-Message-Reference for GSM,
263 and BearerData MessageId for CDMA
264 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
265 char *ackPDU; /* or NULL if n/a */
266 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
267 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
268 -1 if unknown or not applicable*/
271 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
273 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
274 /* 0 = "REC UNREAD" */
276 /* 2 = "STO UNSENT" */
278 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
279 the TP-layer length is "strlen(pdu)/2". */
280 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
281 (as expected by TS 27.005) or NULL for default SMSC */
284 /** Used by RIL_REQUEST_DIAL */
288 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
289 * clir == 0 on "use subscription default value"
290 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
291 * clir == 2 on "CLIR suppression" (allow CLI presentation)
293 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
297 int command; /* one of the commands listed for TS 27.007 +CRSM*/
298 int fileid; /* EF id */
299 char *path; /* "pathid" from TS 27.007 +CRSM command.
300 Path is in hex asciii format eg "7f205f70"
301 Path must always be provided.
306 char *data; /* May be NULL*/
307 char *pin2; /* May be NULL*/
311 int command; /* one of the commands listed for TS 27.007 +CRSM*/
312 int fileid; /* EF id */
313 char *path; /* "pathid" from TS 27.007 +CRSM command.
314 Path is in hex asciii format eg "7f205f70"
315 Path must always be provided.
320 char *data; /* May be NULL*/
321 char *pin2; /* May be NULL*/
322 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
325 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
326 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
328 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
329 ignored for +CSIM command. */
331 /* Following fields are used to derive the APDU ("command" and "length"
332 values in TS 27.007 +CSIM and +CGLA commands). */
337 int p3; /* A negative P3 implies a 4 byte APDU. */
338 char *data; /* May be NULL. In hex string format. */
344 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
345 } RIL_SIM_IO_Response;
347 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
351 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
352 * status 1 = active, 0 = not active
354 * For RIL_REQUEST_SET_CALL_FORWARD:
363 int reason; /* from TS 27.007 7.11 "reason" */
364 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
365 See table for Android mapping from
367 0 means user doesn't input class */
368 int toa; /* "type" from TS 27.007 7.11 */
369 char * number; /* "number" from TS 27.007 7.11. May be NULL */
370 int timeSeconds; /* for CF no reply only */
371 }RIL_CallForwardInfo;
374 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
375 * Upper 16 bits is LAC and lower 16 bits
376 * is CID (as described in TS 27.005)
377 * Primary Scrambling Code (as described in TS 25.331)
379 * Valid values are hexadecimal 0x0000 - 0xffffffff.
381 int rssi; /* Received RSSI in GSM,
382 * Level index of CPICH Received Signal Code Power in UMTS
384 } RIL_NeighboringCell;
386 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
388 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
389 CALL_FAIL_NORMAL = 16,
391 CALL_FAIL_CONGESTION = 34,
392 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
393 CALL_FAIL_CALL_BARRED = 240,
394 CALL_FAIL_FDN_BLOCKED = 241,
395 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
396 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
397 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
398 CALL_FAIL_CDMA_DROP = 1001,
399 CALL_FAIL_CDMA_INTERCEPT = 1002,
400 CALL_FAIL_CDMA_REORDER = 1003,
401 CALL_FAIL_CDMA_SO_REJECT = 1004,
402 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
403 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
404 CALL_FAIL_CDMA_PREEMPTED = 1007,
405 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
406 during emergency callback mode */
407 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
408 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
409 } RIL_LastCallFailCause;
411 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
413 PDP_FAIL_NONE = 0, /* No error, connection ok */
415 /* an integer cause code defined in TS 24.008
416 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
417 If the implementation does not have access to the exact cause codes,
418 then it should return one of the following values,
419 as the UI layer needs to distinguish these
420 cases for error notification and potential retries. */
421 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
422 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
423 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
424 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
425 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
426 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
427 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
428 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
429 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
430 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
431 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
432 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */
433 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
434 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
435 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
436 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
438 /* Not mentioned in the specification */
439 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
440 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
442 /* reasons for data call drop - network/modem disconnect */
443 PDP_FAIL_SIGNAL_LOST = -3,
444 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
445 with parameters appropriate for new technology */
446 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
447 powered off - no retry */
448 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
449 mode was up on same APN/data profile - no retry until
450 tethered call is off */
452 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
453 } RIL_DataCallFailCause;
455 /* See RIL_REQUEST_SETUP_DATA_CALL */
457 RIL_DATA_PROFILE_DEFAULT = 0,
458 RIL_DATA_PROFILE_TETHERED = 1,
459 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
462 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
464 int notificationType; /*
465 * 0 = MO intermediate result code
466 * 1 = MT unsolicited result code
468 int code; /* See 27.007 7.17
471 int index; /* CUG index. See 27.007 7.17. */
472 int type; /* "type" from 27.007 7.17 (MT only). */
473 char * number; /* "number" from 27.007 7.17
474 (MT only, may be NULL). */
475 } RIL_SuppSvcNotification;
477 #define RIL_CARD_MAX_APPS 8
480 RIL_CARDSTATE_ABSENT = 0,
481 RIL_CARDSTATE_PRESENT = 1,
482 RIL_CARDSTATE_ERROR = 2
486 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
487 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
488 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
489 since each app can only have 1 active perso
491 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
492 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
493 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
494 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
495 RIL_PERSOSUBSTATE_SIM_SIM = 7,
496 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
497 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
498 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
499 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
500 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
501 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
502 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
503 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
504 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
505 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
506 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
507 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
508 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
509 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
510 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
511 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
512 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
516 RIL_APPSTATE_UNKNOWN = 0,
517 RIL_APPSTATE_DETECTED = 1,
518 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
519 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
520 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
521 when app_state is assigned to this value */
522 RIL_APPSTATE_READY = 5
526 RIL_PINSTATE_UNKNOWN = 0,
527 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
528 RIL_PINSTATE_ENABLED_VERIFIED = 2,
529 RIL_PINSTATE_DISABLED = 3,
530 RIL_PINSTATE_ENABLED_BLOCKED = 4,
531 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
535 RIL_APPTYPE_UNKNOWN = 0,
537 RIL_APPTYPE_USIM = 2,
538 RIL_APPTYPE_RUIM = 3,
539 RIL_APPTYPE_CSIM = 4,
545 RIL_AppType app_type;
546 RIL_AppState app_state;
547 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
548 RIL_APPSTATE_SUBSCRIPTION_PERSO */
549 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
551 char *app_label_ptr; /* null terminated string */
552 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
557 /* Deprecated, use RIL_CardStatus_v6 */
560 RIL_CardState card_state;
561 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
562 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
563 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
564 int num_applications; /* value <= RIL_CARD_MAX_APPS */
565 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
570 RIL_CardState card_state;
571 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
572 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
573 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
574 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
575 int num_applications; /* value <= RIL_CARD_MAX_APPS */
576 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
579 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
580 * or as part of RIL_SimRefreshResponse_v7
583 /* A file on SIM has been updated. data[1] contains the EFID. */
585 /* SIM initialized. All files should be re-read. */
587 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
589 } RIL_SimRefreshResult;
592 RIL_SimRefreshResult result;
593 int ef_id; /* is the EFID of the updated file if the result is */
594 /* SIM_FILE_UPDATE or 0 for any other result. */
595 char * aid; /* is AID(application ID) of the card application */
596 /* See ETSI 102.221 8.1 and 101.220 4 */
597 /* For SIM_FILE_UPDATE result it can be set to AID of */
598 /* application in which updated EF resides or it can be */
599 /* NULL if EF is outside of an application. */
600 /* For SIM_INIT result this field is set to AID of */
601 /* application that caused REFRESH */
602 /* For SIM_RESET result it is NULL. */
603 } RIL_SimRefreshResponse_v7;
605 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
607 char * number; /* Remote party number */
608 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
609 char * name; /* Remote party name */
610 RIL_CDMA_SignalInfoRecord signalInfoRecord;
611 } RIL_CDMA_CallWaiting_v5;
614 char * number; /* Remote party number */
615 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
616 char * name; /* Remote party name */
617 RIL_CDMA_SignalInfoRecord signalInfoRecord;
618 /* Number type/Number plan required to support International Call Waiting */
619 int number_type; /* 0=Unknown, 1=International, 2=National,
620 3=Network specific, 4=subscriber */
621 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
622 } RIL_CDMA_CallWaiting_v6;
625 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
627 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
628 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
629 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
632 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
633 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
634 * and 9.4.4.2.3 for UMTS.
635 * All other values can be treated as empty CBM data coding scheme.
637 * selected 0 means message types specified in <fromServiceId, toServiceId>
638 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
640 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
641 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
648 unsigned char selected;
649 } RIL_GSM_BroadcastSmsConfigInfo;
651 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
652 #define RIL_RESTRICTED_STATE_NONE 0x00
653 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
654 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
655 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
656 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
657 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
658 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
659 /* Block packet data access due to restriction. */
660 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
662 /* The status for an OTASP/OTAPA session */
664 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
665 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
666 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
667 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
668 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
669 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
670 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
671 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
672 CDMA_OTA_PROVISION_STATUS_COMMITTED,
673 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
674 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
675 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
676 } RIL_CDMA_OTA_ProvisionStatus;
679 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
680 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
681 } RIL_GW_SignalStrength;
684 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
685 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
686 } RIL_SignalStrengthWcdma;
689 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
690 * multiplied by -1. Example: If the actual RSSI is -75, then this response
693 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
694 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
697 } RIL_CDMA_SignalStrength;
701 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
702 * multiplied by -1. Example: If the actual RSSI is -75, then this response
705 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
706 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
709 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
710 } RIL_EVDO_SignalStrength;
713 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
714 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
715 * Range: 44 to 140 dBm
716 * INT_MAX: 0x7FFFFFFF denotes invalid value.
717 * Reference: 3GPP TS 36.133 9.1.4 */
718 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
720 * INT_MAX: 0x7FFFFFFF denotes invalid value.
721 * Reference: 3GPP TS 36.133 9.1.7 */
722 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
723 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
724 * INT_MAX : 0x7FFFFFFF denotes invalid value.
725 * Reference: 3GPP TS 36.101 8.1.1 */
726 int cqi; /* The current Channel Quality Indicator.
728 * INT_MAX : 0x7FFFFFFF denotes invalid value.
729 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
730 } RIL_LTE_SignalStrength;
733 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
734 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
735 * Range: 44 to 140 dBm
736 * INT_MAX: 0x7FFFFFFF denotes invalid value.
737 * Reference: 3GPP TS 36.133 9.1.4 */
738 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
740 * INT_MAX: 0x7FFFFFFF denotes invalid value.
741 * Reference: 3GPP TS 36.133 9.1.7 */
742 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
743 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
744 * INT_MAX : 0x7FFFFFFF denotes invalid value.
745 * Reference: 3GPP TS 36.101 8.1.1 */
746 int cqi; /* The current Channel Quality Indicator.
748 * INT_MAX : 0x7FFFFFFF denotes invalid value.
749 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
750 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
751 * Approximate distance can be calculated using 300m/us * timingAdvance.
752 * Range: 0 to 0x7FFFFFFE
753 * INT_MAX : 0x7FFFFFFF denotes invalid value.
754 * Reference: 3GPP 36.321 section 6.1.3.5
755 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
756 } RIL_LTE_SignalStrength_v8;
758 /* Deprecated, use RIL_SignalStrength_v6 */
760 RIL_GW_SignalStrength GW_SignalStrength;
761 RIL_CDMA_SignalStrength CDMA_SignalStrength;
762 RIL_EVDO_SignalStrength EVDO_SignalStrength;
763 } RIL_SignalStrength_v5;
766 RIL_GW_SignalStrength GW_SignalStrength;
767 RIL_CDMA_SignalStrength CDMA_SignalStrength;
768 RIL_EVDO_SignalStrength EVDO_SignalStrength;
769 RIL_LTE_SignalStrength LTE_SignalStrength;
770 } RIL_SignalStrength_v6;
773 RIL_GW_SignalStrength GW_SignalStrength;
774 RIL_CDMA_SignalStrength CDMA_SignalStrength;
775 RIL_EVDO_SignalStrength EVDO_SignalStrength;
776 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
777 } RIL_SignalStrength_v8;
779 /** RIL_CellIdentityGsm */
781 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
782 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
783 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
784 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
785 } RIL_CellIdentityGsm;
787 /** RIL_CellIdentityWcdma */
789 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
790 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
791 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
792 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
793 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
794 } RIL_CellIdentityWcdma;
796 /** RIL_CellIdentityCdma */
798 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
799 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
800 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
801 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
802 * It is represented in units of 0.25 seconds and ranges from -2592000
803 * to 2592000, both values inclusive (corresponding to a range of -180
804 * to +180 degrees). INT_MAX if unknown */
806 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
807 * It is represented in units of 0.25 seconds and ranges from -1296000
808 * to 1296000, both values inclusive (corresponding to a range of -90
809 * to +90 degrees). INT_MAX if unknown */
810 } RIL_CellIdentityCdma;
812 /** RIL_CellIdentityLte */
814 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
815 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
816 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
817 int pci; /* physical cell id 0..503, INT_MAX if unknown */
818 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
819 } RIL_CellIdentityLte;
821 /** RIL_CellInfoGsm */
823 RIL_CellIdentityGsm cellIdentityGsm;
824 RIL_GW_SignalStrength signalStrengthGsm;
827 /** RIL_CellInfoWcdma */
829 RIL_CellIdentityWcdma cellIdentityWcdma;
830 RIL_SignalStrengthWcdma signalStrengthWcdma;
833 /** RIL_CellInfoCdma */
835 RIL_CellIdentityCdma cellIdentityCdma;
836 RIL_CDMA_SignalStrength signalStrengthCdma;
837 RIL_EVDO_SignalStrength signalStrengthEvdo;
840 /** RIL_CellInfoLte */
842 RIL_CellIdentityLte cellIdentityLte;
843 RIL_LTE_SignalStrength_v8 signalStrengthLte;
846 // Must be the same as CellInfo.TYPE_XXX
848 RIL_CELL_INFO_TYPE_GSM = 1,
849 RIL_CELL_INFO_TYPE_CDMA = 2,
850 RIL_CELL_INFO_TYPE_LTE = 3,
851 RIL_CELL_INFO_TYPE_WCDMA = 4,
854 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
856 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
857 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
858 RIL_TIMESTAMP_TYPE_MODEM = 2,
859 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
860 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
864 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
865 int registered; /* !0 if this cell is registered 0 if not registered */
866 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
867 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
870 RIL_CellInfoCdma cdma;
872 RIL_CellInfoWcdma wcdma;
876 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
878 RIL_CDMA_DISPLAY_INFO_REC,
879 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
880 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
881 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
882 RIL_CDMA_SIGNAL_INFO_REC,
883 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
884 RIL_CDMA_LINE_CONTROL_INFO_REC,
885 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
886 RIL_CDMA_T53_CLIR_INFO_REC,
887 RIL_CDMA_T53_RELEASE_INFO_REC,
888 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
889 } RIL_CDMA_InfoRecName;
891 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
892 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
893 Note: the Extended Display info rec contains multiple records of the
894 form: display_tag, display_len, and display_len occurrences of the
895 chari field if the display_tag is not 10000000 or 10000001.
896 To save space, the records are stored consecutively in a byte buffer.
897 The display_tag, display_len and chari fields are all 1 byte.
902 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
903 } RIL_CDMA_DisplayInfoRecord;
905 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
906 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
907 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
912 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
917 } RIL_CDMA_NumberInfoRecord;
919 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
921 RIL_REDIRECTING_REASON_UNKNOWN = 0,
922 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
923 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
924 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
925 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
926 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
927 RIL_REDIRECTING_REASON_RESERVED
928 } RIL_CDMA_RedirectingReason;
931 RIL_CDMA_NumberInfoRecord redirectingNumber;
932 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
933 RIL_CDMA_RedirectingReason redirectingReason;
934 } RIL_CDMA_RedirectingNumberInfoRecord;
936 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
938 char lineCtrlPolarityIncluded;
940 char lineCtrlReverse;
941 char lineCtrlPowerDenial;
942 } RIL_CDMA_LineControlInfoRecord;
944 /* T53 CLIR Information Record */
947 } RIL_CDMA_T53_CLIRInfoRecord;
949 /* T53 Audio Control Information Record */
953 } RIL_CDMA_T53_AudioControlInfoRecord;
957 RIL_CDMA_InfoRecName name;
960 /* Display and Extended Display Info Rec */
961 RIL_CDMA_DisplayInfoRecord display;
963 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
964 RIL_CDMA_NumberInfoRecord number;
966 /* Signal Info Rec */
967 RIL_CDMA_SignalInfoRecord signal;
969 /* Redirecting Number Info Rec */
970 RIL_CDMA_RedirectingNumberInfoRecord redir;
972 /* Line Control Info Rec */
973 RIL_CDMA_LineControlInfoRecord lineCtrl;
975 /* T53 CLIR Info Rec */
976 RIL_CDMA_T53_CLIRInfoRecord clir;
978 /* T53 Audio Control Info Rec */
979 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
981 } RIL_CDMA_InformationRecord;
983 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
986 char numberOfInfoRecs;
987 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
988 } RIL_CDMA_InformationRecords;
991 * RIL_REQUEST_GET_SIM_STATUS
993 * Requests status of the SIM interface and the SIM card
997 * "response" is const RIL_CardStatus_v6 *
1002 #define RIL_REQUEST_GET_SIM_STATUS 1
1005 * RIL_REQUEST_ENTER_SIM_PIN
1007 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
1009 * "data" is const char **
1010 * ((const char **)data)[0] is PIN value
1011 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1013 * "response" is int *
1014 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1019 * RADIO_NOT_AVAILABLE (radio resetting)
1021 * PASSWORD_INCORRECT
1024 #define RIL_REQUEST_ENTER_SIM_PIN 2
1028 * RIL_REQUEST_ENTER_SIM_PUK
1030 * Supplies SIM PUK and new PIN.
1032 * "data" is const char **
1033 * ((const char **)data)[0] is PUK value
1034 * ((const char **)data)[1] is new PIN value
1035 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1037 * "response" is int *
1038 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1043 * RADIO_NOT_AVAILABLE (radio resetting)
1045 * PASSWORD_INCORRECT
1049 #define RIL_REQUEST_ENTER_SIM_PUK 3
1052 * RIL_REQUEST_ENTER_SIM_PIN2
1054 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1055 * returned as a a failure from a previous operation.
1057 * "data" is const char **
1058 * ((const char **)data)[0] is PIN2 value
1059 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1061 * "response" is int *
1062 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1067 * RADIO_NOT_AVAILABLE (radio resetting)
1069 * PASSWORD_INCORRECT
1072 #define RIL_REQUEST_ENTER_SIM_PIN2 4
1075 * RIL_REQUEST_ENTER_SIM_PUK2
1077 * Supplies SIM PUK2 and new PIN2.
1079 * "data" is const char **
1080 * ((const char **)data)[0] is PUK2 value
1081 * ((const char **)data)[1] is new PIN2 value
1082 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1084 * "response" is int *
1085 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1090 * RADIO_NOT_AVAILABLE (radio resetting)
1092 * PASSWORD_INCORRECT
1096 #define RIL_REQUEST_ENTER_SIM_PUK2 5
1099 * RIL_REQUEST_CHANGE_SIM_PIN
1101 * Supplies old SIM PIN and new PIN.
1103 * "data" is const char **
1104 * ((const char **)data)[0] is old PIN value
1105 * ((const char **)data)[1] is new PIN value
1106 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1108 * "response" is int *
1109 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1114 * RADIO_NOT_AVAILABLE (radio resetting)
1116 * PASSWORD_INCORRECT
1117 * (old PIN is invalid)
1121 #define RIL_REQUEST_CHANGE_SIM_PIN 6
1125 * RIL_REQUEST_CHANGE_SIM_PIN2
1127 * Supplies old SIM PIN2 and new PIN2.
1129 * "data" is const char **
1130 * ((const char **)data)[0] is old PIN2 value
1131 * ((const char **)data)[1] is new PIN2 value
1132 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1134 * "response" is int *
1135 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1140 * RADIO_NOT_AVAILABLE (radio resetting)
1142 * PASSWORD_INCORRECT
1143 * (old PIN2 is invalid)
1147 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
1150 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1152 * Requests that network personlization be deactivated
1154 * "data" is const char **
1155 * ((const char **)(data))[0]] is network depersonlization code
1157 * "response" is int *
1158 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1163 * RADIO_NOT_AVAILABLE (radio resetting)
1165 * PASSWORD_INCORRECT
1169 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1172 * RIL_REQUEST_GET_CURRENT_CALLS
1174 * Requests current call list
1178 * "response" must be a "const RIL_Call **"
1183 * RADIO_NOT_AVAILABLE (radio resetting)
1185 * (request will be made again in a few hundred msec)
1188 #define RIL_REQUEST_GET_CURRENT_CALLS 9
1194 * Initiate voice call
1196 * "data" is const RIL_Dial *
1197 * "response" is NULL
1199 * This method is never used for supplementary service codes
1203 * RADIO_NOT_AVAILABLE (radio resetting)
1206 #define RIL_REQUEST_DIAL 10
1209 * RIL_REQUEST_GET_IMSI
1213 * Only valid when radio state is "RADIO_STATE_ON"
1215 * "data" is const char **
1216 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1217 * "response" is a const char * containing the IMSI
1221 * RADIO_NOT_AVAILABLE (radio resetting)
1225 #define RIL_REQUEST_GET_IMSI 11
1228 * RIL_REQUEST_HANGUP
1230 * Hang up a specific line (like AT+CHLD=1x)
1232 * After this HANGUP request returns, RIL should show the connection is NOT
1233 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1235 * "data" is an int *
1236 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1238 * "response" is NULL
1242 * RADIO_NOT_AVAILABLE (radio resetting)
1246 #define RIL_REQUEST_HANGUP 12
1249 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1251 * Hang up waiting or held (like AT+CHLD=0)
1253 * After this HANGUP request returns, RIL should show the connection is NOT
1254 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1257 * "response" is NULL
1261 * RADIO_NOT_AVAILABLE (radio resetting)
1265 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1268 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1270 * Hang up waiting or held (like AT+CHLD=1)
1272 * After this HANGUP request returns, RIL should show the connection is NOT
1273 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1276 * "response" is NULL
1280 * RADIO_NOT_AVAILABLE (radio resetting)
1284 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1287 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1289 * Switch waiting or holding call and active call (like AT+CHLD=2)
1291 * State transitions should be is follows:
1293 * If call 1 is waiting and call 2 is active, then if this re
1296 * Call 1 Call 2 Call 1 Call 2
1297 * ACTIVE HOLDING HOLDING ACTIVE
1298 * ACTIVE WAITING HOLDING ACTIVE
1299 * HOLDING WAITING HOLDING ACTIVE
1300 * ACTIVE IDLE HOLDING IDLE
1301 * IDLE IDLE IDLE IDLE
1304 * "response" is NULL
1308 * RADIO_NOT_AVAILABLE (radio resetting)
1312 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1313 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1316 * RIL_REQUEST_CONFERENCE
1318 * Conference holding and active (like AT+CHLD=3)
1321 * "response" is NULL
1325 * RADIO_NOT_AVAILABLE (radio resetting)
1328 #define RIL_REQUEST_CONFERENCE 16
1333 * Send UDUB (user determined used busy) to ringing or
1334 * waiting call answer)(RIL_BasicRequest r);
1337 * "response" is NULL
1341 * RADIO_NOT_AVAILABLE (radio resetting)
1344 #define RIL_REQUEST_UDUB 17
1347 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1349 * Requests the failure cause code for the most recently terminated call
1352 * "response" is a "int *"
1353 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
1354 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1355 * failure reasons are derived from the possible call failure scenarios
1356 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
1358 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1359 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1361 * If the implementation does not have access to the exact cause codes,
1362 * then it should return one of the values listed in RIL_LastCallFailCause,
1363 * as the UI layer needs to distinguish these cases for tone generation or
1364 * error notification.
1368 * RADIO_NOT_AVAILABLE
1371 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1373 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1376 * RIL_REQUEST_SIGNAL_STRENGTH
1378 * Requests current signal strength and associated information
1380 * Must succeed if radio is on.
1384 * "response" is a const RIL_SignalStrength *
1388 * RADIO_NOT_AVAILABLE
1390 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1393 * RIL_REQUEST_VOICE_REGISTRATION_STATE
1395 * Request current registration state
1398 * "response" is a "char **"
1399 * ((const char **)response)[0] is registration state 0-6,
1400 * 0 - Not registered, MT is not currently searching
1401 * a new operator to register
1402 * 1 - Registered, home network
1403 * 2 - Not registered, but MT is currently searching
1404 * a new operator to register
1405 * 3 - Registration denied
1407 * 5 - Registered, roaming
1408 * 10 - Same as 0, but indicates that emergency calls
1410 * 12 - Same as 2, but indicates that emergency calls
1412 * 13 - Same as 3, but indicates that emergency calls
1414 * 14 - Same as 4, but indicates that emergency calls
1417 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1418 * NULL if not.Valid LAC are 0x0000 - 0xffff
1419 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1421 * Valid CID are 0x00000000 - 0xffffffff
1422 * In GSM, CID is Cell ID (see TS 27.007)
1424 * In UMTS, CID is UMTS Cell Identity
1425 * (see TS 25.331) in 28 bits
1426 * ((const char **)response)[3] indicates the available voice radio technology,
1427 * valid values as defined by RIL_RadioTechnology.
1428 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1429 * system or NULL if not. Base Station ID in
1431 * ((const char **)response)[5] is Base Station latitude if registered on a
1432 * CDMA system or NULL if not. Base Station
1433 * latitude is a decimal number as specified in
1434 * 3GPP2 C.S0005-A v6.0. It is represented in
1435 * units of 0.25 seconds and ranges from -1296000
1436 * to 1296000, both values inclusive (corresponding
1437 * to a range of -90 to +90 degrees).
1438 * ((const char **)response)[6] is Base Station longitude if registered on a
1439 * CDMA system or NULL if not. Base Station
1440 * longitude is a decimal number as specified in
1441 * 3GPP2 C.S0005-A v6.0. It is represented in
1442 * units of 0.25 seconds and ranges from -2592000
1443 * to 2592000, both values inclusive (corresponding
1444 * to a range of -180 to +180 degrees).
1445 * ((const char **)response)[7] is concurrent services support indicator if
1446 * registered on a CDMA system 0-1.
1447 * 0 - Concurrent services not supported,
1448 * 1 - Concurrent services supported
1449 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1450 * NULL if not. Valid System ID are 0 - 32767
1451 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1452 * NULL if not. Valid System ID are 0 - 65535
1453 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1454 * on a CDMA or EVDO system or NULL if not. Valid values
1456 * ((const char **)response)[11] indicates whether the current system is in the
1457 * PRL if registered on a CDMA or EVDO system or NULL if
1458 * not. 0=not in the PRL, 1=in the PRL
1459 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1460 * if registered on a CDMA or EVDO system or NULL if not.
1461 * Valid values are 0-255.
1462 * ((const char **)response)[13] if registration state is 3 (Registration
1463 * denied) this is an enumerated reason why
1464 * registration was denied. See 3GPP TS 24.008,
1465 * 10.5.3.6 and Annex G.
1467 * 1 - Authentication Failure
1468 * 2 - IMSI unknown in HLR
1471 * 5 - PLMN not allowed
1472 * 6 - Location area not allowed
1473 * 7 - Roaming not allowed
1474 * 8 - No Suitable Cells in this Location Area
1475 * 9 - Network failure
1476 * 10 - Persistent location update reject
1477 * 11 - PLMN not allowed
1478 * 12 - Location area not allowed
1479 * 13 - Roaming not allowed in this Location Area
1480 * 15 - No Suitable Cells in this Location Area
1481 * 17 - Network Failure
1485 * 23 - GSM Authentication unacceptable
1486 * 25 - Not Authorized for this CSG
1487 * 32 - Service option not supported
1488 * 33 - Requested service option not subscribed
1489 * 34 - Service option temporarily out of order
1490 * 38 - Call cannot be identified
1491 * 48-63 - Retry upon entry into a new cell
1492 * 95 - Semantically incorrect message
1493 * 96 - Invalid mandatory information
1494 * 97 - Message type non-existent or not implemented
1495 * 98 - Message not compatible with protocol state
1496 * 99 - Information element non-existent or not implemented
1497 * 100 - Conditional IE error
1498 * 101 - Message not compatible with protocol state
1499 * 111 - Protocol error, unspecified
1500 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1501 * cell as described in TS 25.331, in hexadecimal
1502 * format, or NULL if unknown or not registered
1503 * to a UMTS network.
1505 * Please note that registration state 4 ("unknown") is treated
1506 * as "out of service" in the Android telephony system
1508 * Registration state 3 can be returned if Location Update Reject
1509 * (with cause 17 - Network Failure) is received repeatedly from the network,
1510 * to facilitate "managed roaming"
1514 * RADIO_NOT_AVAILABLE
1517 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
1520 * RIL_REQUEST_DATA_REGISTRATION_STATE
1522 * Request current DATA registration state
1525 * "response" is a "char **"
1526 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1527 * ((const char **)response)[1] is LAC if registered or NULL if not
1528 * ((const char **)response)[2] is CID if registered or NULL if not
1529 * ((const char **)response)[3] indicates the available data radio technology,
1530 * valid values as defined by RIL_RadioTechnology.
1531 * ((const char **)response)[4] if registration state is 3 (Registration
1532 * denied) this is an enumerated reason why
1533 * registration was denied. See 3GPP TS 24.008,
1534 * Annex G.6 "Additonal cause codes for GMM".
1535 * 7 == GPRS services not allowed
1536 * 8 == GPRS services and non-GPRS services not allowed
1537 * 9 == MS identity cannot be derived by the network
1538 * 10 == Implicitly detached
1539 * 14 == GPRS services not allowed in this PLMN
1540 * 16 == MSC temporarily not reachable
1541 * 40 == No PDP context activated
1542 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1543 * established using RIL_REQUEST_SETUP_DATA_CALL.
1545 * The values at offsets 6..10 are optional LTE location information in decimal.
1546 * If a value is unknown that value may be NULL. If all values are NULL,
1547 * none need to be present.
1548 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1549 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1550 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1551 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1552 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1554 * LAC and CID are in hexadecimal format.
1555 * valid LAC are 0x0000 - 0xffff
1556 * valid CID are 0x00000000 - 0x0fffffff
1558 * Please note that registration state 4 ("unknown") is treated
1559 * as "out of service" in the Android telephony system
1563 * RADIO_NOT_AVAILABLE
1566 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
1569 * RIL_REQUEST_OPERATOR
1571 * Request current operator ONS or EONS
1574 * "response" is a "const char **"
1575 * ((const char **)response)[0] is long alpha ONS or EONS
1576 * or NULL if unregistered
1578 * ((const char **)response)[1] is short alpha ONS or EONS
1579 * or NULL if unregistered
1580 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1581 * or NULL if unregistered
1585 * RADIO_NOT_AVAILABLE
1588 #define RIL_REQUEST_OPERATOR 22
1591 * RIL_REQUEST_RADIO_POWER
1593 * Toggle radio on and off (for "airplane" mode)
1594 * If the radio is is turned off/on the radio modem subsystem
1595 * is expected return to an initialized state. For instance,
1596 * any voice and data calls will be terminated and all associated
1600 * ((int *)data)[0] is > 0 for "Radio On"
1601 * ((int *)data)[0] is == 0 for "Radio Off"
1603 * "response" is NULL
1605 * Turn radio on if "on" > 0
1606 * Turn radio off if "on" == 0
1610 * RADIO_NOT_AVAILABLE
1613 #define RIL_REQUEST_RADIO_POWER 23
1620 * If the implementation is currently playing a tone requested via
1621 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1622 * should be played instead
1624 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
1625 * "response" is NULL
1627 * FIXME should this block/mute microphone?
1628 * How does this interact with local DTMF feedback?
1632 * RADIO_NOT_AVAILABLE
1635 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1638 #define RIL_REQUEST_DTMF 24
1641 * RIL_REQUEST_SEND_SMS
1643 * Send an SMS message
1645 * "data" is const char **
1646 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1647 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1648 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1649 * less the SMSC address
1650 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1652 * "response" is a const RIL_SMS_Response *
1654 * Based on the return error, caller decides to resend if sending sms
1655 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1656 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1660 * RADIO_NOT_AVAILABLE
1661 * SMS_SEND_FAIL_RETRY
1665 * FIXME how do we specify TP-Message-Reference if we need to resend?
1667 #define RIL_REQUEST_SEND_SMS 25
1671 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1673 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1674 * except that more messages are expected to be sent soon. If possible,
1675 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1677 * "data" is const char **
1678 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1679 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1680 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1681 * less the SMSC address
1682 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1684 * "response" is a const RIL_SMS_Response *
1686 * Based on the return error, caller decides to resend if sending sms
1687 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1688 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1692 * RADIO_NOT_AVAILABLE
1693 * SMS_SEND_FAIL_RETRY
1697 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1701 * RIL_REQUEST_SETUP_DATA_CALL
1703 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1704 * return success it is added to the list of data calls and a
1705 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1706 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1707 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1708 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
1710 * The RIL is expected to:
1711 * - Create one data call context.
1712 * - Create and configure a dedicated interface for the context
1713 * - The interface must be point to point.
1714 * - The interface is configured with one or more addresses and
1715 * is capable of sending and receiving packets. The prefix length
1716 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1717 * - Must NOT change the linux routing table.
1718 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
1719 * number of simultaneous data call contexts.
1721 * "data" is a const char **
1722 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1723 * for values above 2 this is RIL_RadioTechnology + 2.
1724 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
1725 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1726 * override the one in the profile. NULL indicates no APN overrride.
1727 * ((const char **)data)[3] is the username for APN, or NULL
1728 * ((const char **)data)[4] is the password for APN, or NULL
1729 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1730 * 0 => PAP and CHAP is never performed.
1731 * 1 => PAP may be performed; CHAP is never performed.
1732 * 2 => CHAP may be performed; PAP is never performed.
1733 * 3 => PAP / CHAP may be performed - baseband dependent.
1734 * ((const char **)data)[6] is the connection type to request must be one of the
1735 * PDP_type values in TS 27.007 section 10.1.1.
1736 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1737 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
1739 * "response" is a RIL_Data_Call_Response_v6
1741 * FIXME may need way to configure QoS settings
1744 * SUCCESS should be returned on both success and failure of setup with
1745 * the RIL_Data_Call_Response_v6.status containing the actual status.
1746 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
1748 * Other errors could include:
1749 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1750 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
1752 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1754 #define RIL_REQUEST_SETUP_DATA_CALL 27
1758 * RIL_REQUEST_SIM_IO
1760 * Request SIM I/O operation.
1761 * This is similar to the TS 27.007 "restricted SIM" operation
1762 * where it assumes all of the EF selection will be done by the
1765 * "data" is a const RIL_SIM_IO_v6 *
1766 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1767 * or may specify a PIN2 for operations that require a PIN2 (eg
1768 * updating FDN records)
1770 * "response" is a const RIL_SIM_IO_Response *
1772 * Arguments and responses that are unused for certain
1773 * values of "command" should be ignored or set to NULL
1777 * RADIO_NOT_AVAILABLE
1782 #define RIL_REQUEST_SIM_IO 28
1785 * RIL_REQUEST_SEND_USSD
1787 * Send a USSD message
1789 * If a USSD session already exists, the message should be sent in the
1790 * context of that session. Otherwise, a new session should be created.
1792 * The network reply should be reported via RIL_UNSOL_ON_USSD
1794 * Only one USSD session may exist at a time, and the session is assumed
1796 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1797 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1798 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1800 * "data" is a const char * containing the USSD request in UTF-8 format
1801 * "response" is NULL
1805 * RADIO_NOT_AVAILABLE
1809 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1812 #define RIL_REQUEST_SEND_USSD 29
1815 * RIL_REQUEST_CANCEL_USSD
1817 * Cancel the current USSD session if one exists
1820 * "response" is NULL
1824 * RADIO_NOT_AVAILABLE
1828 #define RIL_REQUEST_CANCEL_USSD 30
1831 * RIL_REQUEST_GET_CLIR
1833 * Gets current CLIR status
1835 * "response" is int *
1836 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1837 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
1841 * RADIO_NOT_AVAILABLE
1844 #define RIL_REQUEST_GET_CLIR 31
1847 * RIL_REQUEST_SET_CLIR
1850 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
1852 * "response" is NULL
1856 * RADIO_NOT_AVAILABLE
1859 #define RIL_REQUEST_SET_CLIR 32
1862 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
1864 * "data" is const RIL_CallForwardInfo *
1866 * "response" is const RIL_CallForwardInfo **
1867 * "response" points to an array of RIL_CallForwardInfo *'s, one for
1868 * each distinct registered phone number.
1870 * For example, if data is forwarded to +18005551212 and voice is forwarded
1871 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
1873 * If, however, both data and voice are forwarded to +18005551212, then
1874 * a single RIL_CallForwardInfo can be returned with the service class
1875 * set to "data + voice = 3")
1879 * RADIO_NOT_AVAILABLE
1882 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
1886 * RIL_REQUEST_SET_CALL_FORWARD
1888 * Configure call forward rule
1890 * "data" is const RIL_CallForwardInfo *
1891 * "response" is NULL
1895 * RADIO_NOT_AVAILABLE
1898 #define RIL_REQUEST_SET_CALL_FORWARD 34
1902 * RIL_REQUEST_QUERY_CALL_WAITING
1904 * Query current call waiting state
1906 * "data" is const int *
1907 * ((const int *)data)[0] is the TS 27.007 service class to query.
1908 * "response" is a const int *
1909 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
1911 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
1912 * must follow, with the TS 27.007 service class bit vector of services
1913 * for which call waiting is enabled.
1915 * For example, if ((const int *)response)[0] is 1 and
1916 * ((const int *)response)[1] is 3, then call waiting is enabled for data
1917 * and voice and disabled for everything else
1921 * RADIO_NOT_AVAILABLE
1924 #define RIL_REQUEST_QUERY_CALL_WAITING 35
1928 * RIL_REQUEST_SET_CALL_WAITING
1930 * Configure current call waiting state
1932 * "data" is const int *
1933 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
1934 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
1935 * services to modify
1936 * "response" is NULL
1940 * RADIO_NOT_AVAILABLE
1943 #define RIL_REQUEST_SET_CALL_WAITING 36
1946 * RIL_REQUEST_SMS_ACKNOWLEDGE
1948 * Acknowledge successful or failed receipt of SMS previously indicated
1949 * via RIL_UNSOL_RESPONSE_NEW_SMS
1952 * ((int *)data)[0] is 1 on successful receipt
1953 * (basically, AT+CNMA=1 from TS 27.005
1954 * is 0 on failed receipt
1955 * (basically, AT+CNMA=2 from TS 27.005)
1956 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
1957 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
1958 * capacity exceeded) and 0xFF (unspecified error) are
1961 * "response" is NULL
1963 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
1967 * RADIO_NOT_AVAILABLE
1970 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
1973 * RIL_REQUEST_GET_IMEI - DEPRECATED
1975 * Get the device IMEI, including check digit
1977 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1978 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
1981 * "response" is a const char * containing the IMEI
1985 * RADIO_NOT_AVAILABLE (radio resetting)
1989 #define RIL_REQUEST_GET_IMEI 38
1992 * RIL_REQUEST_GET_IMEISV - DEPRECATED
1994 * Get the device IMEISV, which should be two decimal digits
1996 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
1997 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2000 * "response" is a const char * containing the IMEISV
2004 * RADIO_NOT_AVAILABLE (radio resetting)
2008 #define RIL_REQUEST_GET_IMEISV 39
2012 * RIL_REQUEST_ANSWER
2014 * Answer incoming call
2016 * Will not be called for WAITING calls.
2017 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2021 * "response" is NULL
2025 * RADIO_NOT_AVAILABLE (radio resetting)
2029 #define RIL_REQUEST_ANSWER 40
2032 * RIL_REQUEST_DEACTIVATE_DATA_CALL
2034 * Deactivate packet data connection and remove from the
2035 * data call list if SUCCESS is returned. Any other return
2036 * values should also try to remove the call from the list,
2037 * but that may not be possible. In any event a
2038 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2039 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2040 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
2042 * "data" is const char **
2043 * ((char**)data)[0] indicating CID
2044 * ((char**)data)[1] indicating Disconnect Reason
2045 * 0 => No specific reason specified
2046 * 1 => Radio shutdown requested
2048 * "response" is NULL
2052 * RADIO_NOT_AVAILABLE
2055 * See also: RIL_REQUEST_SETUP_DATA_CALL
2057 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
2060 * RIL_REQUEST_QUERY_FACILITY_LOCK
2062 * Query the status of a facility lock state
2064 * "data" is const char **
2065 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
2066 * (eg "AO" for BAOC, "SC" for SIM lock)
2067 * ((const char **)data)[1] is the password, or "" if not required
2068 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2070 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2071 * This is only applicable in the case of Fixed Dialing Numbers
2074 * "response" is an int *
2075 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
2076 * services for which the specified barring facility
2077 * is active. "0" means "disabled for all"
2082 * RADIO_NOT_AVAILABLE
2086 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2089 * RIL_REQUEST_SET_FACILITY_LOCK
2091 * Enable/disable one facility lock
2093 * "data" is const char **
2095 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2096 * (eg "AO" for BAOC)
2097 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2098 * ((const char **)data)[2] = password
2099 * ((const char **)data)[3] = string representation of decimal TS 27.007
2100 * service class bit vector. Eg, the string
2101 * "1" means "set this facility for voice services"
2102 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2103 * This is only applicable in the case of Fixed Dialing Numbers
2106 * "response" is int *
2107 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2111 * RADIO_NOT_AVAILABLE
2115 #define RIL_REQUEST_SET_FACILITY_LOCK 43
2118 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2120 * Change call barring facility password
2122 * "data" is const char **
2124 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2125 * (eg "AO" for BAOC)
2126 * ((const char **)data)[1] = old password
2127 * ((const char **)data)[2] = new password
2129 * "response" is NULL
2133 * RADIO_NOT_AVAILABLE
2137 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2140 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2142 * Query current network selectin mode
2146 * "response" is int *
2147 * ((const int *)response)[0] is
2148 * 0 for automatic selection
2149 * 1 for manual selection
2153 * RADIO_NOT_AVAILABLE
2157 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2160 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2162 * Specify that the network should be selected automatically
2165 * "response" is NULL
2167 * This request must not respond until the new operator is selected
2172 * RADIO_NOT_AVAILABLE
2176 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2177 * no retries needed, such as illegal SIM or ME.
2178 * Returns GENERIC_FAILURE for all other causes that might be
2182 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2185 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2187 * Manually select a specified network.
2189 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2190 * "response" is NULL
2192 * This request must not respond until the new operator is selected
2197 * RADIO_NOT_AVAILABLE
2201 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2202 * no retries needed, such as illegal SIM or ME.
2203 * Returns GENERIC_FAILURE for all other causes that might be
2207 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2210 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2212 * Scans for available networks
2215 * "response" is const char ** that should be an array of n*4 strings, where
2216 * n is the number of available networks
2217 * For each available network:
2219 * ((const char **)response)[n+0] is long alpha ONS or EONS
2220 * ((const char **)response)[n+1] is short alpha ONS or EONS
2221 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2222 * ((const char **)response)[n+3] is a string value of the status:
2228 * This request must not respond until the new operator is selected
2233 * RADIO_NOT_AVAILABLE
2237 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2240 * RIL_REQUEST_DTMF_START
2242 * Start playing a DTMF tone. Continue playing DTMF tone until
2243 * RIL_REQUEST_DTMF_STOP is received
2245 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2246 * it should cancel the previous tone and play the new one.
2248 * "data" is a char *
2249 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2250 * "response" is NULL
2254 * RADIO_NOT_AVAILABLE
2257 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2259 #define RIL_REQUEST_DTMF_START 49
2262 * RIL_REQUEST_DTMF_STOP
2264 * Stop playing a currently playing DTMF tone.
2267 * "response" is NULL
2271 * RADIO_NOT_AVAILABLE
2274 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2276 #define RIL_REQUEST_DTMF_STOP 50
2279 * RIL_REQUEST_BASEBAND_VERSION
2281 * Return string value indicating baseband version, eg
2282 * response from AT+CGMR
2285 * "response" is const char * containing version string for log reporting
2289 * RADIO_NOT_AVAILABLE
2293 #define RIL_REQUEST_BASEBAND_VERSION 51
2296 * RIL_REQUEST_SEPARATE_CONNECTION
2298 * Separate a party from a multiparty call placing the multiparty call
2299 * (less the specified party) on hold and leaving the specified party
2300 * as the only other member of the current (active) call
2304 * See TS 22.084 1.3.8.2 (iii)
2305 * TS 22.030 6.5.5 "Entering "2X followed by send"
2306 * TS 27.007 "AT+CHLD=2x"
2308 * "data" is an int *
2309 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2311 * "response" is NULL
2315 * RADIO_NOT_AVAILABLE (radio resetting)
2318 #define RIL_REQUEST_SEPARATE_CONNECTION 52
2322 * RIL_REQUEST_SET_MUTE
2324 * Turn on or off uplink (microphone) mute.
2326 * Will only be sent while voice call is active.
2327 * Will always be reset to "disable mute" when a new voice call is initiated
2329 * "data" is an int *
2330 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2332 * "response" is NULL
2336 * RADIO_NOT_AVAILABLE (radio resetting)
2340 #define RIL_REQUEST_SET_MUTE 53
2343 * RIL_REQUEST_GET_MUTE
2345 * Queries the current state of the uplink mute setting
2348 * "response" is an int *
2349 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2353 * RADIO_NOT_AVAILABLE (radio resetting)
2357 #define RIL_REQUEST_GET_MUTE 54
2360 * RIL_REQUEST_QUERY_CLIP
2362 * Queries the status of the CLIP supplementary service
2364 * (for MMI code "*#30#")
2367 * "response" is an int *
2368 * (int *)response)[0] is 1 for "CLIP provisioned"
2369 * and 0 for "CLIP not provisioned"
2370 * and 2 for "unknown, e.g. no network etc"
2374 * RADIO_NOT_AVAILABLE (radio resetting)
2378 #define RIL_REQUEST_QUERY_CLIP 55
2381 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2382 * field in RIL_Data_Call_Response_v6.
2384 * Requests the failure cause code for the most recently failed PDP
2385 * context or CDMA data connection active
2386 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
2390 * "response" is a "int *"
2391 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2392 * section 6.1.3.1.3 or close approximation
2394 * If the implementation does not have access to the exact cause codes,
2395 * then it should return one of the values listed in
2396 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
2397 * cases for error notification
2398 * and potential retries.
2402 * RADIO_NOT_AVAILABLE
2405 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2407 * Deprecated use the status field in RIL_Data_Call_Response_v6.
2410 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
2413 * RIL_REQUEST_DATA_CALL_LIST
2415 * Returns the data call list. An entry is added when a
2416 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2417 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2418 * when RIL_REQUEST_RADIO_POWER off/on is issued.
2421 * "response" is an array of RIL_Data_Call_Response_v6
2425 * RADIO_NOT_AVAILABLE (radio resetting)
2428 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
2431 #define RIL_REQUEST_DATA_CALL_LIST 57
2434 * RIL_REQUEST_RESET_RADIO - DEPRECATED
2436 * Request a radio reset. The RIL implementation may postpone
2437 * the reset until after this request is responded to if the baseband
2438 * is presently busy.
2440 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2443 * "response" is NULL
2447 * RADIO_NOT_AVAILABLE (radio resetting)
2449 * REQUEST_NOT_SUPPORTED
2452 #define RIL_REQUEST_RESET_RADIO 58
2455 * RIL_REQUEST_OEM_HOOK_RAW
2457 * This request reserved for OEM-specific uses. It passes raw byte arrays
2460 * It can be invoked on the Java side from
2461 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2463 * "data" is a char * of bytes copied from the byte[] data argument in java
2464 * "response" is a char * of bytes that will returned via the
2465 * caller's "response" Message here:
2466 * (byte[])(((AsyncResult)response.obj).result)
2468 * An error response here will result in
2469 * (((AsyncResult)response.obj).result) == null and
2470 * (((AsyncResult)response.obj).exception) being an instance of
2471 * com.android.internal.telephony.gsm.CommandException
2477 #define RIL_REQUEST_OEM_HOOK_RAW 59
2480 * RIL_REQUEST_OEM_HOOK_STRINGS
2482 * This request reserved for OEM-specific uses. It passes strings
2485 * It can be invoked on the Java side from
2486 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2488 * "data" is a const char **, representing an array of null-terminated UTF-8
2489 * strings copied from the "String[] strings" argument to
2490 * invokeOemRilRequestStrings()
2492 * "response" is a const char **, representing an array of null-terminated UTF-8
2493 * stings that will be returned via the caller's response message here:
2495 * (String[])(((AsyncResult)response.obj).result)
2497 * An error response here will result in
2498 * (((AsyncResult)response.obj).result) == null and
2499 * (((AsyncResult)response.obj).exception) being an instance of
2500 * com.android.internal.telephony.gsm.CommandException
2506 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2509 * RIL_REQUEST_SCREEN_STATE
2511 * Indicates the current state of the screen. When the screen is off, the
2512 * RIL should notify the baseband to suppress certain notifications (eg,
2513 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2514 * in an effort to conserve power. These notifications should resume when the
2518 * ((int *)data)[0] is == 1 for "Screen On"
2519 * ((int *)data)[0] is == 0 for "Screen Off"
2521 * "response" is NULL
2527 #define RIL_REQUEST_SCREEN_STATE 61
2531 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2533 * Enables/disables supplementary service related notifications
2536 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2539 * ((int *)data)[0] is == 1 for notifications enabled
2540 * ((int *)data)[0] is == 0 for notifications disabled
2542 * "response" is NULL
2546 * RADIO_NOT_AVAILABLE
2549 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2551 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2554 * RIL_REQUEST_WRITE_SMS_TO_SIM
2556 * Stores a SMS message to SIM memory.
2558 * "data" is RIL_SMS_WriteArgs *
2560 * "response" is int *
2561 * ((const int *)response)[0] is the record index where the message is stored.
2568 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2571 * RIL_REQUEST_DELETE_SMS_ON_SIM
2573 * Deletes a SMS message from SIM memory.
2576 * ((int *)data)[0] is the record index of the message to delete.
2578 * "response" is NULL
2585 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2588 * RIL_REQUEST_SET_BAND_MODE
2590 * Assign a specified band for RF configuration.
2593 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2594 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2595 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2596 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2597 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2598 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2599 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2600 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2601 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2602 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2603 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2604 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2605 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2606 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2607 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2608 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2609 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2610 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2611 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2613 * "response" is NULL
2617 * RADIO_NOT_AVAILABLE
2620 #define RIL_REQUEST_SET_BAND_MODE 65
2623 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2625 * Query the list of band mode supported by RF.
2629 * "response" is int *
2630 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2631 * each available band mode.
2633 * 0 for "unspecified" (selected by baseband automatically)
2634 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2635 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2636 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2637 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2638 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2639 * 6 for "Cellular (800-MHz Band)"
2640 * 7 for "PCS (1900-MHz Band)"
2641 * 8 for "Band Class 3 (JTACS Band)"
2642 * 9 for "Band Class 4 (Korean PCS Band)"
2643 * 10 for "Band Class 5 (450-MHz Band)"
2644 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2645 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2646 * 13 for "Band Class 8 (1800-MHz Band)"
2647 * 14 for "Band Class 9 (900-MHz Band)"
2648 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2649 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2650 * 17 for "Band Class 15 (AWS Band)"
2651 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2655 * RADIO_NOT_AVAILABLE
2658 * See also: RIL_REQUEST_SET_BAND_MODE
2660 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2663 * RIL_REQUEST_STK_GET_PROFILE
2665 * Requests the profile of SIM tool kit.
2666 * The profile indicates the SAT/USAT features supported by ME.
2667 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2671 * "response" is a const char * containing SAT/USAT profile
2672 * in hexadecimal format string starting with first byte of terminal profile
2676 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2677 * RIL_E_GENERIC_FAILURE
2679 #define RIL_REQUEST_STK_GET_PROFILE 67
2682 * RIL_REQUEST_STK_SET_PROFILE
2684 * Download the STK terminal profile as part of SIM initialization
2687 * "data" is a const char * containing SAT/USAT profile
2688 * in hexadecimal format string starting with first byte of terminal profile
2690 * "response" is NULL
2694 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2695 * RIL_E_GENERIC_FAILURE
2697 #define RIL_REQUEST_STK_SET_PROFILE 68
2700 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2702 * Requests to send a SAT/USAT envelope command to SIM.
2703 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2705 * "data" is a const char * containing SAT/USAT command
2706 * in hexadecimal format string starting with command tag
2708 * "response" is a const char * containing SAT/USAT response
2709 * in hexadecimal format string starting with first byte of response
2714 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2715 * RIL_E_GENERIC_FAILURE
2717 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2720 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2722 * Requests to send a terminal response to SIM for a received
2725 * "data" is a const char * containing SAT/USAT response
2726 * in hexadecimal format string starting with first byte of response data
2728 * "response" is NULL
2732 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2733 * RIL_E_GENERIC_FAILURE
2735 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2738 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2740 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2741 * been initialized by ME already. (We could see the call has been in the 'call
2742 * list') So, STK application needs to accept/reject the call according as user
2746 * ((int *)data)[0] is > 0 for "accept" the call setup
2747 * ((int *)data)[0] is == 0 for "reject" the call setup
2749 * "response" is NULL
2753 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2754 * RIL_E_GENERIC_FAILURE
2756 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2759 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2761 * Connects the two calls and disconnects the subscriber from both calls.
2764 * "response" is NULL
2768 * RADIO_NOT_AVAILABLE (radio resetting)
2771 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2774 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2776 * Requests to set the preferred network type for searching and registering
2777 * (CS/PS domain, RAT, and operation mode)
2779 * "data" is int * which is RIL_PreferredNetworkType
2781 * "response" is NULL
2785 * RADIO_NOT_AVAILABLE (radio resetting)
2787 * MODE_NOT_SUPPORTED
2789 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2792 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2794 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2795 * for searching and registering
2799 * "response" is int *
2800 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
2804 * RADIO_NOT_AVAILABLE
2807 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2809 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2812 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2814 * Request neighboring cell id in GSM network
2817 * "response" must be a " const RIL_NeighboringCell** "
2821 * RADIO_NOT_AVAILABLE
2824 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
2827 * RIL_REQUEST_SET_LOCATION_UPDATES
2829 * Enables/disables network state change notifications due to changes in
2830 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
2831 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
2833 * Note: The RIL implementation should default to "updates enabled"
2834 * when the screen is on and "updates disabled" when the screen is off.
2837 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
2838 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
2840 * "response" is NULL
2844 * RADIO_NOT_AVAILABLE
2847 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
2849 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
2852 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
2854 * Request to set the location where the CDMA subscription shall
2858 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
2860 * "response" is NULL
2864 * RADIO_NOT_AVAILABLE
2867 * SUBSCRIPTION_NOT_AVAILABLE
2869 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
2871 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
2874 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
2876 * Request to set the roaming preferences in CDMA
2879 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
2880 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2881 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2883 * "response" is NULL
2887 * RADIO_NOT_AVAILABLE
2890 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
2893 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
2895 * Request the actual setting of the roaming preferences in CDMA in the modem
2899 * "response" is int *
2900 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
2901 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
2902 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
2904 * "response" is NULL
2908 * RADIO_NOT_AVAILABLE
2911 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
2914 * RIL_REQUEST_SET_TTY_MODE
2916 * Request to set the TTY mode
2919 * ((int *)data)[0] is == 0 for TTY off
2920 * ((int *)data)[0] is == 1 for TTY Full
2921 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
2922 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
2924 * "response" is NULL
2928 * RADIO_NOT_AVAILABLE
2931 #define RIL_REQUEST_SET_TTY_MODE 80
2934 * RIL_REQUEST_QUERY_TTY_MODE
2936 * Request the setting of TTY mode
2940 * "response" is int *
2941 * ((int *)response)[0] is == 0 for TTY off
2942 * ((int *)response)[0] is == 1 for TTY Full
2943 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
2944 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
2946 * "response" is NULL
2950 * RADIO_NOT_AVAILABLE
2953 #define RIL_REQUEST_QUERY_TTY_MODE 81
2956 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
2958 * Request to set the preferred voice privacy mode used in voice
2962 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2963 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2965 * "response" is NULL
2969 * RADIO_NOT_AVAILABLE
2972 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
2975 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
2977 * Request the setting of preferred voice privacy mode
2981 * "response" is int *
2982 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
2983 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
2985 * "response" is NULL
2989 * RADIO_NOT_AVAILABLE
2992 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
2995 * RIL_REQUEST_CDMA_FLASH
2999 * "data" is const char *
3000 * ((const char *)data)[0] is a FLASH string
3002 * "response" is NULL
3006 * RADIO_NOT_AVAILABLE
3010 #define RIL_REQUEST_CDMA_FLASH 84
3013 * RIL_REQUEST_CDMA_BURST_DTMF
3017 * "data" is const char **
3018 * ((const char **)data)[0] is a DTMF string
3019 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3021 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3024 * "response" is NULL
3028 * RADIO_NOT_AVAILABLE
3032 #define RIL_REQUEST_CDMA_BURST_DTMF 85
3035 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
3037 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3038 * If the checksum is valid the 20 digit AKEY is written to NV,
3039 * replacing the existing AKEY no matter what it was before.
3041 * "data" is const char *
3042 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3043 * where the last 6 digits are a checksum of the
3044 * first 20, as specified in TR45.AHAG
3045 * "Common Cryptographic Algorithms, Revision D.1
3048 * "response" is NULL
3052 * RADIO_NOT_AVAILABLE
3056 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
3059 * RIL_REQUEST_CDMA_SEND_SMS
3061 * Send a CDMA SMS message
3063 * "data" is const RIL_CDMA_SMS_Message *
3065 * "response" is a const RIL_SMS_Response *
3067 * Based on the return error, caller decides to resend if sending sms
3068 * fails. The CDMA error class is derived as follows,
3069 * SUCCESS is error class 0 (no error)
3070 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3071 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3075 * RADIO_NOT_AVAILABLE
3076 * SMS_SEND_FAIL_RETRY
3080 #define RIL_REQUEST_CDMA_SEND_SMS 87
3083 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3085 * Acknowledge the success or failure in the receipt of SMS
3086 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3088 * "data" is const RIL_CDMA_SMS_Ack *
3090 * "response" is NULL
3094 * RADIO_NOT_AVAILABLE
3098 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3101 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
3103 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3107 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3108 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3112 * RADIO_NOT_AVAILABLE
3116 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
3119 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
3121 * Set GSM/WCDMA Cell Broadcast SMS config
3123 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3124 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3126 * "response" is NULL
3130 * RADIO_NOT_AVAILABLE
3134 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
3137 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
3139 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
3141 * "data" is const int *
3142 * (const int *)data[0] indicates to activate or turn off the
3143 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3144 * 0 - Activate, 1 - Turn off
3146 * "response" is NULL
3150 * RADIO_NOT_AVAILABLE
3154 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
3157 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
3159 * Request the setting of CDMA Broadcast SMS config
3163 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3164 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3168 * RADIO_NOT_AVAILABLE
3172 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
3175 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
3177 * Set CDMA Broadcast SMS config
3179 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3180 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3182 * "response" is NULL
3186 * RADIO_NOT_AVAILABLE
3190 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
3193 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
3195 * Enable or disable the reception of CDMA Broadcast SMS
3197 * "data" is const int *
3198 * (const int *)data[0] indicates to activate or turn off the
3199 * reception of CDMA Broadcast SMS, 0-1,
3200 * 0 - Activate, 1 - Turn off
3202 * "response" is NULL
3206 * RADIO_NOT_AVAILABLE
3210 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
3213 * RIL_REQUEST_CDMA_SUBSCRIPTION
3215 * Request the device MDN / H_SID / H_NID.
3217 * The request is only allowed when CDMA subscription is available. When CDMA
3218 * subscription is changed, application layer should re-issue the request to
3219 * update the subscription information.
3221 * If a NULL value is returned for any of the device id, it means that error
3222 * accessing the device.
3224 * "response" is const char **
3225 * ((const char **)response)[0] is MDN if CDMA subscription is available
3226 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3227 * CDMA subscription is available, in decimal format
3228 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3229 * CDMA subscription is available, in decimal format
3230 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3231 * ((const char **)response)[4] is PRL version if CDMA subscription is available
3235 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3238 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3241 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3243 * Stores a CDMA SMS message to RUIM memory.
3245 * "data" is RIL_CDMA_SMS_WriteArgs *
3247 * "response" is int *
3248 * ((const int *)response)[0] is the record index where the message is stored.
3252 * RADIO_NOT_AVAILABLE
3256 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3259 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3261 * Deletes a CDMA SMS message from RUIM memory.
3264 * ((int *)data)[0] is the record index of the message to delete.
3266 * "response" is NULL
3270 * RADIO_NOT_AVAILABLE
3274 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3277 * RIL_REQUEST_DEVICE_IDENTITY
3279 * Request the device ESN / MEID / IMEI / IMEISV.
3281 * The request is always allowed and contains GSM and CDMA device identity;
3282 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3283 * RIL_REQUEST_GET_IMEISV.
3285 * If a NULL value is returned for any of the device id, it means that error
3286 * accessing the device.
3288 * When CDMA subscription is changed the ESN/MEID may change. The application
3289 * layer should re-issue the request to update the device identity in this case.
3291 * "response" is const char **
3292 * ((const char **)response)[0] is IMEI if GSM subscription is available
3293 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3294 * ((const char **)response)[2] is ESN if CDMA subscription is available
3295 * ((const char **)response)[3] is MEID if CDMA subscription is available
3299 * RADIO_NOT_AVAILABLE
3302 #define RIL_REQUEST_DEVICE_IDENTITY 98
3305 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3307 * Request the radio's system selection module to exit emergency
3308 * callback mode. RIL will not respond with SUCCESS until the modem has
3309 * completely exited from Emergency Callback Mode.
3313 * "response" is NULL
3317 * RADIO_NOT_AVAILABLE
3321 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
3324 * RIL_REQUEST_GET_SMSC_ADDRESS
3326 * Queries the default Short Message Service Center address on the device.
3330 * "response" is const char * containing the SMSC address.
3334 * RADIO_NOT_AVAILABLE
3338 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
3341 * RIL_REQUEST_SET_SMSC_ADDRESS
3343 * Sets the default Short Message Service Center address on the device.
3345 * "data" is const char * containing the SMSC address.
3347 * "response" is NULL
3351 * RADIO_NOT_AVAILABLE
3355 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
3358 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3360 * Indicates whether there is storage available for new SMS messages.
3363 * ((int *)data)[0] is 1 if memory is available for storing new messages
3364 * is 0 if memory capacity is exceeded
3366 * "response" is NULL
3370 * RADIO_NOT_AVAILABLE
3374 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3377 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3379 * Indicates that the StkSerivce is running and is
3380 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3383 * "response" is NULL
3387 * RADIO_NOT_AVAILABLE
3391 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3394 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3396 * Request to query the location where the CDMA subscription shall
3401 * "response" is int *
3402 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3406 * RADIO_NOT_AVAILABLE
3408 * SUBSCRIPTION_NOT_AVAILABLE
3410 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3412 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3415 * RIL_REQUEST_ISIM_AUTHENTICATION
3417 * Request the ISIM application on the UICC to perform AKA
3418 * challenge/response algorithm for IMS authentication
3420 * "data" is a const char * containing the challenge string in Base64 format
3421 * "response" is a const char * containing the response in Base64 format
3425 * RADIO_NOT_AVAILABLE
3428 #define RIL_REQUEST_ISIM_AUTHENTICATION 105
3431 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3433 * Acknowledge successful or failed receipt of SMS previously indicated
3434 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3435 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3437 * "data" is const char **
3438 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3439 * is "0" on failed receipt (send RP-ERROR)
3440 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3442 * "response" is NULL
3446 * RADIO_NOT_AVAILABLE
3449 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3452 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3454 * Requests to send a SAT/USAT envelope command to SIM.
3455 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3457 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3458 * the SW1 and SW2 status bytes from the UICC response are returned along with
3459 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3461 * The RIL implementation shall perform the normal processing of a '91XX'
3462 * response in SW1/SW2 to retrieve the pending proactive command and send it
3463 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3465 * "data" is a const char * containing the SAT/USAT command
3466 * in hexadecimal format starting with command tag
3468 * "response" is a const RIL_SIM_IO_Response *
3472 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3473 * RIL_E_GENERIC_FAILURE
3475 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3478 * RIL_REQUEST_VOICE_RADIO_TECH
3480 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
3481 * when radio state is RADIO_STATE_ON
3484 * "response" is int *
3485 * ((int *) response)[0] is of type const RIL_RadioTechnology
3489 * RADIO_NOT_AVAILABLE
3492 #define RIL_REQUEST_VOICE_RADIO_TECH 108
3495 * RIL_REQUEST_GET_CELL_INFO_LIST
3497 * Request all of the current cell information known to the radio. The radio
3498 * must a list of all current cells, including the neighboring cells. If for a particular
3499 * cell information isn't known then the appropriate unknown value will be returned.
3500 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
3504 * "response" is an array of RIL_CellInfo.
3506 #define RIL_REQUEST_GET_CELL_INFO_LIST 109
3509 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
3511 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
3512 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
3513 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
3514 * a RIL_UNSOL_CELL_INFO_LIST.
3517 * ((int *)data)[0] is minimum time in milliseconds
3519 * "response" is NULL
3523 * RADIO_NOT_AVAILABLE
3526 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
3529 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
3531 * Set an apn to initial attach network
3532 * "response" is NULL
3536 * RADIO_NOT_AVAILABLE (radio resetting)
3538 * SUBSCRIPTION_NOT_AVAILABLE
3540 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
3543 * RIL_REQUEST_IMS_REGISTRATION_STATE
3545 * Request current IMS registration state
3549 * "response" is int *
3550 * ((int *)response)[0] is registration state:
3551 * 0 - Not registered
3554 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
3555 * must follow with IMS SMS format:
3557 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
3561 * RADIO_NOT_AVAILABLE
3564 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112
3567 * RIL_REQUEST_IMS_SEND_SMS
3569 * Send a SMS message over IMS
3571 * "data" is const RIL_IMS_SMS_Message *
3573 * "response" is a const RIL_SMS_Response *
3575 * Based on the return error, caller decides to resend if sending sms
3576 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
3577 * In case of retry, data is encoded based on Voice Technology available.
3581 * RADIO_NOT_AVAILABLE
3582 * SMS_SEND_FAIL_RETRY
3587 #define RIL_REQUEST_IMS_SEND_SMS 113
3590 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
3592 * Request APDU exchange on the basic channel. This command reflects TS 27.007
3593 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
3594 * of GSM/CDMA, and filter commands appropriately. It should filter
3595 * channel management and SELECT by DF name commands.
3597 * "data" is a const RIL_SIM_APDU *
3598 * "sessionid" field should be ignored.
3600 * "response" is a const RIL_SIM_IO_Response *
3604 * RADIO_NOT_AVAILABLE
3607 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
3610 * RIL_REQUEST_SIM_OPEN_CHANNEL
3612 * Open a new logical channel and select the given application. This command
3613 * reflects TS 27.007 "open logical channel" operation (+CCHO).
3615 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
3617 * "response" is int *
3618 * ((int *)data)[0] contains the session id of the logical channel.
3622 * RADIO_NOT_AVAILABLE
3627 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115
3630 * RIL_REQUEST_SIM_CLOSE_CHANNEL
3632 * Close a previously opened logical channel. This command reflects TS 27.007
3633 * "close logical channel" operation (+CCHC).
3636 * ((int *)data)[0] is the session id of logical the channel to close.
3638 * "response" is NULL
3642 * RADIO_NOT_AVAILABLE
3645 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
3648 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
3650 * Exchange APDUs with a UICC over a previously opened logical channel. This
3651 * command reflects TS 27.007 "generic logical channel access" operation
3652 * (+CGLA). The modem should filter channel management and SELECT by DF name
3655 * "data" is a const RIL_SIM_APDU*
3657 * "response" is a const RIL_SIM_IO_Response *
3661 * RADIO_NOT_AVAILABLE
3664 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
3667 /***********************************************************************/
3670 #define RIL_UNSOL_RESPONSE_BASE 1000
3673 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
3675 * Indicate when value of RIL_RadioState has changed.
3677 * Callee will invoke RIL_RadioStateRequest method on main thread
3682 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
3686 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
3688 * Indicate when call state has changed
3690 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
3694 * Response should be invoked on, for example,
3695 * "RING", "BUSY", "NO CARRIER", and also call state
3696 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
3698 * Redundent or extraneous invocations are tolerated
3700 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
3704 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
3706 * Called when the voice network state changed
3708 * Callee will invoke the following requests on main thread:
3710 * RIL_REQUEST_VOICE_REGISTRATION_STATE
3711 * RIL_REQUEST_OPERATOR
3715 * FIXME should this happen when SIM records are loaded? (eg, for
3718 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
3721 * RIL_UNSOL_RESPONSE_NEW_SMS
3723 * Called when new SMS is received.
3725 * "data" is const char *
3726 * This is a pointer to a string containing the PDU of an SMS-DELIVER
3727 * as an ascii string of hex digits. The PDU starts with the SMSC address
3728 * per TS 27.005 (+CMT:)
3730 * Callee will subsequently confirm the receipt of thei SMS with a
3731 * RIL_REQUEST_SMS_ACKNOWLEDGE
3733 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3734 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3735 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3738 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
3741 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
3743 * Called when new SMS Status Report is received.
3745 * "data" is const char *
3746 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
3747 * as an ascii string of hex digits. The PDU starts with the SMSC address
3748 * per TS 27.005 (+CDS:).
3750 * Callee will subsequently confirm the receipt of the SMS with a
3751 * RIL_REQUEST_SMS_ACKNOWLEDGE
3753 * No new RIL_UNSOL_RESPONSE_NEW_SMS
3754 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
3755 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
3758 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
3761 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
3763 * Called when new SMS has been stored on SIM card
3765 * "data" is const int *
3766 * ((const int *)data)[0] contains the slot index on the SIM that contains
3770 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
3775 * Called when a new USSD message is received.
3777 * "data" is const char **
3778 * ((const char **)data)[0] points to a type code, which is
3779 * one of these string values:
3780 * "0" USSD-Notify -- text in ((const char **)data)[1]
3781 * "1" USSD-Request -- text in ((const char **)data)[1]
3782 * "2" Session terminated by network
3783 * "3" other local client (eg, SIM Toolkit) has responded
3784 * "4" Operation not supported
3785 * "5" Network timeout
3787 * The USSD session is assumed to persist if the type code is "1", otherwise
3788 * the current session (if any) is assumed to have terminated.
3790 * ((const char **)data)[1] points to a message string if applicable, which
3791 * should always be in UTF-8.
3793 #define RIL_UNSOL_ON_USSD 1006
3794 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
3797 * RIL_UNSOL_ON_USSD_REQUEST
3799 * Obsolete. Send via RIL_UNSOL_ON_USSD
3801 #define RIL_UNSOL_ON_USSD_REQUEST 1007
3805 * RIL_UNSOL_NITZ_TIME_RECEIVED
3807 * Called when radio has received a NITZ time message
3809 * "data" is const char * pointing to NITZ time string
3810 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
3812 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
3815 * RIL_UNSOL_SIGNAL_STRENGTH
3817 * Radio may report signal strength rather han have it polled.
3819 * "data" is a const RIL_SignalStrength *
3821 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
3825 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
3827 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
3828 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
3829 * of current data contexts including new contexts that have been
3830 * activated. A data call is only removed from this list when the
3831 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
3832 * is powered off/on.
3834 * See also: RIL_REQUEST_DATA_CALL_LIST
3837 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
3840 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
3842 * Reports supplementary service related notification from the network.
3844 * "data" is a const RIL_SuppSvcNotification *
3848 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
3851 * RIL_UNSOL_STK_SESSION_END
3853 * Indicate when STK session is terminated by SIM.
3857 #define RIL_UNSOL_STK_SESSION_END 1012
3860 * RIL_UNSOL_STK_PROACTIVE_COMMAND
3862 * Indicate when SIM issue a STK proactive command to applications
3864 * "data" is a const char * containing SAT/USAT proactive command
3865 * in hexadecimal format string starting with command tag
3868 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
3871 * RIL_UNSOL_STK_EVENT_NOTIFY
3873 * Indicate when SIM notifies applcations some event happens.
3874 * Generally, application does not need to have any feedback to
3875 * SIM but shall be able to indicate appropriate messages to users.
3877 * "data" is a const char * containing SAT/USAT commands or responses
3878 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
3879 * starting with first byte of response data or command tag
3882 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
3885 * RIL_UNSOL_STK_CALL_SETUP
3887 * Indicate when SIM wants application to setup a voice call.
3889 * "data" is const int *
3890 * ((const int *)data)[0] contains timeout value (in milliseconds)
3892 #define RIL_UNSOL_STK_CALL_SETUP 1015
3895 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
3897 * Indicates that SMS storage on the SIM is full. Sent when the network
3898 * attempts to deliver a new SMS message. Messages cannot be saved on the
3899 * SIM until space is freed. In particular, incoming Class 2 messages
3905 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
3908 * RIL_UNSOL_SIM_REFRESH
3910 * Indicates that file(s) on the SIM have been updated, or the SIM
3911 * has been reinitialized.
3913 * In the case where RIL is version 6 or older:
3914 * "data" is an int *
3915 * ((int *)data)[0] is a RIL_SimRefreshResult.
3916 * ((int *)data)[1] is the EFID of the updated file if the result is
3917 * SIM_FILE_UPDATE or NULL for any other result.
3919 * In the case where RIL is version 7:
3920 * "data" is a RIL_SimRefreshResponse_v7 *
3922 * Note: If the SIM state changes as a result of the SIM refresh (eg,
3923 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3926 #define RIL_UNSOL_SIM_REFRESH 1017
3929 * RIL_UNSOL_CALL_RING
3931 * Ring indication for an incoming call (eg, RING or CRING event).
3932 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
3933 * of a call and sending multiple is optional. If the system property
3934 * ro.telephony.call_ring.multiple is false then the upper layers
3935 * will generate the multiple events internally. Otherwise the vendor
3936 * ril must generate multiple RIL_UNSOL_CALL_RING if
3937 * ro.telephony.call_ring.multiple is true or if it is absent.
3939 * The rate of these events is controlled by ro.telephony.call_ring.delay
3940 * and has a default value of 3000 (3 seconds) if absent.
3942 * "data" is null for GSM
3943 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
3945 #define RIL_UNSOL_CALL_RING 1018
3948 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
3950 * Indicates that SIM state changes.
3952 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
3956 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
3959 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3961 * Called when new CDMA SMS is received
3963 * "data" is const RIL_CDMA_SMS_Message *
3965 * Callee will subsequently confirm the receipt of the SMS with
3966 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3968 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
3969 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
3972 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
3975 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
3977 * Called when new Broadcast SMS is received
3979 * "data" can be one of the following:
3980 * If received from GSM network, "data" is const char of 88 bytes
3981 * which indicates each page of a CBS Message sent to the MS by the
3982 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
3983 * If received from UMTS network, "data" is const char of 90 up to 1252
3984 * bytes which contain between 1 and 15 CBS Message pages sent as one
3985 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
3988 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
3991 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
3993 * Indicates that SMS storage on the RUIM is full. Messages
3994 * cannot be saved on the RUIM until space is freed.
3999 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4002 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4004 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4006 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4008 * "data" is an int *
4009 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4011 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4014 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4016 * Indicates that the radio system selection module has
4017 * autonomously entered emergency callback mode.
4022 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
4025 * RIL_UNSOL_CDMA_CALL_WAITING
4027 * Called when CDMA radio receives a call waiting indication.
4029 * "data" is const RIL_CDMA_CallWaiting *
4032 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
4035 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4037 * Called when CDMA radio receives an update of the progress of an
4040 * "data" is const int *
4041 * For CDMA this is an integer OTASP/OTAPA status listed in
4042 * RIL_CDMA_OTA_ProvisionStatus.
4045 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4048 * RIL_UNSOL_CDMA_INFO_REC
4050 * Called when CDMA radio receives one or more info recs.
4052 * "data" is const RIL_CDMA_InformationRecords *
4055 #define RIL_UNSOL_CDMA_INFO_REC 1027
4058 * RIL_UNSOL_OEM_HOOK_RAW
4060 * This is for OEM specific use.
4062 * "data" is a byte[]
4064 #define RIL_UNSOL_OEM_HOOK_RAW 1028
4067 * RIL_UNSOL_RINGBACK_TONE
4069 * Indicates that nework doesn't have in-band information, need to
4070 * play out-band tone.
4072 * "data" is an int *
4073 * ((int *)data)[0] == 0 for stop play ringback tone.
4074 * ((int *)data)[0] == 1 for start play ringback tone.
4076 #define RIL_UNSOL_RINGBACK_TONE 1029
4079 * RIL_UNSOL_RESEND_INCALL_MUTE
4081 * Indicates that framework/application need reset the uplink mute state.
4083 * There may be situations where the mute state becomes out of sync
4084 * between the application and device in some GSM infrastructures.
4088 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
4091 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
4093 * Called when CDMA subscription source changed.
4096 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4098 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
4101 * RIL_UNSOL_CDMA_PRL_CHANGED
4103 * Called when PRL (preferred roaming list) changes.
4106 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
4108 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
4111 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
4113 * Called when Emergency Callback Mode Ends
4115 * Indicates that the radio system selection module has
4116 * proactively exited emergency callback mode.
4121 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
4124 * RIL_UNSOL_RIL_CONNECTED
4126 * Called the ril connects and returns the version
4129 * ((int *)data)[0] is RIL_VERSION
4131 #define RIL_UNSOL_RIL_CONNECTED 1034
4134 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
4136 * Indicates that voice technology has changed. Contains new radio technology
4137 * as a data in the message.
4140 * ((int *)data)[0] is of type const RIL_RadioTechnology
4143 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
4146 * RIL_UNSOL_CELL_INFO_LIST
4148 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
4149 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
4153 * "response" is an array of RIL_CellInfo.
4155 #define RIL_UNSOL_CELL_INFO_LIST 1036
4158 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
4160 * Called when IMS registration state has changed
4162 * To get IMS registration state and IMS SMS format, callee needs to invoke the
4163 * following request on main thread:
4165 * RIL_REQUEST_IMS_REGISTRATION_STATE
4170 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
4172 /***********************************************************************/
4176 * RIL_Request Function pointer
4178 * @param request is one of RIL_REQUEST_*
4179 * @param data is pointer to data defined for that RIL_REQUEST_*
4180 * data is owned by caller, and should not be modified or freed by callee
4181 * @param t should be used in subsequent call to RIL_onResponse
4182 * @param datalen the length of data
4185 typedef void (*RIL_RequestFunc) (int request, void *data,
4186 size_t datalen, RIL_Token t);
4189 * This function should return the current radio state synchronously
4191 typedef RIL_RadioState (*RIL_RadioStateRequest)();
4194 * This function returns "1" if the specified RIL_REQUEST code is
4195 * supported and 0 if it is not
4197 * @param requestCode is one of RIL_REQUEST codes
4200 typedef int (*RIL_Supports)(int requestCode);
4203 * This function is called from a separate thread--not the
4204 * thread that calls RIL_RequestFunc--and indicates that a pending
4205 * request should be cancelled.
4207 * On cancel, the callee should do its best to abandon the request and
4208 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
4210 * Subsequent calls to RIL_onRequestComplete for this request with
4211 * other results will be tolerated but ignored. (That is, it is valid
4212 * to ignore the cancellation request)
4214 * RIL_Cancel calls should return immediately, and not wait for cancellation
4216 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
4219 * @param t token wants to be canceled
4222 typedef void (*RIL_Cancel)(RIL_Token t);
4224 typedef void (*RIL_TimedCallback) (void *param);
4227 * Return a version string for your RIL implementation
4229 typedef const char * (*RIL_GetVersion) (void);
4232 int version; /* set to RIL_VERSION */
4233 RIL_RequestFunc onRequest;
4234 RIL_RadioStateRequest onStateRequest;
4235 RIL_Supports supports;
4236 RIL_Cancel onCancel;
4237 RIL_GetVersion getVersion;
4238 } RIL_RadioFunctions;
4246 } RIL_InitialAttachApn;
4251 * "t" is parameter passed in on previous call to RIL_Notification
4254 * If "e" != SUCCESS, then response can be null/is ignored
4256 * "response" is owned by caller, and should not be modified or
4259 * RIL_onRequestComplete will return as soon as possible
4261 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
4262 void *response, size_t responselen);
4265 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4266 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4268 * "data" is owned by caller, and should not be modified or freed by callee
4271 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data,
4275 * Call user-specifed "callback" function on on the same thread that
4276 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4277 * a relative time value at which the callback is invoked. If relativeTime is
4278 * NULL or points to a 0-filled structure, the callback will be invoked as
4282 void (*RequestTimedCallback) (RIL_TimedCallback callback,
4283 void *param, const struct timeval *relativeTime);
4288 * RIL implementations must defined RIL_Init
4289 * argc and argv will be command line arguments intended for the RIL implementation
4290 * Return NULL on error
4292 * @param env is environment point defined as RIL_Env
4293 * @param argc number of arguments
4294 * @param argv list fo arguments
4297 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
4299 #else /* RIL_SHLIB */
4302 * Call this once at startup to register notification routine
4304 * @param callbacks user-specifed callback function
4306 void RIL_register (const RIL_RadioFunctions *callbacks);
4311 * RIL_onRequestComplete will return as soon as possible
4313 * @param t is parameter passed in on previous call to RIL_Notification
4315 * @param e error code
4316 * if "e" != SUCCESS, then response can be null/is ignored
4317 * @param response is owned by caller, and should not be modified or
4319 * @param responselen the length of response in byte
4321 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
4322 void *response, size_t responselen);
4325 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4326 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4327 * "data" is owned by caller, and should not be modified or freed by callee
4328 * @param datalen the length of data in byte
4331 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
4336 * Call user-specifed "callback" function on on the same thread that
4337 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4338 * a relative time value at which the callback is invoked. If relativeTime is
4339 * NULL or points to a 0-filled structure, the callback will be invoked as
4342 * @param callback user-specifed callback function
4343 * @param param parameter list
4344 * @param relativeTime a relative time value at which the callback is invoked
4347 void RIL_requestTimedCallback (RIL_TimedCallback callback,
4348 void *param, const struct timeval *relativeTime);
4351 #endif /* RIL_SHLIB */
4357 #endif /*ANDROID_RIL_H*/