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
61 typedef void * RIL_Token;
80 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
81 RIL_E_GENERIC_FAILURE = 2,
82 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
83 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
84 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
85 RIL_E_REQUEST_NOT_SUPPORTED = 6,
87 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
88 call on a Class C GPRS device */
89 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
90 registers in network */
91 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
92 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
93 shall be retrieved because of SIM or RUIM
95 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
97 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
98 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
99 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
101 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
102 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
107 RIL_CALL_HOLDING = 1,
108 RIL_CALL_DIALING = 2, /* MO call only */
109 RIL_CALL_ALERTING = 3, /* MO call only */
110 RIL_CALL_INCOMING = 4, /* MT call only */
111 RIL_CALL_WAITING = 5 /* MT call only */
115 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
116 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
117 /* States 2-9 below are deprecated. Just leaving them here for backward compatibility. */
118 RADIO_STATE_SIM_NOT_READY = 2, /* Radio is on, but the SIM interface is not ready */
119 RADIO_STATE_SIM_LOCKED_OR_ABSENT = 3, /* SIM PIN locked, PUK required, network
120 personalization locked, or SIM absent */
121 RADIO_STATE_SIM_READY = 4, /* Radio is on and SIM interface is available */
122 RADIO_STATE_RUIM_NOT_READY = 5, /* Radio is on, but the RUIM interface is not ready */
123 RADIO_STATE_RUIM_READY = 6, /* Radio is on and the RUIM interface is available */
124 RADIO_STATE_RUIM_LOCKED_OR_ABSENT = 7, /* RUIM PIN locked, PUK required, network
125 personalization locked, or RUIM absent */
126 RADIO_STATE_NV_NOT_READY = 8, /* Radio is on, but the NV interface is not available */
127 RADIO_STATE_NV_READY = 9, /* Radio is on and the NV interface is available */
128 RADIO_STATE_ON = 10 /* Radio is on */
132 RADIO_TECH_UNKNOWN = 0,
136 RADIO_TECH_IS95A = 4,
137 RADIO_TECH_IS95B = 5,
138 RADIO_TECH_1xRTT = 6,
139 RADIO_TECH_EVDO_0 = 7,
140 RADIO_TECH_EVDO_A = 8,
141 RADIO_TECH_HSDPA = 9,
142 RADIO_TECH_HSUPA = 10,
143 RADIO_TECH_HSPA = 11,
144 RADIO_TECH_EVDO_B = 12,
145 RADIO_TECH_EHRPD = 13,
147 RADIO_TECH_HSPAP = 15, // HSPA+
148 RADIO_TECH_GSM = 16, // Only supports voice
149 RADIO_TECH_TD_SCDMA = 17
150 } RIL_RadioTechnology;
152 // Do we want to split Data from Voice and the use
153 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
155 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
156 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
157 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
158 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
159 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
160 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
161 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
162 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
163 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
164 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
165 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
166 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
167 PREF_NET_TYPE_LTE_WCDMA = 12 /* LTE/WCDMA */
168 } RIL_PreferredNetworkType;
170 /* Source for cdma subscription */
172 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
173 CDMA_SUBSCRIPTION_SOURCE_NV = 1
174 } RIL_CdmaSubscriptionSource;
176 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
178 RIL_UUS_TYPE1_IMPLICIT = 0,
179 RIL_UUS_TYPE1_REQUIRED = 1,
180 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
181 RIL_UUS_TYPE2_REQUIRED = 3,
182 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
183 RIL_UUS_TYPE3_REQUIRED = 5,
184 RIL_UUS_TYPE3_NOT_REQUIRED = 6
187 /* User-to-User Signaling Information data coding schemes. Possible values for
188 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
189 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
191 RIL_UUS_DCS_USP = 0, /* User specified protocol */
192 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
193 RIL_UUS_DCS_X244 = 2, /* X.244 */
194 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
195 convergence function */
196 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
199 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
200 * This data is passed in RIL_ExtensionRecord and rec contains this
201 * structure when type is RIL_UUS_INFO_EXT_REC */
203 RIL_UUS_Type uusType; /* UUS Type */
204 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
205 int uusLength; /* Length of UUS Data */
206 char * uusData; /* UUS Data */
209 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
211 char isPresent; /* non-zero if signal information record is present */
212 char signalType; /* as defined 3.7.5.5-1 */
213 char alertPitch; /* as defined 3.7.5.5-2 */
214 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
215 } RIL_CDMA_SignalInfoRecord;
219 int index; /* Connection Index for use with, eg, AT+CHLD */
220 int toa; /* type of address, eg 145 = intl */
221 char isMpty; /* nonzero if is mpty call */
222 char isMT; /* nonzero if call is mobile terminated */
223 char als; /* ALS line indicator if available
225 char isVoice; /* nonzero if this is is a voice call */
226 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
227 char * number; /* Remote party number */
228 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
229 char * name; /* Remote party name */
230 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
231 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
234 /* Deprecated, use RIL_Data_Call_Response_v6 */
236 int cid; /* Context ID, uniquely identifies this call */
237 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
238 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
239 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
240 char * apn; /* ignored */
241 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
242 } RIL_Data_Call_Response_v4;
245 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
246 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
249 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
250 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
251 back-off timer value RIL wants to override the one
252 pre-configured in FW.
253 The unit is miliseconds.
254 The value < 0 means no value is suggested.
255 The value 0 means retry should be done ASAP.
256 The value of INT_MAX(0x7fffffff) means no retry. */
257 int cid; /* Context ID, uniquely identifies this call */
258 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
259 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
260 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
261 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
262 such as "IP" or "IPV6" */
263 char * ifname; /* The network interface name */
264 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
265 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
266 May not be empty, typically 1 IPv4 or 1 IPv6 or
267 one of each. If the prefix length is absent the addresses
268 are assumed to be point to point with IPv4 having a prefix
269 length of 32 and IPv6 128. */
270 char * dnses; /* A space-delimited list of DNS server addresses,
271 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
273 char * gateways; /* A space-delimited list of default gateway addresses,
274 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
275 May be empty in which case the addresses represent point
276 to point connections. */
277 } RIL_Data_Call_Response_v6;
280 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
281 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
282 back-off timer value RIL wants to override the one
283 pre-configured in FW.
284 The unit is miliseconds.
285 The value < 0 means no value is suggested.
286 The value 0 means retry should be done ASAP.
287 The value of INT_MAX(0x7fffffff) means no retry. */
288 int cid; /* Context ID, uniquely identifies this call */
289 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
290 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
291 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
292 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
293 such as "IP" or "IPV6" */
294 char * ifname; /* The network interface name */
295 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
296 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
297 May not be empty, typically 1 IPv4 or 1 IPv6 or
298 one of each. If the prefix length is absent the addresses
299 are assumed to be point to point with IPv4 having a prefix
300 length of 32 and IPv6 128. */
301 char * dnses; /* A space-delimited list of DNS server addresses,
302 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
304 char * gateways; /* A space-delimited list of default gateway addresses,
305 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
306 May be empty in which case the addresses represent point
307 to point connections. */
308 char * pcscf; /* the Proxy Call State Control Function address
309 via PCO(Protocol Configuration Option) for IMS client. */
310 } RIL_Data_Call_Response_v9; // FIXME: Change to v10
313 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
314 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
315 } RIL_RadioTechnologyFamily;
318 RIL_RadioTechnologyFamily tech;
319 unsigned char retry; /* 0 == not retry, nonzero == retry */
320 int messageRef; /* Valid field if retry is set to nonzero.
321 Contains messageRef from RIL_SMS_Response
322 corresponding to failed MO SMS.
326 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
327 RIL_CDMA_SMS_Message* cdmaMessage;
329 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
332 } RIL_IMS_SMS_Message;
335 int messageRef; /* TP-Message-Reference for GSM,
336 and BearerData MessageId for CDMA
337 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
338 char *ackPDU; /* or NULL if n/a */
339 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
340 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
341 -1 if unknown or not applicable*/
344 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
346 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
347 /* 0 = "REC UNREAD" */
349 /* 2 = "STO UNSENT" */
351 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
352 the TP-layer length is "strlen(pdu)/2". */
353 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
354 (as expected by TS 27.005) or NULL for default SMSC */
357 /** Used by RIL_REQUEST_DIAL */
361 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
362 * clir == 0 on "use subscription default value"
363 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
364 * clir == 2 on "CLIR suppression" (allow CLI presentation)
366 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
370 int command; /* one of the commands listed for TS 27.007 +CRSM*/
371 int fileid; /* EF id */
372 char *path; /* "pathid" from TS 27.007 +CRSM command.
373 Path is in hex asciii format eg "7f205f70"
374 Path must always be provided.
379 char *data; /* May be NULL*/
380 char *pin2; /* May be NULL*/
384 int command; /* one of the commands listed for TS 27.007 +CRSM*/
385 int fileid; /* EF id */
386 char *path; /* "pathid" from TS 27.007 +CRSM command.
387 Path is in hex asciii format eg "7f205f70"
388 Path must always be provided.
393 char *data; /* May be NULL*/
394 char *pin2; /* May be NULL*/
395 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
398 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
399 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
401 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
402 ignored for +CSIM command. */
404 /* Following fields are used to derive the APDU ("command" and "length"
405 values in TS 27.007 +CSIM and +CGLA commands). */
410 int p3; /* A negative P3 implies a 4 byte APDU. */
411 char *data; /* May be NULL. In hex string format. */
417 char *simResponse; /* In hex string format ([a-fA-F0-9]*). */
418 } RIL_SIM_IO_Response;
420 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
424 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
425 * status 1 = active, 0 = not active
427 * For RIL_REQUEST_SET_CALL_FORWARD:
436 int reason; /* from TS 27.007 7.11 "reason" */
437 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
438 See table for Android mapping from
440 0 means user doesn't input class */
441 int toa; /* "type" from TS 27.007 7.11 */
442 char * number; /* "number" from TS 27.007 7.11. May be NULL */
443 int timeSeconds; /* for CF no reply only */
444 }RIL_CallForwardInfo;
447 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
448 * Upper 16 bits is LAC and lower 16 bits
449 * is CID (as described in TS 27.005)
450 * Primary Scrambling Code (as described in TS 25.331)
452 * Valid values are hexadecimal 0x0000 - 0xffffffff.
454 int rssi; /* Received RSSI in GSM,
455 * Level index of CPICH Received Signal Code Power in UMTS
457 } RIL_NeighboringCell;
459 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
461 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
462 CALL_FAIL_NORMAL = 16,
464 CALL_FAIL_CONGESTION = 34,
465 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
466 CALL_FAIL_CALL_BARRED = 240,
467 CALL_FAIL_FDN_BLOCKED = 241,
468 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
469 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
470 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
471 CALL_FAIL_CDMA_DROP = 1001,
472 CALL_FAIL_CDMA_INTERCEPT = 1002,
473 CALL_FAIL_CDMA_REORDER = 1003,
474 CALL_FAIL_CDMA_SO_REJECT = 1004,
475 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
476 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
477 CALL_FAIL_CDMA_PREEMPTED = 1007,
478 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
479 during emergency callback mode */
480 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
481 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff
482 } RIL_LastCallFailCause;
484 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
486 PDP_FAIL_NONE = 0, /* No error, connection ok */
488 /* an integer cause code defined in TS 24.008
489 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
490 If the implementation does not have access to the exact cause codes,
491 then it should return one of the following values,
492 as the UI layer needs to distinguish these
493 cases for error notification and potential retries. */
494 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
495 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
496 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
497 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
498 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
499 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
500 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
501 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
502 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
503 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
504 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
505 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* restart radio */
506 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
507 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
508 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
509 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
511 /* Not mentioned in the specification */
512 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
513 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
515 /* reasons for data call drop - network/modem disconnect */
516 PDP_FAIL_SIGNAL_LOST = -3,
517 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
518 with parameters appropriate for new technology */
519 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
520 powered off - no retry */
521 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
522 mode was up on same APN/data profile - no retry until
523 tethered call is off */
525 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently */
526 } RIL_DataCallFailCause;
528 /* See RIL_REQUEST_SETUP_DATA_CALL */
530 RIL_DATA_PROFILE_DEFAULT = 0,
531 RIL_DATA_PROFILE_TETHERED = 1,
532 RIL_DATA_PROFILE_OEM_BASE = 1000 /* Start of OEM-specific profiles */
535 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
537 int notificationType; /*
538 * 0 = MO intermediate result code
539 * 1 = MT unsolicited result code
541 int code; /* See 27.007 7.17
544 int index; /* CUG index. See 27.007 7.17. */
545 int type; /* "type" from 27.007 7.17 (MT only). */
546 char * number; /* "number" from 27.007 7.17
547 (MT only, may be NULL). */
548 } RIL_SuppSvcNotification;
550 #define RIL_CARD_MAX_APPS 8
553 RIL_CARDSTATE_ABSENT = 0,
554 RIL_CARDSTATE_PRESENT = 1,
555 RIL_CARDSTATE_ERROR = 2
559 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
560 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
561 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
562 since each app can only have 1 active perso
564 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
565 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
566 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
567 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
568 RIL_PERSOSUBSTATE_SIM_SIM = 7,
569 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
570 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
571 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
572 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
573 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
574 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
575 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
576 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
577 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
578 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
579 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
580 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
581 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
582 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
583 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
584 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
585 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
589 RIL_APPSTATE_UNKNOWN = 0,
590 RIL_APPSTATE_DETECTED = 1,
591 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
592 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
593 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
594 when app_state is assigned to this value */
595 RIL_APPSTATE_READY = 5
599 RIL_PINSTATE_UNKNOWN = 0,
600 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
601 RIL_PINSTATE_ENABLED_VERIFIED = 2,
602 RIL_PINSTATE_DISABLED = 3,
603 RIL_PINSTATE_ENABLED_BLOCKED = 4,
604 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
608 RIL_APPTYPE_UNKNOWN = 0,
610 RIL_APPTYPE_USIM = 2,
611 RIL_APPTYPE_RUIM = 3,
612 RIL_APPTYPE_CSIM = 4,
618 RIL_AppType app_type;
619 RIL_AppState app_state;
620 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
621 RIL_APPSTATE_SUBSCRIPTION_PERSO */
622 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
624 char *app_label_ptr; /* null terminated string */
625 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
630 /* Deprecated, use RIL_CardStatus_v6 */
633 RIL_CardState card_state;
634 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
635 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
636 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
637 int num_applications; /* value <= RIL_CARD_MAX_APPS */
638 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
643 RIL_CardState card_state;
644 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
645 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
646 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
647 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
648 int num_applications; /* value <= RIL_CARD_MAX_APPS */
649 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
652 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
653 * or as part of RIL_SimRefreshResponse_v7
656 /* A file on SIM has been updated. data[1] contains the EFID. */
658 /* SIM initialized. All files should be re-read. */
660 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
662 } RIL_SimRefreshResult;
665 RIL_SimRefreshResult result;
666 int ef_id; /* is the EFID of the updated file if the result is */
667 /* SIM_FILE_UPDATE or 0 for any other result. */
668 char * aid; /* is AID(application ID) of the card application */
669 /* See ETSI 102.221 8.1 and 101.220 4 */
670 /* For SIM_FILE_UPDATE result it can be set to AID of */
671 /* application in which updated EF resides or it can be */
672 /* NULL if EF is outside of an application. */
673 /* For SIM_INIT result this field is set to AID of */
674 /* application that caused REFRESH */
675 /* For SIM_RESET result it is NULL. */
676 } RIL_SimRefreshResponse_v7;
678 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
680 char * number; /* Remote party number */
681 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
682 char * name; /* Remote party name */
683 RIL_CDMA_SignalInfoRecord signalInfoRecord;
684 } RIL_CDMA_CallWaiting_v5;
687 char * number; /* Remote party number */
688 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
689 char * name; /* Remote party name */
690 RIL_CDMA_SignalInfoRecord signalInfoRecord;
691 /* Number type/Number plan required to support International Call Waiting */
692 int number_type; /* 0=Unknown, 1=International, 2=National,
693 3=Network specific, 4=subscriber */
694 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
695 } RIL_CDMA_CallWaiting_v6;
698 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
700 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
701 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
702 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
705 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
706 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
707 * and 9.4.4.2.3 for UMTS.
708 * All other values can be treated as empty CBM data coding scheme.
710 * selected 0 means message types specified in <fromServiceId, toServiceId>
711 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
713 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
714 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
721 unsigned char selected;
722 } RIL_GSM_BroadcastSmsConfigInfo;
724 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
725 #define RIL_RESTRICTED_STATE_NONE 0x00
726 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
727 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
728 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
729 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
730 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
731 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
732 /* Block packet data access due to restriction. */
733 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
735 /* The status for an OTASP/OTAPA session */
737 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
738 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
739 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
740 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
741 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
742 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
743 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
744 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
745 CDMA_OTA_PROVISION_STATUS_COMMITTED,
746 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
747 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
748 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
749 } RIL_CDMA_OTA_ProvisionStatus;
752 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
753 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
754 } RIL_GW_SignalStrength;
757 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
758 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
759 } RIL_SignalStrengthWcdma;
762 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
763 * multiplied by -1. Example: If the actual RSSI is -75, then this response
766 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
767 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
770 } RIL_CDMA_SignalStrength;
774 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
775 * multiplied by -1. Example: If the actual RSSI is -75, then this response
778 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
779 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
782 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
783 } RIL_EVDO_SignalStrength;
786 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
787 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
788 * Range: 44 to 140 dBm
789 * INT_MAX: 0x7FFFFFFF denotes invalid value.
790 * Reference: 3GPP TS 36.133 9.1.4 */
791 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
793 * INT_MAX: 0x7FFFFFFF denotes invalid value.
794 * Reference: 3GPP TS 36.133 9.1.7 */
795 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
796 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
797 * INT_MAX : 0x7FFFFFFF denotes invalid value.
798 * Reference: 3GPP TS 36.101 8.1.1 */
799 int cqi; /* The current Channel Quality Indicator.
801 * INT_MAX : 0x7FFFFFFF denotes invalid value.
802 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
803 } RIL_LTE_SignalStrength;
806 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
807 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
808 * Range: 44 to 140 dBm
809 * INT_MAX: 0x7FFFFFFF denotes invalid value.
810 * Reference: 3GPP TS 36.133 9.1.4 */
811 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
813 * INT_MAX: 0x7FFFFFFF denotes invalid value.
814 * Reference: 3GPP TS 36.133 9.1.7 */
815 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
816 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
817 * INT_MAX : 0x7FFFFFFF denotes invalid value.
818 * Reference: 3GPP TS 36.101 8.1.1 */
819 int cqi; /* The current Channel Quality Indicator.
821 * INT_MAX : 0x7FFFFFFF denotes invalid value.
822 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
823 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
824 * Approximate distance can be calculated using 300m/us * timingAdvance.
825 * Range: 0 to 0x7FFFFFFE
826 * INT_MAX : 0x7FFFFFFF denotes invalid value.
827 * Reference: 3GPP 36.321 section 6.1.3.5
828 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
829 } RIL_LTE_SignalStrength_v8;
832 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
834 * INT_MAX: 0x7FFFFFFF denotes invalid value.
835 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
836 } RIL_TD_SCDMA_SignalStrength;
838 /* Deprecated, use RIL_SignalStrength_v6 */
840 RIL_GW_SignalStrength GW_SignalStrength;
841 RIL_CDMA_SignalStrength CDMA_SignalStrength;
842 RIL_EVDO_SignalStrength EVDO_SignalStrength;
843 } RIL_SignalStrength_v5;
846 RIL_GW_SignalStrength GW_SignalStrength;
847 RIL_CDMA_SignalStrength CDMA_SignalStrength;
848 RIL_EVDO_SignalStrength EVDO_SignalStrength;
849 RIL_LTE_SignalStrength LTE_SignalStrength;
850 } RIL_SignalStrength_v6;
853 RIL_GW_SignalStrength GW_SignalStrength;
854 RIL_CDMA_SignalStrength CDMA_SignalStrength;
855 RIL_EVDO_SignalStrength EVDO_SignalStrength;
856 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
857 } RIL_SignalStrength_v8;
860 RIL_GW_SignalStrength GW_SignalStrength;
861 RIL_CDMA_SignalStrength CDMA_SignalStrength;
862 RIL_EVDO_SignalStrength EVDO_SignalStrength;
863 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
864 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
865 } RIL_SignalStrength_v10;
867 /** RIL_CellIdentityGsm */
869 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
870 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
871 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
872 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
873 } RIL_CellIdentityGsm;
875 /** RIL_CellIdentityWcdma */
877 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
878 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
879 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
880 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
881 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
882 } RIL_CellIdentityWcdma;
884 /** RIL_CellIdentityCdma */
886 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
887 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
888 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
889 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
890 * It is represented in units of 0.25 seconds and ranges from -2592000
891 * to 2592000, both values inclusive (corresponding to a range of -180
892 * to +180 degrees). INT_MAX if unknown */
894 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
895 * It is represented in units of 0.25 seconds and ranges from -1296000
896 * to 1296000, both values inclusive (corresponding to a range of -90
897 * to +90 degrees). INT_MAX if unknown */
898 } RIL_CellIdentityCdma;
900 /** RIL_CellIdentityLte */
902 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
903 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
904 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
905 int pci; /* physical cell id 0..503, INT_MAX if unknown */
906 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
907 } RIL_CellIdentityLte;
909 /** RIL_CellIdentityTdscdma */
911 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
912 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
913 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
914 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
915 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
916 } RIL_CellIdentityTdscdma;
918 /** RIL_CellInfoGsm */
920 RIL_CellIdentityGsm cellIdentityGsm;
921 RIL_GW_SignalStrength signalStrengthGsm;
924 /** RIL_CellInfoWcdma */
926 RIL_CellIdentityWcdma cellIdentityWcdma;
927 RIL_SignalStrengthWcdma signalStrengthWcdma;
930 /** RIL_CellInfoCdma */
932 RIL_CellIdentityCdma cellIdentityCdma;
933 RIL_CDMA_SignalStrength signalStrengthCdma;
934 RIL_EVDO_SignalStrength signalStrengthEvdo;
937 /** RIL_CellInfoLte */
939 RIL_CellIdentityLte cellIdentityLte;
940 RIL_LTE_SignalStrength_v8 signalStrengthLte;
943 /** RIL_CellInfoTdscdma */
945 RIL_CellIdentityTdscdma cellIdentityTdscdma;
946 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
947 } RIL_CellInfoTdscdma;
949 // Must be the same as CellInfo.TYPE_XXX
951 RIL_CELL_INFO_TYPE_GSM = 1,
952 RIL_CELL_INFO_TYPE_CDMA = 2,
953 RIL_CELL_INFO_TYPE_LTE = 3,
954 RIL_CELL_INFO_TYPE_WCDMA = 4,
955 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
958 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
960 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
961 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
962 RIL_TIMESTAMP_TYPE_MODEM = 2,
963 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
964 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
968 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
969 int registered; /* !0 if this cell is registered 0 if not registered */
970 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
971 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
974 RIL_CellInfoCdma cdma;
976 RIL_CellInfoWcdma wcdma;
977 RIL_CellInfoTdscdma tdscdma;
981 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
983 RIL_CDMA_DISPLAY_INFO_REC,
984 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
985 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
986 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
987 RIL_CDMA_SIGNAL_INFO_REC,
988 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
989 RIL_CDMA_LINE_CONTROL_INFO_REC,
990 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
991 RIL_CDMA_T53_CLIR_INFO_REC,
992 RIL_CDMA_T53_RELEASE_INFO_REC,
993 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
994 } RIL_CDMA_InfoRecName;
996 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
997 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
998 Note: the Extended Display info rec contains multiple records of the
999 form: display_tag, display_len, and display_len occurrences of the
1000 chari field if the display_tag is not 10000000 or 10000001.
1001 To save space, the records are stored consecutively in a byte buffer.
1002 The display_tag, display_len and chari fields are all 1 byte.
1007 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
1008 } RIL_CDMA_DisplayInfoRecord;
1010 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1011 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1012 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1017 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
1022 } RIL_CDMA_NumberInfoRecord;
1024 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1026 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1027 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1028 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1029 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1030 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1031 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1032 RIL_REDIRECTING_REASON_RESERVED
1033 } RIL_CDMA_RedirectingReason;
1036 RIL_CDMA_NumberInfoRecord redirectingNumber;
1037 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1038 RIL_CDMA_RedirectingReason redirectingReason;
1039 } RIL_CDMA_RedirectingNumberInfoRecord;
1041 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1043 char lineCtrlPolarityIncluded;
1044 char lineCtrlToggle;
1045 char lineCtrlReverse;
1046 char lineCtrlPowerDenial;
1047 } RIL_CDMA_LineControlInfoRecord;
1049 /* T53 CLIR Information Record */
1052 } RIL_CDMA_T53_CLIRInfoRecord;
1054 /* T53 Audio Control Information Record */
1058 } RIL_CDMA_T53_AudioControlInfoRecord;
1062 RIL_CDMA_InfoRecName name;
1065 /* Display and Extended Display Info Rec */
1066 RIL_CDMA_DisplayInfoRecord display;
1068 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1069 RIL_CDMA_NumberInfoRecord number;
1071 /* Signal Info Rec */
1072 RIL_CDMA_SignalInfoRecord signal;
1074 /* Redirecting Number Info Rec */
1075 RIL_CDMA_RedirectingNumberInfoRecord redir;
1077 /* Line Control Info Rec */
1078 RIL_CDMA_LineControlInfoRecord lineCtrl;
1080 /* T53 CLIR Info Rec */
1081 RIL_CDMA_T53_CLIRInfoRecord clir;
1083 /* T53 Audio Control Info Rec */
1084 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1086 } RIL_CDMA_InformationRecord;
1088 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1090 #define RIL_HARDWARE_CONFIG_UUID_LENGTH 64
1093 char numberOfInfoRecs;
1094 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1095 } RIL_CDMA_InformationRecords;
1097 /* See RIL_REQUEST_NV_READ_ITEM */
1102 /* See RIL_REQUEST_NV_WRITE_ITEM */
1109 HANDOVER_STARTED = 0,
1110 HANDOVER_COMPLETED = 1,
1111 HANDOVER_FAILED = 2,
1112 HANDOVER_CANCELED = 3
1115 /* hardware configuration reported to RILJ. */
1117 RIL_HARDWARE_CONFIG_MODEM = 0,
1118 RIL_HARDWARE_CONFIG_SIM = 1,
1119 } RIL_HardwareConfig_Type;
1122 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1123 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1124 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1125 } RIL_HardwareConfig_State;
1129 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1133 } RIL_HardwareConfig_Modem;
1136 char modemUuid[RIL_HARDWARE_CONFIG_UUID_LENGTH];
1137 } RIL_HardwareConfig_Sim;
1140 RIL_HardwareConfig_Type type;
1141 char uuid[RIL_HARDWARE_CONFIG_UUID_LENGTH];
1142 RIL_HardwareConfig_State state;
1144 RIL_HardwareConfig_Modem modem;
1145 RIL_HardwareConfig_Sim sim;
1147 } RIL_HardwareConfig;
1150 * Data connection power state
1153 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1154 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1155 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1156 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1157 } RIL_DcPowerStates;
1160 * Data connection real time info
1163 uint64_t time; // Time in nanos as returned by ril_nano_time
1164 RIL_DcPowerStates powerState; // Current power state
1169 * RIL_REQUEST_GET_SIM_STATUS
1171 * Requests status of the SIM interface and the SIM card
1175 * "response" is const RIL_CardStatus_v6 *
1180 #define RIL_REQUEST_GET_SIM_STATUS 1
1183 * RIL_REQUEST_ENTER_SIM_PIN
1185 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
1187 * "data" is const char **
1188 * ((const char **)data)[0] is PIN value
1189 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1191 * "response" is int *
1192 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1197 * RADIO_NOT_AVAILABLE (radio resetting)
1199 * PASSWORD_INCORRECT
1202 #define RIL_REQUEST_ENTER_SIM_PIN 2
1206 * RIL_REQUEST_ENTER_SIM_PUK
1208 * Supplies SIM PUK and new PIN.
1210 * "data" is const char **
1211 * ((const char **)data)[0] is PUK value
1212 * ((const char **)data)[1] is new PIN value
1213 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1215 * "response" is int *
1216 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1221 * RADIO_NOT_AVAILABLE (radio resetting)
1223 * PASSWORD_INCORRECT
1227 #define RIL_REQUEST_ENTER_SIM_PUK 3
1230 * RIL_REQUEST_ENTER_SIM_PIN2
1232 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
1233 * returned as a a failure from a previous operation.
1235 * "data" is const char **
1236 * ((const char **)data)[0] is PIN2 value
1237 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1239 * "response" is int *
1240 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1245 * RADIO_NOT_AVAILABLE (radio resetting)
1247 * PASSWORD_INCORRECT
1250 #define RIL_REQUEST_ENTER_SIM_PIN2 4
1253 * RIL_REQUEST_ENTER_SIM_PUK2
1255 * Supplies SIM PUK2 and new PIN2.
1257 * "data" is const char **
1258 * ((const char **)data)[0] is PUK2 value
1259 * ((const char **)data)[1] is new PIN2 value
1260 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1262 * "response" is int *
1263 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1268 * RADIO_NOT_AVAILABLE (radio resetting)
1270 * PASSWORD_INCORRECT
1274 #define RIL_REQUEST_ENTER_SIM_PUK2 5
1277 * RIL_REQUEST_CHANGE_SIM_PIN
1279 * Supplies old SIM PIN and new PIN.
1281 * "data" is const char **
1282 * ((const char **)data)[0] is old PIN value
1283 * ((const char **)data)[1] is new PIN value
1284 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1286 * "response" is int *
1287 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1292 * RADIO_NOT_AVAILABLE (radio resetting)
1294 * PASSWORD_INCORRECT
1295 * (old PIN is invalid)
1299 #define RIL_REQUEST_CHANGE_SIM_PIN 6
1303 * RIL_REQUEST_CHANGE_SIM_PIN2
1305 * Supplies old SIM PIN2 and new PIN2.
1307 * "data" is const char **
1308 * ((const char **)data)[0] is old PIN2 value
1309 * ((const char **)data)[1] is new PIN2 value
1310 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1312 * "response" is int *
1313 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
1318 * RADIO_NOT_AVAILABLE (radio resetting)
1320 * PASSWORD_INCORRECT
1321 * (old PIN2 is invalid)
1325 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
1328 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
1330 * Requests that network personlization be deactivated
1332 * "data" is const char **
1333 * ((const char **)(data))[0]] is network depersonlization code
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
1347 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
1350 * RIL_REQUEST_GET_CURRENT_CALLS
1352 * Requests current call list
1356 * "response" must be a "const RIL_Call **"
1361 * RADIO_NOT_AVAILABLE (radio resetting)
1363 * (request will be made again in a few hundred msec)
1366 #define RIL_REQUEST_GET_CURRENT_CALLS 9
1372 * Initiate voice call
1374 * "data" is const RIL_Dial *
1375 * "response" is NULL
1377 * This method is never used for supplementary service codes
1381 * RADIO_NOT_AVAILABLE (radio resetting)
1384 #define RIL_REQUEST_DIAL 10
1387 * RIL_REQUEST_GET_IMSI
1391 * Only valid when radio state is "RADIO_STATE_ON"
1393 * "data" is const char **
1394 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
1395 * "response" is a const char * containing the IMSI
1399 * RADIO_NOT_AVAILABLE (radio resetting)
1403 #define RIL_REQUEST_GET_IMSI 11
1406 * RIL_REQUEST_HANGUP
1408 * Hang up a specific line (like AT+CHLD=1x)
1410 * After this HANGUP request returns, RIL should show the connection is NOT
1411 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1413 * "data" is an int *
1414 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
1416 * "response" is NULL
1420 * RADIO_NOT_AVAILABLE (radio resetting)
1424 #define RIL_REQUEST_HANGUP 12
1427 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
1429 * Hang up waiting or held (like AT+CHLD=0)
1431 * After this HANGUP request returns, RIL should show the connection is NOT
1432 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1435 * "response" is NULL
1439 * RADIO_NOT_AVAILABLE (radio resetting)
1443 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
1446 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
1448 * Hang up waiting or held (like AT+CHLD=1)
1450 * After this HANGUP request returns, RIL should show the connection is NOT
1451 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
1454 * "response" is NULL
1458 * RADIO_NOT_AVAILABLE (radio resetting)
1462 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
1465 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
1467 * Switch waiting or holding call and active call (like AT+CHLD=2)
1469 * State transitions should be is follows:
1471 * If call 1 is waiting and call 2 is active, then if this re
1474 * Call 1 Call 2 Call 1 Call 2
1475 * ACTIVE HOLDING HOLDING ACTIVE
1476 * ACTIVE WAITING HOLDING ACTIVE
1477 * HOLDING WAITING HOLDING ACTIVE
1478 * ACTIVE IDLE HOLDING IDLE
1479 * IDLE IDLE IDLE IDLE
1482 * "response" is NULL
1486 * RADIO_NOT_AVAILABLE (radio resetting)
1490 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
1491 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
1494 * RIL_REQUEST_CONFERENCE
1496 * Conference holding and active (like AT+CHLD=3)
1499 * "response" is NULL
1503 * RADIO_NOT_AVAILABLE (radio resetting)
1506 #define RIL_REQUEST_CONFERENCE 16
1511 * Send UDUB (user determined used busy) to ringing or
1512 * waiting call answer)(RIL_BasicRequest r);
1515 * "response" is NULL
1519 * RADIO_NOT_AVAILABLE (radio resetting)
1522 #define RIL_REQUEST_UDUB 17
1525 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
1527 * Requests the failure cause code for the most recently terminated call
1530 * "response" is a "int *"
1531 * ((int *)response)[0] is RIL_LastCallFailCause. GSM failure reasons are
1532 * mapped to cause codes defined in TS 24.008 Annex H where possible. CDMA
1533 * failure reasons are derived from the possible call failure scenarios
1534 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
1536 * The implementation should return CALL_FAIL_ERROR_UNSPECIFIED for blocked
1537 * MO calls by restricted state (See RIL_UNSOL_RESTRICTED_STATE_CHANGED)
1539 * If the implementation does not have access to the exact cause codes,
1540 * then it should return one of the values listed in RIL_LastCallFailCause,
1541 * as the UI layer needs to distinguish these cases for tone generation or
1542 * error notification.
1546 * RADIO_NOT_AVAILABLE
1549 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
1551 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
1554 * RIL_REQUEST_SIGNAL_STRENGTH
1556 * Requests current signal strength and associated information
1558 * Must succeed if radio is on.
1562 * "response" is a const RIL_SignalStrength *
1566 * RADIO_NOT_AVAILABLE
1568 #define RIL_REQUEST_SIGNAL_STRENGTH 19
1571 * RIL_REQUEST_VOICE_REGISTRATION_STATE
1573 * Request current registration state
1576 * "response" is a "char **"
1577 * ((const char **)response)[0] is registration state 0-6,
1578 * 0 - Not registered, MT is not currently searching
1579 * a new operator to register
1580 * 1 - Registered, home network
1581 * 2 - Not registered, but MT is currently searching
1582 * a new operator to register
1583 * 3 - Registration denied
1585 * 5 - Registered, roaming
1586 * 10 - Same as 0, but indicates that emergency calls
1588 * 12 - Same as 2, but indicates that emergency calls
1590 * 13 - Same as 3, but indicates that emergency calls
1592 * 14 - Same as 4, but indicates that emergency calls
1595 * ((const char **)response)[1] is LAC if registered on a GSM/WCDMA system or
1596 * NULL if not.Valid LAC are 0x0000 - 0xffff
1597 * ((const char **)response)[2] is CID if registered on a * GSM/WCDMA or
1599 * Valid CID are 0x00000000 - 0xffffffff
1600 * In GSM, CID is Cell ID (see TS 27.007)
1602 * In UMTS, CID is UMTS Cell Identity
1603 * (see TS 25.331) in 28 bits
1604 * ((const char **)response)[3] indicates the available voice radio technology,
1605 * valid values as defined by RIL_RadioTechnology.
1606 * ((const char **)response)[4] is Base Station ID if registered on a CDMA
1607 * system or NULL if not. Base Station ID in
1609 * ((const char **)response)[5] is Base Station latitude if registered on a
1610 * CDMA system or NULL if not. Base Station
1611 * latitude is a decimal number as specified in
1612 * 3GPP2 C.S0005-A v6.0. It is represented in
1613 * units of 0.25 seconds and ranges from -1296000
1614 * to 1296000, both values inclusive (corresponding
1615 * to a range of -90 to +90 degrees).
1616 * ((const char **)response)[6] is Base Station longitude if registered on a
1617 * CDMA system or NULL if not. Base Station
1618 * longitude is a decimal number as specified in
1619 * 3GPP2 C.S0005-A v6.0. It is represented in
1620 * units of 0.25 seconds and ranges from -2592000
1621 * to 2592000, both values inclusive (corresponding
1622 * to a range of -180 to +180 degrees).
1623 * ((const char **)response)[7] is concurrent services support indicator if
1624 * registered on a CDMA system 0-1.
1625 * 0 - Concurrent services not supported,
1626 * 1 - Concurrent services supported
1627 * ((const char **)response)[8] is System ID if registered on a CDMA system or
1628 * NULL if not. Valid System ID are 0 - 32767
1629 * ((const char **)response)[9] is Network ID if registered on a CDMA system or
1630 * NULL if not. Valid System ID are 0 - 65535
1631 * ((const char **)response)[10] is the TSB-58 Roaming Indicator if registered
1632 * on a CDMA or EVDO system or NULL if not. Valid values
1634 * ((const char **)response)[11] indicates whether the current system is in the
1635 * PRL if registered on a CDMA or EVDO system or NULL if
1636 * not. 0=not in the PRL, 1=in the PRL
1637 * ((const char **)response)[12] is the default Roaming Indicator from the PRL,
1638 * if registered on a CDMA or EVDO system or NULL if not.
1639 * Valid values are 0-255.
1640 * ((const char **)response)[13] if registration state is 3 (Registration
1641 * denied) this is an enumerated reason why
1642 * registration was denied. See 3GPP TS 24.008,
1643 * 10.5.3.6 and Annex G.
1645 * 1 - Authentication Failure
1646 * 2 - IMSI unknown in HLR
1649 * 5 - PLMN not allowed
1650 * 6 - Location area not allowed
1651 * 7 - Roaming not allowed
1652 * 8 - No Suitable Cells in this Location Area
1653 * 9 - Network failure
1654 * 10 - Persistent location update reject
1655 * 11 - PLMN not allowed
1656 * 12 - Location area not allowed
1657 * 13 - Roaming not allowed in this Location Area
1658 * 15 - No Suitable Cells in this Location Area
1659 * 17 - Network Failure
1663 * 23 - GSM Authentication unacceptable
1664 * 25 - Not Authorized for this CSG
1665 * 32 - Service option not supported
1666 * 33 - Requested service option not subscribed
1667 * 34 - Service option temporarily out of order
1668 * 38 - Call cannot be identified
1669 * 48-63 - Retry upon entry into a new cell
1670 * 95 - Semantically incorrect message
1671 * 96 - Invalid mandatory information
1672 * 97 - Message type non-existent or not implemented
1673 * 98 - Message not compatible with protocol state
1674 * 99 - Information element non-existent or not implemented
1675 * 100 - Conditional IE error
1676 * 101 - Message not compatible with protocol state
1677 * 111 - Protocol error, unspecified
1678 * ((const char **)response)[14] is the Primary Scrambling Code of the current
1679 * cell as described in TS 25.331, in hexadecimal
1680 * format, or NULL if unknown or not registered
1681 * to a UMTS network.
1683 * Please note that registration state 4 ("unknown") is treated
1684 * as "out of service" in the Android telephony system
1686 * Registration state 3 can be returned if Location Update Reject
1687 * (with cause 17 - Network Failure) is received repeatedly from the network,
1688 * to facilitate "managed roaming"
1692 * RADIO_NOT_AVAILABLE
1695 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
1698 * RIL_REQUEST_DATA_REGISTRATION_STATE
1700 * Request current DATA registration state
1703 * "response" is a "char **"
1704 * ((const char **)response)[0] is registration state 0-5 from TS 27.007 10.1.20 AT+CGREG
1705 * ((const char **)response)[1] is LAC if registered or NULL if not
1706 * ((const char **)response)[2] is CID if registered or NULL if not
1707 * ((const char **)response)[3] indicates the available data radio technology,
1708 * valid values as defined by RIL_RadioTechnology.
1709 * ((const char **)response)[4] if registration state is 3 (Registration
1710 * denied) this is an enumerated reason why
1711 * registration was denied. See 3GPP TS 24.008,
1712 * Annex G.6 "Additonal cause codes for GMM".
1713 * 7 == GPRS services not allowed
1714 * 8 == GPRS services and non-GPRS services not allowed
1715 * 9 == MS identity cannot be derived by the network
1716 * 10 == Implicitly detached
1717 * 14 == GPRS services not allowed in this PLMN
1718 * 16 == MSC temporarily not reachable
1719 * 40 == No PDP context activated
1720 * ((const char **)response)[5] The maximum number of simultaneous Data Calls that can be
1721 * established using RIL_REQUEST_SETUP_DATA_CALL.
1723 * The values at offsets 6..10 are optional LTE location information in decimal.
1724 * If a value is unknown that value may be NULL. If all values are NULL,
1725 * none need to be present.
1726 * ((const char **)response)[6] is TAC, a 16-bit Tracking Area Code.
1727 * ((const char **)response)[7] is CID, a 0-503 Physical Cell Identifier.
1728 * ((const char **)response)[8] is ECI, a 28-bit E-UTRAN Cell Identifier.
1729 * ((const char **)response)[9] is CSGID, a 27-bit Closed Subscriber Group Identity.
1730 * ((const char **)response)[10] is TADV, a 6-bit timing advance value.
1732 * LAC and CID are in hexadecimal format.
1733 * valid LAC are 0x0000 - 0xffff
1734 * valid CID are 0x00000000 - 0x0fffffff
1736 * Please note that registration state 4 ("unknown") is treated
1737 * as "out of service" in the Android telephony system
1741 * RADIO_NOT_AVAILABLE
1744 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
1747 * RIL_REQUEST_OPERATOR
1749 * Request current operator ONS or EONS
1752 * "response" is a "const char **"
1753 * ((const char **)response)[0] is long alpha ONS or EONS
1754 * or NULL if unregistered
1756 * ((const char **)response)[1] is short alpha ONS or EONS
1757 * or NULL if unregistered
1758 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
1759 * or NULL if unregistered
1763 * RADIO_NOT_AVAILABLE
1766 #define RIL_REQUEST_OPERATOR 22
1769 * RIL_REQUEST_RADIO_POWER
1771 * Toggle radio on and off (for "airplane" mode)
1772 * If the radio is is turned off/on the radio modem subsystem
1773 * is expected return to an initialized state. For instance,
1774 * any voice and data calls will be terminated and all associated
1778 * ((int *)data)[0] is > 0 for "Radio On"
1779 * ((int *)data)[0] is == 0 for "Radio Off"
1781 * "response" is NULL
1783 * Turn radio on if "on" > 0
1784 * Turn radio off if "on" == 0
1788 * RADIO_NOT_AVAILABLE
1791 #define RIL_REQUEST_RADIO_POWER 23
1798 * If the implementation is currently playing a tone requested via
1799 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
1800 * should be played instead
1802 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
1803 * "response" is NULL
1805 * FIXME should this block/mute microphone?
1806 * How does this interact with local DTMF feedback?
1810 * RADIO_NOT_AVAILABLE
1813 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
1816 #define RIL_REQUEST_DTMF 24
1819 * RIL_REQUEST_SEND_SMS
1821 * Send an SMS message
1823 * "data" is const char **
1824 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1825 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1826 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1827 * less the SMSC address
1828 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1830 * "response" is a const RIL_SMS_Response *
1832 * Based on the return error, caller decides to resend if sending sms
1833 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1834 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1838 * RADIO_NOT_AVAILABLE
1839 * SMS_SEND_FAIL_RETRY
1843 * FIXME how do we specify TP-Message-Reference if we need to resend?
1845 #define RIL_REQUEST_SEND_SMS 25
1849 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
1851 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
1852 * except that more messages are expected to be sent soon. If possible,
1853 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
1855 * "data" is const char **
1856 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
1857 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
1858 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
1859 * less the SMSC address
1860 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
1862 * "response" is a const RIL_SMS_Response *
1864 * Based on the return error, caller decides to resend if sending sms
1865 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
1866 * and GENERIC_FAILURE means no retry (i.e. error cause is 500)
1870 * RADIO_NOT_AVAILABLE
1871 * SMS_SEND_FAIL_RETRY
1875 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
1879 * RIL_REQUEST_SETUP_DATA_CALL
1881 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
1882 * return success it is added to the list of data calls and a
1883 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
1884 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
1885 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
1886 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
1888 * The RIL is expected to:
1889 * - Create one data call context.
1890 * - Create and configure a dedicated interface for the context
1891 * - The interface must be point to point.
1892 * - The interface is configured with one or more addresses and
1893 * is capable of sending and receiving packets. The prefix length
1894 * of the addresses must be /32 for IPv4 and /128 for IPv6.
1895 * - Must NOT change the linux routing table.
1896 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
1897 * number of simultaneous data call contexts.
1899 * "data" is a const char **
1900 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
1901 * for values above 2 this is RIL_RadioTechnology + 2.
1902 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
1903 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
1904 * override the one in the profile. NULL indicates no APN overrride.
1905 * ((const char **)data)[3] is the username for APN, or NULL
1906 * ((const char **)data)[4] is the password for APN, or NULL
1907 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
1908 * 0 => PAP and CHAP is never performed.
1909 * 1 => PAP may be performed; CHAP is never performed.
1910 * 2 => CHAP may be performed; PAP is never performed.
1911 * 3 => PAP / CHAP may be performed - baseband dependent.
1912 * ((const char **)data)[6] is the connection type to request must be one of the
1913 * PDP_type values in TS 27.007 section 10.1.1.
1914 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1915 * ((const char **)data)[7] Optional connection property parameters, format to be defined.
1917 * "response" is a RIL_Data_Call_Response_v6
1919 * FIXME may need way to configure QoS settings
1922 * SUCCESS should be returned on both success and failure of setup with
1923 * the RIL_Data_Call_Response_v6.status containing the actual status.
1924 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
1926 * Other errors could include:
1927 * RADIO_NOT_AVAILABLE, GENERIC_FAILURE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
1928 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED.
1930 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
1932 #define RIL_REQUEST_SETUP_DATA_CALL 27
1936 * RIL_REQUEST_SIM_IO
1938 * Request SIM I/O operation.
1939 * This is similar to the TS 27.007 "restricted SIM" operation
1940 * where it assumes all of the EF selection will be done by the
1943 * "data" is a const RIL_SIM_IO_v6 *
1944 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
1945 * or may specify a PIN2 for operations that require a PIN2 (eg
1946 * updating FDN records)
1948 * "response" is a const RIL_SIM_IO_Response *
1950 * Arguments and responses that are unused for certain
1951 * values of "command" should be ignored or set to NULL
1955 * RADIO_NOT_AVAILABLE
1960 #define RIL_REQUEST_SIM_IO 28
1963 * RIL_REQUEST_SEND_USSD
1965 * Send a USSD message
1967 * If a USSD session already exists, the message should be sent in the
1968 * context of that session. Otherwise, a new session should be created.
1970 * The network reply should be reported via RIL_UNSOL_ON_USSD
1972 * Only one USSD session may exist at a time, and the session is assumed
1974 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
1975 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
1976 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
1978 * "data" is a const char * containing the USSD request in UTF-8 format
1979 * "response" is NULL
1983 * RADIO_NOT_AVAILABLE
1987 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
1990 #define RIL_REQUEST_SEND_USSD 29
1993 * RIL_REQUEST_CANCEL_USSD
1995 * Cancel the current USSD session if one exists
1998 * "response" is NULL
2002 * RADIO_NOT_AVAILABLE
2006 #define RIL_REQUEST_CANCEL_USSD 30
2009 * RIL_REQUEST_GET_CLIR
2011 * Gets current CLIR status
2013 * "response" is int *
2014 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2015 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2019 * RADIO_NOT_AVAILABLE
2022 #define RIL_REQUEST_GET_CLIR 31
2025 * RIL_REQUEST_SET_CLIR
2028 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2030 * "response" is NULL
2034 * RADIO_NOT_AVAILABLE
2037 #define RIL_REQUEST_SET_CLIR 32
2040 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2042 * "data" is const RIL_CallForwardInfo *
2044 * "response" is const RIL_CallForwardInfo **
2045 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2046 * each distinct registered phone number.
2048 * For example, if data is forwarded to +18005551212 and voice is forwarded
2049 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
2051 * If, however, both data and voice are forwarded to +18005551212, then
2052 * a single RIL_CallForwardInfo can be returned with the service class
2053 * set to "data + voice = 3")
2057 * RADIO_NOT_AVAILABLE
2060 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2064 * RIL_REQUEST_SET_CALL_FORWARD
2066 * Configure call forward rule
2068 * "data" is const RIL_CallForwardInfo *
2069 * "response" is NULL
2073 * RADIO_NOT_AVAILABLE
2076 #define RIL_REQUEST_SET_CALL_FORWARD 34
2080 * RIL_REQUEST_QUERY_CALL_WAITING
2082 * Query current call waiting state
2084 * "data" is const int *
2085 * ((const int *)data)[0] is the TS 27.007 service class to query.
2086 * "response" is a const int *
2087 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2089 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2090 * must follow, with the TS 27.007 service class bit vector of services
2091 * for which call waiting is enabled.
2093 * For example, if ((const int *)response)[0] is 1 and
2094 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2095 * and voice and disabled for everything else
2099 * RADIO_NOT_AVAILABLE
2102 #define RIL_REQUEST_QUERY_CALL_WAITING 35
2106 * RIL_REQUEST_SET_CALL_WAITING
2108 * Configure current call waiting state
2110 * "data" is const int *
2111 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
2112 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
2113 * services to modify
2114 * "response" is NULL
2118 * RADIO_NOT_AVAILABLE
2121 #define RIL_REQUEST_SET_CALL_WAITING 36
2124 * RIL_REQUEST_SMS_ACKNOWLEDGE
2126 * Acknowledge successful or failed receipt of SMS previously indicated
2127 * via RIL_UNSOL_RESPONSE_NEW_SMS
2130 * ((int *)data)[0] is 1 on successful receipt
2131 * (basically, AT+CNMA=1 from TS 27.005
2132 * is 0 on failed receipt
2133 * (basically, AT+CNMA=2 from TS 27.005)
2134 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
2135 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
2136 * capacity exceeded) and 0xFF (unspecified error) are
2139 * "response" is NULL
2141 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
2145 * RADIO_NOT_AVAILABLE
2148 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
2151 * RIL_REQUEST_GET_IMEI - DEPRECATED
2153 * Get the device IMEI, including check digit
2155 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2156 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2159 * "response" is a const char * containing the IMEI
2163 * RADIO_NOT_AVAILABLE (radio resetting)
2167 #define RIL_REQUEST_GET_IMEI 38
2170 * RIL_REQUEST_GET_IMEISV - DEPRECATED
2172 * Get the device IMEISV, which should be two decimal digits
2174 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
2175 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
2178 * "response" is a const char * containing the IMEISV
2182 * RADIO_NOT_AVAILABLE (radio resetting)
2186 #define RIL_REQUEST_GET_IMEISV 39
2190 * RIL_REQUEST_ANSWER
2192 * Answer incoming call
2194 * Will not be called for WAITING calls.
2195 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
2199 * "response" is NULL
2203 * RADIO_NOT_AVAILABLE (radio resetting)
2207 #define RIL_REQUEST_ANSWER 40
2210 * RIL_REQUEST_DEACTIVATE_DATA_CALL
2212 * Deactivate packet data connection and remove from the
2213 * data call list if SUCCESS is returned. Any other return
2214 * values should also try to remove the call from the list,
2215 * but that may not be possible. In any event a
2216 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
2217 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
2218 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
2220 * "data" is const char **
2221 * ((char**)data)[0] indicating CID
2222 * ((char**)data)[1] indicating Disconnect Reason
2223 * 0 => No specific reason specified
2224 * 1 => Radio shutdown requested
2226 * "response" is NULL
2230 * RADIO_NOT_AVAILABLE
2233 * See also: RIL_REQUEST_SETUP_DATA_CALL
2235 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
2238 * RIL_REQUEST_QUERY_FACILITY_LOCK
2240 * Query the status of a facility lock state
2242 * "data" is const char **
2243 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
2244 * (eg "AO" for BAOC, "SC" for SIM lock)
2245 * ((const char **)data)[1] is the password, or "" if not required
2246 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
2248 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2249 * This is only applicable in the case of Fixed Dialing Numbers
2252 * "response" is an int *
2253 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
2254 * services for which the specified barring facility
2255 * is active. "0" means "disabled for all"
2260 * RADIO_NOT_AVAILABLE
2264 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
2267 * RIL_REQUEST_SET_FACILITY_LOCK
2269 * Enable/disable one facility lock
2271 * "data" is const char **
2273 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2274 * (eg "AO" for BAOC)
2275 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
2276 * ((const char **)data)[2] = password
2277 * ((const char **)data)[3] = string representation of decimal TS 27.007
2278 * service class bit vector. Eg, the string
2279 * "1" means "set this facility for voice services"
2280 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2281 * This is only applicable in the case of Fixed Dialing Numbers
2284 * "response" is int *
2285 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2289 * RADIO_NOT_AVAILABLE
2293 #define RIL_REQUEST_SET_FACILITY_LOCK 43
2296 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
2298 * Change call barring facility password
2300 * "data" is const char **
2302 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
2303 * (eg "AO" for BAOC)
2304 * ((const char **)data)[1] = old password
2305 * ((const char **)data)[2] = new password
2307 * "response" is NULL
2311 * RADIO_NOT_AVAILABLE
2315 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
2318 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
2320 * Query current network selectin mode
2324 * "response" is int *
2325 * ((const int *)response)[0] is
2326 * 0 for automatic selection
2327 * 1 for manual selection
2331 * RADIO_NOT_AVAILABLE
2335 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
2338 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
2340 * Specify that the network should be selected automatically
2343 * "response" is NULL
2345 * This request must not respond until the new operator is selected
2350 * RADIO_NOT_AVAILABLE
2354 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2355 * no retries needed, such as illegal SIM or ME.
2356 * Returns GENERIC_FAILURE for all other causes that might be
2360 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
2363 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
2365 * Manually select a specified network.
2367 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
2368 * "response" is NULL
2370 * This request must not respond until the new operator is selected
2375 * RADIO_NOT_AVAILABLE
2379 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
2380 * no retries needed, such as illegal SIM or ME.
2381 * Returns GENERIC_FAILURE for all other causes that might be
2385 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
2388 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
2390 * Scans for available networks
2393 * "response" is const char ** that should be an array of n*4 strings, where
2394 * n is the number of available networks
2395 * For each available network:
2397 * ((const char **)response)[n+0] is long alpha ONS or EONS
2398 * ((const char **)response)[n+1] is short alpha ONS or EONS
2399 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
2400 * ((const char **)response)[n+3] is a string value of the status:
2406 * This request must not respond until the new operator is selected
2411 * RADIO_NOT_AVAILABLE
2415 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
2418 * RIL_REQUEST_DTMF_START
2420 * Start playing a DTMF tone. Continue playing DTMF tone until
2421 * RIL_REQUEST_DTMF_STOP is received
2423 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
2424 * it should cancel the previous tone and play the new one.
2426 * "data" is a char *
2427 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
2428 * "response" is NULL
2432 * RADIO_NOT_AVAILABLE
2435 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
2437 #define RIL_REQUEST_DTMF_START 49
2440 * RIL_REQUEST_DTMF_STOP
2442 * Stop playing a currently playing DTMF tone.
2445 * "response" is NULL
2449 * RADIO_NOT_AVAILABLE
2452 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
2454 #define RIL_REQUEST_DTMF_STOP 50
2457 * RIL_REQUEST_BASEBAND_VERSION
2459 * Return string value indicating baseband version, eg
2460 * response from AT+CGMR
2463 * "response" is const char * containing version string for log reporting
2467 * RADIO_NOT_AVAILABLE
2471 #define RIL_REQUEST_BASEBAND_VERSION 51
2474 * RIL_REQUEST_SEPARATE_CONNECTION
2476 * Separate a party from a multiparty call placing the multiparty call
2477 * (less the specified party) on hold and leaving the specified party
2478 * as the only other member of the current (active) call
2482 * See TS 22.084 1.3.8.2 (iii)
2483 * TS 22.030 6.5.5 "Entering "2X followed by send"
2484 * TS 27.007 "AT+CHLD=2x"
2486 * "data" is an int *
2487 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
2489 * "response" is NULL
2493 * RADIO_NOT_AVAILABLE (radio resetting)
2496 #define RIL_REQUEST_SEPARATE_CONNECTION 52
2500 * RIL_REQUEST_SET_MUTE
2502 * Turn on or off uplink (microphone) mute.
2504 * Will only be sent while voice call is active.
2505 * Will always be reset to "disable mute" when a new voice call is initiated
2507 * "data" is an int *
2508 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
2510 * "response" is NULL
2514 * RADIO_NOT_AVAILABLE (radio resetting)
2518 #define RIL_REQUEST_SET_MUTE 53
2521 * RIL_REQUEST_GET_MUTE
2523 * Queries the current state of the uplink mute setting
2526 * "response" is an int *
2527 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
2531 * RADIO_NOT_AVAILABLE (radio resetting)
2535 #define RIL_REQUEST_GET_MUTE 54
2538 * RIL_REQUEST_QUERY_CLIP
2540 * Queries the status of the CLIP supplementary service
2542 * (for MMI code "*#30#")
2545 * "response" is an int *
2546 * (int *)response)[0] is 1 for "CLIP provisioned"
2547 * and 0 for "CLIP not provisioned"
2548 * and 2 for "unknown, e.g. no network etc"
2552 * RADIO_NOT_AVAILABLE (radio resetting)
2556 #define RIL_REQUEST_QUERY_CLIP 55
2559 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
2560 * field in RIL_Data_Call_Response_v6.
2562 * Requests the failure cause code for the most recently failed PDP
2563 * context or CDMA data connection active
2564 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
2568 * "response" is a "int *"
2569 * ((int *)response)[0] is an integer cause code defined in TS 24.008
2570 * section 6.1.3.1.3 or close approximation
2572 * If the implementation does not have access to the exact cause codes,
2573 * then it should return one of the values listed in
2574 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
2575 * cases for error notification
2576 * and potential retries.
2580 * RADIO_NOT_AVAILABLE
2583 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2585 * Deprecated use the status field in RIL_Data_Call_Response_v6.
2588 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
2591 * RIL_REQUEST_DATA_CALL_LIST
2593 * Returns the data call list. An entry is added when a
2594 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
2595 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
2596 * when RIL_REQUEST_RADIO_POWER off/on is issued.
2599 * "response" is an array of RIL_Data_Call_Response_v6
2603 * RADIO_NOT_AVAILABLE (radio resetting)
2606 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
2609 #define RIL_REQUEST_DATA_CALL_LIST 57
2612 * RIL_REQUEST_RESET_RADIO - DEPRECATED
2614 * Request a radio reset. The RIL implementation may postpone
2615 * the reset until after this request is responded to if the baseband
2616 * is presently busy.
2618 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
2621 * "response" is NULL
2625 * RADIO_NOT_AVAILABLE (radio resetting)
2627 * REQUEST_NOT_SUPPORTED
2630 #define RIL_REQUEST_RESET_RADIO 58
2633 * RIL_REQUEST_OEM_HOOK_RAW
2635 * This request reserved for OEM-specific uses. It passes raw byte arrays
2638 * It can be invoked on the Java side from
2639 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
2641 * "data" is a char * of bytes copied from the byte[] data argument in java
2642 * "response" is a char * of bytes that will returned via the
2643 * caller's "response" Message here:
2644 * (byte[])(((AsyncResult)response.obj).result)
2646 * An error response here will result in
2647 * (((AsyncResult)response.obj).result) == null and
2648 * (((AsyncResult)response.obj).exception) being an instance of
2649 * com.android.internal.telephony.gsm.CommandException
2655 #define RIL_REQUEST_OEM_HOOK_RAW 59
2658 * RIL_REQUEST_OEM_HOOK_STRINGS
2660 * This request reserved for OEM-specific uses. It passes strings
2663 * It can be invoked on the Java side from
2664 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
2666 * "data" is a const char **, representing an array of null-terminated UTF-8
2667 * strings copied from the "String[] strings" argument to
2668 * invokeOemRilRequestStrings()
2670 * "response" is a const char **, representing an array of null-terminated UTF-8
2671 * stings that will be returned via the caller's response message here:
2673 * (String[])(((AsyncResult)response.obj).result)
2675 * An error response here will result in
2676 * (((AsyncResult)response.obj).result) == null and
2677 * (((AsyncResult)response.obj).exception) being an instance of
2678 * com.android.internal.telephony.gsm.CommandException
2684 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
2687 * RIL_REQUEST_SCREEN_STATE
2689 * Indicates the current state of the screen. When the screen is off, the
2690 * RIL should notify the baseband to suppress certain notifications (eg,
2691 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
2692 * in an effort to conserve power. These notifications should resume when the
2696 * ((int *)data)[0] is == 1 for "Screen On"
2697 * ((int *)data)[0] is == 0 for "Screen Off"
2699 * "response" is NULL
2705 #define RIL_REQUEST_SCREEN_STATE 61
2709 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
2711 * Enables/disables supplementary service related notifications
2714 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2717 * ((int *)data)[0] is == 1 for notifications enabled
2718 * ((int *)data)[0] is == 0 for notifications disabled
2720 * "response" is NULL
2724 * RADIO_NOT_AVAILABLE
2727 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
2729 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
2732 * RIL_REQUEST_WRITE_SMS_TO_SIM
2734 * Stores a SMS message to SIM memory.
2736 * "data" is RIL_SMS_WriteArgs *
2738 * "response" is int *
2739 * ((const int *)response)[0] is the record index where the message is stored.
2746 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
2749 * RIL_REQUEST_DELETE_SMS_ON_SIM
2751 * Deletes a SMS message from SIM memory.
2754 * ((int *)data)[0] is the record index of the message to delete.
2756 * "response" is NULL
2763 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
2766 * RIL_REQUEST_SET_BAND_MODE
2768 * Assign a specified band for RF configuration.
2771 * ((int *)data)[0] is == 0 for "unspecified" (selected by baseband automatically)
2772 * ((int *)data)[0] is == 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2773 * ((int *)data)[0] is == 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2774 * ((int *)data)[0] is == 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2775 * ((int *)data)[0] is == 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2776 * ((int *)data)[0] is == 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2777 * ((int *)data)[0] is == 6 for "Cellular (800-MHz Band)"
2778 * ((int *)data)[0] is == 7 for "PCS (1900-MHz Band)"
2779 * ((int *)data)[0] is == 8 for "Band Class 3 (JTACS Band)"
2780 * ((int *)data)[0] is == 9 for "Band Class 4 (Korean PCS Band)"
2781 * ((int *)data)[0] is == 10 for "Band Class 5 (450-MHz Band)"
2782 * ((int *)data)[0] is == 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2783 * ((int *)data)[0] is == 12 for "Band Class 7 (Upper 700-MHz Band)"
2784 * ((int *)data)[0] is == 13 for "Band Class 8 (1800-MHz Band)"
2785 * ((int *)data)[0] is == 14 for "Band Class 9 (900-MHz Band)"
2786 * ((int *)data)[0] is == 15 for "Band Class 10 (Secondary 800-MHz Band)"
2787 * ((int *)data)[0] is == 16 for "Band Class 11 (400-MHz European PAMR Band)"
2788 * ((int *)data)[0] is == 17 for "Band Class 15 (AWS Band)"
2789 * ((int *)data)[0] is == 18 for "Band Class 16 (US 2.5-GHz Band)"
2791 * "response" is NULL
2795 * RADIO_NOT_AVAILABLE
2798 #define RIL_REQUEST_SET_BAND_MODE 65
2801 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
2803 * Query the list of band mode supported by RF.
2807 * "response" is int *
2808 * "response" points to an array of int's, the int[0] is the size of array, reset is one for
2809 * each available band mode.
2811 * 0 for "unspecified" (selected by baseband automatically)
2812 * 1 for "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
2813 * 2 for "US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
2814 * 3 for "JPN band" (WCDMA-800 / WCDMA-IMT-2000)
2815 * 4 for "AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
2816 * 5 for "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
2817 * 6 for "Cellular (800-MHz Band)"
2818 * 7 for "PCS (1900-MHz Band)"
2819 * 8 for "Band Class 3 (JTACS Band)"
2820 * 9 for "Band Class 4 (Korean PCS Band)"
2821 * 10 for "Band Class 5 (450-MHz Band)"
2822 * 11 for "Band Class 6 (2-GMHz IMT2000 Band)"
2823 * 12 for "Band Class 7 (Upper 700-MHz Band)"
2824 * 13 for "Band Class 8 (1800-MHz Band)"
2825 * 14 for "Band Class 9 (900-MHz Band)"
2826 * 15 for "Band Class 10 (Secondary 800-MHz Band)"
2827 * 16 for "Band Class 11 (400-MHz European PAMR Band)"
2828 * 17 for "Band Class 15 (AWS Band)"
2829 * 18 for "Band Class 16 (US 2.5-GHz Band)"
2833 * RADIO_NOT_AVAILABLE
2836 * See also: RIL_REQUEST_SET_BAND_MODE
2838 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
2841 * RIL_REQUEST_STK_GET_PROFILE
2843 * Requests the profile of SIM tool kit.
2844 * The profile indicates the SAT/USAT features supported by ME.
2845 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
2849 * "response" is a const char * containing SAT/USAT profile
2850 * in hexadecimal format string starting with first byte of terminal profile
2854 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2855 * RIL_E_GENERIC_FAILURE
2857 #define RIL_REQUEST_STK_GET_PROFILE 67
2860 * RIL_REQUEST_STK_SET_PROFILE
2862 * Download the STK terminal profile as part of SIM initialization
2865 * "data" is a const char * containing SAT/USAT profile
2866 * in hexadecimal format string starting with first byte of terminal profile
2868 * "response" is NULL
2872 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2873 * RIL_E_GENERIC_FAILURE
2875 #define RIL_REQUEST_STK_SET_PROFILE 68
2878 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
2880 * Requests to send a SAT/USAT envelope command to SIM.
2881 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
2883 * "data" is a const char * containing SAT/USAT command
2884 * in hexadecimal format string starting with command tag
2886 * "response" is a const char * containing SAT/USAT response
2887 * in hexadecimal format string starting with first byte of response
2892 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2893 * RIL_E_GENERIC_FAILURE
2895 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
2898 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
2900 * Requests to send a terminal response to SIM for a received
2903 * "data" is a const char * containing SAT/USAT response
2904 * in hexadecimal format string starting with first byte of response data
2906 * "response" is NULL
2910 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2911 * RIL_E_GENERIC_FAILURE
2913 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
2916 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
2918 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
2919 * been initialized by ME already. (We could see the call has been in the 'call
2920 * list') So, STK application needs to accept/reject the call according as user
2924 * ((int *)data)[0] is > 0 for "accept" the call setup
2925 * ((int *)data)[0] is == 0 for "reject" the call setup
2927 * "response" is NULL
2931 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
2932 * RIL_E_GENERIC_FAILURE
2934 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
2937 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
2939 * Connects the two calls and disconnects the subscriber from both calls.
2942 * "response" is NULL
2946 * RADIO_NOT_AVAILABLE (radio resetting)
2949 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
2952 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2954 * Requests to set the preferred network type for searching and registering
2955 * (CS/PS domain, RAT, and operation mode)
2957 * "data" is int * which is RIL_PreferredNetworkType
2959 * "response" is NULL
2963 * RADIO_NOT_AVAILABLE (radio resetting)
2965 * MODE_NOT_SUPPORTED
2967 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
2970 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
2972 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
2973 * for searching and registering
2977 * "response" is int *
2978 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
2982 * RADIO_NOT_AVAILABLE
2985 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
2987 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
2990 * RIL_REQUEST_NEIGHBORING_CELL_IDS
2992 * Request neighboring cell id in GSM network
2995 * "response" must be a " const RIL_NeighboringCell** "
2999 * RADIO_NOT_AVAILABLE
3002 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
3005 * RIL_REQUEST_SET_LOCATION_UPDATES
3007 * Enables/disables network state change notifications due to changes in
3008 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
3009 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
3011 * Note: The RIL implementation should default to "updates enabled"
3012 * when the screen is on and "updates disabled" when the screen is off.
3015 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
3016 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
3018 * "response" is NULL
3022 * RADIO_NOT_AVAILABLE
3025 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
3027 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
3030 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3032 * Request to set the location where the CDMA subscription shall
3036 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3038 * "response" is NULL
3042 * RADIO_NOT_AVAILABLE
3045 * SUBSCRIPTION_NOT_AVAILABLE
3047 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3049 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
3052 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
3054 * Request to set the roaming preferences in CDMA
3057 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
3058 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3059 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3061 * "response" is NULL
3065 * RADIO_NOT_AVAILABLE
3068 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
3071 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
3073 * Request the actual setting of the roaming preferences in CDMA in the modem
3077 * "response" is int *
3078 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
3079 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
3080 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
3082 * "response" is NULL
3086 * RADIO_NOT_AVAILABLE
3089 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
3092 * RIL_REQUEST_SET_TTY_MODE
3094 * Request to set the TTY mode
3097 * ((int *)data)[0] is == 0 for TTY off
3098 * ((int *)data)[0] is == 1 for TTY Full
3099 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
3100 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
3102 * "response" is NULL
3106 * RADIO_NOT_AVAILABLE
3109 #define RIL_REQUEST_SET_TTY_MODE 80
3112 * RIL_REQUEST_QUERY_TTY_MODE
3114 * Request the setting of TTY mode
3118 * "response" is int *
3119 * ((int *)response)[0] is == 0 for TTY off
3120 * ((int *)response)[0] is == 1 for TTY Full
3121 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
3122 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
3124 * "response" is NULL
3128 * RADIO_NOT_AVAILABLE
3131 #define RIL_REQUEST_QUERY_TTY_MODE 81
3134 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
3136 * Request to set the preferred voice privacy mode used in voice
3140 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3141 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3143 * "response" is NULL
3147 * RADIO_NOT_AVAILABLE
3150 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
3153 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
3155 * Request the setting of preferred voice privacy mode
3159 * "response" is int *
3160 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
3161 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
3163 * "response" is NULL
3167 * RADIO_NOT_AVAILABLE
3170 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
3173 * RIL_REQUEST_CDMA_FLASH
3177 * "data" is const char *
3178 * ((const char *)data)[0] is a FLASH string
3180 * "response" is NULL
3184 * RADIO_NOT_AVAILABLE
3188 #define RIL_REQUEST_CDMA_FLASH 84
3191 * RIL_REQUEST_CDMA_BURST_DTMF
3195 * "data" is const char **
3196 * ((const char **)data)[0] is a DTMF string
3197 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
3199 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
3202 * "response" is NULL
3206 * RADIO_NOT_AVAILABLE
3210 #define RIL_REQUEST_CDMA_BURST_DTMF 85
3213 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
3215 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
3216 * If the checksum is valid the 20 digit AKEY is written to NV,
3217 * replacing the existing AKEY no matter what it was before.
3219 * "data" is const char *
3220 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
3221 * where the last 6 digits are a checksum of the
3222 * first 20, as specified in TR45.AHAG
3223 * "Common Cryptographic Algorithms, Revision D.1
3226 * "response" is NULL
3230 * RADIO_NOT_AVAILABLE
3234 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
3237 * RIL_REQUEST_CDMA_SEND_SMS
3239 * Send a CDMA SMS message
3241 * "data" is const RIL_CDMA_SMS_Message *
3243 * "response" is a const RIL_SMS_Response *
3245 * Based on the return error, caller decides to resend if sending sms
3246 * fails. The CDMA error class is derived as follows,
3247 * SUCCESS is error class 0 (no error)
3248 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
3249 * and GENERIC_FAILURE is error class 3 (permanent and no retry)
3253 * RADIO_NOT_AVAILABLE
3254 * SMS_SEND_FAIL_RETRY
3258 #define RIL_REQUEST_CDMA_SEND_SMS 87
3261 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
3263 * Acknowledge the success or failure in the receipt of SMS
3264 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
3266 * "data" is const RIL_CDMA_SMS_Ack *
3268 * "response" is NULL
3272 * RADIO_NOT_AVAILABLE
3276 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
3279 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
3281 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
3285 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
3286 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
3290 * RADIO_NOT_AVAILABLE
3294 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
3297 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
3299 * Set GSM/WCDMA Cell Broadcast SMS config
3301 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
3302 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
3304 * "response" is NULL
3308 * RADIO_NOT_AVAILABLE
3312 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
3315 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
3317 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
3319 * "data" is const int *
3320 * (const int *)data[0] indicates to activate or turn off the
3321 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
3322 * 0 - Activate, 1 - Turn off
3324 * "response" is NULL
3328 * RADIO_NOT_AVAILABLE
3332 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
3335 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
3337 * Request the setting of CDMA Broadcast SMS config
3341 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
3342 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
3346 * RADIO_NOT_AVAILABLE
3350 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
3353 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
3355 * Set CDMA Broadcast SMS config
3357 * "data" is an const RIL_CDMA_BroadcastSmsConfigInfo **
3358 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
3360 * "response" is NULL
3364 * RADIO_NOT_AVAILABLE
3368 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
3371 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
3373 * Enable or disable the reception of CDMA Broadcast SMS
3375 * "data" is const int *
3376 * (const int *)data[0] indicates to activate or turn off the
3377 * reception of CDMA Broadcast SMS, 0-1,
3378 * 0 - Activate, 1 - Turn off
3380 * "response" is NULL
3384 * RADIO_NOT_AVAILABLE
3388 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
3391 * RIL_REQUEST_CDMA_SUBSCRIPTION
3393 * Request the device MDN / H_SID / H_NID.
3395 * The request is only allowed when CDMA subscription is available. When CDMA
3396 * subscription is changed, application layer should re-issue the request to
3397 * update the subscription information.
3399 * If a NULL value is returned for any of the device id, it means that error
3400 * accessing the device.
3402 * "response" is const char **
3403 * ((const char **)response)[0] is MDN if CDMA subscription is available
3404 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
3405 * CDMA subscription is available, in decimal format
3406 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
3407 * CDMA subscription is available, in decimal format
3408 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
3409 * ((const char **)response)[4] is PRL version if CDMA subscription is available
3413 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
3416 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
3419 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
3421 * Stores a CDMA SMS message to RUIM memory.
3423 * "data" is RIL_CDMA_SMS_WriteArgs *
3425 * "response" is int *
3426 * ((const int *)response)[0] is the record index where the message is stored.
3430 * RADIO_NOT_AVAILABLE
3434 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
3437 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
3439 * Deletes a CDMA SMS message from RUIM memory.
3442 * ((int *)data)[0] is the record index of the message to delete.
3444 * "response" is NULL
3448 * RADIO_NOT_AVAILABLE
3452 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
3455 * RIL_REQUEST_DEVICE_IDENTITY
3457 * Request the device ESN / MEID / IMEI / IMEISV.
3459 * The request is always allowed and contains GSM and CDMA device identity;
3460 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
3461 * RIL_REQUEST_GET_IMEISV.
3463 * If a NULL value is returned for any of the device id, it means that error
3464 * accessing the device.
3466 * When CDMA subscription is changed the ESN/MEID may change. The application
3467 * layer should re-issue the request to update the device identity in this case.
3469 * "response" is const char **
3470 * ((const char **)response)[0] is IMEI if GSM subscription is available
3471 * ((const char **)response)[1] is IMEISV if GSM subscription is available
3472 * ((const char **)response)[2] is ESN if CDMA subscription is available
3473 * ((const char **)response)[3] is MEID if CDMA subscription is available
3477 * RADIO_NOT_AVAILABLE
3480 #define RIL_REQUEST_DEVICE_IDENTITY 98
3483 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
3485 * Request the radio's system selection module to exit emergency
3486 * callback mode. RIL will not respond with SUCCESS until the modem has
3487 * completely exited from Emergency Callback Mode.
3491 * "response" is NULL
3495 * RADIO_NOT_AVAILABLE
3499 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
3502 * RIL_REQUEST_GET_SMSC_ADDRESS
3504 * Queries the default Short Message Service Center address on the device.
3508 * "response" is const char * containing the SMSC address.
3512 * RADIO_NOT_AVAILABLE
3516 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
3519 * RIL_REQUEST_SET_SMSC_ADDRESS
3521 * Sets the default Short Message Service Center address on the device.
3523 * "data" is const char * containing the SMSC address.
3525 * "response" is NULL
3529 * RADIO_NOT_AVAILABLE
3533 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
3536 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
3538 * Indicates whether there is storage available for new SMS messages.
3541 * ((int *)data)[0] is 1 if memory is available for storing new messages
3542 * is 0 if memory capacity is exceeded
3544 * "response" is NULL
3548 * RADIO_NOT_AVAILABLE
3552 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
3555 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
3557 * Indicates that the StkSerivce is running and is
3558 * ready to receive RIL_UNSOL_STK_XXXXX commands.
3561 * "response" is NULL
3565 * RADIO_NOT_AVAILABLE
3569 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
3572 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
3574 * Request to query the location where the CDMA subscription shall
3579 * "response" is int *
3580 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
3584 * RADIO_NOT_AVAILABLE
3586 * SUBSCRIPTION_NOT_AVAILABLE
3588 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
3590 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
3593 * RIL_REQUEST_ISIM_AUTHENTICATION
3595 * Request the ISIM application on the UICC to perform AKA
3596 * challenge/response algorithm for IMS authentication
3598 * "data" is a const char * containing the challenge string in Base64 format
3599 * "response" is a const char * containing the response in Base64 format
3603 * RADIO_NOT_AVAILABLE
3606 #define RIL_REQUEST_ISIM_AUTHENTICATION 105
3609 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
3611 * Acknowledge successful or failed receipt of SMS previously indicated
3612 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
3613 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
3615 * "data" is const char **
3616 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
3617 * is "0" on failed receipt (send RP-ERROR)
3618 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
3620 * "response" is NULL
3624 * RADIO_NOT_AVAILABLE
3627 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
3630 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
3632 * Requests to send a SAT/USAT envelope command to SIM.
3633 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
3635 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
3636 * the SW1 and SW2 status bytes from the UICC response are returned along with
3637 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
3639 * The RIL implementation shall perform the normal processing of a '91XX'
3640 * response in SW1/SW2 to retrieve the pending proactive command and send it
3641 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
3643 * "data" is a const char * containing the SAT/USAT command
3644 * in hexadecimal format starting with command tag
3646 * "response" is a const RIL_SIM_IO_Response *
3650 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3651 * RIL_E_GENERIC_FAILURE
3653 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
3656 * RIL_REQUEST_VOICE_RADIO_TECH
3658 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
3659 * when radio state is RADIO_STATE_ON
3662 * "response" is int *
3663 * ((int *) response)[0] is of type const RIL_RadioTechnology
3667 * RADIO_NOT_AVAILABLE
3670 #define RIL_REQUEST_VOICE_RADIO_TECH 108
3673 * RIL_REQUEST_GET_CELL_INFO_LIST
3675 * Request all of the current cell information known to the radio. The radio
3676 * must a list of all current cells, including the neighboring cells. If for a particular
3677 * cell information isn't known then the appropriate unknown value will be returned.
3678 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
3682 * "response" is an array of RIL_CellInfo.
3684 #define RIL_REQUEST_GET_CELL_INFO_LIST 109
3687 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
3689 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
3690 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
3691 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
3692 * a RIL_UNSOL_CELL_INFO_LIST.
3695 * ((int *)data)[0] is minimum time in milliseconds
3697 * "response" is NULL
3701 * RADIO_NOT_AVAILABLE
3704 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
3707 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
3709 * Set an apn to initial attach network
3710 * "response" is NULL
3714 * RADIO_NOT_AVAILABLE (radio resetting)
3716 * SUBSCRIPTION_NOT_AVAILABLE
3718 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
3721 * RIL_REQUEST_IMS_REGISTRATION_STATE
3723 * Request current IMS registration state
3727 * "response" is int *
3728 * ((int *)response)[0] is registration state:
3729 * 0 - Not registered
3732 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
3733 * must follow with IMS SMS format:
3735 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
3739 * RADIO_NOT_AVAILABLE
3742 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112
3745 * RIL_REQUEST_IMS_SEND_SMS
3747 * Send a SMS message over IMS
3749 * "data" is const RIL_IMS_SMS_Message *
3751 * "response" is a const RIL_SMS_Response *
3753 * Based on the return error, caller decides to resend if sending sms
3754 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
3755 * In case of retry, data is encoded based on Voice Technology available.
3759 * RADIO_NOT_AVAILABLE
3760 * SMS_SEND_FAIL_RETRY
3765 #define RIL_REQUEST_IMS_SEND_SMS 113
3768 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
3770 * Request APDU exchange on the basic channel. This command reflects TS 27.007
3771 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
3772 * of GSM/CDMA, and filter commands appropriately. It should filter
3773 * channel management and SELECT by DF name commands.
3775 * "data" is a const RIL_SIM_APDU *
3776 * "sessionid" field should be ignored.
3778 * "response" is a const RIL_SIM_IO_Response *
3782 * RADIO_NOT_AVAILABLE
3785 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
3788 * RIL_REQUEST_SIM_OPEN_CHANNEL
3790 * Open a new logical channel and select the given application. This command
3791 * reflects TS 27.007 "open logical channel" operation (+CCHO).
3793 * "data" is const char * and set to AID value, See ETSI 102.221 and 101.220.
3795 * "response" is int *
3796 * ((int *)data)[0] contains the session id of the logical channel.
3800 * RADIO_NOT_AVAILABLE
3805 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115
3808 * RIL_REQUEST_SIM_CLOSE_CHANNEL
3810 * Close a previously opened logical channel. This command reflects TS 27.007
3811 * "close logical channel" operation (+CCHC).
3814 * ((int *)data)[0] is the session id of logical the channel to close.
3816 * "response" is NULL
3820 * RADIO_NOT_AVAILABLE
3823 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
3826 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
3828 * Exchange APDUs with a UICC over a previously opened logical channel. This
3829 * command reflects TS 27.007 "generic logical channel access" operation
3830 * (+CGLA). The modem should filter channel management and SELECT by DF name
3833 * "data" is a const RIL_SIM_APDU*
3835 * "response" is a const RIL_SIM_IO_Response *
3839 * RADIO_NOT_AVAILABLE
3842 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
3845 * RIL_REQUEST_NV_READ_ITEM
3847 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
3848 * This is used for device configuration by some CDMA operators.
3850 * "data" is a const RIL_NV_ReadItem *
3852 * "response" is const char * containing the contents of the NV item
3856 * RADIO_NOT_AVAILABLE
3859 #define RIL_REQUEST_NV_READ_ITEM 118
3862 * RIL_REQUEST_NV_WRITE_ITEM
3864 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
3865 * This is used for device configuration by some CDMA operators.
3867 * "data" is a const RIL_NV_WriteItem *
3869 * "response" is NULL
3873 * RADIO_NOT_AVAILABLE
3876 #define RIL_REQUEST_NV_WRITE_ITEM 119
3879 * RIL_REQUEST_NV_WRITE_CDMA_PRL
3881 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
3882 * This is used for device configuration by some CDMA operators.
3884 * "data" is a const char * containing the PRL as a byte array
3886 * "response" is NULL
3890 * RADIO_NOT_AVAILABLE
3893 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
3896 * RIL_REQUEST_NV_RESET_CONFIG
3898 * Reset the radio NV configuration to the factory state.
3899 * This is used for device configuration by some CDMA operators.
3902 * ((int *)data)[0] is 1 to reload all NV items
3903 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
3904 * ((int *)data)[0] is 3 for factory reset (RTN)
3906 * "response" is NULL
3910 * RADIO_NOT_AVAILABLE
3913 #define RIL_REQUEST_NV_RESET_CONFIG 121
3915 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
3916 * FIXME This API needs to have more documentation.
3918 * Selection/de-selection of a subscription from a SIM card
3919 * "data" is const RIL_SelectUiccSub*
3922 * "response" is NULL
3926 * RADIO_NOT_AVAILABLE (radio resetting)
3928 * SUBSCRIPTION_NOT_SUPPORTED
3931 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
3934 * RIL_REQUEST_ALLOW_DATA
3936 * Tells the modem whether data calls are allowed or not
3939 * FIXME slotId and aid will be added.
3940 * ((int *)data)[0] is == 0 to allow data calls
3941 * ((int *)data)[0] is == 1 to disallow data calls
3943 * "response" is NULL
3948 * RADIO_NOT_AVAILABLE (radio resetting)
3952 #define RIL_REQUEST_ALLOW_DATA 123
3955 * RIL_REQUEST_GET_HARDWARE_CONFIG
3957 * Request all of the current hardware (modem and sim) associated
3962 * "response" is an array of RIL_HardwareConfig.
3964 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124
3967 * RIL_REQUEST_SIM_AUTHENTICATION
3969 * Returns the response of SIM Authentication through RIL to a
3970 * challenge request.
3972 * "data" Base64 encoded string containing challenge:
3973 * int authContext; P2 value of authentication command, see P2 parameter in
3974 * 3GPP TS 31.102 7.1.2
3975 * char *authData; the challenge string in Base64 format, see 3GPP
3977 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
3980 * "response" Base64 encoded strings containing response:
3981 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
3983 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
3985 #define RIL_REQUEST_SIM_AUTHENTICATION 125
3988 * RIL_REQUEST_GET_DC_RT_INFO
3990 * Requests the Data Connection Real Time Info
3994 * "response" is the most recent RIL_DcRtInfo
3998 * RADIO_NOT_AVAILABLE
4001 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
4003 #define RIL_REQUEST_GET_DC_RT_INFO 126
4006 * RIL_REQUEST_SET_DC_RT_INFO_RATE
4008 * This is the minimum number of milliseconds between successive
4009 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
4010 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
4011 * 0 means send as fast as possible.
4013 * "data" The number of milliseconds as an int
4015 * "response" is null
4018 * SUCCESS must not fail
4020 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
4023 /***********************************************************************/
4026 #define RIL_UNSOL_RESPONSE_BASE 1000
4029 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
4031 * Indicate when value of RIL_RadioState has changed.
4033 * Callee will invoke RIL_RadioStateRequest method on main thread
4038 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
4042 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
4044 * Indicate when call state has changed
4046 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
4050 * Response should be invoked on, for example,
4051 * "RING", "BUSY", "NO CARRIER", and also call state
4052 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
4054 * Redundent or extraneous invocations are tolerated
4056 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
4060 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
4062 * Called when the voice network state changed
4064 * Callee will invoke the following requests on main thread:
4066 * RIL_REQUEST_VOICE_REGISTRATION_STATE
4067 * RIL_REQUEST_OPERATOR
4071 * FIXME should this happen when SIM records are loaded? (eg, for
4074 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
4077 * RIL_UNSOL_RESPONSE_NEW_SMS
4079 * Called when new SMS is received.
4081 * "data" is const char *
4082 * This is a pointer to a string containing the PDU of an SMS-DELIVER
4083 * as an ascii string of hex digits. The PDU starts with the SMSC address
4084 * per TS 27.005 (+CMT:)
4086 * Callee will subsequently confirm the receipt of thei SMS with a
4087 * RIL_REQUEST_SMS_ACKNOWLEDGE
4089 * No new RIL_UNSOL_RESPONSE_NEW_SMS
4090 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4091 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4094 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
4097 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
4099 * Called when new SMS Status Report is received.
4101 * "data" is const char *
4102 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
4103 * as an ascii string of hex digits. The PDU starts with the SMSC address
4104 * per TS 27.005 (+CDS:).
4106 * Callee will subsequently confirm the receipt of the SMS with a
4107 * RIL_REQUEST_SMS_ACKNOWLEDGE
4109 * No new RIL_UNSOL_RESPONSE_NEW_SMS
4110 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
4111 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
4114 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
4117 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
4119 * Called when new SMS has been stored on SIM card
4121 * "data" is const int *
4122 * ((const int *)data)[0] contains the slot index on the SIM that contains
4126 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
4131 * Called when a new USSD message is received.
4133 * "data" is const char **
4134 * ((const char **)data)[0] points to a type code, which is
4135 * one of these string values:
4136 * "0" USSD-Notify -- text in ((const char **)data)[1]
4137 * "1" USSD-Request -- text in ((const char **)data)[1]
4138 * "2" Session terminated by network
4139 * "3" other local client (eg, SIM Toolkit) has responded
4140 * "4" Operation not supported
4141 * "5" Network timeout
4143 * The USSD session is assumed to persist if the type code is "1", otherwise
4144 * the current session (if any) is assumed to have terminated.
4146 * ((const char **)data)[1] points to a message string if applicable, which
4147 * should always be in UTF-8.
4149 #define RIL_UNSOL_ON_USSD 1006
4150 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
4153 * RIL_UNSOL_ON_USSD_REQUEST
4155 * Obsolete. Send via RIL_UNSOL_ON_USSD
4157 #define RIL_UNSOL_ON_USSD_REQUEST 1007
4161 * RIL_UNSOL_NITZ_TIME_RECEIVED
4163 * Called when radio has received a NITZ time message
4165 * "data" is const char * pointing to NITZ time string
4166 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
4168 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
4171 * RIL_UNSOL_SIGNAL_STRENGTH
4173 * Radio may report signal strength rather han have it polled.
4175 * "data" is a const RIL_SignalStrength *
4177 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
4181 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
4183 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
4184 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
4185 * of current data contexts including new contexts that have been
4186 * activated. A data call is only removed from this list when the
4187 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
4188 * is powered off/on.
4190 * See also: RIL_REQUEST_DATA_CALL_LIST
4193 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
4196 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
4198 * Reports supplementary service related notification from the network.
4200 * "data" is a const RIL_SuppSvcNotification *
4204 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
4207 * RIL_UNSOL_STK_SESSION_END
4209 * Indicate when STK session is terminated by SIM.
4213 #define RIL_UNSOL_STK_SESSION_END 1012
4216 * RIL_UNSOL_STK_PROACTIVE_COMMAND
4218 * Indicate when SIM issue a STK proactive command to applications
4220 * "data" is a const char * containing SAT/USAT proactive command
4221 * in hexadecimal format string starting with command tag
4224 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
4227 * RIL_UNSOL_STK_EVENT_NOTIFY
4229 * Indicate when SIM notifies applcations some event happens.
4230 * Generally, application does not need to have any feedback to
4231 * SIM but shall be able to indicate appropriate messages to users.
4233 * "data" is a const char * containing SAT/USAT commands or responses
4234 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
4235 * starting with first byte of response data or command tag
4238 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
4241 * RIL_UNSOL_STK_CALL_SETUP
4243 * Indicate when SIM wants application to setup a voice call.
4245 * "data" is const int *
4246 * ((const int *)data)[0] contains timeout value (in milliseconds)
4248 #define RIL_UNSOL_STK_CALL_SETUP 1015
4251 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
4253 * Indicates that SMS storage on the SIM is full. Sent when the network
4254 * attempts to deliver a new SMS message. Messages cannot be saved on the
4255 * SIM until space is freed. In particular, incoming Class 2 messages
4261 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
4264 * RIL_UNSOL_SIM_REFRESH
4266 * Indicates that file(s) on the SIM have been updated, or the SIM
4267 * has been reinitialized.
4269 * In the case where RIL is version 6 or older:
4270 * "data" is an int *
4271 * ((int *)data)[0] is a RIL_SimRefreshResult.
4272 * ((int *)data)[1] is the EFID of the updated file if the result is
4273 * SIM_FILE_UPDATE or NULL for any other result.
4275 * In the case where RIL is version 7:
4276 * "data" is a RIL_SimRefreshResponse_v7 *
4278 * Note: If the SIM state changes as a result of the SIM refresh (eg,
4279 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4282 #define RIL_UNSOL_SIM_REFRESH 1017
4285 * RIL_UNSOL_CALL_RING
4287 * Ring indication for an incoming call (eg, RING or CRING event).
4288 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
4289 * of a call and sending multiple is optional. If the system property
4290 * ro.telephony.call_ring.multiple is false then the upper layers
4291 * will generate the multiple events internally. Otherwise the vendor
4292 * ril must generate multiple RIL_UNSOL_CALL_RING if
4293 * ro.telephony.call_ring.multiple is true or if it is absent.
4295 * The rate of these events is controlled by ro.telephony.call_ring.delay
4296 * and has a default value of 3000 (3 seconds) if absent.
4298 * "data" is null for GSM
4299 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
4301 #define RIL_UNSOL_CALL_RING 1018
4304 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
4306 * Indicates that SIM state changes.
4308 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
4312 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
4315 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4317 * Called when new CDMA SMS is received
4319 * "data" is const RIL_CDMA_SMS_Message *
4321 * Callee will subsequently confirm the receipt of the SMS with
4322 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4324 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
4325 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
4328 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
4331 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
4333 * Called when new Broadcast SMS is received
4335 * "data" can be one of the following:
4336 * If received from GSM network, "data" is const char of 88 bytes
4337 * which indicates each page of a CBS Message sent to the MS by the
4338 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
4339 * If received from UMTS network, "data" is const char of 90 up to 1252
4340 * bytes which contain between 1 and 15 CBS Message pages sent as one
4341 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
4344 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
4347 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
4349 * Indicates that SMS storage on the RUIM is full. Messages
4350 * cannot be saved on the RUIM until space is freed.
4355 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
4358 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
4360 * Indicates a restricted state change (eg, for Domain Specific Access Control).
4362 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
4364 * "data" is an int *
4365 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
4367 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
4370 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
4372 * Indicates that the radio system selection module has
4373 * autonomously entered emergency callback mode.
4378 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
4381 * RIL_UNSOL_CDMA_CALL_WAITING
4383 * Called when CDMA radio receives a call waiting indication.
4385 * "data" is const RIL_CDMA_CallWaiting *
4388 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
4391 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
4393 * Called when CDMA radio receives an update of the progress of an
4396 * "data" is const int *
4397 * For CDMA this is an integer OTASP/OTAPA status listed in
4398 * RIL_CDMA_OTA_ProvisionStatus.
4401 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
4404 * RIL_UNSOL_CDMA_INFO_REC
4406 * Called when CDMA radio receives one or more info recs.
4408 * "data" is const RIL_CDMA_InformationRecords *
4411 #define RIL_UNSOL_CDMA_INFO_REC 1027
4414 * RIL_UNSOL_OEM_HOOK_RAW
4416 * This is for OEM specific use.
4418 * "data" is a byte[]
4420 #define RIL_UNSOL_OEM_HOOK_RAW 1028
4423 * RIL_UNSOL_RINGBACK_TONE
4425 * Indicates that nework doesn't have in-band information, need to
4426 * play out-band tone.
4428 * "data" is an int *
4429 * ((int *)data)[0] == 0 for stop play ringback tone.
4430 * ((int *)data)[0] == 1 for start play ringback tone.
4432 #define RIL_UNSOL_RINGBACK_TONE 1029
4435 * RIL_UNSOL_RESEND_INCALL_MUTE
4437 * Indicates that framework/application need reset the uplink mute state.
4439 * There may be situations where the mute state becomes out of sync
4440 * between the application and device in some GSM infrastructures.
4444 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
4447 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
4449 * Called when CDMA subscription source changed.
4452 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4454 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
4457 * RIL_UNSOL_CDMA_PRL_CHANGED
4459 * Called when PRL (preferred roaming list) changes.
4462 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
4464 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
4467 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
4469 * Called when Emergency Callback Mode Ends
4471 * Indicates that the radio system selection module has
4472 * proactively exited emergency callback mode.
4477 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
4480 * RIL_UNSOL_RIL_CONNECTED
4482 * Called the ril connects and returns the version
4485 * ((int *)data)[0] is RIL_VERSION
4487 #define RIL_UNSOL_RIL_CONNECTED 1034
4490 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
4492 * Indicates that voice technology has changed. Contains new radio technology
4493 * as a data in the message.
4496 * ((int *)data)[0] is of type const RIL_RadioTechnology
4499 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
4502 * RIL_UNSOL_CELL_INFO_LIST
4504 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
4505 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
4509 * "response" is an array of RIL_CellInfo.
4511 #define RIL_UNSOL_CELL_INFO_LIST 1036
4514 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
4516 * Called when IMS registration state has changed
4518 * To get IMS registration state and IMS SMS format, callee needs to invoke the
4519 * following request on main thread:
4521 * RIL_REQUEST_IMS_REGISTRATION_STATE
4526 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
4529 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
4531 * Indicated when there is a change in subscription status.
4532 * This event will be sent in the following scenarios
4533 * - subscription readiness at modem, which was selected by telephony layer
4534 * - when subscription is deactivated by modem due to UICC card removal
4535 * - When network invalidates the subscription i.e. attach reject due to authentication reject
4537 * "data" is const int *
4538 * ((const int *)data)[0] == 0 for Subscription Deactivated
4539 * ((const int *)data)[0] == 1 for Subscription Activated
4542 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
4545 * RIL_UNSOL_SRVCC_STATE_NOTIFY
4547 * Called when Single Radio Voice Call Continuity(SRVCC)
4548 * progress state has changed
4551 * ((int *)data)[0] is of type const RIL_SrvccState
4555 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
4558 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
4560 * Called when the hardware configuration associated with the RILd changes
4562 * "data" is an array of RIL_HardwareConfig
4565 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
4568 * RIL_UNSOL_DC_RT_INFO_CHANGED
4570 * Sent when the DC_RT_STATE changes but the time
4571 * between these messages must not be less than the
4572 * value set by RIL_REQUEST_SET_DC_RT_RATE.
4574 * "data" is the most recent RIL_DcRtInfo
4577 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
4579 /***********************************************************************/
4581 #if defined(ANDROID_MULTI_SIM)
4583 * RIL_Request Function pointer
4585 * @param request is one of RIL_REQUEST_*
4586 * @param data is pointer to data defined for that RIL_REQUEST_*
4587 * data is owned by caller, and should not be modified or freed by callee
4588 * @param t should be used in subsequent call to RIL_onResponse
4589 * @param datalen the length of data
4592 typedef void (*RIL_RequestFunc) (int request, void *data,
4593 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
4596 * This function should return the current radio state synchronously
4598 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
4601 /* Backward compatible */
4604 * RIL_Request Function pointer
4606 * @param request is one of RIL_REQUEST_*
4607 * @param data is pointer to data defined for that RIL_REQUEST_*
4608 * data is owned by caller, and should not be modified or freed by callee
4609 * @param t should be used in subsequent call to RIL_onResponse
4610 * @param datalen the length of data
4613 typedef void (*RIL_RequestFunc) (int request, void *data,
4614 size_t datalen, RIL_Token t);
4617 * This function should return the current radio state synchronously
4619 typedef RIL_RadioState (*RIL_RadioStateRequest)();
4625 * This function returns "1" if the specified RIL_REQUEST code is
4626 * supported and 0 if it is not
4628 * @param requestCode is one of RIL_REQUEST codes
4631 typedef int (*RIL_Supports)(int requestCode);
4634 * This function is called from a separate thread--not the
4635 * thread that calls RIL_RequestFunc--and indicates that a pending
4636 * request should be cancelled.
4638 * On cancel, the callee should do its best to abandon the request and
4639 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
4641 * Subsequent calls to RIL_onRequestComplete for this request with
4642 * other results will be tolerated but ignored. (That is, it is valid
4643 * to ignore the cancellation request)
4645 * RIL_Cancel calls should return immediately, and not wait for cancellation
4647 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
4650 * @param t token wants to be canceled
4653 typedef void (*RIL_Cancel)(RIL_Token t);
4655 typedef void (*RIL_TimedCallback) (void *param);
4658 * Return a version string for your RIL implementation
4660 typedef const char * (*RIL_GetVersion) (void);
4663 int version; /* set to RIL_VERSION */
4664 RIL_RequestFunc onRequest;
4665 RIL_RadioStateRequest onStateRequest;
4666 RIL_Supports supports;
4667 RIL_Cancel onCancel;
4668 RIL_GetVersion getVersion;
4669 } RIL_RadioFunctions;
4677 } RIL_InitialAttachApn;
4680 int authContext; /* P2 value of authentication command, see P2 parameter in
4681 3GPP TS 31.102 7.1.2 */
4682 char *authData; /* the challenge string in Base64 format, see 3GPP
4684 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
4685 NULL if no value. */
4686 } RIL_SimAuthentication;
4691 * "t" is parameter passed in on previous call to RIL_Notification
4694 * If "e" != SUCCESS, then response can be null/is ignored
4696 * "response" is owned by caller, and should not be modified or
4699 * RIL_onRequestComplete will return as soon as possible
4701 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
4702 void *response, size_t responselen);
4704 #if defined(ANDROID_MULTI_SIM)
4706 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4707 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4709 * "data" is owned by caller, and should not be modified or freed by callee
4711 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
4714 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
4715 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4717 * "data" is owned by caller, and should not be modified or freed by callee
4719 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
4722 * Call user-specifed "callback" function on on the same thread that
4723 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4724 * a relative time value at which the callback is invoked. If relativeTime is
4725 * NULL or points to a 0-filled structure, the callback will be invoked as
4729 void (*RequestTimedCallback) (RIL_TimedCallback callback,
4730 void *param, const struct timeval *relativeTime);
4735 * RIL implementations must defined RIL_Init
4736 * argc and argv will be command line arguments intended for the RIL implementation
4737 * Return NULL on error
4739 * @param env is environment point defined as RIL_Env
4740 * @param argc number of arguments
4741 * @param argv list fo arguments
4744 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
4746 #else /* RIL_SHLIB */
4749 * Call this once at startup to register notification routine
4751 * @param callbacks user-specifed callback function
4753 void RIL_register (const RIL_RadioFunctions *callbacks);
4758 * RIL_onRequestComplete will return as soon as possible
4760 * @param t is parameter passed in on previous call to RIL_Notification
4762 * @param e error code
4763 * if "e" != SUCCESS, then response can be null/is ignored
4764 * @param response is owned by caller, and should not be modified or
4766 * @param responselen the length of response in byte
4768 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
4769 void *response, size_t responselen);
4771 #if defined(ANDROID_MULTI_SIM)
4773 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4774 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4775 * "data" is owned by caller, and should not be modified or freed by callee
4776 * @param datalen the length of data in byte
4779 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
4780 size_t datalen, RIL_SOCKET_ID socket_id);
4783 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
4784 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
4785 * "data" is owned by caller, and should not be modified or freed by callee
4786 * @param datalen the length of data in byte
4789 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
4794 * Call user-specifed "callback" function on on the same thread that
4795 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
4796 * a relative time value at which the callback is invoked. If relativeTime is
4797 * NULL or points to a 0-filled structure, the callback will be invoked as
4800 * @param callback user-specifed callback function
4801 * @param param parameter list
4802 * @param relativeTime a relative time value at which the callback is invoked
4805 void RIL_requestTimedCallback (RIL_TimedCallback callback,
4806 void *param, const struct timeval *relativeTime);
4809 #endif /* RIL_SHLIB */
4815 #endif /*ANDROID_RIL_H*/