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 #include <telephony/ril_nv_items.h>
24 #include <telephony/ril_msim.h>
26 #ifndef FEATURE_UNIT_TEST
28 #endif /* !FEATURE_UNIT_TEST */
35 #if defined(ANDROID_SIM_COUNT_2)
37 #elif defined(ANDROID_SIM_COUNT_3)
39 #elif defined(ANDROID_SIM_COUNT_4)
45 #ifndef ANDROID_MULTI_SIM
49 #define RIL_VERSION 10 /* Current version */
50 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
52 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
53 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
56 #define MAX_SOCKET_NAME_LENGTH 6
57 #define MAX_CLIENT_ID_LENGTH 2
58 #define MAX_DEBUG_SOCKET_NAME_LENGTH 12
59 #define MAX_QEMU_PIPE_NAME_LENGTH 11
60 #define MAX_UUID_LENGTH 64
63 typedef void * RIL_Token;
82 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
83 RIL_E_GENERIC_FAILURE = 2,
84 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
85 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
86 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
87 RIL_E_REQUEST_NOT_SUPPORTED = 6,
89 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
90 call on a Class C GPRS device */
91 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
92 registers in network */
93 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
94 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
95 shall be retrieved because of SIM or RUIM
97 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
99 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
100 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
101 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
103 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
104 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
109 RIL_CALL_HOLDING = 1,
110 RIL_CALL_DIALING = 2, /* MO call only */
111 RIL_CALL_ALERTING = 3, /* MO call only */
112 RIL_CALL_INCOMING = 4, /* MT call only */
113 RIL_CALL_WAITING = 5 /* MT call only */
117 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
118 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
119 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
120 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
121 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
122 personalization locked, or SIM absent */
123 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
124 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
125 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
126 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
127 personalization locked, or RUIM absent */
128 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
129 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
130 RADIO_STATE_ON = 10 /* Radio is on */
134 RADIO_TECH_UNKNOWN = 0,
138 RADIO_TECH_IS95A = 4,
139 RADIO_TECH_IS95B = 5,
140 RADIO_TECH_1xRTT = 6,
141 RADIO_TECH_EVDO_0 = 7,
142 RADIO_TECH_EVDO_A = 8,
143 RADIO_TECH_HSDPA = 9,
144 RADIO_TECH_HSUPA = 10,
145 RADIO_TECH_HSPA = 11,
146 RADIO_TECH_EVDO_B = 12,
147 RADIO_TECH_EHRPD = 13,
149 RADIO_TECH_HSPAP = 15, // HSPA+
150 RADIO_TECH_GSM = 16, // Only supports voice
151 RADIO_TECH_TD_SCDMA = 17
152 } RIL_RadioTechnology;
155 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
156 RAF_GPRS = (1 << RADIO_TECH_GPRS),
157 RAF_EDGE = (1 << RADIO_TECH_EDGE),
158 RAF_UMTS = (1 << RADIO_TECH_UMTS),
159 RAF_IS95A = (1 << RADIO_TECH_IS95A),
160 RAF_IS95B = (1 << RADIO_TECH_IS95B),
161 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
162 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
163 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
164 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
165 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
166 RAF_HSPA = (1 << RADIO_TECH_HSPA),
167 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
168 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
169 RAF_LTE = (1 << RADIO_TECH_LTE),
170 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
171 RAF_GSM = (1 << RADIO_TECH_GSM),
172 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
173 } RIL_RadioAccessFamily;
176 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
177 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
178 // forthcoming with these same parameters
179 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
180 // RIL_RadioCapability.status = 0, if any START's fail no
181 // APPLY will be sent
182 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
183 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
184 // occurs in any previous command the RIL_RadioAccessesFamily and
185 // logicalModemUuid fields will be the prior configuration thus
186 // restoring the configuration to the previous value. An error
187 // returned by this command will generally be ignored or may
188 // cause that logical modem to be removed from service.
189 } RadioCapabilityPhase;
192 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
194 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
195 // capability was success with RC_PHASE_FINISH
196 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
197 // capability is fail with RC_PHASE_FINISH.
198 } RadioCapabilityStatus;
200 #define RIL_RADIO_CAPABILITY_VERSION 1
202 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
203 int session; // Unique session value defined by framework returned in all "responses/unsol"
204 int phase; // CONFIGURED, START, APPLY, FINISH
205 int rat; // RIL_RadioAccessFamily for the radio
206 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
207 int status; // Return status and an input parameter for RC_PHASE_FINISH
208 } RIL_RadioCapability;
210 // Do we want to split Data from Voice and the use
211 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
213 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
214 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
215 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
216 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
217 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
218 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
219 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
220 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
221 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
222 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
223 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
224 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
225 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
226 } RIL_PreferredNetworkType;
228 /* Source for cdma subscription */
230 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
231 CDMA_SUBSCRIPTION_SOURCE_NV = 1
232 } RIL_CdmaSubscriptionSource;
234 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
236 RIL_UUS_TYPE1_IMPLICIT = 0,
237 RIL_UUS_TYPE1_REQUIRED = 1,
238 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
239 RIL_UUS_TYPE2_REQUIRED = 3,
240 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
241 RIL_UUS_TYPE3_REQUIRED = 5,
242 RIL_UUS_TYPE3_NOT_REQUIRED = 6
245 /* User-to-User Signaling Information data coding schemes. Possible values for
246 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
247 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
249 RIL_UUS_DCS_USP = 0, /* User specified protocol */
250 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
251 RIL_UUS_DCS_X244 = 2, /* X.244 */
252 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
253 convergence function */
254 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
257 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
258 * This data is passed in RIL_ExtensionRecord and rec contains this
259 * structure when type is RIL_UUS_INFO_EXT_REC */
261 RIL_UUS_Type uusType; /* UUS Type */
262 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
263 int uusLength; /* Length of UUS Data */
264 char * uusData; /* UUS Data */
267 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
269 char isPresent; /* non-zero if signal information record is present */
270 char signalType; /* as defined 3.7.5.5-1 */
271 char alertPitch; /* as defined 3.7.5.5-2 */
272 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
273 } RIL_CDMA_SignalInfoRecord;
277 int index; /* Connection Index for use with, eg, AT+CHLD */
278 int toa; /* type of address, eg 145 = intl */
279 char isMpty; /* nonzero if is mpty call */
280 char isMT; /* nonzero if call is mobile terminated */
281 char als; /* ALS line indicator if available
283 char isVoice; /* nonzero if this is is a voice call */
284 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
285 char * number; /* Remote party number */
286 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
287 char * name; /* Remote party name */
288 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
289 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
292 /* Deprecated, use RIL_Data_Call_Response_v6 */
294 int cid; /* Context ID, uniquely identifies this call */
295 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
296 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
297 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
298 char * apn; /* ignored */
299 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
300 } RIL_Data_Call_Response_v4;
303 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
304 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
307 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
308 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
309 back-off timer value RIL wants to override the one
310 pre-configured in FW.
311 The unit is miliseconds.
312 The value < 0 means no value is suggested.
313 The value 0 means retry should be done ASAP.
314 The value of INT_MAX(0x7fffffff) means no retry. */
315 int cid; /* Context ID, uniquely identifies this call */
316 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
317 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
318 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
319 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
320 such as "IP" or "IPV6" */
321 char * ifname; /* The network interface name */
322 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
323 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
324 May not be empty, typically 1 IPv4 or 1 IPv6 or
325 one of each. If the prefix length is absent the addresses
326 are assumed to be point to point with IPv4 having a prefix
327 length of 32 and IPv6 128. */
328 char * dnses; /* A space-delimited list of DNS server addresses,
329 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
331 char * gateways; /* A space-delimited list of default gateway addresses,
332 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
333 May be empty in which case the addresses represent point
334 to point connections. */
335 } RIL_Data_Call_Response_v6;
338 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
339 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
340 back-off timer value RIL wants to override the one
341 pre-configured in FW.
342 The unit is miliseconds.
343 The value < 0 means no value is suggested.
344 The value 0 means retry should be done ASAP.
345 The value of INT_MAX(0x7fffffff) means no retry. */
346 int cid; /* Context ID, uniquely identifies this call */
347 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
348 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
349 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
350 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
351 such as "IP" or "IPV6" */
352 char * ifname; /* The network interface name */
353 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
354 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
355 May not be empty, typically 1 IPv4 or 1 IPv6 or
356 one of each. If the prefix length is absent the addresses
357 are assumed to be point to point with IPv4 having a prefix
358 length of 32 and IPv6 128. */
359 char * dnses; /* A space-delimited list of DNS server addresses,
360 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
362 char * gateways; /* A space-delimited list of default gateway addresses,
363 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
364 May be empty in which case the addresses represent point
365 to point connections. */
366 char * pcscf; /* the Proxy Call State Control Function address
367 via PCO(Protocol Configuration Option) for IMS client. */
368 } RIL_Data_Call_Response_v9; // FIXME: Change to v10
371 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
372 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
373 } RIL_RadioTechnologyFamily;
376 RIL_RadioTechnologyFamily tech;
377 unsigned char retry; /* 0 == not retry, nonzero == retry */
378 int messageRef; /* Valid field if retry is set to nonzero.
379 Contains messageRef from RIL_SMS_Response
380 corresponding to failed MO SMS.
384 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
385 RIL_CDMA_SMS_Message* cdmaMessage;
387 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
390 } RIL_IMS_SMS_Message;
393 int messageRef; /* TP-Message-Reference for GSM,
394 and BearerData MessageId for CDMA
395 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
396 char *ackPDU; /* or NULL if n/a */
397 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
398 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
399 -1 if unknown or not applicable*/
402 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
404 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
405 /* 0 = "REC UNREAD" */
407 /* 2 = "STO UNSENT" */
409 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
410 the TP-layer length is "strlen(pdu)/2". */
411 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
412 (as expected by TS 27.005) or NULL for default SMSC */
415 /** Used by RIL_REQUEST_DIAL */
419 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
420 * clir == 0 on "use subscription default value"
421 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
422 * clir == 2 on "CLIR suppression" (allow CLI presentation)
424 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
428 int command; /* one of the commands listed for TS 27.007 +CRSM*/
429 int fileid; /* EF id */
430 char *path; /* "pathid" from TS 27.007 +CRSM command.
431 Path is in hex asciii format eg "7f205f70"
432 Path must always be provided.
437 char *data; /* May be NULL*/
438 char *pin2; /* May be NULL*/
442 int command; /* one of the commands listed for TS 27.007 +CRSM*/
443 int fileid; /* EF id */
444 char *path; /* "pathid" from TS 27.007 +CRSM command.
445 Path is in hex asciii format eg "7f205f70"
446 Path must always be provided.
451 char *data; /* May be NULL*/
452 char *pin2; /* May be NULL*/
453 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
456 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
457 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
459 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
460 ignored for +CSIM command. */
462 /* Following fields are used to derive the APDU ("command" and "length"
463 values in TS 27.007 +CSIM and +CGLA commands). */
468 int p3; /* A negative P3 implies a 4 byte APDU. */
469 char *data; /* May be NULL. In hex string format. */
475 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
476 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
477 } RIL_SIM_IO_Response;
479 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
483 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
484 * status 1 = active, 0 = not active
486 * For RIL_REQUEST_SET_CALL_FORWARD:
495 int reason; /* from TS 27.007 7.11 "reason" */
496 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
497 See table for Android mapping from
499 0 means user doesn't input class */
500 int toa; /* "type" from TS 27.007 7.11 */
501 char * number; /* "number" from TS 27.007 7.11. May be NULL */
502 int timeSeconds; /* for CF no reply only */
503 }RIL_CallForwardInfo;
506 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
507 * Upper 16 bits is LAC and lower 16 bits
508 * is CID (as described in TS 27.005)
509 * Primary Scrambling Code (as described in TS 25.331)
511 * Valid values are hexadecimal 0x0000 - 0xffffffff.
513 int rssi; /* Received RSSI in GSM,
514 * Level index of CPICH Received Signal Code Power in UMTS
516 } RIL_NeighboringCell;
518 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
520 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
521 CALL_FAIL_NORMAL = 16,
523 CALL_FAIL_CONGESTION = 34,
524 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
525 CALL_FAIL_CALL_BARRED = 240,
526 CALL_FAIL_FDN_BLOCKED = 241,
527 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
528 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
529 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
530 CALL_FAIL_CDMA_DROP = 1001,
531 CALL_FAIL_CDMA_INTERCEPT = 1002,
532 CALL_FAIL_CDMA_REORDER = 1003,
533 CALL_FAIL_CDMA_SO_REJECT = 1004,
534 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
535 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
536 CALL_FAIL_CDMA_PREEMPTED = 1007,
537 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
538 during emergency callback mode */
539 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
540 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
541 } RIL_LastCallFailCause;
543 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
545 PDP_FAIL_NONE = 0, /* No error, connection ok */
547 /* an integer cause code defined in TS 24.008
548 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
549 If the implementation does not have access to the exact cause codes,
550 then it should return one of the following values,
551 as the UI layer needs to distinguish these
552 cases for error notification and potential retries. */
553 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
554 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
555 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
556 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
557 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
558 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
559 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
560 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
561 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
562 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
563 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
564 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
565 based on framework config */
566 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
567 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
568 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
569 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
571 /* Not mentioned in the specification */
572 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
573 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
575 /* reasons for data call drop - network/modem disconnect */
576 PDP_FAIL_SIGNAL_LOST = -3,
577 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
578 with parameters appropriate for new technology */
579 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
580 powered off - no retry */
581 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
582 mode was up on same APN/data profile - no retry until
583 tethered call is off */
585 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
586 } RIL_DataCallFailCause;
588 /* See RIL_REQUEST_SETUP_DATA_CALL */
590 RIL_DATA_PROFILE_DEFAULT = 0,
591 RIL_DATA_PROFILE_TETHERED = 1,
592 RIL_DATA_PROFILE_IMS = 2,
593 RIL_DATA_PROFILE_FOTA = 3,
594 RIL_DATA_PROFILE_CBS = 4,
595 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
596 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
599 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
601 int notificationType; /*
602 * 0 = MO intermediate result code
603 * 1 = MT unsolicited result code
605 int code; /* See 27.007 7.17
608 int index; /* CUG index. See 27.007 7.17. */
609 int type; /* "type" from 27.007 7.17 (MT only). */
610 char * number; /* "number" from 27.007 7.17
611 (MT only, may be NULL). */
612 } RIL_SuppSvcNotification;
614 #define RIL_CARD_MAX_APPS 8
617 RIL_CARDSTATE_ABSENT = 0,
618 RIL_CARDSTATE_PRESENT = 1,
619 RIL_CARDSTATE_ERROR = 2
623 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
624 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
625 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
626 since each app can only have 1 active perso
628 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
629 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
630 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
631 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
632 RIL_PERSOSUBSTATE_SIM_SIM = 7,
633 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
634 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
635 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
636 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
637 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
638 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
639 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
640 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
641 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
642 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
643 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
644 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
645 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
646 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
647 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
648 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
649 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
653 RIL_APPSTATE_UNKNOWN = 0,
654 RIL_APPSTATE_DETECTED = 1,
655 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
656 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
657 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
658 when app_state is assigned to this value */
659 RIL_APPSTATE_READY = 5
663 RIL_PINSTATE_UNKNOWN = 0,
664 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
665 RIL_PINSTATE_ENABLED_VERIFIED = 2,
666 RIL_PINSTATE_DISABLED = 3,
667 RIL_PINSTATE_ENABLED_BLOCKED = 4,
668 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
672 RIL_APPTYPE_UNKNOWN = 0,
674 RIL_APPTYPE_USIM = 2,
675 RIL_APPTYPE_RUIM = 3,
676 RIL_APPTYPE_CSIM = 4,
682 RIL_AppType app_type;
683 RIL_AppState app_state;
684 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
685 RIL_APPSTATE_SUBSCRIPTION_PERSO */
686 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
688 char *app_label_ptr; /* null terminated string */
689 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
694 /* Deprecated, use RIL_CardStatus_v6 */
697 RIL_CardState card_state;
698 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
699 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
700 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
701 int num_applications; /* value <= RIL_CARD_MAX_APPS */
702 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
707 RIL_CardState card_state;
708 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
709 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
710 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
711 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
712 int num_applications; /* value <= RIL_CARD_MAX_APPS */
713 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
716 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
717 * or as part of RIL_SimRefreshResponse_v7
720 /* A file on SIM has been updated. data[1] contains the EFID. */
722 /* SIM initialized. All files should be re-read. */
724 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
726 } RIL_SimRefreshResult;
729 RIL_SimRefreshResult result;
730 int ef_id; /* is the EFID of the updated file if the result is */
731 /* SIM_FILE_UPDATE or 0 for any other result. */
732 char * aid; /* is AID(application ID) of the card application */
733 /* See ETSI 102.221 8.1 and 101.220 4 */
734 /* For SIM_FILE_UPDATE result it can be set to AID of */
735 /* application in which updated EF resides or it can be */
736 /* NULL if EF is outside of an application. */
737 /* For SIM_INIT result this field is set to AID of */
738 /* application that caused REFRESH */
739 /* For SIM_RESET result it is NULL. */
740 } RIL_SimRefreshResponse_v7;
742 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
744 char * number; /* Remote party number */
745 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
746 char * name; /* Remote party name */
747 RIL_CDMA_SignalInfoRecord signalInfoRecord;
748 } RIL_CDMA_CallWaiting_v5;
751 char * number; /* Remote party number */
752 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
753 char * name; /* Remote party name */
754 RIL_CDMA_SignalInfoRecord signalInfoRecord;
755 /* Number type/Number plan required to support International Call Waiting */
756 int number_type; /* 0=Unknown, 1=International, 2=National,
757 3=Network specific, 4=subscriber */
758 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
759 } RIL_CDMA_CallWaiting_v6;
762 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
764 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
765 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
766 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
769 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
770 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
771 * and 9.4.4.2.3 for UMTS.
772 * All other values can be treated as empty CBM data coding scheme.
774 * selected 0 means message types specified in <fromServiceId, toServiceId>
775 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
777 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
778 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
785 unsigned char selected;
786 } RIL_GSM_BroadcastSmsConfigInfo;
788 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
789 #define RIL_RESTRICTED_STATE_NONE 0x00
790 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
791 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
792 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
793 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
794 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
795 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
796 /* Block packet data access due to restriction. */
797 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
799 /* The status for an OTASP/OTAPA session */
801 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
802 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
803 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
804 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
805 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
806 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
807 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
808 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
809 CDMA_OTA_PROVISION_STATUS_COMMITTED,
810 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
811 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
812 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
813 } RIL_CDMA_OTA_ProvisionStatus;
816 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
817 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
818 } RIL_GW_SignalStrength;
821 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
822 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
823 } RIL_SignalStrengthWcdma;
826 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
827 * multiplied by -1. Example: If the actual RSSI is -75, then this response
830 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
831 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
834 } RIL_CDMA_SignalStrength;
838 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
839 * multiplied by -1. Example: If the actual RSSI is -75, then this response
842 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
843 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
846 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
847 } RIL_EVDO_SignalStrength;
850 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
851 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
852 * Range: 44 to 140 dBm
853 * INT_MAX: 0x7FFFFFFF denotes invalid value.
854 * Reference: 3GPP TS 36.133 9.1.4 */
855 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
857 * INT_MAX: 0x7FFFFFFF denotes invalid value.
858 * Reference: 3GPP TS 36.133 9.1.7 */
859 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
860 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
861 * INT_MAX : 0x7FFFFFFF denotes invalid value.
862 * Reference: 3GPP TS 36.101 8.1.1 */
863 int cqi; /* The current Channel Quality Indicator.
865 * INT_MAX : 0x7FFFFFFF denotes invalid value.
866 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
867 } RIL_LTE_SignalStrength;
870 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
871 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
872 * Range: 44 to 140 dBm
873 * INT_MAX: 0x7FFFFFFF denotes invalid value.
874 * Reference: 3GPP TS 36.133 9.1.4 */
875 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
877 * INT_MAX: 0x7FFFFFFF denotes invalid value.
878 * Reference: 3GPP TS 36.133 9.1.7 */
879 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
880 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
881 * INT_MAX : 0x7FFFFFFF denotes invalid value.
882 * Reference: 3GPP TS 36.101 8.1.1 */
883 int cqi; /* The current Channel Quality Indicator.
885 * INT_MAX : 0x7FFFFFFF denotes invalid value.
886 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
887 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
888 * Approximate distance can be calculated using 300m/us * timingAdvance.
889 * Range: 0 to 0x7FFFFFFE
890 * INT_MAX : 0x7FFFFFFF denotes invalid value.
891 * Reference: 3GPP 36.321 section 6.1.3.5
892 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
893 } RIL_LTE_SignalStrength_v8;
896 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
898 * INT_MAX: 0x7FFFFFFF denotes invalid value.
899 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
900 } RIL_TD_SCDMA_SignalStrength;
902 /* Deprecated, use RIL_SignalStrength_v6 */
904 RIL_GW_SignalStrength GW_SignalStrength;
905 RIL_CDMA_SignalStrength CDMA_SignalStrength;
906 RIL_EVDO_SignalStrength EVDO_SignalStrength;
907 } RIL_SignalStrength_v5;
910 RIL_GW_SignalStrength GW_SignalStrength;
911 RIL_CDMA_SignalStrength CDMA_SignalStrength;
912 RIL_EVDO_SignalStrength EVDO_SignalStrength;
913 RIL_LTE_SignalStrength LTE_SignalStrength;
914 } RIL_SignalStrength_v6;
917 RIL_GW_SignalStrength GW_SignalStrength;
918 RIL_CDMA_SignalStrength CDMA_SignalStrength;
919 RIL_EVDO_SignalStrength EVDO_SignalStrength;
920 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
921 } RIL_SignalStrength_v8;
924 RIL_GW_SignalStrength GW_SignalStrength;
925 RIL_CDMA_SignalStrength CDMA_SignalStrength;
926 RIL_EVDO_SignalStrength EVDO_SignalStrength;
927 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
928 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
929 } RIL_SignalStrength_v10;
931 /** RIL_CellIdentityGsm */
933 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
934 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
935 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
936 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
937 } RIL_CellIdentityGsm;
939 /** RIL_CellIdentityWcdma */
941 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
942 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
943 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
944 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
945 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
946 } RIL_CellIdentityWcdma;
948 /** RIL_CellIdentityCdma */
950 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
951 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
952 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
953 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
954 * It is represented in units of 0.25 seconds and ranges from -2592000
955 * to 2592000, both values inclusive (corresponding to a range of -180
956 * to +180 degrees). INT_MAX if unknown */
958 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
959 * It is represented in units of 0.25 seconds and ranges from -1296000
960 * to 1296000, both values inclusive (corresponding to a range of -90
961 * to +90 degrees). INT_MAX if unknown */
962 } RIL_CellIdentityCdma;
964 /** RIL_CellIdentityLte */
966 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
967 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
968 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
969 int pci; /* physical cell id 0..503, INT_MAX if unknown */
970 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
971 } RIL_CellIdentityLte;
973 /** RIL_CellIdentityTdscdma */
975 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
976 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
977 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
978 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
979 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
980 } RIL_CellIdentityTdscdma;
982 /** RIL_CellInfoGsm */
984 RIL_CellIdentityGsm cellIdentityGsm;
985 RIL_GW_SignalStrength signalStrengthGsm;
988 /** RIL_CellInfoWcdma */
990 RIL_CellIdentityWcdma cellIdentityWcdma;
991 RIL_SignalStrengthWcdma signalStrengthWcdma;
994 /** RIL_CellInfoCdma */
996 RIL_CellIdentityCdma cellIdentityCdma;
997 RIL_CDMA_SignalStrength signalStrengthCdma;
998 RIL_EVDO_SignalStrength signalStrengthEvdo;
1001 /** RIL_CellInfoLte */
1003 RIL_CellIdentityLte cellIdentityLte;
1004 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1007 /** RIL_CellInfoTdscdma */
1009 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1010 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1011 } RIL_CellInfoTdscdma;
1013 // Must be the same as CellInfo.TYPE_XXX
1015 RIL_CELL_INFO_TYPE_GSM = 1,
1016 RIL_CELL_INFO_TYPE_CDMA = 2,
1017 RIL_CELL_INFO_TYPE_LTE = 3,
1018 RIL_CELL_INFO_TYPE_WCDMA = 4,
1019 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
1022 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1024 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1025 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1026 RIL_TIMESTAMP_TYPE_MODEM = 2,
1027 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1028 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1029 } RIL_TimeStampType;
1032 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1033 int registered; /* !0 if this cell is registered 0 if not registered */
1034 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1035 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1037 RIL_CellInfoGsm gsm;
1038 RIL_CellInfoCdma cdma;
1039 RIL_CellInfoLte lte;
1040 RIL_CellInfoWcdma wcdma;
1041 RIL_CellInfoTdscdma tdscdma;
1045 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
1047 RIL_CDMA_DISPLAY_INFO_REC,
1048 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1049 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1050 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1051 RIL_CDMA_SIGNAL_INFO_REC,
1052 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1053 RIL_CDMA_LINE_CONTROL_INFO_REC,
1054 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1055 RIL_CDMA_T53_CLIR_INFO_REC,
1056 RIL_CDMA_T53_RELEASE_INFO_REC,
1057 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1058 } RIL_CDMA_InfoRecName;
1060 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
1061 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1062 Note: the Extended Display info rec contains multiple records of the
1063 form: display_tag, display_len, and display_len occurrences of the
1064 chari field if the display_tag is not 10000000 or 10000001.
1065 To save space, the records are stored consecutively in a byte buffer.
1066 The display_tag, display_len and chari fields are all 1 byte.
1071 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
1072 } RIL_CDMA_DisplayInfoRecord;
1074 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1075 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1076 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1081 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
1086 } RIL_CDMA_NumberInfoRecord;
1088 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1090 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1091 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1092 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1093 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1094 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1095 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1096 RIL_REDIRECTING_REASON_RESERVED
1097 } RIL_CDMA_RedirectingReason;
1100 RIL_CDMA_NumberInfoRecord redirectingNumber;
1101 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1102 RIL_CDMA_RedirectingReason redirectingReason;
1103 } RIL_CDMA_RedirectingNumberInfoRecord;
1105 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1107 char lineCtrlPolarityIncluded;
1108 char lineCtrlToggle;
1109 char lineCtrlReverse;
1110 char lineCtrlPowerDenial;
1111 } RIL_CDMA_LineControlInfoRecord;
1113 /* T53 CLIR Information Record */
1116 } RIL_CDMA_T53_CLIRInfoRecord;
1118 /* T53 Audio Control Information Record */
1122 } RIL_CDMA_T53_AudioControlInfoRecord;
1126 RIL_CDMA_InfoRecName name;
1129 /* Display and Extended Display Info Rec */
1130 RIL_CDMA_DisplayInfoRecord display;
1132 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1133 RIL_CDMA_NumberInfoRecord number;
1135 /* Signal Info Rec */
1136 RIL_CDMA_SignalInfoRecord signal;
1138 /* Redirecting Number Info Rec */
1139 RIL_CDMA_RedirectingNumberInfoRecord redir;
1141 /* Line Control Info Rec */
1142 RIL_CDMA_LineControlInfoRecord lineCtrl;
1144 /* T53 CLIR Info Rec */
1145 RIL_CDMA_T53_CLIRInfoRecord clir;
1147 /* T53 Audio Control Info Rec */
1148 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1150 } RIL_CDMA_InformationRecord;
1152 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1155 char numberOfInfoRecs;
1156 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1157 } RIL_CDMA_InformationRecords;
1159 /* See RIL_REQUEST_NV_READ_ITEM */
1164 /* See RIL_REQUEST_NV_WRITE_ITEM */
1171 HANDOVER_STARTED = 0,
1172 HANDOVER_COMPLETED = 1,
1173 HANDOVER_FAILED = 2,
1174 HANDOVER_CANCELED = 3
1177 /* hardware configuration reported to RILJ. */
1179 RIL_HARDWARE_CONFIG_MODEM = 0,
1180 RIL_HARDWARE_CONFIG_SIM = 1,
1181 } RIL_HardwareConfig_Type;
1184 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1185 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1186 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1187 } RIL_HardwareConfig_State;
1191 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1195 } RIL_HardwareConfig_Modem;
1198 char modemUuid[MAX_UUID_LENGTH];
1199 } RIL_HardwareConfig_Sim;
1202 RIL_HardwareConfig_Type type;
1203 char uuid[MAX_UUID_LENGTH];
1204 RIL_HardwareConfig_State state;
1206 RIL_HardwareConfig_Modem modem;
1207 RIL_HardwareConfig_Sim sim;
1209 } RIL_HardwareConfig;
1212 * Data connection power state
1215 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1216 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1217 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1218 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1219 } RIL_DcPowerStates;
1222 * Data connection real time info
1225 uint64_t time; // Time in nanos as returned by ril_nano_time
1226 RIL_DcPowerStates powerState; // Current power state
1230 * Data profile to modem
1233 /* id of the data profile */
1235 /* the APN to connect to */
1237 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1238 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1241 /** authentication protocol used for this PDP context
1242 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1245 /* the username for APN, or NULL */
1247 /* the password for APN, or NULL */
1249 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1251 /* the period in seconds to limit the maximum connections */
1253 /* the maximum connections during maxConnsTime */
1255 /** the required wait time in seconds after a successful UE initiated
1256 * disconnect of a given PDN connection before the device can send
1257 * a new PDN connection request for that given PDN
1260 /* true to enable the profile, 0 to disable, 1 to enable */
1262 } RIL_DataProfileInfo;
1265 * RIL_REQUEST_GET_SIM_STATUS
1267 * Requests status of the SIM interface and the SIM card
1271 * "response" is const RIL_CardStatus_v6 *
1276 #define RIL_REQUEST_GET_SIM_STATUS 1
1279 * RIL_REQUEST_ENTER_SIM_PIN
1281 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
1283 * "data" is const char **
1284 * ((const char **)data)[0] is PIN value
1285 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1287 * "response" is int *
1288 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1293 * RADIO_NOT_AVAILABLE (radio resetting)
1295 * PASSWORD_INCORRECT
1298 #define RIL_REQUEST_ENTER_SIM_PIN 2
1302 * RIL_REQUEST_ENTER_SIM_PUK
1304 * Supplies SIM PUK and new PIN.
1306 * "data" is const char **
1307 * ((const char **)data)[0] is PUK value
1308 * ((const char **)data)[1] is new PIN value
1309 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1311 * "response" is int *
1312 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1317 * RADIO_NOT_AVAILABLE (radio resetting)
1319 * PASSWORD_INCORRECT
1323 #define RIL_REQUEST_ENTER_SIM_PUK 3
1326 * RIL_REQUEST_ENTER_SIM_PIN2
1328 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1329 * returned as a a failure from a previous operation.
1331 * "data" is const char **
1332 * ((const char **)data)[0] is PIN2 value
1333 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1335 * "response" is int *
1336 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1341 * RADIO_NOT_AVAILABLE (radio resetting)
1343 * PASSWORD_INCORRECT
1346 #define RIL_REQUEST_ENTER_SIM_PIN2 4
1349 * RIL_REQUEST_ENTER_SIM_PUK2
1351 * Supplies SIM PUK2 and new PIN2.
1353 * "data" is const char **
1354 * ((const char **)data)[0] is PUK2 value
1355 * ((const char **)data)[1] is new PIN2 value
1356 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1358 * "response" is int *
1359 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1364 * RADIO_NOT_AVAILABLE (radio resetting)
1366 * PASSWORD_INCORRECT
1370 #define RIL_REQUEST_ENTER_SIM_PUK2 5
1373 * RIL_REQUEST_CHANGE_SIM_PIN
1375 * Supplies old SIM PIN and new PIN.
1377 * "data" is const char **
1378 * ((const char **)data)[0] is old PIN value
1379 * ((const char **)data)[1] is new PIN value
1380 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1382 * "response" is int *
1383 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1388 * RADIO_NOT_AVAILABLE (radio resetting)
1390 * PASSWORD_INCORRECT
1391 * (old PIN is invalid)
1395 #define RIL_REQUEST_CHANGE_SIM_PIN 6
1399 * RIL_REQUEST_CHANGE_SIM_PIN2
1401 * Supplies old SIM PIN2 and new PIN2.
1403 * "data" is const char **
1404 * ((const char **)data)[0] is old PIN2 value
1405 * ((const char **)data)[1] is new PIN2 value
1406 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1408 * "response" is int *
1409 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1414 * RADIO_NOT_AVAILABLE (radio resetting)
1416 * PASSWORD_INCORRECT
1417 * (old PIN2 is invalid)
1421 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
1424 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1426 * Requests that network personlization be deactivated
1428 * "data" is const char **
1429 * ((const char **)(data))[0]] is network depersonlization code
1431 * "response" is int *
1432 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1437 * RADIO_NOT_AVAILABLE (radio resetting)
1439 * PASSWORD_INCORRECT
1443 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1446 * RIL_REQUEST_GET_CURRENT_CALLS
1448 * Requests current call list
1452 * "response" must be a "const RIL_Call **"
1457 * RADIO_NOT_AVAILABLE (radio resetting)
1459 * (request will be made again in a few hundred msec)
1462 #define RIL_REQUEST_GET_CURRENT_CALLS 9
1468 * Initiate voice call
1470 * "data" is const RIL_Dial *
1471 * "response" is NULL
1473 * This method is never used for supplementary service codes
1477 * RADIO_NOT_AVAILABLE (radio resetting)
1480 #define RIL_REQUEST_DIAL 10
1483 * RIL_REQUEST_GET_IMSI
1487 * Only valid when radio state is "RADIO_STATE_ON"
1489 * "data" is const char **
1490 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1491 * "response" is a const char * containing the IMSI
1495 * RADIO_NOT_AVAILABLE (radio resetting)
1499 #define RIL_REQUEST_GET_IMSI 11
1502 * RIL_REQUEST_HANGUP
1504 * Hang up a specific line (like AT+CHLD=1x)
1506 * After this HANGUP request returns, RIL should show the connection is NOT
1507 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1509 * "data" is an int *
1510 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1512 * "response" is NULL
1516 * RADIO_NOT_AVAILABLE (radio resetting)
1520 #define RIL_REQUEST_HANGUP 12
1523 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1525 * Hang up waiting or held (like AT+CHLD=0)
1527 * After this HANGUP request returns, RIL should show the connection is NOT
1528 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1531 * "response" is NULL
1535 * RADIO_NOT_AVAILABLE (radio resetting)
1539 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1542 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1544 * Hang up waiting or held (like AT+CHLD=1)
1546 * After this HANGUP request returns, RIL should show the connection is NOT
1547 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1550 * "response" is NULL
1554 * RADIO_NOT_AVAILABLE (radio resetting)
1558 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1561 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1563 * Switch waiting or holding call and active call (like AT+CHLD=2)
1565 * State transitions should be is follows:
1567 * If call 1 is waiting and call 2 is active, then if this re
1570 * Call 1 Call 2 Call 1 Call 2
1571 * ACTIVE HOLDING HOLDING ACTIVE
1572 * ACTIVE WAITING HOLDING ACTIVE
1573 * HOLDING WAITING HOLDING ACTIVE
1574 * ACTIVE IDLE HOLDING IDLE
1575 * IDLE IDLE IDLE IDLE
1578 * "response" is NULL
1582 * RADIO_NOT_AVAILABLE (radio resetting)
1586 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1587 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1590 * RIL_REQUEST_CONFERENCE
1592 * Conference holding and active (like AT+CHLD=3)
1595 * "response" is NULL
1599 * RADIO_NOT_AVAILABLE (radio resetting)
1602 #define RIL_REQUEST_CONFERENCE 16
1607 * Send UDUB (user determined used busy) to ringing or
1608 * waiting call answer)(RIL_BasicRequest r);
1611 * "response" is NULL
1615 * RADIO_NOT_AVAILABLE (radio resetting)
1618 #define RIL_REQUEST_UDUB 17
1621 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1623 * Requests the failure cause code for the most recently terminated call
1626 * "response" is a "int *"
1627 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
1628 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1629 * failure reasons are derived from the possible call failure scenarios
1630 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
1632 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1633 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1635 * If the implementation does not have access to the exact cause codes,
1636 * then it should return one of the values listed in RIL_LastCallFailCause,
1637 * as the UI layer needs to distinguish these cases for tone generation or
1638 * error notification.
1642 * RADIO_NOT_AVAILABLE
1645 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1647 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1650 * RIL_REQUEST_SIGNAL_STRENGTH
1652 * Requests current signal strength and associated information
1654 * Must succeed if radio is on.
1658 * "response" is a const RIL_SignalStrength *
1662 * RADIO_NOT_AVAILABLE
1664 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1667 * RIL_REQUEST_VOICE_REGISTRATION_STATE
1669 * Request current registration state
1672 * "response" is a "char **"
1673 * ((const char **)response)[0] is registration state 0-6,
1674 * 0 - Not registered, MT is not currently searching
1675 * a new operator to register
1676 * 1 - Registered, home network
1677 * 2 - Not registered, but MT is currently searching
1678 * a new operator to register
1679 * 3 - Registration denied
1681 * 5 - Registered, roaming
1682 * 10 - Same as 0, but indicates that emergency calls
1684 * 12 - Same as 2, but indicates that emergency calls
1686 * 13 - Same as 3, but indicates that emergency calls
1688 * 14 - Same as 4, but indicates that emergency calls
1691 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1692 * NULL if not.Valid LAC are 0x0000 - 0xffff
1693 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1695 * Valid CID are 0x00000000 - 0xffffffff
1696 * In GSM, CID is Cell ID (see TS 27.007)
1698 * In UMTS, CID is UMTS Cell Identity
1699 * (see TS 25.331) in 28 bits
1700 * ((const char **)response)[3] indicates the available voice radio technology,
1701 * valid values as defined by RIL_RadioTechnology.
1702 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1703 * system or NULL if not. Base Station ID in
1705 * ((const char **)response)[5] is Base Station latitude if registered on a
1706 * CDMA system or NULL if not. Base Station
1707 * latitude is a decimal number as specified in
1708 * 3GPP2 C.S0005-A v6.0. It is represented in
1709 * units of 0.25 seconds and ranges from -1296000
1710 * to 1296000, both values inclusive (corresponding
1711 * to a range of -90 to +90 degrees).
1712 * ((const char **)response)[6] is Base Station longitude if registered on a
1713 * CDMA system or NULL if not. Base Station
1714 * longitude is a decimal number as specified in
1715 * 3GPP2 C.S0005-A v6.0. It is represented in
1716 * units of 0.25 seconds and ranges from -2592000
1717 * to 2592000, both values inclusive (corresponding
1718 * to a range of -180 to +180 degrees).
1719 * ((const char **)response)[7] is concurrent services support indicator if
1720 * registered on a CDMA system 0-1.
1721 * 0 - Concurrent services not supported,
1722 * 1 - Concurrent services supported
1723 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1724 * NULL if not. Valid System ID are 0 - 32767
1725 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1726 * NULL if not. Valid System ID are 0 - 65535
1727 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1728 * on a CDMA or EVDO system or NULL if not. Valid values
1730 * ((const char **)response)[11] indicates whether the current system is in the
1731 * PRL if registered on a CDMA or EVDO system or NULL if
1732 * not. 0=not in the PRL, 1=in the PRL
1733 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1734 * if registered on a CDMA or EVDO system or NULL if not.
1735 * Valid values are 0-255.
1736 * ((const char **)response)[13] if registration state is 3 (Registration
1737 * denied) this is an enumerated reason why
1738 * registration was denied. See 3GPP TS 24.008,
1739 * 10.5.3.6 and Annex G.
1741 * 1 - Authentication Failure
1742 * 2 - IMSI unknown in HLR
1745 * 5 - PLMN not allowed
1746 * 6 - Location area not allowed
1747 * 7 - Roaming not allowed
1748 * 8 - No Suitable Cells in this Location Area
1749 * 9 - Network failure
1750 * 10 - Persistent location update reject
1751 * 11 - PLMN not allowed
1752 * 12 - Location area not allowed
1753 * 13 - Roaming not allowed in this Location Area
1754 * 15 - No Suitable Cells in this Location Area
1755 * 17 - Network Failure
1759 * 23 - GSM Authentication unacceptable
1760 * 25 - Not Authorized for this CSG
1761 * 32 - Service option not supported
1762 * 33 - Requested service option not subscribed
1763 * 34 - Service option temporarily out of order
1764 * 38 - Call cannot be identified
1765 * 48-63 - Retry upon entry into a new cell
1766 * 95 - Semantically incorrect message
1767 * 96 - Invalid mandatory information
1768 * 97 - Message type non-existent or not implemented
1769 * 98 - Message not compatible with protocol state
1770 * 99 - Information element non-existent or not implemented
1771 * 100 - Conditional IE error
1772 * 101 - Message not compatible with protocol state
1773 * 111 - Protocol error, unspecified
1774 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1775 * cell as described in TS 25.331, in hexadecimal
1776 * format, or NULL if unknown or not registered
1777 * to a UMTS network.
1779 * Please note that registration state 4 ("unknown") is treated
1780 * as "out of service" in the Android telephony system
1782 * Registration state 3 can be returned if Location Update Reject
1783 * (with cause 17 - Network Failure) is received repeatedly from the network,
1784 * to facilitate "managed roaming"
1788 * RADIO_NOT_AVAILABLE
1791 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
1794 * RIL_REQUEST_DATA_REGISTRATION_STATE
1796 * Request current DATA registration state
1799 * "response" is a "char **"
1800 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1801 * ((const char **)response)[1] is LAC if registered or NULL if not
1802 * ((const char **)response)[2] is CID if registered or NULL if not
1803 * ((const char **)response)[3] indicates the available data radio technology,
1804 * valid values as defined by RIL_RadioTechnology.
1805 * ((const char **)response)[4] if registration state is 3 (Registration
1806 * denied) this is an enumerated reason why
1807 * registration was denied. See 3GPP TS 24.008,
1808 * Annex G.6 "Additonal cause codes for GMM".
1809 * 7 == GPRS services not allowed
1810 * 8 == GPRS services and non-GPRS services not allowed
1811 * 9 == MS identity cannot be derived by the network
1812 * 10 == Implicitly detached
1813 * 14 == GPRS services not allowed in this PLMN
1814 * 16 == MSC temporarily not reachable
1815 * 40 == No PDP context activated
1816 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1817 * established using RIL_REQUEST_SETUP_DATA_CALL.
1819 * The values at offsets 6..10 are optional LTE location information in decimal.
1820 * If a value is unknown that value may be NULL. If all values are NULL,
1821 * none need to be present.
1822 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1823 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1824 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1825 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1826 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1828 * LAC and CID are in hexadecimal format.
1829 * valid LAC are 0x0000 - 0xffff
1830 * valid CID are 0x00000000 - 0x0fffffff
1832 * Please note that registration state 4 ("unknown") is treated
1833 * as "out of service" in the Android telephony system
1837 * RADIO_NOT_AVAILABLE
1840 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
1843 * RIL_REQUEST_OPERATOR
1845 * Request current operator ONS or EONS
1848 * "response" is a "const char **"
1849 * ((const char **)response)[0] is long alpha ONS or EONS
1850 * or NULL if unregistered
1852 * ((const char **)response)[1] is short alpha ONS or EONS
1853 * or NULL if unregistered
1854 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1855 * or NULL if unregistered
1859 * RADIO_NOT_AVAILABLE
1862 #define RIL_REQUEST_OPERATOR 22
1865 * RIL_REQUEST_RADIO_POWER
1867 * Toggle radio on and off (for "airplane" mode)
1868 * If the radio is is turned off/on the radio modem subsystem
1869 * is expected return to an initialized state. For instance,
1870 * any voice and data calls will be terminated and all associated
1874 * ((int *)data)[0] is > 0 for "Radio On"
1875 * ((int *)data)[0] is == 0 for "Radio Off"
1877 * "response" is NULL
1879 * Turn radio on if "on" > 0
1880 * Turn radio off if "on" == 0
1884 * RADIO_NOT_AVAILABLE
1887 #define RIL_REQUEST_RADIO_POWER 23
1894 * If the implementation is currently playing a tone requested via
1895 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1896 * should be played instead
1898 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
1899 * "response" is NULL
1901 * FIXME should this block/mute microphone?
1902 * How does this interact with local DTMF feedback?
1906 * RADIO_NOT_AVAILABLE
1909 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1912 #define RIL_REQUEST_DTMF 24
1915 * RIL_REQUEST_SEND_SMS
1917 * Send an SMS message
1919 * "data" is const char **
1920 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1921 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1922 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1923 * less the SMSC address
1924 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1926 * "response" is a const RIL_SMS_Response *
1928 * Based on the return error, caller decides to resend if sending sms
1929 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1930 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1934 * RADIO_NOT_AVAILABLE
1935 * SMS_SEND_FAIL_RETRY
1939 * FIXME how do we specify TP-Message-Reference if we need to resend?
1941 #define RIL_REQUEST_SEND_SMS 25
1945 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1947 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1948 * except that more messages are expected to be sent soon. If possible,
1949 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1951 * "data" is const char **
1952 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1953 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1954 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1955 * less the SMSC address
1956 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1958 * "response" is a const RIL_SMS_Response *
1960 * Based on the return error, caller decides to resend if sending sms
1961 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1962 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1966 * RADIO_NOT_AVAILABLE
1967 * SMS_SEND_FAIL_RETRY
1971 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1975 * RIL_REQUEST_SETUP_DATA_CALL
1977 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1978 * return success it is added to the list of data calls and a
1979 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1980 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1981 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1982 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
1984 * The RIL is expected to:
1985 * - Create one data call context.
1986 * - Create and configure a dedicated interface for the context
1987 * - The interface must be point to point.
1988 * - The interface is configured with one or more addresses and
1989 * is capable of sending and receiving packets. The prefix length
1990 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1991 * - Must NOT change the linux routing table.
1992 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
1993 * number of simultaneous data call contexts.
1995 * "data" is a const char **
1996 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1997 * for values above 2 this is RIL_RadioTechnology + 2.
1998 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
1999 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
2000 * override the one in the profile. NULL indicates no APN overrride.
2001 * ((const char **)data)[3] is the username for APN, or NULL
2002 * ((const char **)data)[4] is the password for APN, or NULL
2003 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2004 * 0 => PAP and CHAP is never performed.
2005 * 1 => PAP may be performed; CHAP is never performed.
2006 * 2 => CHAP may be performed; PAP is never performed.
2007 * 3 => PAP / CHAP may be performed - baseband dependent.
2008 * ((const char **)data)[6] is the connection type to request must be one of the
2009 * PDP_type values in TS 27.007 section 10.1.1.
2010 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2011 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
2013 * "response" is a RIL_Data_Call_Response_v6
2015 * FIXME may need way to configure QoS settings
2018 * SUCCESS should be returned on both success and failure of setup with
2019 * the RIL_Data_Call_Response_v6.status containing the actual status.
2020 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
2022 * Other errors could include:
2023 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2024 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
2026 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
2028 #define RIL_REQUEST_SETUP_DATA_CALL 27
2032 * RIL_REQUEST_SIM_IO
2034 * Request SIM I/O operation.
2035 * This is similar to the TS 27.007 "restricted SIM" operation
2036 * where it assumes all of the EF selection will be done by the
2039 * "data" is a const RIL_SIM_IO_v6 *
2040 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2041 * or may specify a PIN2 for operations that require a PIN2 (eg
2042 * updating FDN records)
2044 * "response" is a const RIL_SIM_IO_Response *
2046 * Arguments and responses that are unused for certain
2047 * values of "command" should be ignored or set to NULL
2051 * RADIO_NOT_AVAILABLE
2056 #define RIL_REQUEST_SIM_IO 28
2059 * RIL_REQUEST_SEND_USSD
2061 * Send a USSD message
2063 * If a USSD session already exists, the message should be sent in the
2064 * context of that session. Otherwise, a new session should be created.
2066 * The network reply should be reported via RIL_UNSOL_ON_USSD
2068 * Only one USSD session may exist at a time, and the session is assumed
2070 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2071 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2072 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2074 * "data" is a const char * containing the USSD request in UTF-8 format
2075 * "response" is NULL
2079 * RADIO_NOT_AVAILABLE
2083 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2086 #define RIL_REQUEST_SEND_USSD 29
2089 * RIL_REQUEST_CANCEL_USSD
2091 * Cancel the current USSD session if one exists
2094 * "response" is NULL
2098 * RADIO_NOT_AVAILABLE
2102 #define RIL_REQUEST_CANCEL_USSD 30
2105 * RIL_REQUEST_GET_CLIR
2107 * Gets current CLIR status
2109 * "response" is int *
2110 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2111 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2115 * RADIO_NOT_AVAILABLE
2118 #define RIL_REQUEST_GET_CLIR 31
2121 * RIL_REQUEST_SET_CLIR
2124 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2126 * "response" is NULL
2130 * RADIO_NOT_AVAILABLE
2133 #define RIL_REQUEST_SET_CLIR 32
2136 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2138 * "data" is const RIL_CallForwardInfo *
2140 * "response" is const RIL_CallForwardInfo **
2141 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2142 * each distinct registered phone number.
2144 * For example, if data is forwarded to +18005551212 and voice is forwarded
2145 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
2147 * If, however, both data and voice are forwarded to +18005551212, then
2148 * a single RIL_CallForwardInfo can be returned with the service class
2149 * set to "data + voice = 3")
2153 * RADIO_NOT_AVAILABLE
2156 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2160 * RIL_REQUEST_SET_CALL_FORWARD
2162 * Configure call forward rule
2164 * "data" is const RIL_CallForwardInfo *
2165 * "response" is NULL
2169 * RADIO_NOT_AVAILABLE
2172 #define RIL_REQUEST_SET_CALL_FORWARD 34
2176 * RIL_REQUEST_QUERY_CALL_WAITING
2178 * Query current call waiting state
2180 * "data" is const int *
2181 * ((const int *)data)[0] is the TS 27.007 service class to query.
2182 * "response" is a const int *
2183 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2185 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2186 * must follow, with the TS 27.007 service class bit vector of services
2187 * for which call waiting is enabled.
2189 * For example, if ((const int *)response)[0] is 1 and
2190 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2191 * and voice and disabled for everything else
2195 * RADIO_NOT_AVAILABLE
2198 #define RIL_REQUEST_QUERY_CALL_WAITING 35
2202 * RIL_REQUEST_SET_CALL_WAITING
2204 * Configure current call waiting state
2206 * "data" is const int *
2207 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2208 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2209 * services to modify
2210 * "response" is NULL
2214 * RADIO_NOT_AVAILABLE
2217 #define RIL_REQUEST_SET_CALL_WAITING 36
2220 * RIL_REQUEST_SMS_ACKNOWLEDGE
2222 * Acknowledge successful or failed receipt of SMS previously indicated
2223 * via RIL_UNSOL_RESPONSE_NEW_SMS
2226 * ((int *)data)[0] is 1 on successful receipt
2227 * (basically, AT+CNMA=1 from TS 27.005
2228 * is 0 on failed receipt
2229 * (basically, AT+CNMA=2 from TS 27.005)
2230 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2231 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2232 * capacity exceeded) and 0xFF (unspecified error) are
2235 * "response" is NULL
2237 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2241 * RADIO_NOT_AVAILABLE
2244 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2247 * RIL_REQUEST_GET_IMEI - DEPRECATED
2249 * Get the device IMEI, including check digit
2251 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2252 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2255 * "response" is a const char * containing the IMEI
2259 * RADIO_NOT_AVAILABLE (radio resetting)
2263 #define RIL_REQUEST_GET_IMEI 38
2266 * RIL_REQUEST_GET_IMEISV - DEPRECATED
2268 * Get the device IMEISV, which should be two decimal digits
2270 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2271 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2274 * "response" is a const char * containing the IMEISV
2278 * RADIO_NOT_AVAILABLE (radio resetting)
2282 #define RIL_REQUEST_GET_IMEISV 39
2286 * RIL_REQUEST_ANSWER
2288 * Answer incoming call
2290 * Will not be called for WAITING calls.
2291 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2295 * "response" is NULL
2299 * RADIO_NOT_AVAILABLE (radio resetting)
2303 #define RIL_REQUEST_ANSWER 40
2306 * RIL_REQUEST_DEACTIVATE_DATA_CALL
2308 * Deactivate packet data connection and remove from the
2309 * data call list if SUCCESS is returned. Any other return
2310 * values should also try to remove the call from the list,
2311 * but that may not be possible. In any event a
2312 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2313 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2314 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
2316 * "data" is const char **
2317 * ((char**)data)[0] indicating CID
2318 * ((char**)data)[1] indicating Disconnect Reason
2319 * 0 => No specific reason specified
2320 * 1 => Radio shutdown requested
2322 * "response" is NULL
2326 * RADIO_NOT_AVAILABLE
2329 * See also: RIL_REQUEST_SETUP_DATA_CALL
2331 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
2334 * RIL_REQUEST_QUERY_FACILITY_LOCK
2336 * Query the status of a facility lock state
2338 * "data" is const char **
2339 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
2340 * (eg "AO" for BAOC, "SC" for SIM lock)
2341 * ((const char **)data)[1] is the password, or "" if not required
2342 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2344 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2345 * This is only applicable in the case of Fixed Dialing Numbers
2348 * "response" is an int *
2349 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
2350 * services for which the specified barring facility
2351 * is active. "0" means "disabled for all"
2356 * RADIO_NOT_AVAILABLE
2360 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2363 * RIL_REQUEST_SET_FACILITY_LOCK
2365 * Enable/disable one facility lock
2367 * "data" is const char **
2369 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2370 * (eg "AO" for BAOC)
2371 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2372 * ((const char **)data)[2] = password
2373 * ((const char **)data)[3] = string representation of decimal TS 27.007
2374 * service class bit vector. Eg, the string
2375 * "1" means "set this facility for voice services"
2376 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2377 * This is only applicable in the case of Fixed Dialing Numbers
2380 * "response" is int *
2381 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2385 * RADIO_NOT_AVAILABLE
2389 #define RIL_REQUEST_SET_FACILITY_LOCK 43
2392 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2394 * Change call barring facility password
2396 * "data" is const char **
2398 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2399 * (eg "AO" for BAOC)
2400 * ((const char **)data)[1] = old password
2401 * ((const char **)data)[2] = new password
2403 * "response" is NULL
2407 * RADIO_NOT_AVAILABLE
2411 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2414 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2416 * Query current network selectin mode
2420 * "response" is int *
2421 * ((const int *)response)[0] is
2422 * 0 for automatic selection
2423 * 1 for manual selection
2427 * RADIO_NOT_AVAILABLE
2431 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2434 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2436 * Specify that the network should be selected automatically
2439 * "response" is NULL
2441 * This request must not respond until the new operator is selected
2446 * RADIO_NOT_AVAILABLE
2450 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2451 * no retries needed, such as illegal SIM or ME.
2452 * Returns GENERIC_FAILURE for all other causes that might be
2456 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2459 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2461 * Manually select a specified network.
2463 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2464 * "response" is NULL
2466 * This request must not respond until the new operator is selected
2471 * RADIO_NOT_AVAILABLE
2475 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2476 * no retries needed, such as illegal SIM or ME.
2477 * Returns GENERIC_FAILURE for all other causes that might be
2481 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2484 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2486 * Scans for available networks
2489 * "response" is const char ** that should be an array of n*4 strings, where
2490 * n is the number of available networks
2491 * For each available network:
2493 * ((const char **)response)[n+0] is long alpha ONS or EONS
2494 * ((const char **)response)[n+1] is short alpha ONS or EONS
2495 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2496 * ((const char **)response)[n+3] is a string value of the status:
2502 * This request must not respond until the new operator is selected
2507 * RADIO_NOT_AVAILABLE
2511 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2514 * RIL_REQUEST_DTMF_START
2516 * Start playing a DTMF tone. Continue playing DTMF tone until
2517 * RIL_REQUEST_DTMF_STOP is received
2519 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2520 * it should cancel the previous tone and play the new one.
2522 * "data" is a char *
2523 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2524 * "response" is NULL
2528 * RADIO_NOT_AVAILABLE
2531 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2533 #define RIL_REQUEST_DTMF_START 49
2536 * RIL_REQUEST_DTMF_STOP
2538 * Stop playing a currently playing DTMF tone.
2541 * "response" is NULL
2545 * RADIO_NOT_AVAILABLE
2548 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2550 #define RIL_REQUEST_DTMF_STOP 50
2553 * RIL_REQUEST_BASEBAND_VERSION
2555 * Return string value indicating baseband version, eg
2556 * response from AT+CGMR
2559 * "response" is const char * containing version string for log reporting
2563 * RADIO_NOT_AVAILABLE
2567 #define RIL_REQUEST_BASEBAND_VERSION 51
2570 * RIL_REQUEST_SEPARATE_CONNECTION
2572 * Separate a party from a multiparty call placing the multiparty call
2573 * (less the specified party) on hold and leaving the specified party
2574 * as the only other member of the current (active) call
2578 * See TS 22.084 1.3.8.2 (iii)
2579 * TS 22.030 6.5.5 "Entering "2X followed by send"
2580 * TS 27.007 "AT+CHLD=2x"
2582 * "data" is an int *
2583 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2585 * "response" is NULL
2589 * RADIO_NOT_AVAILABLE (radio resetting)
2592 #define RIL_REQUEST_SEPARATE_CONNECTION 52
2596 * RIL_REQUEST_SET_MUTE
2598 * Turn on or off uplink (microphone) mute.
2600 * Will only be sent while voice call is active.
2601 * Will always be reset to "disable mute" when a new voice call is initiated
2603 * "data" is an int *
2604 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2606 * "response" is NULL
2610 * RADIO_NOT_AVAILABLE (radio resetting)
2614 #define RIL_REQUEST_SET_MUTE 53
2617 * RIL_REQUEST_GET_MUTE
2619 * Queries the current state of the uplink mute setting
2622 * "response" is an int *
2623 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2627 * RADIO_NOT_AVAILABLE (radio resetting)
2631 #define RIL_REQUEST_GET_MUTE 54
2634 * RIL_REQUEST_QUERY_CLIP
2636 * Queries the status of the CLIP supplementary service
2638 * (for MMI code "*#30#")
2641 * "response" is an int *
2642 * (int *)response)[0] is 1 for "CLIP provisioned"
2643 * and 0 for "CLIP not provisioned"
2644 * and 2 for "unknown, e.g. no network etc"
2648 * RADIO_NOT_AVAILABLE (radio resetting)
2652 #define RIL_REQUEST_QUERY_CLIP 55
2655 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2656 * field in RIL_Data_Call_Response_v6.
2658 * Requests the failure cause code for the most recently failed PDP
2659 * context or CDMA data connection active
2660 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
2664 * "response" is a "int *"
2665 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2666 * section 6.1.3.1.3 or close approximation
2668 * If the implementation does not have access to the exact cause codes,
2669 * then it should return one of the values listed in
2670 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
2671 * cases for error notification
2672 * and potential retries.
2676 * RADIO_NOT_AVAILABLE
2679 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2681 * Deprecated use the status field in RIL_Data_Call_Response_v6.
2684 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
2687 * RIL_REQUEST_DATA_CALL_LIST
2689 * Returns the data call list. An entry is added when a
2690 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2691 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2692 * when RIL_REQUEST_RADIO_POWER off/on is issued.
2695 * "response" is an array of RIL_Data_Call_Response_v6
2699 * RADIO_NOT_AVAILABLE (radio resetting)
2702 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
2705 #define RIL_REQUEST_DATA_CALL_LIST 57
2708 * RIL_REQUEST_RESET_RADIO - DEPRECATED
2710 * Request a radio reset. The RIL implementation may postpone
2711 * the reset until after this request is responded to if the baseband
2712 * is presently busy.
2714 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2717 * "response" is NULL
2721 * RADIO_NOT_AVAILABLE (radio resetting)
2723 * REQUEST_NOT_SUPPORTED
2726 #define RIL_REQUEST_RESET_RADIO 58
2729 * RIL_REQUEST_OEM_HOOK_RAW
2731 * This request reserved for OEM-specific uses. It passes raw byte arrays
2734 * It can be invoked on the Java side from
2735 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2737 * "data" is a char * of bytes copied from the byte[] data argument in java
2738 * "response" is a char * of bytes that will returned via the
2739 * caller's "response" Message here:
2740 * (byte[])(((AsyncResult)response.obj).result)
2742 * An error response here will result in
2743 * (((AsyncResult)response.obj).result) == null and
2744 * (((AsyncResult)response.obj).exception) being an instance of
2745 * com.android.internal.telephony.gsm.CommandException
2751 #define RIL_REQUEST_OEM_HOOK_RAW 59
2754 * RIL_REQUEST_OEM_HOOK_STRINGS
2756 * This request reserved for OEM-specific uses. It passes strings
2759 * It can be invoked on the Java side from
2760 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2762 * "data" is a const char **, representing an array of null-terminated UTF-8
2763 * strings copied from the "String[] strings" argument to
2764 * invokeOemRilRequestStrings()
2766 * "response" is a const char **, representing an array of null-terminated UTF-8
2767 * stings that will be returned via the caller's response message here:
2769 * (String[])(((AsyncResult)response.obj).result)
2771 * An error response here will result in
2772 * (((AsyncResult)response.obj).result) == null and
2773 * (((AsyncResult)response.obj).exception) being an instance of
2774 * com.android.internal.telephony.gsm.CommandException
2780 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2783 * RIL_REQUEST_SCREEN_STATE
2785 * Indicates the current state of the screen. When the screen is off, the
2786 * RIL should notify the baseband to suppress certain notifications (eg,
2787 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2788 * in an effort to conserve power. These notifications should resume when the
2792 * ((int *)data)[0] is == 1 for "Screen On"
2793 * ((int *)data)[0] is == 0 for "Screen Off"
2795 * "response" is NULL
2801 #define RIL_REQUEST_SCREEN_STATE 61
2805 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2807 * Enables/disables supplementary service related notifications
2810 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2813 * ((int *)data)[0] is == 1 for notifications enabled
2814 * ((int *)data)[0] is == 0 for notifications disabled
2816 * "response" is NULL
2820 * RADIO_NOT_AVAILABLE
2823 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2825 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2828 * RIL_REQUEST_WRITE_SMS_TO_SIM
2830 * Stores a SMS message to SIM memory.
2832 * "data" is RIL_SMS_WriteArgs *
2834 * "response" is int *
2835 * ((const int *)response)[0] is the record index where the message is stored.
2842 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2845 * RIL_REQUEST_DELETE_SMS_ON_SIM
2847 * Deletes a SMS message from SIM memory.
2850 * ((int *)data)[0] is the record index of the message to delete.
2852 * "response" is NULL
2859 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2862 * RIL_REQUEST_SET_BAND_MODE
2864 * Assign a specified band for RF configuration.
2867 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2868 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2869 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2870 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2871 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2872 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2873 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2874 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2875 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2876 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2877 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2878 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2879 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2880 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2881 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2882 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2883 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2884 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2885 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2887 * "response" is NULL
2891 * RADIO_NOT_AVAILABLE
2894 #define RIL_REQUEST_SET_BAND_MODE 65
2897 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2899 * Query the list of band mode supported by RF.
2903 * "response" is int *
2904 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2905 * each available band mode.
2907 * 0 for "unspecified" (selected by baseband automatically)
2908 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2909 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2910 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2911 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2912 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2913 * 6 for "Cellular (800-MHz Band)"
2914 * 7 for "PCS (1900-MHz Band)"
2915 * 8 for "Band Class 3 (JTACS Band)"
2916 * 9 for "Band Class 4 (Korean PCS Band)"
2917 * 10 for "Band Class 5 (450-MHz Band)"
2918 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2919 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2920 * 13 for "Band Class 8 (1800-MHz Band)"
2921 * 14 for "Band Class 9 (900-MHz Band)"
2922 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2923 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2924 * 17 for "Band Class 15 (AWS Band)"
2925 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2929 * RADIO_NOT_AVAILABLE
2932 * See also: RIL_REQUEST_SET_BAND_MODE
2934 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2937 * RIL_REQUEST_STK_GET_PROFILE
2939 * Requests the profile of SIM tool kit.
2940 * The profile indicates the SAT/USAT features supported by ME.
2941 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2945 * "response" is a const char * containing SAT/USAT profile
2946 * in hexadecimal format string starting with first byte of terminal profile
2950 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2951 * RIL_E_GENERIC_FAILURE
2953 #define RIL_REQUEST_STK_GET_PROFILE 67
2956 * RIL_REQUEST_STK_SET_PROFILE
2958 * Download the STK terminal profile as part of SIM initialization
2961 * "data" is a const char * containing SAT/USAT profile
2962 * in hexadecimal format string starting with first byte of terminal profile
2964 * "response" is NULL
2968 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2969 * RIL_E_GENERIC_FAILURE
2971 #define RIL_REQUEST_STK_SET_PROFILE 68
2974 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2976 * Requests to send a SAT/USAT envelope command to SIM.
2977 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2979 * "data" is a const char * containing SAT/USAT command
2980 * in hexadecimal format string starting with command tag
2982 * "response" is a const char * containing SAT/USAT response
2983 * in hexadecimal format string starting with first byte of response
2988 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2989 * RIL_E_GENERIC_FAILURE
2991 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2994 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2996 * Requests to send a terminal response to SIM for a received
2999 * "data" is a const char * containing SAT/USAT response
3000 * in hexadecimal format string starting with first byte of response data
3002 * "response" is NULL
3006 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3007 * RIL_E_GENERIC_FAILURE
3009 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3012 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3014 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3015 * been initialized by ME already. (We could see the call has been in the 'call
3016 * list') So, STK application needs to accept/reject the call according as user
3020 * ((int *)data)[0] is > 0 for "accept" the call setup
3021 * ((int *)data)[0] is == 0 for "reject" the call setup
3023 * "response" is NULL
3027 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3028 * RIL_E_GENERIC_FAILURE
3030 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3033 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3035 * Connects the two calls and disconnects the subscriber from both calls.
3038 * "response" is NULL
3042 * RADIO_NOT_AVAILABLE (radio resetting)
3045 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3048 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3050 * Requests to set the preferred network type for searching and registering
3051 * (CS/PS domain, RAT, and operation mode)
3053 * "data" is int * which is RIL_PreferredNetworkType
3055 * "response" is NULL
3059 * RADIO_NOT_AVAILABLE (radio resetting)
3061 * MODE_NOT_SUPPORTED
3063 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3066 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
3068 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
3069 * for searching and registering
3073 * "response" is int *
3074 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
3078 * RADIO_NOT_AVAILABLE
3081 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3083 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
3086 * RIL_REQUEST_NEIGHBORING_CELL_IDS
3088 * Request neighboring cell id in GSM network
3091 * "response" must be a " const RIL_NeighboringCell** "
3095 * RADIO_NOT_AVAILABLE
3098 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3101 * RIL_REQUEST_SET_LOCATION_UPDATES
3103 * Enables/disables network state change notifications due to changes in
3104 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3105 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
3107 * Note: The RIL implementation should default to "updates enabled"
3108 * when the screen is on and "updates disabled" when the screen is off.
3111 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3112 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3114 * "response" is NULL
3118 * RADIO_NOT_AVAILABLE
3121 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3123 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
3126 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3128 * Request to set the location where the CDMA subscription shall
3132 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3134 * "response" is NULL
3138 * RADIO_NOT_AVAILABLE
3141 * SUBSCRIPTION_NOT_AVAILABLE
3143 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3145 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
3148 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
3150 * Request to set the roaming preferences in CDMA
3153 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3154 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3155 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3157 * "response" is NULL
3161 * RADIO_NOT_AVAILABLE
3164 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3167 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
3169 * Request the actual setting of the roaming preferences in CDMA in the modem
3173 * "response" is int *
3174 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3175 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3176 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3178 * "response" is NULL
3182 * RADIO_NOT_AVAILABLE
3185 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3188 * RIL_REQUEST_SET_TTY_MODE
3190 * Request to set the TTY mode
3193 * ((int *)data)[0] is == 0 for TTY off
3194 * ((int *)data)[0] is == 1 for TTY Full
3195 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3196 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
3198 * "response" is NULL
3202 * RADIO_NOT_AVAILABLE
3205 #define RIL_REQUEST_SET_TTY_MODE 80
3208 * RIL_REQUEST_QUERY_TTY_MODE
3210 * Request the setting of TTY mode
3214 * "response" is int *
3215 * ((int *)response)[0] is == 0 for TTY off
3216 * ((int *)response)[0] is == 1 for TTY Full
3217 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3218 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
3220 * "response" is NULL
3224 * RADIO_NOT_AVAILABLE
3227 #define RIL_REQUEST_QUERY_TTY_MODE 81
3230 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3232 * Request to set the preferred voice privacy mode used in voice
3236 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3237 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3239 * "response" is NULL
3243 * RADIO_NOT_AVAILABLE
3246 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3249 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
3251 * Request the setting of preferred voice privacy mode
3255 * "response" is int *
3256 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3257 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3259 * "response" is NULL
3263 * RADIO_NOT_AVAILABLE
3266 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3269 * RIL_REQUEST_CDMA_FLASH
3273 * "data" is const char *
3274 * ((const char *)data)[0] is a FLASH string
3276 * "response" is NULL
3280 * RADIO_NOT_AVAILABLE
3284 #define RIL_REQUEST_CDMA_FLASH 84
3287 * RIL_REQUEST_CDMA_BURST_DTMF
3291 * "data" is const char **
3292 * ((const char **)data)[0] is a DTMF string
3293 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3295 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3298 * "response" is NULL
3302 * RADIO_NOT_AVAILABLE
3306 #define RIL_REQUEST_CDMA_BURST_DTMF 85
3309 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
3311 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3312 * If the checksum is valid the 20 digit AKEY is written to NV,
3313 * replacing the existing AKEY no matter what it was before.
3315 * "data" is const char *
3316 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3317 * where the last 6 digits are a checksum of the
3318 * first 20, as specified in TR45.AHAG
3319 * "Common Cryptographic Algorithms, Revision D.1
3322 * "response" is NULL
3326 * RADIO_NOT_AVAILABLE
3330 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
3333 * RIL_REQUEST_CDMA_SEND_SMS
3335 * Send a CDMA SMS message
3337 * "data" is const RIL_CDMA_SMS_Message *
3339 * "response" is a const RIL_SMS_Response *
3341 * Based on the return error, caller decides to resend if sending sms
3342 * fails. The CDMA error class is derived as follows,
3343 * SUCCESS is error class 0 (no error)
3344 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3345 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3349 * RADIO_NOT_AVAILABLE
3350 * SMS_SEND_FAIL_RETRY
3354 #define RIL_REQUEST_CDMA_SEND_SMS 87
3357 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3359 * Acknowledge the success or failure in the receipt of SMS
3360 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3362 * "data" is const RIL_CDMA_SMS_Ack *
3364 * "response" is NULL
3368 * RADIO_NOT_AVAILABLE
3372 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3375 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
3377 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3381 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3382 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3386 * RADIO_NOT_AVAILABLE
3390 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
3393 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
3395 * Set GSM/WCDMA Cell Broadcast SMS config
3397 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3398 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3400 * "response" is NULL
3404 * RADIO_NOT_AVAILABLE
3408 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
3411 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
3413 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
3415 * "data" is const int *
3416 * (const int *)data[0] indicates to activate or turn off the
3417 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3418 * 0 - Activate, 1 - Turn off
3420 * "response" is NULL
3424 * RADIO_NOT_AVAILABLE
3428 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
3431 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
3433 * Request the setting of CDMA Broadcast SMS config
3437 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3438 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3442 * RADIO_NOT_AVAILABLE
3446 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
3449 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
3451 * Set CDMA Broadcast SMS config
3453 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3454 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3456 * "response" is NULL
3460 * RADIO_NOT_AVAILABLE
3464 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
3467 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
3469 * Enable or disable the reception of CDMA Broadcast SMS
3471 * "data" is const int *
3472 * (const int *)data[0] indicates to activate or turn off the
3473 * reception of CDMA Broadcast SMS, 0-1,
3474 * 0 - Activate, 1 - Turn off
3476 * "response" is NULL
3480 * RADIO_NOT_AVAILABLE
3484 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
3487 * RIL_REQUEST_CDMA_SUBSCRIPTION
3489 * Request the device MDN / H_SID / H_NID.
3491 * The request is only allowed when CDMA subscription is available. When CDMA
3492 * subscription is changed, application layer should re-issue the request to
3493 * update the subscription information.
3495 * If a NULL value is returned for any of the device id, it means that error
3496 * accessing the device.
3498 * "response" is const char **
3499 * ((const char **)response)[0] is MDN if CDMA subscription is available
3500 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3501 * CDMA subscription is available, in decimal format
3502 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3503 * CDMA subscription is available, in decimal format
3504 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3505 * ((const char **)response)[4] is PRL version if CDMA subscription is available
3509 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3512 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3515 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3517 * Stores a CDMA SMS message to RUIM memory.
3519 * "data" is RIL_CDMA_SMS_WriteArgs *
3521 * "response" is int *
3522 * ((const int *)response)[0] is the record index where the message is stored.
3526 * RADIO_NOT_AVAILABLE
3530 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3533 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3535 * Deletes a CDMA SMS message from RUIM memory.
3538 * ((int *)data)[0] is the record index of the message to delete.
3540 * "response" is NULL
3544 * RADIO_NOT_AVAILABLE
3548 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3551 * RIL_REQUEST_DEVICE_IDENTITY
3553 * Request the device ESN / MEID / IMEI / IMEISV.
3555 * The request is always allowed and contains GSM and CDMA device identity;
3556 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3557 * RIL_REQUEST_GET_IMEISV.
3559 * If a NULL value is returned for any of the device id, it means that error
3560 * accessing the device.
3562 * When CDMA subscription is changed the ESN/MEID may change. The application
3563 * layer should re-issue the request to update the device identity in this case.
3565 * "response" is const char **
3566 * ((const char **)response)[0] is IMEI if GSM subscription is available
3567 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3568 * ((const char **)response)[2] is ESN if CDMA subscription is available
3569 * ((const char **)response)[3] is MEID if CDMA subscription is available
3573 * RADIO_NOT_AVAILABLE
3576 #define RIL_REQUEST_DEVICE_IDENTITY 98
3579 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3581 * Request the radio's system selection module to exit emergency
3582 * callback mode. RIL will not respond with SUCCESS until the modem has
3583 * completely exited from Emergency Callback Mode.
3587 * "response" is NULL
3591 * RADIO_NOT_AVAILABLE
3595 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
3598 * RIL_REQUEST_GET_SMSC_ADDRESS
3600 * Queries the default Short Message Service Center address on the device.
3604 * "response" is const char * containing the SMSC address.
3608 * RADIO_NOT_AVAILABLE
3612 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
3615 * RIL_REQUEST_SET_SMSC_ADDRESS
3617 * Sets the default Short Message Service Center address on the device.
3619 * "data" is const char * containing the SMSC address.
3621 * "response" is NULL
3625 * RADIO_NOT_AVAILABLE
3629 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
3632 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3634 * Indicates whether there is storage available for new SMS messages.
3637 * ((int *)data)[0] is 1 if memory is available for storing new messages
3638 * is 0 if memory capacity is exceeded
3640 * "response" is NULL
3644 * RADIO_NOT_AVAILABLE
3648 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3651 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3653 * Indicates that the StkSerivce is running and is
3654 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3657 * "response" is NULL
3661 * RADIO_NOT_AVAILABLE
3665 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3668 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3670 * Request to query the location where the CDMA subscription shall
3675 * "response" is int *
3676 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3680 * RADIO_NOT_AVAILABLE
3682 * SUBSCRIPTION_NOT_AVAILABLE
3684 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3686 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3689 * RIL_REQUEST_ISIM_AUTHENTICATION
3691 * Request the ISIM application on the UICC to perform AKA
3692 * challenge/response algorithm for IMS authentication
3694 * "data" is a const char * containing the challenge string in Base64 format
3695 * "response" is a const char * containing the response in Base64 format
3699 * RADIO_NOT_AVAILABLE
3702 #define RIL_REQUEST_ISIM_AUTHENTICATION 105
3705 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3707 * Acknowledge successful or failed receipt of SMS previously indicated
3708 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3709 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3711 * "data" is const char **
3712 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3713 * is "0" on failed receipt (send RP-ERROR)
3714 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3716 * "response" is NULL
3720 * RADIO_NOT_AVAILABLE
3723 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3726 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3728 * Requests to send a SAT/USAT envelope command to SIM.
3729 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3731 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3732 * the SW1 and SW2 status bytes from the UICC response are returned along with
3733 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3735 * The RIL implementation shall perform the normal processing of a '91XX'
3736 * response in SW1/SW2 to retrieve the pending proactive command and send it
3737 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3739 * "data" is a const char * containing the SAT/USAT command
3740 * in hexadecimal format starting with command tag
3742 * "response" is a const RIL_SIM_IO_Response *
3746 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3747 * RIL_E_GENERIC_FAILURE
3749 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3752 * RIL_REQUEST_VOICE_RADIO_TECH
3754 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
3755 * when radio state is RADIO_STATE_ON
3758 * "response" is int *
3759 * ((int *) response)[0] is of type const RIL_RadioTechnology
3763 * RADIO_NOT_AVAILABLE
3766 #define RIL_REQUEST_VOICE_RADIO_TECH 108
3769 * RIL_REQUEST_GET_CELL_INFO_LIST
3771 * Request all of the current cell information known to the radio. The radio
3772 * must a list of all current cells, including the neighboring cells. If for a particular
3773 * cell information isn't known then the appropriate unknown value will be returned.
3774 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
3778 * "response" is an array of RIL_CellInfo.
3780 #define RIL_REQUEST_GET_CELL_INFO_LIST 109
3783 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
3785 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
3786 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
3787 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
3788 * a RIL_UNSOL_CELL_INFO_LIST.
3791 * ((int *)data)[0] is minimum time in milliseconds
3793 * "response" is NULL
3797 * RADIO_NOT_AVAILABLE
3800 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
3803 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
3805 * Set an apn to initial attach network
3806 * "response" is NULL
3810 * RADIO_NOT_AVAILABLE (radio resetting)
3812 * SUBSCRIPTION_NOT_AVAILABLE
3814 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
3817 * RIL_REQUEST_IMS_REGISTRATION_STATE
3819 * Request current IMS registration state
3823 * "response" is int *
3824 * ((int *)response)[0] is registration state:
3825 * 0 - Not registered
3828 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
3829 * must follow with IMS SMS format:
3831 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
3835 * RADIO_NOT_AVAILABLE
3838 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112
3841 * RIL_REQUEST_IMS_SEND_SMS
3843 * Send a SMS message over IMS
3845 * "data" is const RIL_IMS_SMS_Message *
3847 * "response" is a const RIL_SMS_Response *
3849 * Based on the return error, caller decides to resend if sending sms
3850 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
3851 * In case of retry, data is encoded based on Voice Technology available.
3855 * RADIO_NOT_AVAILABLE
3856 * SMS_SEND_FAIL_RETRY
3861 #define RIL_REQUEST_IMS_SEND_SMS 113
3864 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
3866 * Request APDU exchange on the basic channel. This command reflects TS 27.007
3867 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
3868 * of GSM/CDMA, and filter commands appropriately. It should filter
3869 * channel management and SELECT by DF name commands.
3871 * "data" is a const RIL_SIM_APDU *
3872 * "sessionid" field should be ignored.
3874 * "response" is a const RIL_SIM_IO_Response *
3878 * RADIO_NOT_AVAILABLE
3881 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
3884 * RIL_REQUEST_SIM_OPEN_CHANNEL
3886 * Open a new logical channel and select the given application. This command
3887 * reflects TS 27.007 "open logical channel" operation (+CCHO).
3889 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
3891 * "response" is int *
3892 * ((int *)data)[0] contains the session id of the logical channel.
3893 * ((int *)data)[1] onwards may optionally contain the select response for the
3894 * open channel command with one byte per integer.
3898 * RADIO_NOT_AVAILABLE
3903 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115
3906 * RIL_REQUEST_SIM_CLOSE_CHANNEL
3908 * Close a previously opened logical channel. This command reflects TS 27.007
3909 * "close logical channel" operation (+CCHC).
3912 * ((int *)data)[0] is the session id of logical the channel to close.
3914 * "response" is NULL
3918 * RADIO_NOT_AVAILABLE
3921 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
3924 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
3926 * Exchange APDUs with a UICC over a previously opened logical channel. This
3927 * command reflects TS 27.007 "generic logical channel access" operation
3928 * (+CGLA). The modem should filter channel management and SELECT by DF name
3931 * "data" is a const RIL_SIM_APDU*
3933 * "response" is a const RIL_SIM_IO_Response *
3937 * RADIO_NOT_AVAILABLE
3940 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
3943 * RIL_REQUEST_NV_READ_ITEM
3945 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
3946 * This is used for device configuration by some CDMA operators.
3948 * "data" is a const RIL_NV_ReadItem *
3950 * "response" is const char * containing the contents of the NV item
3954 * RADIO_NOT_AVAILABLE
3957 #define RIL_REQUEST_NV_READ_ITEM 118
3960 * RIL_REQUEST_NV_WRITE_ITEM
3962 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
3963 * This is used for device configuration by some CDMA operators.
3965 * "data" is a const RIL_NV_WriteItem *
3967 * "response" is NULL
3971 * RADIO_NOT_AVAILABLE
3974 #define RIL_REQUEST_NV_WRITE_ITEM 119
3977 * RIL_REQUEST_NV_WRITE_CDMA_PRL
3979 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
3980 * This is used for device configuration by some CDMA operators.
3982 * "data" is a const char * containing the PRL as a byte array
3984 * "response" is NULL
3988 * RADIO_NOT_AVAILABLE
3991 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
3994 * RIL_REQUEST_NV_RESET_CONFIG
3996 * Reset the radio NV configuration to the factory state.
3997 * This is used for device configuration by some CDMA operators.
4000 * ((int *)data)[0] is 1 to reload all NV items
4001 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
4002 * ((int *)data)[0] is 3 for factory reset (RTN)
4004 * "response" is NULL
4008 * RADIO_NOT_AVAILABLE
4011 #define RIL_REQUEST_NV_RESET_CONFIG 121
4013 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
4014 * FIXME This API needs to have more documentation.
4016 * Selection/de-selection of a subscription from a SIM card
4017 * "data" is const RIL_SelectUiccSub*
4020 * "response" is NULL
4024 * RADIO_NOT_AVAILABLE (radio resetting)
4026 * SUBSCRIPTION_NOT_SUPPORTED
4029 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
4032 * RIL_REQUEST_ALLOW_DATA
4034 * Tells the modem whether data calls are allowed or not
4037 * FIXME slotId and aid will be added.
4038 * ((int *)data)[0] is == 0 to allow data calls
4039 * ((int *)data)[0] is == 1 to disallow data calls
4041 * "response" is NULL
4046 * RADIO_NOT_AVAILABLE (radio resetting)
4050 #define RIL_REQUEST_ALLOW_DATA 123
4053 * RIL_REQUEST_GET_HARDWARE_CONFIG
4055 * Request all of the current hardware (modem and sim) associated
4060 * "response" is an array of RIL_HardwareConfig.
4062 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124
4065 * RIL_REQUEST_SIM_AUTHENTICATION
4067 * Returns the response of SIM Authentication through RIL to a
4068 * challenge request.
4070 * "data" Base64 encoded string containing challenge:
4071 * int authContext; P2 value of authentication command, see P2 parameter in
4072 * 3GPP TS 31.102 7.1.2
4073 * char *authData; the challenge string in Base64 format, see 3GPP
4075 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
4078 * "response" Base64 encoded strings containing response:
4079 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
4081 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
4083 #define RIL_REQUEST_SIM_AUTHENTICATION 125
4086 * RIL_REQUEST_GET_DC_RT_INFO
4088 * Requests the Data Connection Real Time Info
4092 * "response" is the most recent RIL_DcRtInfo
4096 * RADIO_NOT_AVAILABLE
4099 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4101 #define RIL_REQUEST_GET_DC_RT_INFO 126
4104 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4106 * This is the minimum number of milliseconds between successive
4107 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4108 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4109 * 0 means send as fast as possible.
4111 * "data" The number of milliseconds as an int
4113 * "response" is null
4116 * SUCCESS must not fail
4118 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4121 * RIL_REQUEST_SET_DATA_PROFILE
4123 * Set data profile in modem
4124 * Modem should erase existed profiles from framework, and apply new profiles
4125 * "data" is an const RIL_DataProfileInfo **
4126 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
4127 * "response" is NULL
4131 * RADIO_NOT_AVAILABLE (radio resetting)
4133 * SUBSCRIPTION_NOT_AVAILABLE
4135 #define RIL_REQUEST_SET_DATA_PROFILE 128
4138 * RIL_REQUEST_SHUTDOWN
4140 * Device is shutting down. All further commands are ignored
4141 * and RADIO_NOT_AVAILABLE must be returned.
4144 * "response" is NULL
4148 * RADIO_NOT_AVAILABLE
4151 #define RIL_REQUEST_SHUTDOWN 129
4154 * RIL_REQUEST_GET_RADIO_CAPABILITY
4156 * Used to get phone radio capablility.
4159 * ((int *)data)[0] is the phone radio access family defined in
4160 * RadioAccessFamily. It's a bit mask value to represent the support type.
4164 * RADIO_NOT_AVAILABLE
4167 #define RIL_REQUEST_GET_RADIO_CAPABILITY 130
4170 * RIL_REQUEST_SET_RADIO_CAPABILITY
4172 * Used to set the phones radio capability. Be VERY careful
4173 * using this request as it may cause some vendor modems to reset. Because
4174 * of the possible modem reset any RIL commands after this one may not be
4177 * "data" is the RIL_RadioCapability structure
4179 * "response" is the RIL_RadioCapability structure, used to feedback return status
4182 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
4183 * RADIO_NOT_AVAILABLE
4186 #define RIL_REQUEST_SET_RADIO_CAPABILITY 131
4189 /***********************************************************************/
4192 #define RIL_UNSOL_RESPONSE_BASE 1000
4195 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
4197 * Indicate when value of RIL_RadioState has changed.
4199 * Callee will invoke RIL_RadioStateRequest method on main thread
4204 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
4208 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
4210 * Indicate when call state has changed
4212 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
4216 * Response should be invoked on, for example,
4217 * "RING", "BUSY", "NO CARRIER", and also call state
4218 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
4220 * Redundent or extraneous invocations are tolerated
4222 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4226 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
4228 * Called when the voice network state changed
4230 * Callee will invoke the following requests on main thread:
4232 * RIL_REQUEST_VOICE_REGISTRATION_STATE
4233 * RIL_REQUEST_OPERATOR
4237 * FIXME should this happen when SIM records are loaded? (eg, for
4240 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
4243 * RIL_UNSOL_RESPONSE_NEW_SMS
4245 * Called when new SMS is received.
4247 * "data" is const char *
4248 * This is a pointer to a string containing the PDU of an SMS-DELIVER
4249 * as an ascii string of hex digits. The PDU starts with the SMSC address
4250 * per TS 27.005 (+CMT:)
4252 * Callee will subsequently confirm the receipt of thei SMS with a
4253 * RIL_REQUEST_SMS_ACKNOWLEDGE
4255 * No new RIL_UNSOL_RESPONSE_NEW_SMS
4256 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4257 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4260 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4263 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4265 * Called when new SMS Status Report is received.
4267 * "data" is const char *
4268 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4269 * as an ascii string of hex digits. The PDU starts with the SMSC address
4270 * per TS 27.005 (+CDS:).
4272 * Callee will subsequently confirm the receipt of the SMS with a
4273 * RIL_REQUEST_SMS_ACKNOWLEDGE
4275 * No new RIL_UNSOL_RESPONSE_NEW_SMS
4276 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4277 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4280 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4283 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4285 * Called when new SMS has been stored on SIM card
4287 * "data" is const int *
4288 * ((const int *)data)[0] contains the slot index on the SIM that contains
4292 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4297 * Called when a new USSD message is received.
4299 * "data" is const char **
4300 * ((const char **)data)[0] points to a type code, which is
4301 * one of these string values:
4302 * "0" USSD-Notify -- text in ((const char **)data)[1]
4303 * "1" USSD-Request -- text in ((const char **)data)[1]
4304 * "2" Session terminated by network
4305 * "3" other local client (eg, SIM Toolkit) has responded
4306 * "4" Operation not supported
4307 * "5" Network timeout
4309 * The USSD session is assumed to persist if the type code is "1", otherwise
4310 * the current session (if any) is assumed to have terminated.
4312 * ((const char **)data)[1] points to a message string if applicable, which
4313 * should always be in UTF-8.
4315 #define RIL_UNSOL_ON_USSD 1006
4316 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
4319 * RIL_UNSOL_ON_USSD_REQUEST
4321 * Obsolete. Send via RIL_UNSOL_ON_USSD
4323 #define RIL_UNSOL_ON_USSD_REQUEST 1007
4327 * RIL_UNSOL_NITZ_TIME_RECEIVED
4329 * Called when radio has received a NITZ time message
4331 * "data" is const char * pointing to NITZ time string
4332 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4334 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
4337 * RIL_UNSOL_SIGNAL_STRENGTH
4339 * Radio may report signal strength rather han have it polled.
4341 * "data" is a const RIL_SignalStrength *
4343 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
4347 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
4349 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
4350 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4351 * of current data contexts including new contexts that have been
4352 * activated. A data call is only removed from this list when the
4353 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4354 * is powered off/on.
4356 * See also: RIL_REQUEST_DATA_CALL_LIST
4359 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
4362 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4364 * Reports supplementary service related notification from the network.
4366 * "data" is a const RIL_SuppSvcNotification *
4370 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4373 * RIL_UNSOL_STK_SESSION_END
4375 * Indicate when STK session is terminated by SIM.
4379 #define RIL_UNSOL_STK_SESSION_END 1012
4382 * RIL_UNSOL_STK_PROACTIVE_COMMAND
4384 * Indicate when SIM issue a STK proactive command to applications
4386 * "data" is a const char * containing SAT/USAT proactive command
4387 * in hexadecimal format string starting with command tag
4390 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4393 * RIL_UNSOL_STK_EVENT_NOTIFY
4395 * Indicate when SIM notifies applcations some event happens.
4396 * Generally, application does not need to have any feedback to
4397 * SIM but shall be able to indicate appropriate messages to users.
4399 * "data" is a const char * containing SAT/USAT commands or responses
4400 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4401 * starting with first byte of response data or command tag
4404 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4407 * RIL_UNSOL_STK_CALL_SETUP
4409 * Indicate when SIM wants application to setup a voice call.
4411 * "data" is const int *
4412 * ((const int *)data)[0] contains timeout value (in milliseconds)
4414 #define RIL_UNSOL_STK_CALL_SETUP 1015
4417 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4419 * Indicates that SMS storage on the SIM is full. Sent when the network
4420 * attempts to deliver a new SMS message. Messages cannot be saved on the
4421 * SIM until space is freed. In particular, incoming Class 2 messages
4427 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4430 * RIL_UNSOL_SIM_REFRESH
4432 * Indicates that file(s) on the SIM have been updated, or the SIM
4433 * has been reinitialized.
4435 * In the case where RIL is version 6 or older:
4436 * "data" is an int *
4437 * ((int *)data)[0] is a RIL_SimRefreshResult.
4438 * ((int *)data)[1] is the EFID of the updated file if the result is
4439 * SIM_FILE_UPDATE or NULL for any other result.
4441 * In the case where RIL is version 7:
4442 * "data" is a RIL_SimRefreshResponse_v7 *
4444 * Note: If the SIM state changes as a result of the SIM refresh (eg,
4445 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4448 #define RIL_UNSOL_SIM_REFRESH 1017
4451 * RIL_UNSOL_CALL_RING
4453 * Ring indication for an incoming call (eg, RING or CRING event).
4454 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4455 * of a call and sending multiple is optional. If the system property
4456 * ro.telephony.call_ring.multiple is false then the upper layers
4457 * will generate the multiple events internally. Otherwise the vendor
4458 * ril must generate multiple RIL_UNSOL_CALL_RING if
4459 * ro.telephony.call_ring.multiple is true or if it is absent.
4461 * The rate of these events is controlled by ro.telephony.call_ring.delay
4462 * and has a default value of 3000 (3 seconds) if absent.
4464 * "data" is null for GSM
4465 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
4467 #define RIL_UNSOL_CALL_RING 1018
4470 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4472 * Indicates that SIM state changes.
4474 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
4478 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4481 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4483 * Called when new CDMA SMS is received
4485 * "data" is const RIL_CDMA_SMS_Message *
4487 * Callee will subsequently confirm the receipt of the SMS with
4488 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4490 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4491 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
4494 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4497 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
4499 * Called when new Broadcast SMS is received
4501 * "data" can be one of the following:
4502 * If received from GSM network, "data" is const char of 88 bytes
4503 * which indicates each page of a CBS Message sent to the MS by the
4504 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
4505 * If received from UMTS network, "data" is const char of 90 up to 1252
4506 * bytes which contain between 1 and 15 CBS Message pages sent as one
4507 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
4510 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
4513 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
4515 * Indicates that SMS storage on the RUIM is full. Messages
4516 * cannot be saved on the RUIM until space is freed.
4521 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4524 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4526 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4528 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4530 * "data" is an int *
4531 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4533 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4536 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4538 * Indicates that the radio system selection module has
4539 * autonomously entered emergency callback mode.
4544 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
4547 * RIL_UNSOL_CDMA_CALL_WAITING
4549 * Called when CDMA radio receives a call waiting indication.
4551 * "data" is const RIL_CDMA_CallWaiting *
4554 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
4557 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4559 * Called when CDMA radio receives an update of the progress of an
4562 * "data" is const int *
4563 * For CDMA this is an integer OTASP/OTAPA status listed in
4564 * RIL_CDMA_OTA_ProvisionStatus.
4567 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4570 * RIL_UNSOL_CDMA_INFO_REC
4572 * Called when CDMA radio receives one or more info recs.
4574 * "data" is const RIL_CDMA_InformationRecords *
4577 #define RIL_UNSOL_CDMA_INFO_REC 1027
4580 * RIL_UNSOL_OEM_HOOK_RAW
4582 * This is for OEM specific use.
4584 * "data" is a byte[]
4586 #define RIL_UNSOL_OEM_HOOK_RAW 1028
4589 * RIL_UNSOL_RINGBACK_TONE
4591 * Indicates that nework doesn't have in-band information, need to
4592 * play out-band tone.
4594 * "data" is an int *
4595 * ((int *)data)[0] == 0 for stop play ringback tone.
4596 * ((int *)data)[0] == 1 for start play ringback tone.
4598 #define RIL_UNSOL_RINGBACK_TONE 1029
4601 * RIL_UNSOL_RESEND_INCALL_MUTE
4603 * Indicates that framework/application need reset the uplink mute state.
4605 * There may be situations where the mute state becomes out of sync
4606 * between the application and device in some GSM infrastructures.
4610 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
4613 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
4615 * Called when CDMA subscription source changed.
4618 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4620 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
4623 * RIL_UNSOL_CDMA_PRL_CHANGED
4625 * Called when PRL (preferred roaming list) changes.
4628 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
4630 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
4633 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
4635 * Called when Emergency Callback Mode Ends
4637 * Indicates that the radio system selection module has
4638 * proactively exited emergency callback mode.
4643 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
4646 * RIL_UNSOL_RIL_CONNECTED
4648 * Called the ril connects and returns the version
4651 * ((int *)data)[0] is RIL_VERSION
4653 #define RIL_UNSOL_RIL_CONNECTED 1034
4656 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
4658 * Indicates that voice technology has changed. Contains new radio technology
4659 * as a data in the message.
4662 * ((int *)data)[0] is of type const RIL_RadioTechnology
4665 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
4668 * RIL_UNSOL_CELL_INFO_LIST
4670 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
4671 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
4675 * "response" is an array of RIL_CellInfo.
4677 #define RIL_UNSOL_CELL_INFO_LIST 1036
4680 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
4682 * Called when IMS registration state has changed
4684 * To get IMS registration state and IMS SMS format, callee needs to invoke the
4685 * following request on main thread:
4687 * RIL_REQUEST_IMS_REGISTRATION_STATE
4692 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
4695 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
4697 * Indicated when there is a change in subscription status.
4698 * This event will be sent in the following scenarios
4699 * - subscription readiness at modem, which was selected by telephony layer
4700 * - when subscription is deactivated by modem due to UICC card removal
4701 * - When network invalidates the subscription i.e. attach reject due to authentication reject
4703 * "data" is const int *
4704 * ((const int *)data)[0] == 0 for Subscription Deactivated
4705 * ((const int *)data)[0] == 1 for Subscription Activated
4708 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
4711 * RIL_UNSOL_SRVCC_STATE_NOTIFY
4713 * Called when Single Radio Voice Call Continuity(SRVCC)
4714 * progress state has changed
4717 * ((int *)data)[0] is of type const RIL_SrvccState
4721 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
4724 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
4726 * Called when the hardware configuration associated with the RILd changes
4728 * "data" is an array of RIL_HardwareConfig
4731 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
4734 * RIL_UNSOL_DC_RT_INFO_CHANGED
4736 * Sent when the DC_RT_STATE changes but the time
4737 * between these messages must not be less than the
4738 * value set by RIL_REQUEST_SET_DC_RT_RATE.
4740 * "data" is the most recent RIL_DcRtInfo
4743 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
4746 * RIL_UNSOL_RADIO_CAPABILITY
4748 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
4749 * Returns the phone radio capability exactly as
4750 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
4751 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
4753 * "data" is the RIL_RadioCapability structure
4755 #define RIL_UNSOL_RADIO_CAPABILITY 1042
4757 /***********************************************************************/
4759 #if defined(ANDROID_MULTI_SIM)
4761 * RIL_Request Function pointer
4763 * @param request is one of RIL_REQUEST_*
4764 * @param data is pointer to data defined for that RIL_REQUEST_*
4765 * data is owned by caller, and should not be modified or freed by callee
4766 * @param t should be used in subsequent call to RIL_onResponse
4767 * @param datalen the length of data
4770 typedef void (*RIL_RequestFunc) (int request, void *data,
4771 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
4774 * This function should return the current radio state synchronously
4776 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
4779 /* Backward compatible */
4782 * RIL_Request Function pointer
4784 * @param request is one of RIL_REQUEST_*
4785 * @param data is pointer to data defined for that RIL_REQUEST_*
4786 * data is owned by caller, and should not be modified or freed by callee
4787 * @param t should be used in subsequent call to RIL_onResponse
4788 * @param datalen the length of data
4791 typedef void (*RIL_RequestFunc) (int request, void *data,
4792 size_t datalen, RIL_Token t);
4795 * This function should return the current radio state synchronously
4797 typedef RIL_RadioState (*RIL_RadioStateRequest)();
4803 * This function returns "1" if the specified RIL_REQUEST code is
4804 * supported and 0 if it is not
4806 * @param requestCode is one of RIL_REQUEST codes
4809 typedef int (*RIL_Supports)(int requestCode);
4812 * This function is called from a separate thread--not the
4813 * thread that calls RIL_RequestFunc--and indicates that a pending
4814 * request should be cancelled.
4816 * On cancel, the callee should do its best to abandon the request and
4817 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
4819 * Subsequent calls to RIL_onRequestComplete for this request with
4820 * other results will be tolerated but ignored. (That is, it is valid
4821 * to ignore the cancellation request)
4823 * RIL_Cancel calls should return immediately, and not wait for cancellation
4825 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
4828 * @param t token wants to be canceled
4831 typedef void (*RIL_Cancel)(RIL_Token t);
4833 typedef void (*RIL_TimedCallback) (void *param);
4836 * Return a version string for your RIL implementation
4838 typedef const char * (*RIL_GetVersion) (void);
4841 int version; /* set to RIL_VERSION */
4842 RIL_RequestFunc onRequest;
4843 RIL_RadioStateRequest onStateRequest;
4844 RIL_Supports supports;
4845 RIL_Cancel onCancel;
4846 RIL_GetVersion getVersion;
4847 } RIL_RadioFunctions;
4855 } RIL_InitialAttachApn;
4858 int authContext; /* P2 value of authentication command, see P2 parameter in
4859 3GPP TS 31.102 7.1.2 */
4860 char *authData; /* the challenge string in Base64 format, see 3GPP
4862 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
4863 NULL if no value. */
4864 } RIL_SimAuthentication;
4869 * "t" is parameter passed in on previous call to RIL_Notification
4872 * If "e" != SUCCESS, then response can be null/is ignored
4874 * "response" is owned by caller, and should not be modified or
4877 * RIL_onRequestComplete will return as soon as possible
4879 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
4880 void *response, size_t responselen);
4882 #if defined(ANDROID_MULTI_SIM)
4884 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4885 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4887 * "data" is owned by caller, and should not be modified or freed by callee
4889 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
4892 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4893 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4895 * "data" is owned by caller, and should not be modified or freed by callee
4897 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
4900 * Call user-specifed "callback" function on on the same thread that
4901 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4902 * a relative time value at which the callback is invoked. If relativeTime is
4903 * NULL or points to a 0-filled structure, the callback will be invoked as
4907 void (*RequestTimedCallback) (RIL_TimedCallback callback,
4908 void *param, const struct timeval *relativeTime);
4913 * RIL implementations must defined RIL_Init
4914 * argc and argv will be command line arguments intended for the RIL implementation
4915 * Return NULL on error
4917 * @param env is environment point defined as RIL_Env
4918 * @param argc number of arguments
4919 * @param argv list fo arguments
4922 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
4924 #else /* RIL_SHLIB */
4927 * Call this once at startup to register notification routine
4929 * @param callbacks user-specifed callback function
4931 void RIL_register (const RIL_RadioFunctions *callbacks);
4936 * RIL_onRequestComplete will return as soon as possible
4938 * @param t is parameter passed in on previous call to RIL_Notification
4940 * @param e error code
4941 * if "e" != SUCCESS, then response can be null/is ignored
4942 * @param response is owned by caller, and should not be modified or
4944 * @param responselen the length of response in byte
4946 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
4947 void *response, size_t responselen);
4949 #if defined(ANDROID_MULTI_SIM)
4951 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4952 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4953 * "data" is owned by caller, and should not be modified or freed by callee
4954 * @param datalen the length of data in byte
4957 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
4958 size_t datalen, RIL_SOCKET_ID socket_id);
4961 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4962 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4963 * "data" is owned by caller, and should not be modified or freed by callee
4964 * @param datalen the length of data in byte
4967 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
4972 * Call user-specifed "callback" function on on the same thread that
4973 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4974 * a relative time value at which the callback is invoked. If relativeTime is
4975 * NULL or points to a 0-filled structure, the callback will be invoked as
4978 * @param callback user-specifed callback function
4979 * @param param parameter list
4980 * @param relativeTime a relative time value at which the callback is invoked
4983 void RIL_requestTimedCallback (RIL_TimedCallback callback,
4984 void *param, const struct timeval *relativeTime);
4987 #endif /* RIL_SHLIB */
4993 #endif /*ANDROID_RIL_H*/