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
52 * Value of RIL_VERSION should not be changed in future. Here onwards,
53 * when a new change is supposed to be introduced which could involve new
54 * schemes added like Wakelocks, data structures added/updated, etc, we would
55 * just document RIL version associated with that change below. When OEM updates its
56 * RIL with those changes, they would return that new RIL version during RIL_REGISTER.
57 * We should make use of the returned version by vendor to identify appropriate scheme
58 * or data structure version to use.
60 * Documentation of RIL version and associated changes
61 * RIL_VERSION = 12 : This version corresponds to updated data structures namely
62 * RIL_Data_Call_Response_v11, RIL_SIM_IO_v6, RIL_CardStatus_v6,
63 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6,
64 * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, RIL_CellIdentityGsm_v12
65 * RIL_CellIdentityWcdma_v12, RIL_CellIdentityLte_v12,RIL_CellInfoGsm_v12,
66 * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, RIL_CellInfo_v12.
68 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the first
69 * strongly versioned version it enforces structure use.
71 * RIL_VERSION = 14 : New data structures are added, namely RIL_CarrierMatchType,
72 * RIL_Carrier, RIL_CarrierRestrictions and RIL_PCO_Data.
73 * New commands added: RIL_REQUEST_SET_CARRIER_RESTRICTIONS,
74 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS and RIL_UNSOL_PCO_DATA.
76 * RIL_VERSION = 15 : New commands added:
77 * RIL_UNSOL_MODEM_RESTART,
78 * RIL_REQUEST_SEND_DEVICE_STATE,
79 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER,
80 * RIL_REQUEST_SET_SIM_CARD_POWER
81 * The new parameters for RIL_REQUEST_SETUP_DATA_CALL,
82 * Updated data structures: RIL_DataProfileInfo_v15, RIL_InitialAttachApn_v15
83 * New data structure RIL_DataRegistrationStateResponse,
84 * RIL_VoiceRegistrationStateResponse same is
85 * used in RIL_REQUEST_DATA_REGISTRATION_STATE and
86 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively.
87 * New data structure RIL_OpenChannelParams.
89 #define RIL_VERSION 12
90 #define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name
91 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */
93 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64
94 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81
97 #define MAX_SERVICE_NAME_LENGTH 6
98 #define MAX_CLIENT_ID_LENGTH 2
99 #define MAX_DEBUG_SOCKET_NAME_LENGTH 12
100 #define MAX_QEMU_PIPE_NAME_LENGTH 11
101 #define MAX_UUID_LENGTH 64
104 typedef void * RIL_Token;
123 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */
124 RIL_E_GENERIC_FAILURE = 2,
125 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */
126 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */
127 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */
128 RIL_E_REQUEST_NOT_SUPPORTED = 6,
130 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice
131 call on a Class C GPRS device */
132 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device
133 registers in network */
134 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */
135 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription
136 shall be retrieved because of SIM or RUIM
138 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified
140 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */
141 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */
142 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to
144 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */
145 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */
146 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */
147 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */
148 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different
150 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */
151 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */
152 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD
154 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */
155 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */
156 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */
157 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */
158 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */
159 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */
160 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling
162 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */
163 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response
164 from modem for this request */
165 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */
166 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */
167 RIL_E_SIM_ERR = 43, /* Received error from SIM card */
168 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */
169 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */
170 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */
171 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */
172 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */
173 RIL_E_NETWORK_ERR = 49, /* Received error from network */
174 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */
175 RIL_E_SIM_BUSY = 51, /* SIM is busy */
176 RIL_E_SIM_FULL = 52, /* The target EF is full */
177 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */
178 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */
179 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */
180 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */
181 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */
182 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */
183 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */
184 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */
185 RIL_E_NOT_PROVISIONED = 61, /* Device doesnot have this value provisioned */
186 RIL_E_NO_SUBSCRIPTION = 62, /* Device doesnot have subscription */
187 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */
188 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device
189 is currently in use */
190 RIL_E_ABORTED = 65, /* Operation aborted */
191 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */
192 // OEM specific error codes. To be used by OEM when they don't want to reveal
193 // specific error codes which would be replaced by Generic failure.
194 RIL_E_OEM_ERROR_1 = 501,
195 RIL_E_OEM_ERROR_2 = 502,
196 RIL_E_OEM_ERROR_3 = 503,
197 RIL_E_OEM_ERROR_4 = 504,
198 RIL_E_OEM_ERROR_5 = 505,
199 RIL_E_OEM_ERROR_6 = 506,
200 RIL_E_OEM_ERROR_7 = 507,
201 RIL_E_OEM_ERROR_8 = 508,
202 RIL_E_OEM_ERROR_9 = 509,
203 RIL_E_OEM_ERROR_10 = 510,
204 RIL_E_OEM_ERROR_11 = 511,
205 RIL_E_OEM_ERROR_12 = 512,
206 RIL_E_OEM_ERROR_13 = 513,
207 RIL_E_OEM_ERROR_14 = 514,
208 RIL_E_OEM_ERROR_15 = 515,
209 RIL_E_OEM_ERROR_16 = 516,
210 RIL_E_OEM_ERROR_17 = 517,
211 RIL_E_OEM_ERROR_18 = 518,
212 RIL_E_OEM_ERROR_19 = 519,
213 RIL_E_OEM_ERROR_20 = 520,
214 RIL_E_OEM_ERROR_21 = 521,
215 RIL_E_OEM_ERROR_22 = 522,
216 RIL_E_OEM_ERROR_23 = 523,
217 RIL_E_OEM_ERROR_24 = 524,
218 RIL_E_OEM_ERROR_25 = 525
223 RIL_CALL_HOLDING = 1,
224 RIL_CALL_DIALING = 2, /* MO call only */
225 RIL_CALL_ALERTING = 3, /* MO call only */
226 RIL_CALL_INCOMING = 4, /* MT call only */
227 RIL_CALL_WAITING = 5 /* MT call only */
231 RADIO_STATE_OFF = 0, /* Radio explictly powered off (eg CFUN=0) */
232 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */
233 RADIO_STATE_ON = 10 /* Radio is on */
237 RADIO_TECH_UNKNOWN = 0,
241 RADIO_TECH_IS95A = 4,
242 RADIO_TECH_IS95B = 5,
243 RADIO_TECH_1xRTT = 6,
244 RADIO_TECH_EVDO_0 = 7,
245 RADIO_TECH_EVDO_A = 8,
246 RADIO_TECH_HSDPA = 9,
247 RADIO_TECH_HSUPA = 10,
248 RADIO_TECH_HSPA = 11,
249 RADIO_TECH_EVDO_B = 12,
250 RADIO_TECH_EHRPD = 13,
252 RADIO_TECH_HSPAP = 15, // HSPA+
253 RADIO_TECH_GSM = 16, // Only supports voice
254 RADIO_TECH_TD_SCDMA = 17,
255 RADIO_TECH_IWLAN = 18,
256 RADIO_TECH_LTE_CA = 19
257 } RIL_RadioTechnology;
260 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN),
261 RAF_GPRS = (1 << RADIO_TECH_GPRS),
262 RAF_EDGE = (1 << RADIO_TECH_EDGE),
263 RAF_UMTS = (1 << RADIO_TECH_UMTS),
264 RAF_IS95A = (1 << RADIO_TECH_IS95A),
265 RAF_IS95B = (1 << RADIO_TECH_IS95B),
266 RAF_1xRTT = (1 << RADIO_TECH_1xRTT),
267 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0),
268 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A),
269 RAF_HSDPA = (1 << RADIO_TECH_HSDPA),
270 RAF_HSUPA = (1 << RADIO_TECH_HSUPA),
271 RAF_HSPA = (1 << RADIO_TECH_HSPA),
272 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B),
273 RAF_EHRPD = (1 << RADIO_TECH_EHRPD),
274 RAF_LTE = (1 << RADIO_TECH_LTE),
275 RAF_HSPAP = (1 << RADIO_TECH_HSPAP),
276 RAF_GSM = (1 << RADIO_TECH_GSM),
277 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA),
278 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA)
279 } RIL_RadioAccessFamily;
282 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically)
283 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
284 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900)
285 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000)
286 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000)
287 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850)
288 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band)
289 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band)
290 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band)
291 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band)
292 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band)
293 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band)
294 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band)
295 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band)
296 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band)
297 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band)
298 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band)
299 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band)
300 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band)
304 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes
305 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be
306 // forthcoming with these same parameters
307 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned
308 // RIL_RadioCapability.status = 0, if any START's fail no
309 // APPLY will be sent
310 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY
311 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error
312 // occurs in any previous command the RIL_RadioAccessesFamily and
313 // logicalModemUuid fields will be the prior configuration thus
314 // restoring the configuration to the previous value. An error
315 // returned by this command will generally be ignored or may
316 // cause that logical modem to be removed from service.
317 } RadioCapabilityPhase;
320 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START,
322 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio
323 // capability was success with RC_PHASE_FINISH
324 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio
325 // capability is fail with RC_PHASE_FINISH.
326 } RadioCapabilityStatus;
328 #define RIL_RADIO_CAPABILITY_VERSION 1
330 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION
331 int session; // Unique session value defined by framework returned in all "responses/unsol"
332 int phase; // CONFIGURED, START, APPLY, FINISH
333 int rat; // RIL_RadioAccessFamily for the radio
334 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem.
335 int status; // Return status and an input parameter for RC_PHASE_FINISH
336 } RIL_RadioCapability;
338 // Do we want to split Data from Voice and the use
339 // RIL_RadioTechnology for get/setPreferredVoice/Data ?
341 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */
342 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */
343 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */
344 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */
345 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */
346 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */
347 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */
348 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */
349 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */
350 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */
351 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */
352 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */
353 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */
354 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */
355 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */
356 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */
357 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */
358 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */
359 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */
360 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */
361 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */
362 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */
363 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */
364 } RIL_PreferredNetworkType;
366 /* Source for cdma subscription */
368 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0,
369 CDMA_SUBSCRIPTION_SOURCE_NV = 1
370 } RIL_CdmaSubscriptionSource;
372 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */
374 RIL_UUS_TYPE1_IMPLICIT = 0,
375 RIL_UUS_TYPE1_REQUIRED = 1,
376 RIL_UUS_TYPE1_NOT_REQUIRED = 2,
377 RIL_UUS_TYPE2_REQUIRED = 3,
378 RIL_UUS_TYPE2_NOT_REQUIRED = 4,
379 RIL_UUS_TYPE3_REQUIRED = 5,
380 RIL_UUS_TYPE3_NOT_REQUIRED = 6
383 /* User-to-User Signaling Information data coding schemes. Possible values for
384 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been
385 * specified in section 10.5.4.25 of 3GPP TS 24.008 */
387 RIL_UUS_DCS_USP = 0, /* User specified protocol */
388 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */
389 RIL_UUS_DCS_X244 = 2, /* X.244 */
390 RIL_UUS_DCS_RMCF = 3, /* Reserved for system mangement
391 convergence function */
392 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */
395 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0
396 * This data is passed in RIL_ExtensionRecord and rec contains this
397 * structure when type is RIL_UUS_INFO_EXT_REC */
399 RIL_UUS_Type uusType; /* UUS Type */
400 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */
401 int uusLength; /* Length of UUS Data */
402 char * uusData; /* UUS Data */
405 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */
407 char isPresent; /* non-zero if signal information record is present */
408 char signalType; /* as defined 3.7.5.5-1 */
409 char alertPitch; /* as defined 3.7.5.5-2 */
410 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */
411 } RIL_CDMA_SignalInfoRecord;
415 int index; /* Connection Index for use with, eg, AT+CHLD */
416 int toa; /* type of address, eg 145 = intl */
417 char isMpty; /* nonzero if is mpty call */
418 char isMT; /* nonzero if call is mobile terminated */
419 char als; /* ALS line indicator if available
421 char isVoice; /* nonzero if this is is a voice call */
422 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */
423 char * number; /* Remote party number */
424 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
425 char * name; /* Remote party name */
426 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */
427 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
430 /* Deprecated, use RIL_Data_Call_Response_v6 */
432 int cid; /* Context ID, uniquely identifies this call */
433 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
434 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
435 For example, "IP", "IPV6", "IPV4V6", or "PPP". */
436 char * apn; /* ignored */
437 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */
438 } RIL_Data_Call_Response_v4;
441 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST
442 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0.
445 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
446 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
447 back-off timer value RIL wants to override the one
448 pre-configured in FW.
449 The unit is miliseconds.
450 The value < 0 means no value is suggested.
451 The value 0 means retry should be done ASAP.
452 The value of INT_MAX(0x7fffffff) means no retry. */
453 int cid; /* Context ID, uniquely identifies this call */
454 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
455 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
456 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
457 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
458 such as "IP" or "IPV6" */
459 char * ifname; /* The network interface name */
460 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
461 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
462 May not be empty, typically 1 IPv4 or 1 IPv6 or
463 one of each. If the prefix length is absent the addresses
464 are assumed to be point to point with IPv4 having a prefix
465 length of 32 and IPv6 128. */
466 char * dnses; /* A space-delimited list of DNS server addresses,
467 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
469 char * gateways; /* A space-delimited list of default gateway addresses,
470 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
471 May be empty in which case the addresses represent point
472 to point connections. */
473 } RIL_Data_Call_Response_v6;
476 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
477 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
478 back-off timer value RIL wants to override the one
479 pre-configured in FW.
480 The unit is miliseconds.
481 The value < 0 means no value is suggested.
482 The value 0 means retry should be done ASAP.
483 The value of INT_MAX(0x7fffffff) means no retry. */
484 int cid; /* Context ID, uniquely identifies this call */
485 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
486 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
487 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
488 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
489 such as "IP" or "IPV6" */
490 char * ifname; /* The network interface name */
491 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
492 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
493 May not be empty, typically 1 IPv4 or 1 IPv6 or
494 one of each. If the prefix length is absent the addresses
495 are assumed to be point to point with IPv4 having a prefix
496 length of 32 and IPv6 128. */
497 char * dnses; /* A space-delimited list of DNS server addresses,
498 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
500 char * gateways; /* A space-delimited list of default gateway addresses,
501 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
502 May be empty in which case the addresses represent point
503 to point connections. */
504 char * pcscf; /* the Proxy Call State Control Function address
505 via PCO(Protocol Configuration Option) for IMS client. */
506 } RIL_Data_Call_Response_v9;
509 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */
510 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry
511 back-off timer value RIL wants to override the one
512 pre-configured in FW.
513 The unit is miliseconds.
514 The value < 0 means no value is suggested.
515 The value 0 means retry should be done ASAP.
516 The value of INT_MAX(0x7fffffff) means no retry. */
517 int cid; /* Context ID, uniquely identifies this call */
518 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */
519 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1.
520 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is
521 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported
522 such as "IP" or "IPV6" */
523 char * ifname; /* The network interface name */
524 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length,
525 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64".
526 May not be empty, typically 1 IPv4 or 1 IPv6 or
527 one of each. If the prefix length is absent the addresses
528 are assumed to be point to point with IPv4 having a prefix
529 length of 32 and IPv6 128. */
530 char * dnses; /* A space-delimited list of DNS server addresses,
531 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
533 char * gateways; /* A space-delimited list of default gateway addresses,
534 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
535 May be empty in which case the addresses represent point
536 to point connections. */
537 char * pcscf; /* the Proxy Call State Control Function address
538 via PCO(Protocol Configuration Option) for IMS client. */
539 int mtu; /* MTU received from network
540 Value <= 0 means network has either not sent a value or
541 sent an invalid value */
542 } RIL_Data_Call_Response_v11;
545 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
546 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
547 } RIL_RadioTechnologyFamily;
550 RIL_RadioTechnologyFamily tech;
551 unsigned char retry; /* 0 == not retry, nonzero == retry */
552 int messageRef; /* Valid field if retry is set to nonzero.
553 Contains messageRef from RIL_SMS_Response
554 corresponding to failed MO SMS.
558 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */
559 RIL_CDMA_SMS_Message* cdmaMessage;
561 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */
562 char** gsmMessage; /* This is an array of pointers where pointers
563 are contiguous but elements pointed by those pointers
567 } RIL_IMS_SMS_Message;
570 int messageRef; /* TP-Message-Reference for GSM,
571 and BearerData MessageId for CDMA
572 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */
573 char *ackPDU; /* or NULL if n/a */
574 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS,
575 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA,
576 -1 if unknown or not applicable*/
579 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */
581 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
582 /* 0 = "REC UNREAD" */
584 /* 2 = "STO UNSENT" */
586 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address,
587 the TP-layer length is "strlen(pdu)/2". */
588 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte
589 (as expected by TS 27.005) or NULL for default SMSC */
592 /** Used by RIL_REQUEST_DIAL */
596 /* (same as 'n' paremeter in TS 27.007 7.7 "+CLIR"
597 * clir == 0 on "use subscription default value"
598 * clir == 1 on "CLIR invocation" (restrict CLI presentation)
599 * clir == 2 on "CLIR suppression" (allow CLI presentation)
601 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */
605 int command; /* one of the commands listed for TS 27.007 +CRSM*/
606 int fileid; /* EF id */
607 char *path; /* "pathid" from TS 27.007 +CRSM command.
608 Path is in hex asciii format eg "7f205f70"
609 Path must always be provided.
614 char *data; /* May be NULL*/
615 char *pin2; /* May be NULL*/
619 int command; /* one of the commands listed for TS 27.007 +CRSM*/
620 int fileid; /* EF id */
621 char *path; /* "pathid" from TS 27.007 +CRSM command.
622 Path is in hex asciii format eg "7f205f70"
623 Path must always be provided.
628 char *data; /* May be NULL*/
629 char *pin2; /* May be NULL*/
630 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */
633 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and
634 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */
636 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be
637 ignored for +CSIM command. */
639 /* Following fields are used to derive the APDU ("command" and "length"
640 values in TS 27.007 +CSIM and +CGLA commands). */
645 int p3; /* A negative P3 implies a 4 byte APDU. */
646 char *data; /* May be NULL. In hex string format. */
652 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION
653 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */
654 } RIL_SIM_IO_Response;
656 /* See also com.android.internal.telephony.gsm.CallForwardInfo */
660 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
661 * status 1 = active, 0 = not active
663 * For RIL_REQUEST_SET_CALL_FORWARD:
672 int reason; /* from TS 27.007 7.11 "reason" */
673 int serviceClass;/* From 27.007 +CCFC/+CLCK "class"
674 See table for Android mapping from
676 0 means user doesn't input class */
677 int toa; /* "type" from TS 27.007 7.11 */
678 char * number; /* "number" from TS 27.007 7.11. May be NULL */
679 int timeSeconds; /* for CF no reply only */
680 }RIL_CallForwardInfo;
683 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM.
684 * Upper 16 bits is LAC and lower 16 bits
685 * is CID (as described in TS 27.005)
686 * Primary Scrambling Code (as described in TS 25.331)
688 * Valid values are hexadecimal 0x0000 - 0xffffffff.
690 int rssi; /* Received RSSI in GSM,
691 * Level index of CPICH Received Signal Code Power in UMTS
693 } RIL_NeighboringCell;
696 char lce_status; /* LCE service status:
697 * -1 = not supported;
701 unsigned int actual_interval_ms; /* actual LCE reporting interval,
702 * meaningful only if LCEStatus = 1.
707 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */
708 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */
709 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio
710 * moves to inactive state or network type change)
717 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */
718 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */
719 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */
720 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */
721 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */
722 } RIL_CarrierMatchType;
727 RIL_CarrierMatchType match_type; /* Specify match type for the carrier.
728 * If it’s RIL_MATCH_ALL, match_data is null;
729 * otherwise, match_data is the value for the match type.
731 const char * match_data;
735 int32_t len_allowed_carriers; /* length of array allowed_carriers */
736 int32_t len_excluded_carriers; /* length of array excluded_carriers */
737 RIL_Carrier * allowed_carriers; /* whitelist for allowed carriers */
738 RIL_Carrier * excluded_carriers; /* blacklist for explicitly excluded carriers
739 * which match allowed_carriers. Eg. allowed_carriers match
740 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1
741 * is ABCD. It means except the carrier whose gid1 is ABCD,
742 * all carriers with the same mcc/mnc are allowed.
744 } RIL_CarrierRestrictions;
746 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */
748 CALL_FAIL_UNOBTAINABLE_NUMBER = 1,
749 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3,
750 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6,
751 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8,
752 CALL_FAIL_NORMAL = 16,
754 CALL_FAIL_NO_USER_RESPONDING = 18,
755 CALL_FAIL_NO_ANSWER_FROM_USER = 19,
756 CALL_FAIL_CALL_REJECTED = 21,
757 CALL_FAIL_NUMBER_CHANGED = 22,
758 CALL_FAIL_PREEMPTION = 25,
759 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27,
760 CALL_FAIL_INVALID_NUMBER_FORMAT = 28,
761 CALL_FAIL_FACILITY_REJECTED = 29,
762 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30,
763 CALL_FAIL_NORMAL_UNSPECIFIED = 31,
764 CALL_FAIL_CONGESTION = 34,
765 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38,
766 CALL_FAIL_TEMPORARY_FAILURE = 41,
767 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42,
768 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43,
769 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44,
770 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47,
771 CALL_FAIL_QOS_UNAVAILABLE = 49,
772 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50,
773 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55,
774 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57,
775 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58,
776 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63,
777 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65,
778 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68,
779 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69,
780 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70,
781 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79,
782 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81,
783 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87,
784 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88,
785 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91,
786 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95,
787 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96,
788 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97,
789 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98,
790 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99,
791 CALL_FAIL_CONDITIONAL_IE_ERROR = 100,
792 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101,
793 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102,
794 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111,
795 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127,
796 CALL_FAIL_CALL_BARRED = 240,
797 CALL_FAIL_FDN_BLOCKED = 241,
798 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242,
799 CALL_FAIL_IMEI_NOT_ACCEPTED = 243,
800 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */
801 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245,
802 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246,
803 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */
804 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */
805 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */
806 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */
807 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */
808 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */
809 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */
810 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */
811 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */
812 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */
813 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */
814 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */
815 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */
816 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */
817 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */
818 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000,
819 CALL_FAIL_CDMA_DROP = 1001,
820 CALL_FAIL_CDMA_INTERCEPT = 1002,
821 CALL_FAIL_CDMA_REORDER = 1003,
822 CALL_FAIL_CDMA_SO_REJECT = 1004,
823 CALL_FAIL_CDMA_RETRY_ORDER = 1005,
824 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006,
825 CALL_FAIL_CDMA_PREEMPTED = 1007,
826 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed
827 during emergency callback mode */
828 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */
830 /* OEM specific error codes. Used to distinguish error from
831 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */
832 CALL_FAIL_OEM_CAUSE_1 = 0xf001,
833 CALL_FAIL_OEM_CAUSE_2 = 0xf002,
834 CALL_FAIL_OEM_CAUSE_3 = 0xf003,
835 CALL_FAIL_OEM_CAUSE_4 = 0xf004,
836 CALL_FAIL_OEM_CAUSE_5 = 0xf005,
837 CALL_FAIL_OEM_CAUSE_6 = 0xf006,
838 CALL_FAIL_OEM_CAUSE_7 = 0xf007,
839 CALL_FAIL_OEM_CAUSE_8 = 0xf008,
840 CALL_FAIL_OEM_CAUSE_9 = 0xf009,
841 CALL_FAIL_OEM_CAUSE_10 = 0xf00a,
842 CALL_FAIL_OEM_CAUSE_11 = 0xf00b,
843 CALL_FAIL_OEM_CAUSE_12 = 0xf00c,
844 CALL_FAIL_OEM_CAUSE_13 = 0xf00d,
845 CALL_FAIL_OEM_CAUSE_14 = 0xf00e,
846 CALL_FAIL_OEM_CAUSE_15 = 0xf00f,
848 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon,
849 vendor code should make sure to map error
850 code to specific error */
851 } RIL_LastCallFailCause;
854 RIL_LastCallFailCause cause_code;
856 } RIL_LastCallFailCauseInfo;
858 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */
860 PDP_FAIL_NONE = 0, /* No error, connection ok */
862 /* an integer cause code defined in TS 24.008
863 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B.
864 If the implementation does not have access to the exact cause codes,
865 then it should return one of the following values,
866 as the UI layer needs to distinguish these
867 cases for error notification and potential retries. */
868 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */
869 PDP_FAIL_NAS_SIGNALLING = 0x0E,
870 PDP_FAIL_LLC_SNDCP = 0x19,
871 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A,
872 PDP_FAIL_MISSING_UKNOWN_APN = 0x1B, /* no retry */
873 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */
874 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */
875 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */
876 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F,
877 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */
878 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */
879 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22,
880 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */
881 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio,
882 based on framework config */
883 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25,
884 PDP_FAIL_NETWORK_FAILURE = 0x26,
885 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27,
886 PDP_FAIL_FEATURE_NOT_SUPP = 0x28,
887 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29,
888 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A,
889 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B,
890 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C,
891 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D,
892 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E,
893 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */
894 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */
895 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34,
896 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35,
897 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36,
898 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37,
899 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41,
900 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42,
901 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51,
902 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F,
903 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60,
904 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61,
905 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62,
906 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63,
907 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64,
908 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65,
909 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */
910 PDP_FAIL_APN_TYPE_CONFLICT = 0x70,
911 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71,
912 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72,
913 PDP_FAIL_EMM_ACCESS_BARRED = 0x73,
914 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74,
915 PDP_FAIL_IFACE_MISMATCH = 0x75,
916 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76,
917 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77,
918 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78,
919 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79,
920 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A,
922 // OEM specific error codes. To be used by OEMs when they don't want to
923 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED
924 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001,
925 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002,
926 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003,
927 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004,
928 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005,
929 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006,
930 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007,
931 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008,
932 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009,
933 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A,
934 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B,
935 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C,
936 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D,
937 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E,
938 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F,
940 /* Not mentioned in the specification */
941 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1,
942 PDP_FAIL_DATA_REGISTRATION_FAIL = -2,
944 /* reasons for data call drop - network/modem disconnect */
945 PDP_FAIL_SIGNAL_LOST = -3,
946 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4,/* preferred technology has changed, should retry
947 with parameters appropriate for new technology */
948 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting,
949 powered off - no retry */
950 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered
951 mode was up on same APN/data profile - no retry until
952 tethered call is off */
954 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as
955 new error codes are added making this unnecessary */
956 } RIL_DataCallFailCause;
958 /* See RIL_REQUEST_SETUP_DATA_CALL */
960 RIL_DATA_PROFILE_DEFAULT = 0,
961 RIL_DATA_PROFILE_TETHERED = 1,
962 RIL_DATA_PROFILE_IMS = 2,
963 RIL_DATA_PROFILE_FOTA = 3,
964 RIL_DATA_PROFILE_CBS = 4,
965 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */
966 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF
969 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */
971 int notificationType; /*
972 * 0 = MO intermediate result code
973 * 1 = MT unsolicited result code
975 int code; /* See 27.007 7.17
978 int index; /* CUG index. See 27.007 7.17. */
979 int type; /* "type" from 27.007 7.17 (MT only). */
980 char * number; /* "number" from 27.007 7.17
981 (MT only, may be NULL). */
982 } RIL_SuppSvcNotification;
984 #define RIL_CARD_MAX_APPS 8
987 RIL_CARDSTATE_ABSENT = 0,
988 RIL_CARDSTATE_PRESENT = 1,
989 RIL_CARDSTATE_ERROR = 2,
990 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/
994 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */
995 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */
996 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished
997 since each app can only have 1 active perso
999 RIL_PERSOSUBSTATE_SIM_NETWORK = 3,
1000 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4,
1001 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5,
1002 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6,
1003 RIL_PERSOSUBSTATE_SIM_SIM = 7,
1004 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */
1005 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9,
1006 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10,
1007 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11,
1008 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12,
1009 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13,
1010 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14,
1011 RIL_PERSOSUBSTATE_RUIM_HRPD = 15,
1012 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16,
1013 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17,
1014 RIL_PERSOSUBSTATE_RUIM_RUIM = 18,
1015 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */
1016 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20,
1017 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21,
1018 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22,
1019 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23,
1020 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24
1021 } RIL_PersoSubstate;
1024 RIL_APPSTATE_UNKNOWN = 0,
1025 RIL_APPSTATE_DETECTED = 1,
1026 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */
1027 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */
1028 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at
1029 when app_state is assigned to this value */
1030 RIL_APPSTATE_READY = 5
1034 RIL_PINSTATE_UNKNOWN = 0,
1035 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1,
1036 RIL_PINSTATE_ENABLED_VERIFIED = 2,
1037 RIL_PINSTATE_DISABLED = 3,
1038 RIL_PINSTATE_ENABLED_BLOCKED = 4,
1039 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5
1043 RIL_APPTYPE_UNKNOWN = 0,
1044 RIL_APPTYPE_SIM = 1,
1045 RIL_APPTYPE_USIM = 2,
1046 RIL_APPTYPE_RUIM = 3,
1047 RIL_APPTYPE_CSIM = 4,
1048 RIL_APPTYPE_ISIM = 5
1052 * Please note that registration state UNKNOWN is
1053 * treated as "out of service" in the Android telephony.
1054 * Registration state REG_DENIED must be returned if Location Update
1055 * Reject (with cause 17 - Network Failure) is received
1056 * repeatedly from the network, to facilitate
1060 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching
1061 // a new operator to register
1062 RIL_REG_HOME = 1, // Registered, home network
1063 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching
1064 // a new operator to register
1065 RIL_REG_DENIED = 3, // Registration denied
1066 RIL_UNKNOWN = 4, // Unknown
1067 RIL_REG_ROAMING = 5, // Registered, roaming
1068 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as
1069 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that
1070 // emergency calls are enabled.
1071 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING
1072 // but indicates that
1073 // emergency calls are enabled.
1074 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that
1075 // emergency calls are enabled.
1076 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that
1077 // emergency calls are enabled.
1082 RIL_AppType app_type;
1083 RIL_AppState app_state;
1084 RIL_PersoSubstate perso_substate; /* applicable only if app_state ==
1085 RIL_APPSTATE_SUBSCRIPTION_PERSO */
1086 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41,
1088 char *app_label_ptr; /* null terminated string */
1089 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */
1094 /* Deprecated, use RIL_CardStatus_v6 */
1097 RIL_CardState card_state;
1098 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1099 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1100 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1101 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1102 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1103 } RIL_CardStatus_v5;
1107 RIL_CardState card_state;
1108 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */
1109 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1110 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1111 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */
1112 int num_applications; /* value <= RIL_CARD_MAX_APPS */
1113 RIL_AppStatus applications[RIL_CARD_MAX_APPS];
1114 } RIL_CardStatus_v6;
1116 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH
1117 * or as part of RIL_SimRefreshResponse_v7
1120 /* A file on SIM has been updated. data[1] contains the EFID. */
1121 SIM_FILE_UPDATE = 0,
1122 /* SIM initialized. All files should be re-read. */
1124 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */
1126 } RIL_SimRefreshResult;
1129 RIL_SimRefreshResult result;
1130 int ef_id; /* is the EFID of the updated file if the result is */
1131 /* SIM_FILE_UPDATE or 0 for any other result. */
1132 char * aid; /* is AID(application ID) of the card application */
1133 /* See ETSI 102.221 8.1 and 101.220 4 */
1134 /* For SIM_FILE_UPDATE result it can be set to AID of */
1135 /* application in which updated EF resides or it can be */
1136 /* NULL if EF is outside of an application. */
1137 /* For SIM_INIT result this field is set to AID of */
1138 /* application that caused REFRESH */
1139 /* For SIM_RESET result it is NULL. */
1140 } RIL_SimRefreshResponse_v7;
1142 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */
1144 char * number; /* Remote party number */
1145 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1146 char * name; /* Remote party name */
1147 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1148 } RIL_CDMA_CallWaiting_v5;
1151 char * number; /* Remote party number */
1152 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */
1153 char * name; /* Remote party name */
1154 RIL_CDMA_SignalInfoRecord signalInfoRecord;
1155 /* Number type/Number plan required to support International Call Waiting */
1156 int number_type; /* 0=Unknown, 1=International, 2=National,
1157 3=Network specific, 4=subscriber */
1158 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */
1159 } RIL_CDMA_CallWaiting_v6;
1162 * Which types of Cell Broadcast Message (CBM) are to be received by the ME
1164 * uFromServiceID - uToServiceID defines a range of CBM message identifiers
1165 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS
1166 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty
1169 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes
1170 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS
1171 * and 9.4.4.2.3 for UMTS.
1172 * All other values can be treated as empty CBM data coding scheme.
1174 * selected 0 means message types specified in <fromServiceId, toServiceId>
1175 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted.
1177 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and
1178 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG.
1185 unsigned char selected;
1186 } RIL_GSM_BroadcastSmsConfigInfo;
1188 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */
1189 #define RIL_RESTRICTED_STATE_NONE 0x00
1190 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */
1191 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01
1192 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */
1193 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02
1194 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/
1195 #define RIL_RESTRICTED_STATE_CS_ALL 0x04
1196 /* Block packet data access due to restriction. */
1197 #define RIL_RESTRICTED_STATE_PS_ALL 0x10
1199 /* The status for an OTASP/OTAPA session */
1201 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED,
1202 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED,
1203 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED,
1204 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED,
1205 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED,
1206 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED,
1207 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED,
1208 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED,
1209 CDMA_OTA_PROVISION_STATUS_COMMITTED,
1210 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED,
1211 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED,
1212 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
1213 } RIL_CDMA_OTA_ProvisionStatus;
1216 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1217 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1218 } RIL_GW_SignalStrength;
1221 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1222 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1223 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us.
1224 * INT_MAX denotes invalid value */
1225 } RIL_GSM_SignalStrength_v12;
1228 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1229 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */
1230 } RIL_SignalStrengthWcdma;
1233 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1234 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1237 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1238 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1241 } RIL_CDMA_SignalStrength;
1245 int dbm; /* Valid values are positive integers. This value is the actual RSSI value
1246 * multiplied by -1. Example: If the actual RSSI is -75, then this response
1249 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied
1250 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value
1253 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */
1254 } RIL_EVDO_SignalStrength;
1257 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1258 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1259 * Range: 44 to 140 dBm
1260 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1261 * Reference: 3GPP TS 36.133 9.1.4 */
1262 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1263 * Range: 20 to 3 dB.
1264 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1265 * Reference: 3GPP TS 36.133 9.1.7 */
1266 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1267 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1268 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1269 * Reference: 3GPP TS 36.101 8.1.1 */
1270 int cqi; /* The current Channel Quality Indicator.
1272 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1273 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1274 } RIL_LTE_SignalStrength;
1277 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */
1278 int rsrp; /* The current Reference Signal Receive Power in dBm multipled by -1.
1279 * Range: 44 to 140 dBm
1280 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1281 * Reference: 3GPP TS 36.133 9.1.4 */
1282 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1.
1283 * Range: 20 to 3 dB.
1284 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1285 * Reference: 3GPP TS 36.133 9.1.7 */
1286 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units.
1287 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
1288 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1289 * Reference: 3GPP TS 36.101 8.1.1 */
1290 int cqi; /* The current Channel Quality Indicator.
1292 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1293 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */
1294 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device.
1295 * Approximate distance can be calculated using 300m/us * timingAdvance.
1296 * Range: 0 to 0x7FFFFFFE
1297 * INT_MAX : 0x7FFFFFFF denotes invalid value.
1298 * Reference: 3GPP 36.321 section 6.1.3.5
1299 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */
1300 } RIL_LTE_SignalStrength_v8;
1303 int rscp; /* The Received Signal Code Power in dBm multipled by -1.
1305 * INT_MAX: 0x7FFFFFFF denotes invalid value.
1306 * Reference: 3GPP TS 25.123, section 9.1.1.1 */
1307 } RIL_TD_SCDMA_SignalStrength;
1309 /* Deprecated, use RIL_SignalStrength_v6 */
1311 RIL_GW_SignalStrength GW_SignalStrength;
1312 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1313 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1314 } RIL_SignalStrength_v5;
1317 RIL_GW_SignalStrength GW_SignalStrength;
1318 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1319 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1320 RIL_LTE_SignalStrength LTE_SignalStrength;
1321 } RIL_SignalStrength_v6;
1324 RIL_GW_SignalStrength GW_SignalStrength;
1325 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1326 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1327 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1328 } RIL_SignalStrength_v8;
1331 RIL_GW_SignalStrength GW_SignalStrength;
1332 RIL_CDMA_SignalStrength CDMA_SignalStrength;
1333 RIL_EVDO_SignalStrength EVDO_SignalStrength;
1334 RIL_LTE_SignalStrength_v8 LTE_SignalStrength;
1335 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength;
1336 } RIL_SignalStrength_v10;
1339 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1340 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1341 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1342 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1343 } RIL_CellIdentityGsm;
1346 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1347 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1348 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1349 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */
1350 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */
1351 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */
1352 } RIL_CellIdentityGsm_v12;
1355 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1356 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1357 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1358 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1359 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1360 } RIL_CellIdentityWcdma;
1363 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1364 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1365 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1366 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1367 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */
1368 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */
1369 } RIL_CellIdentityWcdma_v12;
1372 int networkId; /* Network Id 0..65535, INT_MAX if unknown */
1373 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */
1374 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */
1375 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1376 * It is represented in units of 0.25 seconds and ranges from -2592000
1377 * to 2592000, both values inclusive (corresponding to a range of -180
1378 * to +180 degrees). INT_MAX if unknown */
1380 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0.
1381 * It is represented in units of 0.25 seconds and ranges from -1296000
1382 * to 1296000, both values inclusive (corresponding to a range of -90
1383 * to +90 degrees). INT_MAX if unknown */
1384 } RIL_CellIdentityCdma;
1387 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1388 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1389 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1390 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1391 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1392 } RIL_CellIdentityLte;
1395 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1396 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1397 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */
1398 int pci; /* physical cell id 0..503, INT_MAX if unknown */
1399 int tac; /* 16-bit tracking area code, INT_MAX if unknown */
1400 int earfcn; /* 18-bit LTE Absolute RC Channel Number, INT_MAX if unknown */
1401 } RIL_CellIdentityLte_v12;
1404 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */
1405 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */
1406 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */
1407 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */
1408 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */
1409 } RIL_CellIdentityTdscdma;
1412 RIL_CellIdentityGsm cellIdentityGsm;
1413 RIL_GW_SignalStrength signalStrengthGsm;
1417 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1418 RIL_GSM_SignalStrength_v12 signalStrengthGsm;
1419 } RIL_CellInfoGsm_v12;
1422 RIL_CellIdentityWcdma cellIdentityWcdma;
1423 RIL_SignalStrengthWcdma signalStrengthWcdma;
1424 } RIL_CellInfoWcdma;
1427 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1428 RIL_SignalStrengthWcdma signalStrengthWcdma;
1429 } RIL_CellInfoWcdma_v12;
1432 RIL_CellIdentityCdma cellIdentityCdma;
1433 RIL_CDMA_SignalStrength signalStrengthCdma;
1434 RIL_EVDO_SignalStrength signalStrengthEvdo;
1438 RIL_CellIdentityLte cellIdentityLte;
1439 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1443 RIL_CellIdentityLte_v12 cellIdentityLte;
1444 RIL_LTE_SignalStrength_v8 signalStrengthLte;
1445 } RIL_CellInfoLte_v12;
1448 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1449 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma;
1450 } RIL_CellInfoTdscdma;
1452 // Must be the same as CellInfo.TYPE_XXX
1454 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */
1455 RIL_CELL_INFO_TYPE_GSM = 1,
1456 RIL_CELL_INFO_TYPE_CDMA = 2,
1457 RIL_CELL_INFO_TYPE_LTE = 3,
1458 RIL_CELL_INFO_TYPE_WCDMA = 4,
1459 RIL_CELL_INFO_TYPE_TD_SCDMA = 5
1462 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX
1464 RIL_TIMESTAMP_TYPE_UNKNOWN = 0,
1465 RIL_TIMESTAMP_TYPE_ANTENNA = 1,
1466 RIL_TIMESTAMP_TYPE_MODEM = 2,
1467 RIL_TIMESTAMP_TYPE_OEM_RIL = 3,
1468 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4,
1469 } RIL_TimeStampType;
1472 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1473 int registered; /* !0 if this cell is registered 0 if not registered */
1474 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1475 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1477 RIL_CellInfoGsm gsm;
1478 RIL_CellInfoCdma cdma;
1479 RIL_CellInfoLte lte;
1480 RIL_CellInfoWcdma wcdma;
1481 RIL_CellInfoTdscdma tdscdma;
1486 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1487 int registered; /* !0 if this cell is registered 0 if not registered */
1488 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */
1489 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */
1491 RIL_CellInfoGsm_v12 gsm;
1492 RIL_CellInfoCdma cdma;
1493 RIL_CellInfoLte_v12 lte;
1494 RIL_CellInfoWcdma_v12 wcdma;
1495 RIL_CellInfoTdscdma tdscdma;
1500 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */
1502 RIL_CellIdentityGsm_v12 cellIdentityGsm;
1503 RIL_CellIdentityWcdma_v12 cellIdentityWcdma;
1504 RIL_CellIdentityLte_v12 cellIdentityLte;
1505 RIL_CellIdentityTdscdma cellIdentityTdscdma;
1506 RIL_CellIdentityCdma cellIdentityCdma;
1508 }RIL_CellIdentity_v16;
1511 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1512 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1513 // UNKNOWN, REG_ROAMING defined in RegState
1514 RIL_RadioTechnology rat; // indicates the available voice radio technology,
1515 // valid values as defined by RadioTechnology.
1516 int32_t cssSupported; // concurrent services support indicator. if
1517 // registered on a CDMA system.
1518 // 0 - Concurrent services not supported,
1519 // 1 - Concurrent services supported
1520 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered
1521 // on a CDMA or EVDO system or -1 if not.
1522 // Valid values are 0-255.
1523 int32_t systemIsInPrl; // indicates whether the current system is in the
1524 // PRL if registered on a CDMA or EVDO system or -1 if
1525 // not. 0=not in the PRL, 1=in the PRL
1526 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL,
1527 // if registered on a CDMA or EVDO system or -1 if not.
1528 // Valid values are 0-255.
1529 int32_t reasonForDenial; // reasonForDenial if registration state is 3
1530 // (Registration denied) this is an enumerated reason why
1531 // registration was denied. See 3GPP TS 24.008,
1532 // 10.5.3.6 and Annex G.
1534 // 1 - Authentication Failure
1535 // 2 - IMSI unknown in HLR
1538 // 5 - PLMN not allowed
1539 // 6 - Location area not allowed
1540 // 7 - Roaming not allowed
1541 // 8 - No Suitable Cells in this Location Area
1542 // 9 - Network failure
1543 // 10 - Persistent location update reject
1544 // 11 - PLMN not allowed
1545 // 12 - Location area not allowed
1546 // 13 - Roaming not allowed in this Location Area
1547 // 15 - No Suitable Cells in this Location Area
1548 // 17 - Network Failure
1550 // 21 - Sync Failure
1552 // 23 - GSM Authentication unacceptable
1553 // 25 - Not Authorized for this CSG
1554 // 32 - Service option not supported
1555 // 33 - Requested service option not subscribed
1556 // 34 - Service option temporarily out of order
1557 // 38 - Call cannot be identified
1558 // 48-63 - Retry upon entry into a new cell
1559 // 95 - Semantically incorrect message
1560 // 96 - Invalid mandatory information
1561 // 97 - Message type non-existent or not implemented
1562 // 98 - Message type not compatible with protocol state
1563 // 99 - Information element non-existent or
1565 // 100 - Conditional IE error
1566 // 101 - Message not compatible with protocol state;
1567 RIL_CellIdentity_v16 cellIdentity; // current cell information
1568 }RIL_VoiceRegistrationStateResponse;
1572 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING,
1573 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED,
1574 // UNKNOWN, REG_ROAMING defined in RegState
1575 RIL_RadioTechnology rat; // indicates the available data radio technology,
1576 // valid values as defined by RadioTechnology.
1577 int32_t reasonDataDenied; // if registration state is 3 (Registration
1578 // denied) this is an enumerated reason why
1579 // registration was denied. See 3GPP TS 24.008,
1580 // Annex G.6 "Additional cause codes for GMM".
1581 // 7 == GPRS services not allowed
1582 // 8 == GPRS services and non-GPRS services not allowed
1583 // 9 == MS identity cannot be derived by the network
1584 // 10 == Implicitly detached
1585 // 14 == GPRS services not allowed in this PLMN
1586 // 16 == MSC temporarily not reachable
1587 // 40 == No PDP context activated
1588 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that
1589 // must be established using setupDataCall().
1590 RIL_CellIdentity_v16 cellIdentity; // Current cell information
1591 }RIL_DataRegistrationStateResponse;
1593 /* Names of the CDMA info records (C.S0005 section 3.7.5) */
1595 RIL_CDMA_DISPLAY_INFO_REC,
1596 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC,
1597 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC,
1598 RIL_CDMA_CONNECTED_NUMBER_INFO_REC,
1599 RIL_CDMA_SIGNAL_INFO_REC,
1600 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC,
1601 RIL_CDMA_LINE_CONTROL_INFO_REC,
1602 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC,
1603 RIL_CDMA_T53_CLIR_INFO_REC,
1604 RIL_CDMA_T53_RELEASE_INFO_REC,
1605 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC
1606 } RIL_CDMA_InfoRecName;
1608 /* Display Info Rec as defined in C.S0005 section 3.7.5.1
1609 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16
1610 Note: the Extended Display info rec contains multiple records of the
1611 form: display_tag, display_len, and display_len occurrences of the
1612 chari field if the display_tag is not 10000000 or 10000001.
1613 To save space, the records are stored consecutively in a byte buffer.
1614 The display_tag, display_len and chari fields are all 1 byte.
1619 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH];
1620 } RIL_CDMA_DisplayInfoRecord;
1622 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2
1623 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3
1624 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4
1629 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH];
1634 } RIL_CDMA_NumberInfoRecord;
1636 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */
1638 RIL_REDIRECTING_REASON_UNKNOWN = 0,
1639 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1,
1640 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2,
1641 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9,
1642 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10,
1643 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15,
1644 RIL_REDIRECTING_REASON_RESERVED
1645 } RIL_CDMA_RedirectingReason;
1648 RIL_CDMA_NumberInfoRecord redirectingNumber;
1649 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */
1650 RIL_CDMA_RedirectingReason redirectingReason;
1651 } RIL_CDMA_RedirectingNumberInfoRecord;
1653 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */
1655 char lineCtrlPolarityIncluded;
1656 char lineCtrlToggle;
1657 char lineCtrlReverse;
1658 char lineCtrlPowerDenial;
1659 } RIL_CDMA_LineControlInfoRecord;
1661 /* T53 CLIR Information Record */
1664 } RIL_CDMA_T53_CLIRInfoRecord;
1666 /* T53 Audio Control Information Record */
1670 } RIL_CDMA_T53_AudioControlInfoRecord;
1674 RIL_CDMA_InfoRecName name;
1677 /* Display and Extended Display Info Rec */
1678 RIL_CDMA_DisplayInfoRecord display;
1680 /* Called Party Number, Calling Party Number, Connected Number Info Rec */
1681 RIL_CDMA_NumberInfoRecord number;
1683 /* Signal Info Rec */
1684 RIL_CDMA_SignalInfoRecord signal;
1686 /* Redirecting Number Info Rec */
1687 RIL_CDMA_RedirectingNumberInfoRecord redir;
1689 /* Line Control Info Rec */
1690 RIL_CDMA_LineControlInfoRecord lineCtrl;
1692 /* T53 CLIR Info Rec */
1693 RIL_CDMA_T53_CLIRInfoRecord clir;
1695 /* T53 Audio Control Info Rec */
1696 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl;
1698 } RIL_CDMA_InformationRecord;
1700 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10
1703 char numberOfInfoRecs;
1704 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS];
1705 } RIL_CDMA_InformationRecords;
1707 /* See RIL_REQUEST_NV_READ_ITEM */
1712 /* See RIL_REQUEST_NV_WRITE_ITEM */
1719 HANDOVER_STARTED = 0,
1720 HANDOVER_COMPLETED = 1,
1721 HANDOVER_FAILED = 2,
1722 HANDOVER_CANCELED = 3
1725 /* hardware configuration reported to RILJ. */
1727 RIL_HARDWARE_CONFIG_MODEM = 0,
1728 RIL_HARDWARE_CONFIG_SIM = 1,
1729 } RIL_HardwareConfig_Type;
1732 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0,
1733 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1,
1734 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2,
1735 } RIL_HardwareConfig_State;
1739 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */
1743 } RIL_HardwareConfig_Modem;
1746 char modemUuid[MAX_UUID_LENGTH];
1747 } RIL_HardwareConfig_Sim;
1750 RIL_HardwareConfig_Type type;
1751 char uuid[MAX_UUID_LENGTH];
1752 RIL_HardwareConfig_State state;
1754 RIL_HardwareConfig_Modem modem;
1755 RIL_HardwareConfig_Sim sim;
1757 } RIL_HardwareConfig;
1763 SS_CF_NOT_REACHABLE,
1765 SS_CF_ALL_CONDITIONAL,
1777 SS_OUTGOING_BARRING,
1779 } RIL_SsServiceType;
1787 } RIL_SsRequestType;
1790 SS_ALL_TELE_AND_BEARER_SERVICES,
1793 SS_ALL_DATA_TELESERVICES,
1795 SS_ALL_TELESERVICES_EXCEPT_SMS
1796 } RIL_SsTeleserviceType;
1798 #define SS_INFO_MAX 4
1799 #define NUM_SERVICE_CLASSES 7
1802 int numValidIndexes; /* This gives the number of valid values in cfInfo.
1803 For example if voice is forwarded to one number and data
1804 is forwarded to a different one then numValidIndexes will be
1805 2 indicating total number of valid values in cfInfo.
1806 Similarly if all the services are forwarded to the same
1807 number then the value of numValidIndexes will be 1. */
1809 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data
1810 for SS request to query call
1812 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */
1816 RIL_SsServiceType serviceType;
1817 RIL_SsRequestType requestType;
1818 RIL_SsTeleserviceType teleserviceType;
1823 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET
1824 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns
1825 two ints, so first two values of ssInfo[] will be
1826 used for response if serviceType is SS_CLIR and
1827 requestType is SS_INTERROGATION */
1831 } RIL_StkCcUnsolSsResponse;
1834 * Data connection power state
1837 RIL_DC_POWER_STATE_LOW = 1, // Low power state
1838 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state
1839 RIL_DC_POWER_STATE_HIGH = 3, // High power state
1840 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state
1841 } RIL_DcPowerStates;
1844 * Data connection real time info
1847 uint64_t time; // Time in nanos as returned by ril_nano_time
1848 RIL_DcPowerStates powerState; // Current power state
1852 * Data profile to modem
1855 /* id of the data profile */
1857 /* the APN to connect to */
1859 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1860 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1863 /** authentication protocol used for this PDP context
1864 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1867 /* the username for APN, or NULL */
1869 /* the password for APN, or NULL */
1871 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1873 /* the period in seconds to limit the maximum connections */
1875 /* the maximum connections during maxConnsTime */
1877 /** the required wait time in seconds after a successful UE initiated
1878 * disconnect of a given PDN connection before the device can send
1879 * a new PDN connection request for that given PDN
1882 /* true to enable the profile, 0 to disable, 1 to enable */
1884 } RIL_DataProfileInfo;
1887 /* id of the data profile */
1889 /* the APN to connect to */
1891 /** one of the PDP_type values in TS 27.007 section 10.1.1.
1892 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1895 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network.
1896 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
1898 char *roamingProtocol;
1899 /** authentication protocol used for this PDP context
1900 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3)
1903 /* the username for APN, or NULL */
1905 /* the password for APN, or NULL */
1907 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */
1909 /* the period in seconds to limit the maximum connections */
1911 /* the maximum connections during maxConnsTime */
1913 /** the required wait time in seconds after a successful UE initiated
1914 * disconnect of a given PDN connection before the device can send
1915 * a new PDN connection request for that given PDN
1918 /* true to enable the profile, 0 to disable, 1 to enable */
1920 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */
1921 int supportedTypesBitmask;
1922 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */
1924 /** maximum transmission unit (MTU) size in bytes */
1926 /** the MVNO type: possible values are "imsi", "gid", "spn" */
1928 /** MVNO match data. Can be anything defined by the carrier. For example,
1929 * SPN like: "A MOBILE", "BEN NL", etc...
1930 * IMSI like: "302720x94", "2060188", etc...
1931 * GID like: "4E", "33", etc...
1933 char *mvnoMatchData;
1934 } RIL_DataProfileInfo_v15;
1936 /* Tx Power Levels */
1937 #define RIL_NUM_TX_POWER_LEVELS 5
1940 * Aggregate modem activity information
1944 /* total time (in ms) when modem is in a low power or
1947 uint32_t sleep_mode_time_ms;
1949 /* total time (in ms) when modem is awake but neither
1950 * the transmitter nor receiver are active/awake */
1951 uint32_t idle_mode_time_ms;
1953 /* total time (in ms) during which the transmitter is active/awake,
1954 * subdivided by manufacturer-defined device-specific
1955 * contiguous increasing ranges of transmit power between
1956 * 0 and the transmitter's maximum transmit power.
1958 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS];
1960 /* total time (in ms) for which receiver is active/awake and
1961 * the transmitter is inactive */
1962 uint32_t rx_mode_time_ms;
1963 } RIL_ActivityStatsInfo;
1966 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown
1967 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic
1968 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic
1969 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS
1970 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic
1971 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic
1972 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA
1973 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS
1974 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS
1975 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN
1976 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn,
1977 // but is used for access to carrier services in an
1978 // emergency call situation.
1979 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types
1983 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager)
1984 // True indicates the device is in power save mode.
1985 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager)
1986 // True indicates the device is charging.
1987 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic
1988 // is expected, for example, when the device is idle
1989 // (e.g. not doing tethering in the background). Note
1990 // this doesn't mean no data is expected.
1991 } RIL_DeviceStateType;
1994 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the
1995 // signal strength update through
1996 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it.
1997 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send
1998 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
1999 // when any field in
2000 // RIL_REQUEST_VOICE_REGISTRATION_STATE or
2001 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When
2002 // this bit is not set, modem should suppress
2003 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2004 // only when insignificant fields change
2005 // (e.g. cell info).
2006 // Modem should continue sending
2007 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
2008 // when significant fields are updated even when this
2009 // bit is not set. The following fields are
2010 // considered significant, registration state and
2011 // radio technology.
2012 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data
2013 // call list changed unsolicited response
2014 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any
2015 // field in RIL_Data_Call_Response changes.
2016 // Otherwise modem should suppress the unsolicited
2017 // response when the only changed field is 'active'
2018 // (for data dormancy). For all other fields change,
2019 // modem should continue sending
2020 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this
2021 // bit is set or not.
2022 } RIL_UnsolicitedResponseFilter;
2025 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/
2026 int p2; /* P2 parameter (described in ISO 7816-4)
2027 P2Constants:NO_P2 if to be ignored */
2028 } RIL_OpenChannelParams;
2031 * RIL_REQUEST_GET_SIM_STATUS
2033 * Requests status of the SIM interface and the SIM card
2037 * "response" is const RIL_CardStatus_v6 *
2042 #define RIL_REQUEST_GET_SIM_STATUS 1
2045 * RIL_REQUEST_ENTER_SIM_PIN
2047 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state
2049 * "data" is const char **
2050 * ((const char **)data)[0] is PIN value
2051 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2053 * "response" is int *
2054 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2059 * RADIO_NOT_AVAILABLE (radio resetting)
2060 * PASSWORD_INCORRECT
2063 #define RIL_REQUEST_ENTER_SIM_PIN 2
2066 * RIL_REQUEST_ENTER_SIM_PUK
2068 * Supplies SIM PUK and new PIN.
2070 * "data" is const char **
2071 * ((const char **)data)[0] is PUK value
2072 * ((const char **)data)[1] is new PIN value
2073 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2075 * "response" is int *
2076 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2081 * RADIO_NOT_AVAILABLE (radio resetting)
2082 * PASSWORD_INCORRECT
2086 #define RIL_REQUEST_ENTER_SIM_PUK 3
2089 * RIL_REQUEST_ENTER_SIM_PIN2
2091 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was
2092 * returned as a a failure from a previous operation.
2094 * "data" is const char **
2095 * ((const char **)data)[0] is PIN2 value
2096 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2098 * "response" is int *
2099 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2104 * RADIO_NOT_AVAILABLE (radio resetting)
2105 * PASSWORD_INCORRECT
2108 #define RIL_REQUEST_ENTER_SIM_PIN2 4
2111 * RIL_REQUEST_ENTER_SIM_PUK2
2113 * Supplies SIM PUK2 and new PIN2.
2115 * "data" is const char **
2116 * ((const char **)data)[0] is PUK2 value
2117 * ((const char **)data)[1] is new PIN2 value
2118 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2120 * "response" is int *
2121 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2126 * RADIO_NOT_AVAILABLE (radio resetting)
2127 * PASSWORD_INCORRECT
2131 #define RIL_REQUEST_ENTER_SIM_PUK2 5
2134 * RIL_REQUEST_CHANGE_SIM_PIN
2136 * Supplies old SIM PIN and new PIN.
2138 * "data" is const char **
2139 * ((const char **)data)[0] is old PIN value
2140 * ((const char **)data)[1] is new PIN value
2141 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2143 * "response" is int *
2144 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2149 * RADIO_NOT_AVAILABLE (radio resetting)
2150 * PASSWORD_INCORRECT
2151 * (old PIN is invalid)
2155 #define RIL_REQUEST_CHANGE_SIM_PIN 6
2159 * RIL_REQUEST_CHANGE_SIM_PIN2
2161 * Supplies old SIM PIN2 and new PIN2.
2163 * "data" is const char **
2164 * ((const char **)data)[0] is old PIN2 value
2165 * ((const char **)data)[1] is new PIN2 value
2166 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2168 * "response" is int *
2169 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2174 * RADIO_NOT_AVAILABLE (radio resetting)
2175 * PASSWORD_INCORRECT
2176 * (old PIN2 is invalid)
2180 #define RIL_REQUEST_CHANGE_SIM_PIN2 7
2183 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION
2185 * Requests that network personlization be deactivated
2187 * "data" is const char **
2188 * ((const char **)(data))[0]] is network depersonlization code
2190 * "response" is int *
2191 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
2196 * RADIO_NOT_AVAILABLE (radio resetting)
2197 * PASSWORD_INCORRECT
2201 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8
2204 * RIL_REQUEST_GET_CURRENT_CALLS
2206 * Requests current call list
2210 * "response" must be a "const RIL_Call **"
2215 * RADIO_NOT_AVAILABLE (radio resetting)
2217 * (request will be made again in a few hundred msec)
2220 #define RIL_REQUEST_GET_CURRENT_CALLS 9
2226 * Initiate voice call
2228 * "data" is const RIL_Dial *
2229 * "response" is NULL
2231 * This method is never used for supplementary service codes
2235 * RADIO_NOT_AVAILABLE (radio resetting)
2236 * DIAL_MODIFIED_TO_USSD
2237 * DIAL_MODIFIED_TO_SS
2238 * DIAL_MODIFIED_TO_DIAL
2250 * MODE_NOT_SUPPORTED
2253 #define RIL_REQUEST_DIAL 10
2256 * RIL_REQUEST_GET_IMSI
2260 * Only valid when radio state is "RADIO_STATE_ON"
2262 * "data" is const char **
2263 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
2264 * "response" is a const char * containing the IMSI
2268 * RADIO_NOT_AVAILABLE (radio resetting)
2271 #define RIL_REQUEST_GET_IMSI 11
2274 * RIL_REQUEST_HANGUP
2276 * Hang up a specific line (like AT+CHLD=1x)
2278 * After this HANGUP request returns, RIL should show the connection is NOT
2279 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2281 * "data" is an int *
2282 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above)
2284 * "response" is NULL
2288 * RADIO_NOT_AVAILABLE (radio resetting)
2299 #define RIL_REQUEST_HANGUP 12
2302 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND
2304 * Hang up waiting or held (like AT+CHLD=0)
2306 * After this HANGUP request returns, RIL should show the connection is NOT
2307 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2310 * "response" is NULL
2314 * RADIO_NOT_AVAILABLE (radio resetting)
2322 * OPERATION_NOT_ALLOWED
2326 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13
2329 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND
2331 * Hang up waiting or held (like AT+CHLD=1)
2333 * After this HANGUP request returns, RIL should show the connection is NOT
2334 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query.
2337 * "response" is NULL
2341 * RADIO_NOT_AVAILABLE (radio resetting)
2347 * OPERATION_NOT_ALLOWED
2352 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14
2355 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE
2357 * Switch waiting or holding call and active call (like AT+CHLD=2)
2359 * State transitions should be is follows:
2361 * If call 1 is waiting and call 2 is active, then if this re
2364 * Call 1 Call 2 Call 1 Call 2
2365 * ACTIVE HOLDING HOLDING ACTIVE
2366 * ACTIVE WAITING HOLDING ACTIVE
2367 * HOLDING WAITING HOLDING ACTIVE
2368 * ACTIVE IDLE HOLDING IDLE
2369 * IDLE IDLE IDLE IDLE
2372 * "response" is NULL
2376 * RADIO_NOT_AVAILABLE (radio resetting)
2384 * OPERATION_NOT_ALLOWED
2387 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15
2388 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15
2391 * RIL_REQUEST_CONFERENCE
2393 * Conference holding and active (like AT+CHLD=3)
2396 * "response" is NULL
2400 * RADIO_NOT_AVAILABLE (radio resetting)
2407 * OPERATION_NOT_ALLOWED
2409 #define RIL_REQUEST_CONFERENCE 16
2414 * Send UDUB (user determined used busy) to ringing or
2415 * waiting call answer)(RIL_BasicRequest r);
2418 * "response" is NULL
2422 * RADIO_NOT_AVAILABLE (radio resetting)
2429 * OPERATION_NOT_ALLOWED
2432 #define RIL_REQUEST_UDUB 17
2435 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE
2437 * Requests the failure cause code for the most recently terminated call
2440 * "response" is a const RIL_LastCallFailCauseInfo *
2441 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause.
2442 * The vendor cause code must be used for debugging purpose only.
2443 * The implementation must return one of the values of LastCallFailCause
2444 * as mentioned below.
2446 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H
2448 * CDMA failure reasons codes for the possible call failure scenarios
2449 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard.
2450 * Any of the following reason codes if the call is failed or dropped due to reason
2451 * mentioned with in the braces.
2453 * CALL_FAIL_RADIO_OFF (Radio is OFF)
2454 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage)
2455 * CALL_FAIL_NO_VALID_SIM (No valid SIM)
2456 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario)
2457 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network)
2458 * CALL_FAIL_NETWORK_REJECT (Explicit network reject)
2459 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH)
2460 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure)
2461 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage)
2462 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure)
2463 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure)
2464 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal)
2465 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal)
2466 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring)
2467 * CALL_FAIL_NETWORK_DETACH (Explicit network detach)
2469 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only
2471 * If the implementation does not have access to the exact cause codes,
2472 * then it should return one of the values listed in RIL_LastCallFailCause,
2473 * as the UI layer needs to distinguish these cases for tone generation or
2474 * error notification.
2478 * RADIO_NOT_AVAILABLE
2481 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
2483 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18
2486 * RIL_REQUEST_SIGNAL_STRENGTH
2488 * Requests current signal strength and associated information
2490 * Must succeed if radio is on.
2494 * "response" is a const RIL_SignalStrength *
2498 * RADIO_NOT_AVAILABLE
2504 * REQUEST_NOT_SUPPORTED
2506 #define RIL_REQUEST_SIGNAL_STRENGTH 19
2509 * RIL_REQUEST_VOICE_REGISTRATION_STATE
2511 * Request current registration state
2514 * "response" is a const RIL_VoiceRegistrationStateResponse *
2518 * RADIO_NOT_AVAILABLE
2520 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20
2523 * RIL_REQUEST_DATA_REGISTRATION_STATE
2525 * Request current DATA registration state
2528 * "response" is a const RIL_DataRegistrationStateResponse *
2532 * RADIO_NOT_AVAILABLE
2538 * REQUEST_NOT_SUPPORTED
2540 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21
2543 * RIL_REQUEST_OPERATOR
2545 * Request current operator ONS or EONS
2548 * "response" is a "const char **"
2549 * ((const char **)response)[0] is long alpha ONS or EONS
2550 * or NULL if unregistered
2552 * ((const char **)response)[1] is short alpha ONS or EONS
2553 * or NULL if unregistered
2554 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC)
2555 * or NULL if unregistered
2559 * RADIO_NOT_AVAILABLE
2563 * REQUEST_NOT_SUPPORTED
2565 #define RIL_REQUEST_OPERATOR 22
2568 * RIL_REQUEST_RADIO_POWER
2570 * Toggle radio on and off (for "airplane" mode)
2571 * If the radio is is turned off/on the radio modem subsystem
2572 * is expected return to an initialized state. For instance,
2573 * any voice and data calls will be terminated and all associated
2577 * ((int *)data)[0] is > 0 for "Radio On"
2578 * ((int *)data)[0] is == 0 for "Radio Off"
2580 * "response" is NULL
2582 * Turn radio on if "on" > 0
2583 * Turn radio off if "on" == 0
2587 * RADIO_NOT_AVAILABLE
2588 * OPERATION_NOT_ALLOWED
2596 * OPERATION_NOT_ALLOWED
2597 * INVALID_MODEM_STATE
2598 * REQUEST_NOT_SUPPORTED
2600 #define RIL_REQUEST_RADIO_POWER 23
2607 * If the implementation is currently playing a tone requested via
2608 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone
2609 * should be played instead
2611 * "data" is a char * containing a single character with one of 12 values: 0-9,*,#
2612 * "response" is NULL
2614 * FIXME should this block/mute microphone?
2615 * How does this interact with local DTMF feedback?
2619 * RADIO_NOT_AVAILABLE
2627 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START
2630 #define RIL_REQUEST_DTMF 24
2633 * RIL_REQUEST_SEND_SMS
2635 * Send an SMS message
2637 * "data" is const char **
2638 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2639 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2640 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2641 * less the SMSC address
2642 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2644 * "response" is a const RIL_SMS_Response *
2646 * Based on the return error, caller decides to resend if sending sms
2647 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
2651 * RADIO_NOT_AVAILABLE
2652 * SMS_SEND_FAIL_RETRY
2658 * REQUEST_RATE_LIMITED
2659 * INVALID_SMS_FORMAT
2662 * INVALID_SMSC_ADDRESS
2665 * MODE_NOT_SUPPORTED
2667 * FIXME how do we specify TP-Message-Reference if we need to resend?
2669 #define RIL_REQUEST_SEND_SMS 25
2673 * RIL_REQUEST_SEND_SMS_EXPECT_MORE
2675 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS,
2676 * except that more messages are expected to be sent soon. If possible,
2677 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command)
2679 * "data" is const char **
2680 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed
2681 * by a length byte (as expected by TS 27.005) or NULL for default SMSC
2682 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string
2683 * less the SMSC address
2684 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2"
2686 * "response" is a const RIL_SMS_Response *
2688 * Based on the return error, caller decides to resend if sending sms
2689 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332)
2693 * RADIO_NOT_AVAILABLE
2694 * SMS_SEND_FAIL_RETRY
2699 * INVALID_SMS_FORMAT
2701 * REQUEST_RATE_LIMITED
2706 * INVALID_SMSC_ADDRESS
2707 * MODE_NOT_SUPPORTED
2710 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26
2714 * RIL_REQUEST_SETUP_DATA_CALL
2716 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status
2717 * return success it is added to the list of data calls and a
2718 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the
2719 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the
2720 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST
2721 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED.
2723 * The RIL is expected to:
2724 * - Create one data call context.
2725 * - Create and configure a dedicated interface for the context
2726 * - The interface must be point to point.
2727 * - The interface is configured with one or more addresses and
2728 * is capable of sending and receiving packets. The prefix length
2729 * of the addresses must be /32 for IPv4 and /128 for IPv6.
2730 * - Must NOT change the linux routing table.
2731 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5]
2732 * number of simultaneous data call contexts.
2734 * "data" is a const char **
2735 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2...
2736 * for values above 2 this is RIL_RadioTechnology + 2.
2737 * ((const char **)data)[1] is a RIL_DataProfile (support is optional)
2738 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will
2739 * override the one in the profile. NULL indicates no APN overrride.
2740 * ((const char **)data)[3] is the username for APN, or NULL
2741 * ((const char **)data)[4] is the password for APN, or NULL
2742 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
2743 * 0 => PAP and CHAP is never performed.
2744 * 1 => PAP may be performed; CHAP is never performed.
2745 * 2 => CHAP may be performed; PAP is never performed.
2746 * 3 => PAP / CHAP may be performed - baseband dependent.
2747 * ((const char **)data)[6] is the non-roaming/home connection type to request. Must be one of the
2748 * PDP_type values in TS 27.007 section 10.1.1.
2749 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2750 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the
2751 * PDP_type values in TS 27.007 section 10.1.1.
2752 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
2753 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The
2754 * bitmask will encapsulate the following values:
2755 * ia,mms,agps,supl,hipri,fota,dun,ims,default.
2756 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a
2757 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs.
2758 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was
2759 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier.
2760 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which
2761 * the apn is connected.
2762 * ((const char **)data)[12] is the MVNO type:
2763 * possible values are "imsi", "gid", "spn".
2764 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier.
2766 * SPN like: "A MOBILE", "BEN NL", etc...
2767 * IMSI like: "302720x94", "2060188", etc...
2768 * GID like: "4E", "33", etc...
2769 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1"
2770 * indicates data roaming is enabled by the user, "0" indicates disabled.
2772 * "response" is a RIL_Data_Call_Response_v11
2774 * FIXME may need way to configure QoS settings
2777 * SUCCESS should be returned on both success and failure of setup with
2778 * the RIL_Data_Call_Response_v6.status containing the actual status.
2779 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored.
2781 * Other errors could include:
2782 * RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
2783 * OP_NOT_ALLOWED_DURING_VOICE_CALL and REQUEST_NOT_SUPPORTED,
2786 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL
2788 #define RIL_REQUEST_SETUP_DATA_CALL 27
2792 * RIL_REQUEST_SIM_IO
2794 * Request SIM I/O operation.
2795 * This is similar to the TS 27.007 "restricted SIM" operation
2796 * where it assumes all of the EF selection will be done by the
2799 * "data" is a const RIL_SIM_IO_v6 *
2800 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL,
2801 * or may specify a PIN2 for operations that require a PIN2 (eg
2802 * updating FDN records)
2804 * "response" is a const RIL_SIM_IO_Response *
2806 * Arguments and responses that are unused for certain
2807 * values of "command" should be ignored or set to NULL
2811 * RADIO_NOT_AVAILABLE
2815 #define RIL_REQUEST_SIM_IO 28
2818 * RIL_REQUEST_SEND_USSD
2820 * Send a USSD message
2822 * If a USSD session already exists, the message should be sent in the
2823 * context of that session. Otherwise, a new session should be created.
2825 * The network reply should be reported via RIL_UNSOL_ON_USSD
2827 * Only one USSD session may exist at a time, and the session is assumed
2829 * a) The android system invokes RIL_REQUEST_CANCEL_USSD
2830 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code
2831 * of "0" (USSD-Notify/no further action) or "2" (session terminated)
2833 * "data" is a const char * containing the USSD request in UTF-8 format
2834 * "response" is NULL
2838 * RADIO_NOT_AVAILABLE
2840 * USSD_MODIFIED_TO_DIAL
2841 * USSD_MODIFIED_TO_SS
2842 * USSD_MODIFIED_TO_USSD
2844 * OPERATION_NOT_ALLOWED
2853 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD
2856 #define RIL_REQUEST_SEND_USSD 29
2859 * RIL_REQUEST_CANCEL_USSD
2861 * Cancel the current USSD session if one exists
2864 * "response" is NULL
2868 * RADIO_NOT_AVAILABLE
2870 * OPERATION_NOT_ALLOWED
2877 #define RIL_REQUEST_CANCEL_USSD 30
2880 * RIL_REQUEST_GET_CLIR
2882 * Gets current CLIR status
2884 * "response" is int *
2885 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2886 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7
2890 * RADIO_NOT_AVAILABLE
2891 * SS_MODIFIED_TO_DIAL
2892 * SS_MODIFIED_TO_USSD
2900 #define RIL_REQUEST_GET_CLIR 31
2903 * RIL_REQUEST_SET_CLIR
2906 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7
2908 * "response" is NULL
2912 * RADIO_NOT_AVAILABLE
2913 * SS_MODIFIED_TO_DIAL
2914 * SS_MODIFIED_TO_USSD
2919 #define RIL_REQUEST_SET_CLIR 32
2922 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
2924 * "data" is const RIL_CallForwardInfo *
2926 * "response" is const RIL_CallForwardInfo **
2927 * "response" points to an array of RIL_CallForwardInfo *'s, one for
2928 * each distinct registered phone number.
2930 * For example, if data is forwarded to +18005551212 and voice is forwarded
2931 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned
2933 * If, however, both data and voice are forwarded to +18005551212, then
2934 * a single RIL_CallForwardInfo can be returned with the service class
2935 * set to "data + voice = 3")
2939 * RADIO_NOT_AVAILABLE
2940 * SS_MODIFIED_TO_DIAL
2941 * SS_MODIFIED_TO_USSD
2951 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33
2955 * RIL_REQUEST_SET_CALL_FORWARD
2957 * Configure call forward rule
2959 * "data" is const RIL_CallForwardInfo *
2960 * "response" is NULL
2964 * RADIO_NOT_AVAILABLE
2965 * SS_MODIFIED_TO_DIAL
2966 * SS_MODIFIED_TO_USSD
2976 #define RIL_REQUEST_SET_CALL_FORWARD 34
2980 * RIL_REQUEST_QUERY_CALL_WAITING
2982 * Query current call waiting state
2984 * "data" is const int *
2985 * ((const int *)data)[0] is the TS 27.007 service class to query.
2986 * "response" is a const int *
2987 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled"
2989 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1]
2990 * must follow, with the TS 27.007 service class bit vector of services
2991 * for which call waiting is enabled.
2993 * For example, if ((const int *)response)[0] is 1 and
2994 * ((const int *)response)[1] is 3, then call waiting is enabled for data
2995 * and voice and disabled for everything else
2999 * RADIO_NOT_AVAILABLE
3000 * SS_MODIFIED_TO_DIAL
3001 * SS_MODIFIED_TO_USSD
3010 #define RIL_REQUEST_QUERY_CALL_WAITING 35
3014 * RIL_REQUEST_SET_CALL_WAITING
3016 * Configure current call waiting state
3018 * "data" is const int *
3019 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled"
3020 * ((const int *)data)[1] is the TS 27.007 service class bit vector of
3021 * services to modify
3022 * "response" is NULL
3026 * RADIO_NOT_AVAILABLE
3027 * SS_MODIFIED_TO_DIAL
3028 * SS_MODIFIED_TO_USSD
3037 #define RIL_REQUEST_SET_CALL_WAITING 36
3040 * RIL_REQUEST_SMS_ACKNOWLEDGE
3042 * Acknowledge successful or failed receipt of SMS previously indicated
3043 * via RIL_UNSOL_RESPONSE_NEW_SMS
3046 * ((int *)data)[0] is 1 on successful receipt
3047 * (basically, AT+CNMA=1 from TS 27.005
3048 * is 0 on failed receipt
3049 * (basically, AT+CNMA=2 from TS 27.005)
3050 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined
3051 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory
3052 * capacity exceeded) and 0xFF (unspecified error) are
3055 * "response" is NULL
3057 * FIXME would like request that specified RP-ACK/RP-ERROR PDU
3061 * RADIO_NOT_AVAILABLE
3063 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37
3066 * RIL_REQUEST_GET_IMEI - DEPRECATED
3068 * Get the device IMEI, including check digit
3070 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
3071 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3074 * "response" is a const char * containing the IMEI
3078 * RADIO_NOT_AVAILABLE (radio resetting)
3084 * REQUEST_NOT_SUPPORTED
3087 #define RIL_REQUEST_GET_IMEI 38
3090 * RIL_REQUEST_GET_IMEISV - DEPRECATED
3092 * Get the device IMEISV, which should be two decimal digits
3094 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY
3095 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE
3098 * "response" is a const char * containing the IMEISV
3102 * RADIO_NOT_AVAILABLE (radio resetting)
3108 * REQUEST_NOT_SUPPORTED
3111 #define RIL_REQUEST_GET_IMEISV 39
3115 * RIL_REQUEST_ANSWER
3117 * Answer incoming call
3119 * Will not be called for WAITING calls.
3120 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case
3124 * "response" is NULL
3128 * RADIO_NOT_AVAILABLE (radio resetting)
3137 #define RIL_REQUEST_ANSWER 40
3140 * RIL_REQUEST_DEACTIVATE_DATA_CALL
3142 * Deactivate packet data connection and remove from the
3143 * data call list if SUCCESS is returned. Any other return
3144 * values should also try to remove the call from the list,
3145 * but that may not be possible. In any event a
3146 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An
3147 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be
3148 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL.
3150 * "data" is const char **
3151 * ((char**)data)[0] indicating CID
3152 * ((char**)data)[1] indicating Disconnect Reason
3153 * 0 => No specific reason specified
3154 * 1 => Radio shutdown requested
3156 * "response" is NULL
3160 * RADIO_NOT_AVAILABLE
3164 * REQUEST_NOT_SUPPORTED
3166 * See also: RIL_REQUEST_SETUP_DATA_CALL
3168 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41
3171 * RIL_REQUEST_QUERY_FACILITY_LOCK
3173 * Query the status of a facility lock state
3175 * "data" is const char **
3176 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4
3177 * (eg "AO" for BAOC, "SC" for SIM lock)
3178 * ((const char **)data)[1] is the password, or "" if not required
3179 * ((const char **)data)[2] is the TS 27.007 service class bit vector of
3181 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
3182 * This is only applicable in the case of Fixed Dialing Numbers
3185 * "response" is an int *
3186 * ((const int *)response) 0 is the TS 27.007 service class bit vector of
3187 * services for which the specified barring facility
3188 * is active. "0" means "disabled for all"
3193 * RADIO_NOT_AVAILABLE
3194 * SS_MODIFIED_TO_DIAL
3195 * SS_MODIFIED_TO_USSD
3205 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42
3208 * RIL_REQUEST_SET_FACILITY_LOCK
3210 * Enable/disable one facility lock
3212 * "data" is const char **
3214 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3215 * (eg "AO" for BAOC)
3216 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock"
3217 * ((const char **)data)[2] = password
3218 * ((const char **)data)[3] = string representation of decimal TS 27.007
3219 * service class bit vector. Eg, the string
3220 * "1" means "set this facility for voice services"
3221 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value.
3222 * This is only applicable in the case of Fixed Dialing Numbers
3225 * "response" is int *
3226 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown
3230 * RADIO_NOT_AVAILABLE
3231 * SS_MODIFIED_TO_DIAL
3232 * SS_MODIFIED_TO_USSD
3242 #define RIL_REQUEST_SET_FACILITY_LOCK 43
3245 * RIL_REQUEST_CHANGE_BARRING_PASSWORD
3247 * Change call barring facility password
3249 * "data" is const char **
3251 * ((const char **)data)[0] = facility string code from TS 27.007 7.4
3252 * (eg "AO" for BAOC)
3253 * ((const char **)data)[1] = old password
3254 * ((const char **)data)[2] = new password
3256 * "response" is NULL
3260 * RADIO_NOT_AVAILABLE
3261 * SS_MODIFIED_TO_DIAL
3262 * SS_MODIFIED_TO_USSD
3272 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44
3275 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
3277 * Query current network selectin mode
3281 * "response" is int *
3282 * ((const int *)response)[0] is
3283 * 0 for automatic selection
3284 * 1 for manual selection
3288 * RADIO_NOT_AVAILABLE
3294 * REQUEST_NOT_SUPPORTED
3297 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45
3300 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
3302 * Specify that the network should be selected automatically
3305 * "response" is NULL
3307 * This request must not respond until the new operator is selected
3312 * RADIO_NOT_AVAILABLE
3314 * OPERATION_NOT_ALLOWED
3320 * REQUEST_NOT_SUPPORTED
3322 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3323 * no retries needed, such as illegal SIM or ME.
3326 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46
3329 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
3331 * Manually select a specified network.
3333 * "data" is const char * specifying MCCMNC of network to select (eg "310170")
3334 * "response" is NULL
3336 * This request must not respond until the new operator is selected
3341 * RADIO_NOT_AVAILABLE
3343 * OPERATION_NOT_ALLOWED
3350 * REQUEST_NOT_SUPPORTED
3352 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and
3353 * no retries needed, such as illegal SIM or ME.
3356 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47
3359 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
3361 * Scans for available networks
3364 * "response" is const char ** that should be an array of n*4 strings, where
3365 * n is the number of available networks
3366 * For each available network:
3368 * ((const char **)response)[n+0] is long alpha ONS or EONS
3369 * ((const char **)response)[n+1] is short alpha ONS or EONS
3370 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC)
3371 * ((const char **)response)[n+3] is a string value of the status:
3379 * RADIO_NOT_AVAILABLE
3380 * OPERATION_NOT_ALLOWED
3386 * REQUEST_NOT_SUPPORTED
3388 * OPERATION_NOT_ALLOWED
3391 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48
3394 * RIL_REQUEST_DTMF_START
3396 * Start playing a DTMF tone. Continue playing DTMF tone until
3397 * RIL_REQUEST_DTMF_STOP is received
3399 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing,
3400 * it should cancel the previous tone and play the new one.
3402 * "data" is a char *
3403 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,#
3404 * "response" is NULL
3408 * RADIO_NOT_AVAILABLE
3417 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP
3419 #define RIL_REQUEST_DTMF_START 49
3422 * RIL_REQUEST_DTMF_STOP
3424 * Stop playing a currently playing DTMF tone.
3427 * "response" is NULL
3431 * RADIO_NOT_AVAILABLE
3432 * OPERATION_NOT_ALLOWED
3441 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START
3443 #define RIL_REQUEST_DTMF_STOP 50
3446 * RIL_REQUEST_BASEBAND_VERSION
3448 * Return string value indicating baseband version, eg
3449 * response from AT+CGMR
3452 * "response" is const char * containing version string for log reporting
3456 * RADIO_NOT_AVAILABLE
3463 * REQUEST_NOT_SUPPORTED
3466 #define RIL_REQUEST_BASEBAND_VERSION 51
3469 * RIL_REQUEST_SEPARATE_CONNECTION
3471 * Separate a party from a multiparty call placing the multiparty call
3472 * (less the specified party) on hold and leaving the specified party
3473 * as the only other member of the current (active) call
3477 * See TS 22.084 1.3.8.2 (iii)
3478 * TS 22.030 6.5.5 "Entering "2X followed by send"
3479 * TS 27.007 "AT+CHLD=2x"
3481 * "data" is an int *
3482 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL
3484 * "response" is NULL
3488 * RADIO_NOT_AVAILABLE (radio resetting)
3498 * OPERATION_NOT_ALLOWED
3500 #define RIL_REQUEST_SEPARATE_CONNECTION 52
3504 * RIL_REQUEST_SET_MUTE
3506 * Turn on or off uplink (microphone) mute.
3508 * Will only be sent while voice call is active.
3509 * Will always be reset to "disable mute" when a new voice call is initiated
3511 * "data" is an int *
3512 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute"
3514 * "response" is NULL
3518 * RADIO_NOT_AVAILABLE (radio resetting)
3521 * REQUEST_RATE_LIMITED
3524 #define RIL_REQUEST_SET_MUTE 53
3527 * RIL_REQUEST_GET_MUTE
3529 * Queries the current state of the uplink mute setting
3532 * "response" is an int *
3533 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled"
3537 * RADIO_NOT_AVAILABLE (radio resetting)
3538 * SS_MODIFIED_TO_DIAL
3539 * SS_MODIFIED_TO_USSD
3542 * REQUEST_RATE_LIMITED
3545 #define RIL_REQUEST_GET_MUTE 54
3548 * RIL_REQUEST_QUERY_CLIP
3550 * Queries the status of the CLIP supplementary service
3552 * (for MMI code "*#30#")
3555 * "response" is an int *
3556 * (int *)response)[0] is 1 for "CLIP provisioned"
3557 * and 0 for "CLIP not provisioned"
3558 * and 2 for "unknown, e.g. no network etc"
3562 * RADIO_NOT_AVAILABLE (radio resetting)
3570 #define RIL_REQUEST_QUERY_CLIP 55
3573 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status
3574 * field in RIL_Data_Call_Response_v6.
3576 * Requests the failure cause code for the most recently failed PDP
3577 * context or CDMA data connection active
3578 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE
3582 * "response" is a "int *"
3583 * ((int *)response)[0] is an integer cause code defined in TS 24.008
3584 * section 6.1.3.1.3 or close approximation
3586 * If the implementation does not have access to the exact cause codes,
3587 * then it should return one of the values listed in
3588 * RIL_DataCallFailCause, as the UI layer needs to distinguish these
3589 * cases for error notification
3590 * and potential retries.
3594 * RADIO_NOT_AVAILABLE
3596 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE
3598 * Deprecated use the status field in RIL_Data_Call_Response_v6.
3601 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56
3604 * RIL_REQUEST_DATA_CALL_LIST
3606 * Returns the data call list. An entry is added when a
3607 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a
3608 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied
3609 * when RIL_REQUEST_RADIO_POWER off/on is issued.
3612 * "response" is an array of RIL_Data_Call_Response_v6
3616 * RADIO_NOT_AVAILABLE (radio resetting)
3618 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED
3621 #define RIL_REQUEST_DATA_CALL_LIST 57
3624 * RIL_REQUEST_RESET_RADIO - DEPRECATED
3626 * Request a radio reset. The RIL implementation may postpone
3627 * the reset until after this request is responded to if the baseband
3628 * is presently busy.
3630 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER
3633 * "response" is NULL
3637 * RADIO_NOT_AVAILABLE (radio resetting)
3638 * REQUEST_NOT_SUPPORTED
3641 #define RIL_REQUEST_RESET_RADIO 58
3644 * RIL_REQUEST_OEM_HOOK_RAW
3646 * This request reserved for OEM-specific uses. It passes raw byte arrays
3649 * It can be invoked on the Java side from
3650 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw()
3652 * "data" is a char * of bytes copied from the byte[] data argument in java
3653 * "response" is a char * of bytes that will returned via the
3654 * caller's "response" Message here:
3655 * (byte[])(((AsyncResult)response.obj).result)
3657 * An error response here will result in
3658 * (((AsyncResult)response.obj).result) == null and
3659 * (((AsyncResult)response.obj).exception) being an instance of
3660 * com.android.internal.telephony.gsm.CommandException
3666 #define RIL_REQUEST_OEM_HOOK_RAW 59
3669 * RIL_REQUEST_OEM_HOOK_STRINGS
3671 * This request reserved for OEM-specific uses. It passes strings
3674 * It can be invoked on the Java side from
3675 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings()
3677 * "data" is a const char **, representing an array of null-terminated UTF-8
3678 * strings copied from the "String[] strings" argument to
3679 * invokeOemRilRequestStrings()
3681 * "response" is a const char **, representing an array of null-terminated UTF-8
3682 * stings that will be returned via the caller's response message here:
3684 * (String[])(((AsyncResult)response.obj).result)
3686 * An error response here will result in
3687 * (((AsyncResult)response.obj).result) == null and
3688 * (((AsyncResult)response.obj).exception) being an instance of
3689 * com.android.internal.telephony.gsm.CommandException
3695 #define RIL_REQUEST_OEM_HOOK_STRINGS 60
3698 * RIL_REQUEST_SCREEN_STATE - DEPRECATED
3700 * Indicates the current state of the screen. When the screen is off, the
3701 * RIL should notify the baseband to suppress certain notifications (eg,
3702 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
3703 * in an effort to conserve power. These notifications should resume when the
3706 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state
3707 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited
3708 * response from the modem in different scenarios.
3711 * ((int *)data)[0] is == 1 for "Screen On"
3712 * ((int *)data)[0] is == 0 for "Screen Off"
3714 * "response" is NULL
3722 * REQUEST_NOT_SUPPORTED
3724 #define RIL_REQUEST_SCREEN_STATE 61
3728 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
3730 * Enables/disables supplementary service related notifications
3733 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3736 * ((int *)data)[0] is == 1 for notifications enabled
3737 * ((int *)data)[0] is == 0 for notifications disabled
3739 * "response" is NULL
3743 * RADIO_NOT_AVAILABLE
3751 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION.
3753 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62
3756 * RIL_REQUEST_WRITE_SMS_TO_SIM
3758 * Stores a SMS message to SIM memory.
3760 * "data" is RIL_SMS_WriteArgs *
3762 * "response" is int *
3763 * ((const int *)response)[0] is the record index where the message is stored.
3769 * INVALID_SMS_FORMAT
3775 * INVALID_MODEM_STATE
3776 * MODE_NOT_SUPPORTED
3777 * INVALID_SMSC_ADDRESS
3780 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63
3783 * RIL_REQUEST_DELETE_SMS_ON_SIM
3785 * Deletes a SMS message from SIM memory.
3788 * ((int *)data)[0] is the record index of the message to delete.
3790 * "response" is NULL
3797 * REQUEST_RATE_LIMITED
3803 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64
3806 * RIL_REQUEST_SET_BAND_MODE
3808 * Assign a specified band for RF configuration.
3811 * ((int *)data)[0] is a RIL_RadioBandMode
3813 * "response" is NULL
3817 * RADIO_NOT_AVAILABLE
3818 * OPERATION_NOT_ALLOWED
3824 * REQUEST_NOT_SUPPORTED
3826 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3828 #define RIL_REQUEST_SET_BAND_MODE 65
3831 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
3833 * Query the list of band mode supported by RF.
3837 * "response" is int *
3838 * "response" points to an array of int's, the int[0] is the size of array;
3839 * subsequent values are a list of RIL_RadioBandMode listing supported modes.
3843 * RADIO_NOT_AVAILABLE
3848 * REQUEST_NOT_SUPPORTED
3850 * See also: RIL_REQUEST_SET_BAND_MODE
3852 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66
3855 * RIL_REQUEST_STK_GET_PROFILE
3857 * Requests the profile of SIM tool kit.
3858 * The profile indicates the SAT/USAT features supported by ME.
3859 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111
3863 * "response" is a const char * containing SAT/USAT profile
3864 * in hexadecimal format string starting with first byte of terminal profile
3868 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3870 #define RIL_REQUEST_STK_GET_PROFILE 67
3873 * RIL_REQUEST_STK_SET_PROFILE
3875 * Download the STK terminal profile as part of SIM initialization
3878 * "data" is a const char * containing SAT/USAT profile
3879 * in hexadecimal format string starting with first byte of terminal profile
3881 * "response" is NULL
3885 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3887 #define RIL_REQUEST_STK_SET_PROFILE 68
3890 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
3892 * Requests to send a SAT/USAT envelope command to SIM.
3893 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
3895 * "data" is a const char * containing SAT/USAT command
3896 * in hexadecimal format string starting with command tag
3898 * "response" is a const char * containing SAT/USAT response
3899 * in hexadecimal format string starting with first byte of response
3904 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3906 * OPERATION_NOT_ALLOWED
3908 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69
3911 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
3913 * Requests to send a terminal response to SIM for a received
3916 * "data" is a const char * containing SAT/USAT response
3917 * in hexadecimal format string starting with first byte of response data
3919 * "response" is NULL
3923 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3924 * RIL_E_OPERATION_NOT_ALLOWED
3926 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70
3929 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
3931 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has
3932 * been initialized by ME already. (We could see the call has been in the 'call
3933 * list') So, STK application needs to accept/reject the call according as user
3937 * ((int *)data)[0] is > 0 for "accept" the call setup
3938 * ((int *)data)[0] is == 0 for "reject" the call setup
3940 * "response" is NULL
3944 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
3945 * RIL_E_OPERATION_NOT_ALLOWED
3947 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71
3950 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER
3952 * Connects the two calls and disconnects the subscriber from both calls.
3955 * "response" is NULL
3959 * RADIO_NOT_AVAILABLE (radio resetting)
3969 * OPERATION_NOT_ALLOWED
3971 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72
3974 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
3976 * Requests to set the preferred network type for searching and registering
3977 * (CS/PS domain, RAT, and operation mode)
3979 * "data" is int * which is RIL_PreferredNetworkType
3981 * "response" is NULL
3985 * RADIO_NOT_AVAILABLE (radio resetting)
3986 * OPERATION_NOT_ALLOWED
3987 * MODE_NOT_SUPPORTED
3993 * REQUEST_NOT_SUPPORTED
3995 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73
3998 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
4000 * Query the preferred network type (CS/PS domain, RAT, and operation mode)
4001 * for searching and registering
4005 * "response" is int *
4006 * ((int *)reponse)[0] is == RIL_PreferredNetworkType
4010 * RADIO_NOT_AVAILABLE
4016 * REQUEST_NOT_SUPPORTED
4018 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
4020 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74
4023 * RIL_REQUEST_NEIGHBORING_CELL_IDS
4025 * Request neighboring cell id in GSM network
4028 * "response" must be a " const RIL_NeighboringCell** "
4032 * RADIO_NOT_AVAILABLE
4038 * REQUEST_NOT_SUPPORTED
4040 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75
4043 * RIL_REQUEST_SET_LOCATION_UPDATES
4045 * Enables/disables network state change notifications due to changes in
4046 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA).
4047 * Basically +CREG=2 vs. +CREG=1 (TS 27.007).
4049 * Note: The RIL implementation should default to "updates enabled"
4050 * when the screen is on and "updates disabled" when the screen is off.
4053 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2)
4054 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1)
4056 * "response" is NULL
4060 * RADIO_NOT_AVAILABLE
4066 * REQUEST_NOT_SUPPORTED
4068 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED
4070 #define RIL_REQUEST_SET_LOCATION_UPDATES 76
4073 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4075 * Request to set the location where the CDMA subscription shall
4079 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4081 * "response" is NULL
4085 * RADIO_NOT_AVAILABLE
4087 * SUBSCRIPTION_NOT_AVAILABLE
4089 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4091 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77
4094 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
4096 * Request to set the roaming preferences in CDMA
4099 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL
4100 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4101 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL
4103 * "response" is NULL
4107 * RADIO_NOT_AVAILABLE
4113 * REQUEST_NOT_SUPPORTED
4114 * OPERATION_NOT_ALLOWED
4116 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78
4119 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
4121 * Request the actual setting of the roaming preferences in CDMA in the modem
4125 * "response" is int *
4126 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL
4127 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL
4128 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL
4130 * "response" is NULL
4134 * RADIO_NOT_AVAILABLE
4140 * REQUEST_NOT_SUPPORTED
4142 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79
4145 * RIL_REQUEST_SET_TTY_MODE
4147 * Request to set the TTY mode
4150 * ((int *)data)[0] is == 0 for TTY off
4151 * ((int *)data)[0] is == 1 for TTY Full
4152 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover)
4153 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover)
4155 * "response" is NULL
4159 * RADIO_NOT_AVAILABLE
4169 #define RIL_REQUEST_SET_TTY_MODE 80
4172 * RIL_REQUEST_QUERY_TTY_MODE
4174 * Request the setting of TTY mode
4178 * "response" is int *
4179 * ((int *)response)[0] is == 0 for TTY off
4180 * ((int *)response)[0] is == 1 for TTY Full
4181 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover)
4182 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover)
4184 * "response" is NULL
4188 * RADIO_NOT_AVAILABLE
4194 #define RIL_REQUEST_QUERY_TTY_MODE 81
4197 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
4199 * Request to set the preferred voice privacy mode used in voice
4203 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4204 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
4206 * "response" is NULL
4210 * RADIO_NOT_AVAILABLE
4218 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82
4221 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
4223 * Request the setting of preferred voice privacy mode
4227 * "response" is int *
4228 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask)
4229 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask)
4231 * "response" is NULL
4235 * RADIO_NOT_AVAILABLE
4241 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83
4244 * RIL_REQUEST_CDMA_FLASH
4248 * "data" is const char *
4249 * ((const char *)data)[0] is a FLASH string
4251 * "response" is NULL
4255 * RADIO_NOT_AVAILABLE
4265 #define RIL_REQUEST_CDMA_FLASH 84
4268 * RIL_REQUEST_CDMA_BURST_DTMF
4272 * "data" is const char **
4273 * ((const char **)data)[0] is a DTMF string
4274 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use
4276 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use
4279 * "response" is NULL
4283 * RADIO_NOT_AVAILABLE
4292 #define RIL_REQUEST_CDMA_BURST_DTMF 85
4295 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
4297 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum).
4298 * If the checksum is valid the 20 digit AKEY is written to NV,
4299 * replacing the existing AKEY no matter what it was before.
4301 * "data" is const char *
4302 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9')
4303 * where the last 6 digits are a checksum of the
4304 * first 20, as specified in TR45.AHAG
4305 * "Common Cryptographic Algorithms, Revision D.1
4308 * "response" is NULL
4312 * RADIO_NOT_AVAILABLE
4318 * REQUEST_NOT_SUPPORTED
4321 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86
4324 * RIL_REQUEST_CDMA_SEND_SMS
4326 * Send a CDMA SMS message
4328 * "data" is const RIL_CDMA_SMS_Message *
4330 * "response" is a const RIL_SMS_Response *
4332 * Based on the return error, caller decides to resend if sending sms
4333 * fails. The CDMA error class is derived as follows,
4334 * SUCCESS is error class 0 (no error)
4335 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure)
4339 * RADIO_NOT_AVAILABLE
4340 * SMS_SEND_FAIL_RETRY
4345 * REQUEST_RATE_LIMITED
4346 * INVALID_SMS_FORMAT
4352 * INVALID_SMSC_ADDRESS
4353 * MODE_NOT_SUPPORTED
4356 #define RIL_REQUEST_CDMA_SEND_SMS 87
4359 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
4361 * Acknowledge the success or failure in the receipt of SMS
4362 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
4364 * "data" is const RIL_CDMA_SMS_Ack *
4366 * "response" is NULL
4370 * RADIO_NOT_AVAILABLE
4375 * REQUEST_RATE_LIMITED
4379 * MODE_NOT_SUPPORTED
4381 * INVALID_MODEM_STATE
4384 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88
4387 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
4389 * Request the setting of GSM/WCDMA Cell Broadcast SMS config.
4393 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo **
4394 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *)
4398 * RADIO_NOT_AVAILABLE
4401 * REQUEST_RATE_LIMITED
4408 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89
4411 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
4413 * Set GSM/WCDMA Cell Broadcast SMS config
4415 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo **
4416 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *)
4418 * "response" is NULL
4422 * RADIO_NOT_AVAILABLE
4427 * REQUEST_RATE_LIMITED
4432 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90
4435 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
4437 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS
4439 * "data" is const int *
4440 * (const int *)data[0] indicates to activate or turn off the
4441 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1,
4442 * 0 - Activate, 1 - Turn off
4444 * "response" is NULL
4448 * RADIO_NOT_AVAILABLE
4453 * REQUEST_RATE_LIMITED
4457 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91
4460 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
4462 * Request the setting of CDMA Broadcast SMS config
4466 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4467 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *)
4471 * RADIO_NOT_AVAILABLE
4474 * REQUEST_RATE_LIMITED
4481 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92
4484 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
4486 * Set CDMA Broadcast SMS config
4488 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo **
4489 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *)
4491 * "response" is NULL
4495 * RADIO_NOT_AVAILABLE
4500 * REQUEST_RATE_LIMITED
4505 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93
4508 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
4510 * Enable or disable the reception of CDMA Broadcast SMS
4512 * "data" is const int *
4513 * (const int *)data[0] indicates to activate or turn off the
4514 * reception of CDMA Broadcast SMS, 0-1,
4515 * 0 - Activate, 1 - Turn off
4517 * "response" is NULL
4521 * RADIO_NOT_AVAILABLE
4526 * REQUEST_RATE_LIMITED
4530 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94
4533 * RIL_REQUEST_CDMA_SUBSCRIPTION
4535 * Request the device MDN / H_SID / H_NID.
4537 * The request is only allowed when CDMA subscription is available. When CDMA
4538 * subscription is changed, application layer should re-issue the request to
4539 * update the subscription information.
4541 * If a NULL value is returned for any of the device id, it means that error
4542 * accessing the device.
4544 * "response" is const char **
4545 * ((const char **)response)[0] is MDN if CDMA subscription is available
4546 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if
4547 * CDMA subscription is available, in decimal format
4548 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if
4549 * CDMA subscription is available, in decimal format
4550 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available
4551 * ((const char **)response)[4] is PRL version if CDMA subscription is available
4555 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE
4562 * REQUEST_NOT_SUPPORTED
4566 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95
4569 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
4571 * Stores a CDMA SMS message to RUIM memory.
4573 * "data" is RIL_CDMA_SMS_WriteArgs *
4575 * "response" is int *
4576 * ((const int *)response)[0] is the record index where the message is stored.
4580 * RADIO_NOT_AVAILABLE
4583 * INVALID_SMS_FORMAT
4589 * INVALID_MODEM_STATE
4590 * MODE_NOT_SUPPORTED
4591 * INVALID_SMSC_ADDRESS
4594 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96
4597 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
4599 * Deletes a CDMA SMS message from RUIM memory.
4602 * ((int *)data)[0] is the record index of the message to delete.
4604 * "response" is NULL
4608 * RADIO_NOT_AVAILABLE
4611 * REQUEST_RATE_LIMITED
4617 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97
4620 * RIL_REQUEST_DEVICE_IDENTITY
4622 * Request the device ESN / MEID / IMEI / IMEISV.
4624 * The request is always allowed and contains GSM and CDMA device identity;
4625 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and
4626 * RIL_REQUEST_GET_IMEISV.
4628 * If a NULL value is returned for any of the device id, it means that error
4629 * accessing the device.
4631 * When CDMA subscription is changed the ESN/MEID may change. The application
4632 * layer should re-issue the request to update the device identity in this case.
4634 * "response" is const char **
4635 * ((const char **)response)[0] is IMEI if GSM subscription is available
4636 * ((const char **)response)[1] is IMEISV if GSM subscription is available
4637 * ((const char **)response)[2] is ESN if CDMA subscription is available
4638 * ((const char **)response)[3] is MEID if CDMA subscription is available
4642 * RADIO_NOT_AVAILABLE
4649 * REQUEST_NOT_SUPPORTED
4652 #define RIL_REQUEST_DEVICE_IDENTITY 98
4655 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
4657 * Request the radio's system selection module to exit emergency
4658 * callback mode. RIL will not respond with SUCCESS until the modem has
4659 * completely exited from Emergency Callback Mode.
4663 * "response" is NULL
4667 * RADIO_NOT_AVAILABLE
4668 * OPERATION_NOT_ALLOWED
4674 * REQUEST_NOT_SUPPORTED
4677 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99
4680 * RIL_REQUEST_GET_SMSC_ADDRESS
4682 * Queries the default Short Message Service Center address on the device.
4686 * "response" is const char * containing the SMSC address.
4690 * RADIO_NOT_AVAILABLE
4692 * REQUEST_RATE_LIMITED
4697 * INVALID_MODEM_STATE
4701 #define RIL_REQUEST_GET_SMSC_ADDRESS 100
4704 * RIL_REQUEST_SET_SMSC_ADDRESS
4706 * Sets the default Short Message Service Center address on the device.
4708 * "data" is const char * containing the SMSC address.
4710 * "response" is NULL
4714 * RADIO_NOT_AVAILABLE
4716 * INVALID_SMS_FORMAT
4719 * REQUEST_RATE_LIMITED
4724 #define RIL_REQUEST_SET_SMSC_ADDRESS 101
4727 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
4729 * Indicates whether there is storage available for new SMS messages.
4732 * ((int *)data)[0] is 1 if memory is available for storing new messages
4733 * is 0 if memory capacity is exceeded
4735 * "response" is NULL
4739 * RADIO_NOT_AVAILABLE
4744 * REQUEST_RATE_LIMITED
4748 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102
4751 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
4753 * Indicates that the StkSerivce is running and is
4754 * ready to receive RIL_UNSOL_STK_XXXXX commands.
4757 * "response" is NULL
4761 * RADIO_NOT_AVAILABLE
4764 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103
4767 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
4769 * Request to query the location where the CDMA subscription shall
4774 * "response" is int *
4775 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
4779 * RADIO_NOT_AVAILABLE
4780 * SUBSCRIPTION_NOT_AVAILABLE
4782 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
4784 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104
4787 * RIL_REQUEST_ISIM_AUTHENTICATION
4789 * Request the ISIM application on the UICC to perform AKA
4790 * challenge/response algorithm for IMS authentication
4792 * "data" is a const char * containing the challenge string in Base64 format
4793 * "response" is a const char * containing the response in Base64 format
4797 * RADIO_NOT_AVAILABLE
4799 #define RIL_REQUEST_ISIM_AUTHENTICATION 105
4802 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
4804 * Acknowledge successful or failed receipt of SMS previously indicated
4805 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send
4806 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU.
4808 * "data" is const char **
4809 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK)
4810 * is "0" on failed receipt (send RP-ERROR)
4811 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format
4813 * "response" is NULL
4817 * RADIO_NOT_AVAILABLE
4819 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106
4822 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
4824 * Requests to send a SAT/USAT envelope command to SIM.
4825 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111.
4827 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
4828 * the SW1 and SW2 status bytes from the UICC response are returned along with
4829 * the response data, using the same structure as RIL_REQUEST_SIM_IO.
4831 * The RIL implementation shall perform the normal processing of a '91XX'
4832 * response in SW1/SW2 to retrieve the pending proactive command and send it
4833 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does.
4835 * "data" is a const char * containing the SAT/USAT command
4836 * in hexadecimal format starting with command tag
4838 * "response" is a const RIL_SIM_IO_Response *
4842 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting)
4844 * OPERATION_NOT_ALLOWED
4846 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107
4849 * RIL_REQUEST_VOICE_RADIO_TECH
4851 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only
4852 * when radio state is not RADIO_STATE_UNAVAILABLE
4855 * "response" is int *
4856 * ((int *) response)[0] is of type const RIL_RadioTechnology
4860 * RADIO_NOT_AVAILABLE
4862 #define RIL_REQUEST_VOICE_RADIO_TECH 108
4865 * RIL_REQUEST_GET_CELL_INFO_LIST
4867 * Request all of the current cell information known to the radio. The radio
4868 * must a list of all current cells, including the neighboring cells. If for a particular
4869 * cell information isn't known then the appropriate unknown value will be returned.
4870 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST.
4874 * "response" is an array of RIL_CellInfo_v12.
4878 * RADIO_NOT_AVAILABLE
4884 * REQUEST_NOT_SUPPORTED
4887 #define RIL_REQUEST_GET_CELL_INFO_LIST 109
4890 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE
4892 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked.
4893 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported
4894 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
4895 * a RIL_UNSOL_CELL_INFO_LIST.
4898 * ((int *)data)[0] is minimum time in milliseconds
4900 * "response" is NULL
4904 * RADIO_NOT_AVAILABLE
4909 * REQUEST_NOT_SUPPORTED
4911 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110
4914 * RIL_REQUEST_SET_INITIAL_ATTACH_APN
4916 * Set an apn to initial attach network
4918 * "data" is a const char **
4919 * ((const char **)data)[0] is the APN to connect if radio technology is LTE
4920 * ((const char **)data)[1] is the connection type to request must be one of the
4921 * PDP_type values in TS 27.007 section 10.1.1.
4922 * For example, "IP", "IPV6", "IPV4V6", or "PPP".
4923 * ((const char **)data)[2] is the PAP / CHAP auth type. Values:
4924 * 0 => PAP and CHAP is never performed.
4925 * 1 => PAP may be performed; CHAP is never performed.
4926 * 2 => CHAP may be performed; PAP is never performed.
4927 * 3 => PAP / CHAP may be performed - baseband dependent.
4928 * ((const char **)data)[3] is the username for APN, or NULL
4929 * ((const char **)data)[4] is the password for APN, or NULL
4931 * "response" is NULL
4935 * RADIO_NOT_AVAILABLE (radio resetting)
4936 * SUBSCRIPTION_NOT_AVAILABLE
4943 * REQUEST_NOT_SUPPORTED
4946 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111
4949 * RIL_REQUEST_IMS_REGISTRATION_STATE
4951 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
4952 * instead, provide IMS registration status via an IMS Service.
4954 * Request current IMS registration state
4958 * "response" is int *
4959 * ((int *)response)[0] is registration state:
4960 * 0 - Not registered
4963 * If ((int*)response)[0] is = 1, then ((int *) response)[1]
4964 * must follow with IMS SMS format:
4966 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily
4970 * RADIO_NOT_AVAILABLE
4972 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112
4975 * RIL_REQUEST_IMS_SEND_SMS
4977 * Send a SMS message over IMS
4979 * "data" is const RIL_IMS_SMS_Message *
4981 * "response" is a const RIL_SMS_Response *
4983 * Based on the return error, caller decides to resend if sending sms
4984 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry.
4985 * In case of retry, data is encoded based on Voice Technology available.
4989 * RADIO_NOT_AVAILABLE
4990 * SMS_SEND_FAIL_RETRY
4996 * INVALID_SMS_FORMAT
4998 * REQUEST_RATE_LIMITED
5002 * INVALID_SMSC_ADDRESS
5003 * MODE_NOT_SUPPORTED
5006 #define RIL_REQUEST_IMS_SEND_SMS 113
5009 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC
5011 * Request APDU exchange on the basic channel. This command reflects TS 27.007
5012 * "generic SIM access" operation (+CSIM). The modem must ensure proper function
5013 * of GSM/CDMA, and filter commands appropriately. It should filter
5014 * channel management and SELECT by DF name commands.
5016 * "data" is a const RIL_SIM_APDU *
5017 * "sessionid" field should be ignored.
5019 * "response" is a const RIL_SIM_IO_Response *
5023 * RADIO_NOT_AVAILABLE
5025 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114
5028 * RIL_REQUEST_SIM_OPEN_CHANNEL
5030 * Open a new logical channel and select the given application. This command
5031 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request
5032 * also specifies the P2 parameter (described in ISO 7816-4).
5034 * "data" is a const RIL_OpenChannelParam *
5036 * "response" is int *
5037 * ((int *)data)[0] contains the session id of the logical channel.
5038 * ((int *)data)[1] onwards may optionally contain the select response for the
5039 * open channel command with one byte per integer.
5043 * RADIO_NOT_AVAILABLE
5047 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115
5050 * RIL_REQUEST_SIM_CLOSE_CHANNEL
5052 * Close a previously opened logical channel. This command reflects TS 27.007
5053 * "close logical channel" operation (+CCHC).
5056 * ((int *)data)[0] is the session id of logical the channel to close.
5058 * "response" is NULL
5062 * RADIO_NOT_AVAILABLE
5064 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116
5067 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL
5069 * Exchange APDUs with a UICC over a previously opened logical channel. This
5070 * command reflects TS 27.007 "generic logical channel access" operation
5071 * (+CGLA). The modem should filter channel management and SELECT by DF name
5074 * "data" is a const RIL_SIM_APDU*
5076 * "response" is a const RIL_SIM_IO_Response *
5080 * RADIO_NOT_AVAILABLE
5082 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117
5085 * RIL_REQUEST_NV_READ_ITEM
5087 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
5088 * This is used for device configuration by some CDMA operators.
5090 * "data" is a const RIL_NV_ReadItem *
5092 * "response" is const char * containing the contents of the NV item
5096 * RADIO_NOT_AVAILABLE
5098 #define RIL_REQUEST_NV_READ_ITEM 118
5101 * RIL_REQUEST_NV_WRITE_ITEM
5103 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h.
5104 * This is used for device configuration by some CDMA operators.
5106 * "data" is a const RIL_NV_WriteItem *
5108 * "response" is NULL
5112 * RADIO_NOT_AVAILABLE
5114 #define RIL_REQUEST_NV_WRITE_ITEM 119
5117 * RIL_REQUEST_NV_WRITE_CDMA_PRL
5119 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
5120 * This is used for device configuration by some CDMA operators.
5122 * "data" is a const char * containing the PRL as a byte array
5124 * "response" is NULL
5128 * RADIO_NOT_AVAILABLE
5130 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120
5133 * RIL_REQUEST_NV_RESET_CONFIG
5135 * Reset the radio NV configuration to the factory state.
5136 * This is used for device configuration by some CDMA operators.
5139 * ((int *)data)[0] is 1 to reload all NV items
5140 * ((int *)data)[0] is 2 for erase NV reset (SCRTN)
5141 * ((int *)data)[0] is 3 for factory reset (RTN)
5143 * "response" is NULL
5147 * RADIO_NOT_AVAILABLE
5149 #define RIL_REQUEST_NV_RESET_CONFIG 121
5151 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION
5152 * FIXME This API needs to have more documentation.
5154 * Selection/de-selection of a subscription from a SIM card
5155 * "data" is const RIL_SelectUiccSub*
5158 * "response" is NULL
5162 * RADIO_NOT_AVAILABLE (radio resetting)
5163 * SUBSCRIPTION_NOT_SUPPORTED
5169 * REQUEST_NOT_SUPPORTED
5172 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122
5175 * RIL_REQUEST_ALLOW_DATA
5177 * Tells the modem whether data calls are allowed or not
5180 * FIXME slotId and aid will be added.
5181 * ((int *)data)[0] is == 0 to allow data calls
5182 * ((int *)data)[0] is == 1 to disallow data calls
5184 * "response" is NULL
5189 * RADIO_NOT_AVAILABLE (radio resetting)
5196 * INVALID_MODEM_STATE
5197 * REQUEST_NOT_SUPPORTED
5200 #define RIL_REQUEST_ALLOW_DATA 123
5203 * RIL_REQUEST_GET_HARDWARE_CONFIG
5205 * Request all of the current hardware (modem and sim) associated
5210 * "response" is an array of RIL_HardwareConfig.
5212 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124
5215 * RIL_REQUEST_SIM_AUTHENTICATION
5217 * Returns the response of SIM Authentication through RIL to a
5218 * challenge request.
5220 * "data" Base64 encoded string containing challenge:
5221 * int authContext; P2 value of authentication command, see P2 parameter in
5222 * 3GPP TS 31.102 7.1.2
5223 * char *authData; the challenge string in Base64 format, see 3GPP
5225 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4,
5228 * "response" Base64 encoded strings containing response:
5229 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3
5231 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2
5233 #define RIL_REQUEST_SIM_AUTHENTICATION 125
5236 * RIL_REQUEST_GET_DC_RT_INFO
5238 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
5239 * Requests the Data Connection Real Time Info
5243 * "response" is the most recent RIL_DcRtInfo
5247 * RADIO_NOT_AVAILABLE
5248 * REQUEST_NOT_SUPPORTED
5250 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED
5252 #define RIL_REQUEST_GET_DC_RT_INFO 126
5255 * RIL_REQUEST_SET_DC_RT_INFO_RATE
5257 * The request is DEPRECATED
5258 * This is the minimum number of milliseconds between successive
5259 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate
5260 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of
5261 * 0 means send as fast as possible.
5263 * "data" The number of milliseconds as an int
5265 * "response" is null
5268 * SUCCESS must not fail
5270 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127
5273 * RIL_REQUEST_SET_DATA_PROFILE
5275 * Set data profile in modem
5276 * Modem should erase existed profiles from framework, and apply new profiles
5277 * "data" is a const RIL_DataProfileInfo **
5278 * "datalen" is count * sizeof(const RIL_DataProfileInfo *)
5279 * "response" is NULL
5283 * RADIO_NOT_AVAILABLE (radio resetting)
5284 * SUBSCRIPTION_NOT_AVAILABLE
5286 #define RIL_REQUEST_SET_DATA_PROFILE 128
5289 * RIL_REQUEST_SHUTDOWN
5291 * Device is shutting down. All further commands are ignored
5292 * and RADIO_NOT_AVAILABLE must be returned.
5295 * "response" is NULL
5299 * RADIO_NOT_AVAILABLE
5300 * OPERATION_NOT_ALLOWED
5304 * REQUEST_NOT_SUPPORTED
5306 #define RIL_REQUEST_SHUTDOWN 129
5309 * RIL_REQUEST_GET_RADIO_CAPABILITY
5311 * Used to get phone radio capablility.
5313 * "data" is the RIL_RadioCapability structure
5317 * RADIO_NOT_AVAILABLE
5318 * OPERATION_NOT_ALLOWED
5320 * REQUEST_NOT_SUPPORTED
5322 #define RIL_REQUEST_GET_RADIO_CAPABILITY 130
5325 * RIL_REQUEST_SET_RADIO_CAPABILITY
5327 * Used to set the phones radio capability. Be VERY careful
5328 * using this request as it may cause some vendor modems to reset. Because
5329 * of the possible modem reset any RIL commands after this one may not be
5332 * "data" is the RIL_RadioCapability structure
5334 * "response" is the RIL_RadioCapability structure, used to feedback return status
5337 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds.
5338 * RADIO_NOT_AVAILABLE
5339 * OPERATION_NOT_ALLOWED
5346 * REQUEST_NOT_SUPPORTED
5348 #define RIL_REQUEST_SET_RADIO_CAPABILITY 131
5351 * RIL_REQUEST_START_LCE
5353 * Start Link Capacity Estimate (LCE) service if supported by the radio.
5355 * "data" is const int *
5356 * ((const int*)data)[0] specifies the desired reporting interval (ms).
5357 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH.
5359 * "response" is the RIL_LceStatusInfo.
5363 * RADIO_NOT_AVAILABLE
5366 * REQUEST_NOT_SUPPORTED
5368 #define RIL_REQUEST_START_LCE 132
5371 * RIL_REQUEST_STOP_LCE
5373 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be
5374 * idempotent for the radio modem.
5376 * "response" is the RIL_LceStatusInfo.
5380 * RADIO_NOT_AVAILABLE
5383 #define RIL_REQUEST_STOP_LCE 133
5386 * RIL_REQUEST_PULL_LCEDATA
5388 * Pull LCE service for capacity information.
5390 * "response" is the RIL_LceDataInfo.
5394 * RADIO_NOT_AVAILABLE
5397 #define RIL_REQUEST_PULL_LCEDATA 134
5400 * RIL_REQUEST_GET_ACTIVITY_INFO
5402 * Get modem activity information for power consumption estimation.
5404 * Request clear-on-read statistics information that is used for
5405 * estimating the per-millisecond power consumption of the cellular
5409 * "response" is const RIL_ActivityStatsInfo *
5414 * RADIO_NOT_AVAILABLE (radio resetting)
5420 * REQUEST_NOT_SUPPORTED
5422 #define RIL_REQUEST_GET_ACTIVITY_INFO 135
5425 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS
5427 * Set carrier restrictions for this sim slot. Expected modem behavior:
5428 * If never receives this command
5429 * - Must allow all carriers
5430 * Receives this command with data being NULL
5431 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload
5432 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android.
5433 * Receives this command with a list of carriers
5434 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM
5435 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in
5436 * the allowed list, modem must detach from the registered network and only keep emergency
5437 * service, and notify Android SIM refresh reset with new SIM state being
5438 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled.
5440 * "data" is const RIL_CarrierRestrictions *
5441 * A list of allowed carriers and possibly a list of excluded carriers.
5442 * If data is NULL, means to clear previous carrier restrictions and allow all carriers
5444 * "response" is int *
5445 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly.
5446 * On success, it should match the length of list data->allowed_carriers.
5447 * If data is NULL, the value must be 0.
5451 * RIL_E_INVALID_ARGUMENTS
5452 * RIL_E_RADIO_NOT_AVAILABLE
5453 * RIL_E_REQUEST_NOT_SUPPORTED
5455 #define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136
5458 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS
5460 * Get carrier restrictions for this sim slot. Expected modem behavior:
5461 * Return list of allowed carriers, or null if all carriers are allowed.
5465 * "response" is const RIL_CarrierRestrictions *.
5466 * If response is NULL, it means all carriers are allowed.
5470 * RIL_E_RADIO_NOT_AVAILABLE
5471 * RIL_E_REQUEST_NOT_SUPPORTED
5473 #define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137
5476 * RIL_REQUEST_SEND_DEVICE_STATE
5478 * Send the updated device state.
5479 * Modem can perform power saving based on the provided device state.
5480 * "data" is const int *
5481 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type.
5482 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each
5485 * "datalen" is count * sizeof(const RIL_DeviceState *)
5486 * "response" is NULL
5490 * RADIO_NOT_AVAILABLE (radio resetting)
5495 * REQUEST_NOT_SUPPORTED
5497 #define RIL_REQUEST_SEND_DEVICE_STATE 138
5500 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER
5502 * Set the unsolicited response filter
5503 * This is used to prevent unnecessary application processor
5504 * wake up for power saving purposes by suppressing the
5505 * unsolicited responses in certain scenarios.
5507 * "data" is an int *
5509 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter
5511 * "response" is NULL
5515 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist)
5516 * RADIO_NOT_AVAILABLE (radio resetting)
5520 * REQUEST_NOT_SUPPORTED
5522 #define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139
5525 * RIL_REQUEST_SET_SIM_CARD_POWER
5527 * Set SIM card power up or down
5529 * Request is equivalent to inserting and removing the card, with
5530 * an additional effect where the ability to detect card removal/insertion
5531 * is disabled when the SIM card is powered down.
5533 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5534 * as if the SIM had been inserted or removed.
5537 * ((int *)data)[0] is 1 for "SIM POWER UP"
5538 * ((int *)data)[0] is 0 for "SIM POWER DOWN"
5540 * "response" is NULL
5544 * RADIO_NOT_AVAILABLE
5545 * REQUEST_NOT_SUPPORTED
5549 #define RIL_REQUEST_SET_SIM_CARD_POWER 140
5550 /***********************************************************************/
5553 * RIL_RESPONSE_ACKNOWLEDGEMENT
5555 * This is used by Asynchronous solicited messages and Unsolicited messages
5556 * to acknowledge the receipt of those messages in RIL.java so that the ack
5557 * can be used to let ril.cpp to release wakelock.
5561 * RADIO_NOT_AVAILABLE
5564 #define RIL_RESPONSE_ACKNOWLEDGEMENT 800
5566 /***********************************************************************/
5569 #define RIL_UNSOL_RESPONSE_BASE 1000
5572 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
5574 * Indicate when value of RIL_RadioState has changed.
5576 * Callee will invoke RIL_RadioStateRequest method on main thread
5581 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000
5585 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
5587 * Indicate when call state has changed
5589 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread
5593 * Response should be invoked on, for example,
5594 * "RING", "BUSY", "NO CARRIER", and also call state
5595 * transitions (DIALING->ALERTING ALERTING->ACTIVE)
5597 * Redundent or extraneous invocations are tolerated
5599 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001
5603 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
5605 * Called when the voice network state changed
5607 * Callee will invoke the following requests on main thread:
5609 * RIL_REQUEST_VOICE_REGISTRATION_STATE
5610 * RIL_REQUEST_OPERATOR
5614 * FIXME should this happen when SIM records are loaded? (eg, for
5617 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002
5620 * RIL_UNSOL_RESPONSE_NEW_SMS
5622 * Called when new SMS is received.
5624 * "data" is const char *
5625 * This is a pointer to a string containing the PDU of an SMS-DELIVER
5626 * as an ascii string of hex digits. The PDU starts with the SMSC address
5627 * per TS 27.005 (+CMT:)
5629 * Callee will subsequently confirm the receipt of thei SMS with a
5630 * RIL_REQUEST_SMS_ACKNOWLEDGE
5632 * No new RIL_UNSOL_RESPONSE_NEW_SMS
5633 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5634 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5637 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003
5640 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
5642 * Called when new SMS Status Report is received.
5644 * "data" is const char *
5645 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT
5646 * as an ascii string of hex digits. The PDU starts with the SMSC address
5647 * per TS 27.005 (+CDS:).
5649 * Callee will subsequently confirm the receipt of the SMS with a
5650 * RIL_REQUEST_SMS_ACKNOWLEDGE
5652 * No new RIL_UNSOL_RESPONSE_NEW_SMS
5653 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a
5654 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received
5657 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004
5660 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
5662 * Called when new SMS has been stored on SIM card
5664 * "data" is const int *
5665 * ((const int *)data)[0] contains the slot index on the SIM that contains
5669 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005
5674 * Called when a new USSD message is received.
5676 * "data" is const char **
5677 * ((const char **)data)[0] points to a type code, which is
5678 * one of these string values:
5679 * "0" USSD-Notify -- text in ((const char **)data)[1]
5680 * "1" USSD-Request -- text in ((const char **)data)[1]
5681 * "2" Session terminated by network
5682 * "3" other local client (eg, SIM Toolkit) has responded
5683 * "4" Operation not supported
5684 * "5" Network timeout
5686 * The USSD session is assumed to persist if the type code is "1", otherwise
5687 * the current session (if any) is assumed to have terminated.
5689 * ((const char **)data)[1] points to a message string if applicable, which
5690 * should always be in UTF-8.
5692 #define RIL_UNSOL_ON_USSD 1006
5693 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */
5696 * RIL_UNSOL_ON_USSD_REQUEST
5698 * Obsolete. Send via RIL_UNSOL_ON_USSD
5700 #define RIL_UNSOL_ON_USSD_REQUEST 1007
5703 * RIL_UNSOL_NITZ_TIME_RECEIVED
5705 * Called when radio has received a NITZ time message
5707 * "data" is const char * pointing to NITZ time string
5708 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt"
5710 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008
5713 * RIL_UNSOL_SIGNAL_STRENGTH
5715 * Radio may report signal strength rather han have it polled.
5717 * "data" is a const RIL_SignalStrength *
5719 #define RIL_UNSOL_SIGNAL_STRENGTH 1009
5723 * RIL_UNSOL_DATA_CALL_LIST_CHANGED
5725 * "data" is an array of RIL_Data_Call_Response_v6 identical to that
5726 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list
5727 * of current data contexts including new contexts that have been
5728 * activated. A data call is only removed from this list when the
5729 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio
5730 * is powered off/on.
5732 * See also: RIL_REQUEST_DATA_CALL_LIST
5735 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010
5738 * RIL_UNSOL_SUPP_SVC_NOTIFICATION
5740 * Reports supplementary service related notification from the network.
5742 * "data" is a const RIL_SuppSvcNotification *
5746 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011
5749 * RIL_UNSOL_STK_SESSION_END
5751 * Indicate when STK session is terminated by SIM.
5755 #define RIL_UNSOL_STK_SESSION_END 1012
5758 * RIL_UNSOL_STK_PROACTIVE_COMMAND
5760 * Indicate when SIM issue a STK proactive command to applications
5762 * "data" is a const char * containing SAT/USAT proactive command
5763 * in hexadecimal format string starting with command tag
5766 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013
5769 * RIL_UNSOL_STK_EVENT_NOTIFY
5771 * Indicate when SIM notifies applcations some event happens.
5772 * Generally, application does not need to have any feedback to
5773 * SIM but shall be able to indicate appropriate messages to users.
5775 * "data" is a const char * containing SAT/USAT commands or responses
5776 * sent by ME to SIM or commands handled by ME, in hexadecimal format string
5777 * starting with first byte of response data or command tag
5780 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014
5783 * RIL_UNSOL_STK_CALL_SETUP
5785 * Indicate when SIM wants application to setup a voice call.
5787 * "data" is const int *
5788 * ((const int *)data)[0] contains timeout value (in milliseconds)
5790 #define RIL_UNSOL_STK_CALL_SETUP 1015
5793 * RIL_UNSOL_SIM_SMS_STORAGE_FULL
5795 * Indicates that SMS storage on the SIM is full. Sent when the network
5796 * attempts to deliver a new SMS message. Messages cannot be saved on the
5797 * SIM until space is freed. In particular, incoming Class 2 messages
5803 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016
5806 * RIL_UNSOL_SIM_REFRESH
5808 * Indicates that file(s) on the SIM have been updated, or the SIM
5809 * has been reinitialized.
5811 * In the case where RIL is version 6 or older:
5812 * "data" is an int *
5813 * ((int *)data)[0] is a RIL_SimRefreshResult.
5814 * ((int *)data)[1] is the EFID of the updated file if the result is
5815 * SIM_FILE_UPDATE or NULL for any other result.
5817 * In the case where RIL is version 7:
5818 * "data" is a RIL_SimRefreshResponse_v7 *
5820 * Note: If the SIM state changes as a result of the SIM refresh (eg,
5821 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5824 #define RIL_UNSOL_SIM_REFRESH 1017
5827 * RIL_UNSOL_CALL_RING
5829 * Ring indication for an incoming call (eg, RING or CRING event).
5830 * There must be at least one RIL_UNSOL_CALL_RING at the beginning
5831 * of a call and sending multiple is optional. If the system property
5832 * ro.telephony.call_ring.multiple is false then the upper layers
5833 * will generate the multiple events internally. Otherwise the vendor
5834 * ril must generate multiple RIL_UNSOL_CALL_RING if
5835 * ro.telephony.call_ring.multiple is true or if it is absent.
5837 * The rate of these events is controlled by ro.telephony.call_ring.delay
5838 * and has a default value of 3000 (3 seconds) if absent.
5840 * "data" is null for GSM
5841 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA
5843 #define RIL_UNSOL_CALL_RING 1018
5846 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
5848 * Indicates that SIM state changes.
5850 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread
5854 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019
5857 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
5859 * Called when new CDMA SMS is received
5861 * "data" is const RIL_CDMA_SMS_Message *
5863 * Callee will subsequently confirm the receipt of the SMS with
5864 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
5866 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until
5867 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received
5870 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020
5873 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
5875 * Called when new Broadcast SMS is received
5877 * "data" can be one of the following:
5878 * If received from GSM network, "data" is const char of 88 bytes
5879 * which indicates each page of a CBS Message sent to the MS by the
5880 * BTS as coded in 3GPP 23.041 Section 9.4.1.2.
5881 * If received from UMTS network, "data" is const char of 90 up to 1252
5882 * bytes which contain between 1 and 15 CBS Message pages sent as one
5883 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2.
5886 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021
5889 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
5891 * Indicates that SMS storage on the RUIM is full. Messages
5892 * cannot be saved on the RUIM until space is freed.
5897 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022
5900 * RIL_UNSOL_RESTRICTED_STATE_CHANGED
5902 * Indicates a restricted state change (eg, for Domain Specific Access Control).
5904 * Radio need send this msg after radio off/on cycle no matter it is changed or not.
5906 * "data" is an int *
5907 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values.
5909 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023
5912 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
5914 * Indicates that the radio system selection module has
5915 * autonomously entered emergency callback mode.
5920 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024
5923 * RIL_UNSOL_CDMA_CALL_WAITING
5925 * Called when CDMA radio receives a call waiting indication.
5927 * "data" is const RIL_CDMA_CallWaiting *
5930 #define RIL_UNSOL_CDMA_CALL_WAITING 1025
5933 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
5935 * Called when CDMA radio receives an update of the progress of an
5938 * "data" is const int *
5939 * For CDMA this is an integer OTASP/OTAPA status listed in
5940 * RIL_CDMA_OTA_ProvisionStatus.
5943 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026
5946 * RIL_UNSOL_CDMA_INFO_REC
5948 * Called when CDMA radio receives one or more info recs.
5950 * "data" is const RIL_CDMA_InformationRecords *
5953 #define RIL_UNSOL_CDMA_INFO_REC 1027
5956 * RIL_UNSOL_OEM_HOOK_RAW
5958 * This is for OEM specific use.
5960 * "data" is a byte[]
5962 #define RIL_UNSOL_OEM_HOOK_RAW 1028
5965 * RIL_UNSOL_RINGBACK_TONE
5967 * Indicates that nework doesn't have in-band information, need to
5968 * play out-band tone.
5970 * "data" is an int *
5971 * ((int *)data)[0] == 0 for stop play ringback tone.
5972 * ((int *)data)[0] == 1 for start play ringback tone.
5974 #define RIL_UNSOL_RINGBACK_TONE 1029
5977 * RIL_UNSOL_RESEND_INCALL_MUTE
5979 * Indicates that framework/application need reset the uplink mute state.
5981 * There may be situations where the mute state becomes out of sync
5982 * between the application and device in some GSM infrastructures.
5986 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030
5989 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
5991 * Called when CDMA subscription source changed.
5994 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource
5996 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031
5999 * RIL_UNSOL_CDMA_PRL_CHANGED
6001 * Called when PRL (preferred roaming list) changes.
6004 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION
6006 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032
6009 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
6011 * Called when Emergency Callback Mode Ends
6013 * Indicates that the radio system selection module has
6014 * proactively exited emergency callback mode.
6019 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033
6022 * RIL_UNSOL_RIL_CONNECTED
6024 * Called the ril connects and returns the version
6027 * ((int *)data)[0] is RIL_VERSION
6029 #define RIL_UNSOL_RIL_CONNECTED 1034
6032 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
6034 * Indicates that voice technology has changed. Contains new radio technology
6035 * as a data in the message.
6038 * ((int *)data)[0] is of type const RIL_RadioTechnology
6041 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035
6044 * RIL_UNSOL_CELL_INFO_LIST
6046 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned
6047 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE.
6051 * "response" is an array of RIL_CellInfo_v12.
6053 #define RIL_UNSOL_CELL_INFO_LIST 1036
6056 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED
6058 * This message is DEPRECATED and shall be removed in a future release (target: 2018);
6059 * instead, provide IMS registration status via an IMS Service.
6061 * Called when IMS registration state has changed
6063 * To get IMS registration state and IMS SMS format, callee needs to invoke the
6064 * following request on main thread:
6066 * RIL_REQUEST_IMS_REGISTRATION_STATE
6071 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037
6074 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED
6076 * Indicated when there is a change in subscription status.
6077 * This event will be sent in the following scenarios
6078 * - subscription readiness at modem, which was selected by telephony layer
6079 * - when subscription is deactivated by modem due to UICC card removal
6080 * - When network invalidates the subscription i.e. attach reject due to authentication reject
6082 * "data" is const int *
6083 * ((const int *)data)[0] == 0 for Subscription Deactivated
6084 * ((const int *)data)[0] == 1 for Subscription Activated
6087 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038
6090 * RIL_UNSOL_SRVCC_STATE_NOTIFY
6092 * Called when Single Radio Voice Call Continuity(SRVCC)
6093 * progress state has changed
6096 * ((int *)data)[0] is of type const RIL_SrvccState
6100 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039
6103 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED
6105 * Called when the hardware configuration associated with the RILd changes
6107 * "data" is an array of RIL_HardwareConfig
6110 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040
6113 * RIL_UNSOL_DC_RT_INFO_CHANGED
6115 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO
6116 * Sent when the DC_RT_STATE changes but the time
6117 * between these messages must not be less than the
6118 * value set by RIL_REQUEST_SET_DC_RT_RATE.
6120 * "data" is the most recent RIL_DcRtInfo
6123 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041
6126 * RIL_UNSOL_RADIO_CAPABILITY
6128 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes.
6129 * Returns the phone radio capability exactly as
6130 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the
6131 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY.
6133 * "data" is the RIL_RadioCapability structure
6135 #define RIL_UNSOL_RADIO_CAPABILITY 1042
6140 * Called when SS response is received when DIAL/USSD/SS is changed to SS by
6143 * "data" is const RIL_StkCcUnsolSsResponse *
6146 #define RIL_UNSOL_ON_SS 1043
6149 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY
6151 * Called when there is an ALPHA from UICC during Call Control.
6153 * "data" is const char * containing ALPHA string from UICC in UTF-8 format.
6156 #define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044
6159 * RIL_UNSOL_LCEDATA_RECV
6161 * Called when there is an incoming Link Capacity Estimate (LCE) info report.
6163 * "data" is the RIL_LceDataInfo structure.
6166 #define RIL_UNSOL_LCEDATA_RECV 1045
6169 * RIL_UNSOL_PCO_DATA
6171 * Called when there is new Carrier PCO data received for a data call. Ideally
6172 * only new data will be forwarded, though this is not required. Multiple
6173 * boxes of carrier PCO data for a given call should result in a series of
6174 * RIL_UNSOL_PCO_DATA calls.
6176 * "data" is the RIL_PCO_Data structure.
6179 #define RIL_UNSOL_PCO_DATA 1046
6182 * RIL_UNSOL_MODEM_RESTART
6184 * Called when there is a modem reset.
6186 * "reason" is "const char *" containing the reason for the reset. It
6187 * could be a crash signature if the restart was due to a crash or some
6188 * string such as "user-initiated restart" or "AT command initiated
6189 * restart" that explains the cause of the modem restart.
6191 * When modem restarts, one of the following radio state transitions will happen
6192 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or
6193 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF
6194 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE
6195 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to
6196 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again.
6198 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the
6199 * modem restart as that could be interpreted as a second modem reset by the
6202 #define RIL_UNSOL_MODEM_RESTART 1047
6204 /***********************************************************************/
6207 #if defined(ANDROID_MULTI_SIM)
6209 * RIL_Request Function pointer
6211 * @param request is one of RIL_REQUEST_*
6212 * @param data is pointer to data defined for that RIL_REQUEST_*
6213 * data is owned by caller, and should not be modified or freed by callee
6214 * structures passed as data may contain pointers to non-contiguous memory
6215 * @param t should be used in subsequent call to RIL_onResponse
6216 * @param datalen is the length of "data" which is defined as other argument. It may or may
6217 * not be equal to sizeof(data). Refer to the documentation of individual structures
6218 * to find if pointers listed in the structure are contiguous and counted in the datalen
6220 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
6223 typedef void (*RIL_RequestFunc) (int request, void *data,
6224 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id);
6227 * This function should return the current radio state synchronously
6229 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id);
6232 /* Backward compatible */
6235 * RIL_Request Function pointer
6237 * @param request is one of RIL_REQUEST_*
6238 * @param data is pointer to data defined for that RIL_REQUEST_*
6239 * data is owned by caller, and should not be modified or freed by callee
6240 * structures passed as data may contain pointers to non-contiguous memory
6241 * @param t should be used in subsequent call to RIL_onResponse
6242 * @param datalen is the length of "data" which is defined as other argument. It may or may
6243 * not be equal to sizeof(data). Refer to the documentation of individual structures
6244 * to find if pointers listed in the structure are contiguous and counted in the datalen
6246 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data))
6249 typedef void (*RIL_RequestFunc) (int request, void *data,
6250 size_t datalen, RIL_Token t);
6253 * This function should return the current radio state synchronously
6255 typedef RIL_RadioState (*RIL_RadioStateRequest)();
6261 * This function returns "1" if the specified RIL_REQUEST code is
6262 * supported and 0 if it is not
6264 * @param requestCode is one of RIL_REQUEST codes
6267 typedef int (*RIL_Supports)(int requestCode);
6270 * This function is called from a separate thread--not the
6271 * thread that calls RIL_RequestFunc--and indicates that a pending
6272 * request should be cancelled.
6274 * On cancel, the callee should do its best to abandon the request and
6275 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point.
6277 * Subsequent calls to RIL_onRequestComplete for this request with
6278 * other results will be tolerated but ignored. (That is, it is valid
6279 * to ignore the cancellation request)
6281 * RIL_Cancel calls should return immediately, and not wait for cancellation
6283 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007
6286 * @param t token wants to be canceled
6289 typedef void (*RIL_Cancel)(RIL_Token t);
6291 typedef void (*RIL_TimedCallback) (void *param);
6294 * Return a version string for your RIL implementation
6296 typedef const char * (*RIL_GetVersion) (void);
6299 int version; /* set to RIL_VERSION */
6300 RIL_RequestFunc onRequest;
6301 RIL_RadioStateRequest onStateRequest;
6302 RIL_Supports supports;
6303 RIL_Cancel onCancel;
6304 RIL_GetVersion getVersion;
6305 } RIL_RadioFunctions;
6308 char *apn; /* the APN to connect to */
6309 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6310 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6311 int authtype; /* authentication protocol used for this PDP context
6312 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6313 char *username; /* the username for APN, or NULL */
6314 char *password; /* the password for APN, or NULL */
6315 } RIL_InitialAttachApn;
6318 char *apn; /* the APN to connect to */
6319 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6320 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */
6321 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on
6322 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/
6323 int authtype; /* authentication protocol used for this PDP context
6324 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */
6325 char *username; /* the username for APN, or NULL */
6326 char *password; /* the password for APN, or NULL */
6327 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of
6329 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of
6331 int modemCognitive; /* indicating the APN setting was sent to the modem through
6332 setDataProfile earlier. */
6333 int mtu; /* maximum transmission unit (MTU) size in bytes */
6334 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */
6335 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier.
6337 SPN like: "A MOBILE", "BEN NL", etc...
6338 IMSI like: "302720x94", "2060188", etc...
6339 GID like: "4E", "33", etc... */
6340 } RIL_InitialAttachApn_v15;
6343 int authContext; /* P2 value of authentication command, see P2 parameter in
6344 3GPP TS 31.102 7.1.2 */
6345 char *authData; /* the challenge string in Base64 format, see 3GPP
6347 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4,
6348 NULL if no value. */
6349 } RIL_SimAuthentication;
6352 int cid; /* Context ID, uniquely identifies this call */
6353 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1.
6354 For example, "IP", "IPV6", "IPV4V6". */
6355 int pco_id; /* The protocol ID for this box. Note that only IDs from
6356 FF00H - FFFFH are accepted. If more than one is included
6357 from the network, multiple calls should be made to send all
6359 int contents_length; /* The number of octets in the contents. */
6360 char *contents; /* Carrier-defined content. It is binary, opaque and
6361 loosely defined in LTE Layer 3 spec 24.008 */
6367 * "t" is parameter passed in on previous call to RIL_Notification
6370 * If "e" != SUCCESS, then response can be null/is ignored
6372 * "response" is owned by caller, and should not be modified or
6375 * RIL_onRequestComplete will return as soon as possible
6377 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e,
6378 void *response, size_t responselen);
6380 #if defined(ANDROID_MULTI_SIM)
6382 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6383 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6385 * "data" is owned by caller, and should not be modified or freed by callee
6387 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id);
6390 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_*
6391 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6393 * "data" is owned by caller, and should not be modified or freed by callee
6395 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen);
6398 * Call user-specifed "callback" function on on the same thread that
6399 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6400 * a relative time value at which the callback is invoked. If relativeTime is
6401 * NULL or points to a 0-filled structure, the callback will be invoked as
6405 void (*RequestTimedCallback) (RIL_TimedCallback callback,
6406 void *param, const struct timeval *relativeTime);
6408 * "t" is parameter passed in on previous call RIL_Notification routine
6410 * RIL_onRequestAck will be called by vendor when an Async RIL request was received
6411 * by them and an ack needs to be sent back to java ril.
6413 void (*OnRequestAck) (RIL_Token t);
6418 * RIL implementations must defined RIL_Init
6419 * argc and argv will be command line arguments intended for the RIL implementation
6420 * Return NULL on error
6422 * @param env is environment point defined as RIL_Env
6423 * @param argc number of arguments
6424 * @param argv list fo arguments
6427 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv);
6430 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init
6431 * for initializing RIL_RadioFunctions used for BT SAP communcations. It is called whenever RILD
6432 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP
6433 * sepecific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init
6434 * and used on the general RIL socket.
6435 * argc and argv will be command line arguments intended for the RIL implementation
6436 * Return NULL on error.
6438 * @param env is environment point defined as RIL_Env
6439 * @param argc number of arguments
6440 * @param argv list fo arguments
6443 const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv);
6445 #else /* RIL_SHLIB */
6448 * Call this once at startup to register notification routine
6450 * @param callbacks user-specifed callback function
6452 void RIL_register (const RIL_RadioFunctions *callbacks);
6454 void rilc_thread_pool();
6459 * RIL_onRequestComplete will return as soon as possible
6461 * @param t is parameter passed in on previous call to RIL_Notification
6463 * @param e error code
6464 * if "e" != SUCCESS, then response can be null/is ignored
6465 * @param response is owned by caller, and should not be modified or
6467 * @param responselen the length of response in byte
6469 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e,
6470 void *response, size_t responselen);
6473 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and
6474 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's
6475 * results, just that the command was received and will take a while. After sending this Ack
6476 * its vendor's responsibility to make sure that AP is up whenever needed while command is
6479 * @param t is parameter passed in on previous call to RIL_Notification
6482 void RIL_onRequestAck(RIL_Token t);
6484 #if defined(ANDROID_MULTI_SIM)
6486 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6487 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6488 * "data" is owned by caller, and should not be modified or freed by callee
6489 * @param datalen the length of data in byte
6492 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6493 size_t datalen, RIL_SOCKET_ID socket_id);
6496 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_*
6497 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_*
6498 * "data" is owned by caller, and should not be modified or freed by callee
6499 * @param datalen the length of data in byte
6502 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data,
6507 * Call user-specifed "callback" function on on the same thread that
6508 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies
6509 * a relative time value at which the callback is invoked. If relativeTime is
6510 * NULL or points to a 0-filled structure, the callback will be invoked as
6513 * @param callback user-specifed callback function
6514 * @param param parameter list
6515 * @param relativeTime a relative time value at which the callback is invoked
6518 void RIL_requestTimedCallback (RIL_TimedCallback callback,
6519 void *param, const struct timeval *relativeTime);
6521 #endif /* RIL_SHLIB */
6527 #endif /*ANDROID_RIL_H*/