1 /* 2 * Copyright (C) 2006 The Android Open Source Project 3 * 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 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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. 15 */ 16 17 #ifndef ANDROID_RIL_H 18 #define ANDROID_RIL_H 1 19 20 #include <stdlib.h> 21 #include <stdint.h> 22 #include <stdbool.h> 23 #include <telephony/ril_cdma_sms.h> 24 #include <telephony/ril_nv_items.h> 25 #include <telephony/ril_msim.h> 26 27 #ifndef FEATURE_UNIT_TEST 28 #include <sys/time.h> 29 #endif /* !FEATURE_UNIT_TEST */ 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 #ifndef SIM_COUNT 36 #if defined(ANDROID_SIM_COUNT_2) 37 #define SIM_COUNT 2 38 #elif defined(ANDROID_SIM_COUNT_3) 39 #define SIM_COUNT 3 40 #elif defined(ANDROID_SIM_COUNT_4) 41 #define SIM_COUNT 4 42 #else 43 #define SIM_COUNT 1 44 #endif 45 46 #ifndef ANDROID_MULTI_SIM 47 #define SIM_COUNT 1 48 #endif 49 #endif 50 51 /* 52 * RIL version. 53 * Value of RIL_VERSION should not be changed in future. Here onwards, 54 * when a new change is supposed to be introduced which could involve new 55 * schemes added like Wakelocks, data structures added/updated, etc, we would 56 * just document RIL version associated with that change below. When OEM updates 57 * its RIL with those changes, they would return that new RIL version during 58 * RIL_REGISTER. We should make use of the returned version by vendor to 59 * identify appropriate scheme or data structure version to use. 60 * 61 * Documentation of RIL version and associated changes 62 * RIL_VERSION = 12 : Updated data structures: RIL_Data_Call_Response_v11, 63 * RIL_SIM_IO_v6, RIL_CardStatus_v6, 64 * RIL_SimRefreshResponse_v7, RIL_CDMA_CallWaiting_v6, 65 * RIL_LTE_SignalStrength_v8, RIL_SignalStrength_v10, 66 * RIL_CellIdentityGsm_v12, RIL_CellIdentityWcdma_v12, 67 * RIL_CellIdentityLte_v12, RIL_CellInfoGsm_v12, 68 * RIL_CellInfoWcdma_v12, RIL_CellInfoLte_v12, 69 * RIL_CellInfo_v12 70 * 71 * RIL_VERSION = 13 : This version includes new wakelock semantics and as the 72 * first strongly versioned version it enforces structure 73 * use. 74 * 75 * RIL_VERSION = 14 : New commands added: 76 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS, 77 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS, 78 * RIL_UNSOL_PCO_DATA 79 * New data structures are added: RIL_CarrierMatchType, 80 * RIL_Carrier, RIL_CarrierRestrictions, RIL_PCO_Data 81 * 82 * 83 * RIL_VERSION = 15 : New commands added: 84 * RIL_UNSOL_MODEM_RESTART, 85 * RIL_REQUEST_SEND_DEVICE_STATE, 86 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER, 87 * RIL_REQUEST_SET_SIM_CARD_POWER, 88 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION, 89 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 90 * RIL_REQUEST_START_NETWORK_SCAN 91 * RIL_REQUEST_STOP_NETWORK_SCAN 92 * RIL_UNSOL_NETWORK_SCAN_RESULT 93 * RIL_REQUEST_GET_MODEM_STACK_STATUS 94 * RIL_REQUEST_ENABLE_MODEM 95 * RIL_REQUEST_EMERGENCY_DIAL 96 * RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS 97 * RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA 98 * RIL_REQUEST_SET_LINK_CAPACITY_REPORTING_CRITERIA 99 * RIL_REQUEST_ENABLE_UICC_APPLICATIONS 100 * RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED 101 * RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION 102 * RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE 103 * New parameters for RIL_REQUEST_SETUP_DATA_CALL 104 * Updated data structures: RIL_DataProfileInfo_v15, 105 * RIL_InitialAttachApn_v15, RIL_Data_Call_Response_v12 106 * New data structures: RIL_DataRegistrationStateResponse, 107 * RIL_OpenChannelParams, 108 * RIL_VoiceRegistrationStateResponse same is used in 109 * RIL_REQUEST_DATA_REGISTRATION_STATE and 110 * RIL_REQUEST_VOICE_REGISTRATION_STATE respectively. 111 * RIL_VERSION = 16 : New commands added: 112 * RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY 113 * RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED 114 * RIL_REQUEST_ALLOCATE_PDU_SESSION_ID 115 * RIL_REQUEST_RELEASE_PDU_SESSION_ID 116 * RIL_REQUEST_START_HANDOVER 117 * RIL_REQUEST_CANCEL_HANDOVER 118 * RIL_REQUEST_SET_ALLOWED_NETWORK_TYPES_BITMAP 119 * RIL_REQUEST_SET_DATA_THROTTLING 120 * RIL_REQUEST_GET_SYSTEM_SELECTION_CHANNELS 121 * RIL_REQUEST_GET_ALLOWED_NETWORK_TYPES_BITMAP 122 * RIL_REQUEST_GET_SLICING_CONFIG 123 * New parameters for RIL_REQUEST_SETUP_DATA_CALL 124 * Updated data structures: RIL_CarrierInfoForImsiEncryption_v16 125 * New data structure: RIL_PublicKeyType 126 */ 127 #define RIL_VERSION 16 128 #define LAST_IMPRECISE_RIL_VERSION 12 // Better self-documented name 129 #define RIL_VERSION_MIN 6 /* Minimum RIL_VERSION supported */ 130 131 #define CDMA_ALPHA_INFO_BUFFER_LENGTH 64 132 #define CDMA_NUMBER_INFO_BUFFER_LENGTH 81 133 134 #define MAX_RILDS 3 135 #define MAX_SERVICE_NAME_LENGTH 6 136 #define MAX_CLIENT_ID_LENGTH 2 137 #define MAX_DEBUG_SOCKET_NAME_LENGTH 12 138 #define MAX_QEMU_PIPE_NAME_LENGTH 11 139 #define MAX_UUID_LENGTH 64 140 #define MAX_BANDS 8 141 #define MAX_CHANNELS 32 142 #define MAX_RADIO_ACCESS_NETWORKS 8 143 #define MAX_BROADCAST_SMS_CONFIG_INFO 25 144 145 #define RIL_RADIO_ACCESS_SPECIFIER_MAX_SIZE 8 146 147 typedef void * RIL_Token; 148 149 typedef enum { 150 RIL_SOCKET_1, 151 #if (SIM_COUNT >= 2) 152 RIL_SOCKET_2, 153 #if (SIM_COUNT >= 3) 154 RIL_SOCKET_3, 155 #endif 156 #if (SIM_COUNT >= 4) 157 RIL_SOCKET_4, 158 #endif 159 #endif 160 RIL_SOCKET_NUM 161 } RIL_SOCKET_ID; 162 163 164 typedef enum { 165 RIL_E_SUCCESS = 0, 166 RIL_E_RADIO_NOT_AVAILABLE = 1, /* If radio did not start or is resetting */ 167 RIL_E_GENERIC_FAILURE = 2, 168 RIL_E_PASSWORD_INCORRECT = 3, /* for PIN/PIN2 methods only! */ 169 RIL_E_SIM_PIN2 = 4, /* Operation requires SIM PIN2 to be entered */ 170 RIL_E_SIM_PUK2 = 5, /* Operation requires SIM PIN2 to be entered */ 171 RIL_E_REQUEST_NOT_SUPPORTED = 6, 172 RIL_E_CANCELLED = 7, 173 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, /* data ops are not allowed during voice 174 call on a Class C GPRS device */ 175 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, /* data ops are not allowed before device 176 registers in network */ 177 RIL_E_SMS_SEND_FAIL_RETRY = 10, /* fail to send sms and need retry */ 178 RIL_E_SIM_ABSENT = 11, /* fail to set the location where CDMA subscription 179 shall be retrieved because of SIM or RUIM 180 card absent */ 181 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 12, /* fail to find CDMA subscription from specified 182 location */ 183 RIL_E_MODE_NOT_SUPPORTED = 13, /* HW does not support preferred network type */ 184 RIL_E_FDN_CHECK_FAILURE = 14, /* command failed because recipient is not on FDN list */ 185 RIL_E_ILLEGAL_SIM_OR_ME = 15, /* network selection failed due to 186 illegal SIM or ME */ 187 RIL_E_MISSING_RESOURCE = 16, /* no logical channel available */ 188 RIL_E_NO_SUCH_ELEMENT = 17, /* application not found on SIM */ 189 RIL_E_DIAL_MODIFIED_TO_USSD = 18, /* DIAL request modified to USSD */ 190 RIL_E_DIAL_MODIFIED_TO_SS = 19, /* DIAL request modified to SS */ 191 RIL_E_DIAL_MODIFIED_TO_DIAL = 20, /* DIAL request modified to DIAL with different 192 data */ 193 RIL_E_USSD_MODIFIED_TO_DIAL = 21, /* USSD request modified to DIAL */ 194 RIL_E_USSD_MODIFIED_TO_SS = 22, /* USSD request modified to SS */ 195 RIL_E_USSD_MODIFIED_TO_USSD = 23, /* USSD request modified to different USSD 196 request */ 197 RIL_E_SS_MODIFIED_TO_DIAL = 24, /* SS request modified to DIAL */ 198 RIL_E_SS_MODIFIED_TO_USSD = 25, /* SS request modified to USSD */ 199 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 26, /* Subscription not supported by RIL */ 200 RIL_E_SS_MODIFIED_TO_SS = 27, /* SS request modified to different SS request */ 201 RIL_E_LCE_NOT_SUPPORTED = 36, /* LCE service not supported(36 in RILConstants.java) */ 202 RIL_E_NO_MEMORY = 37, /* Not sufficient memory to process the request */ 203 RIL_E_INTERNAL_ERR = 38, /* Modem hit unexpected error scenario while handling 204 this request */ 205 RIL_E_SYSTEM_ERR = 39, /* Hit platform or system error */ 206 RIL_E_MODEM_ERR = 40, /* Vendor RIL got unexpected or incorrect response 207 from modem for this request */ 208 RIL_E_INVALID_STATE = 41, /* Unexpected request for the current state */ 209 RIL_E_NO_RESOURCES = 42, /* Not sufficient resource to process the request */ 210 RIL_E_SIM_ERR = 43, /* Received error from SIM card */ 211 RIL_E_INVALID_ARGUMENTS = 44, /* Received invalid arguments in request */ 212 RIL_E_INVALID_SIM_STATE = 45, /* Can not process the request in current SIM state */ 213 RIL_E_INVALID_MODEM_STATE = 46, /* Can not process the request in current Modem state */ 214 RIL_E_INVALID_CALL_ID = 47, /* Received invalid call id in request */ 215 RIL_E_NO_SMS_TO_ACK = 48, /* ACK received when there is no SMS to ack */ 216 RIL_E_NETWORK_ERR = 49, /* Received error from network */ 217 RIL_E_REQUEST_RATE_LIMITED = 50, /* Operation denied due to overly-frequent requests */ 218 RIL_E_SIM_BUSY = 51, /* SIM is busy */ 219 RIL_E_SIM_FULL = 52, /* The target EF is full */ 220 RIL_E_NETWORK_REJECT = 53, /* Request is rejected by network */ 221 RIL_E_OPERATION_NOT_ALLOWED = 54, /* Not allowed the request now */ 222 RIL_E_EMPTY_RECORD = 55, /* The request record is empty */ 223 RIL_E_INVALID_SMS_FORMAT = 56, /* Invalid sms format */ 224 RIL_E_ENCODING_ERR = 57, /* Message not encoded properly */ 225 RIL_E_INVALID_SMSC_ADDRESS = 58, /* SMSC address specified is invalid */ 226 RIL_E_NO_SUCH_ENTRY = 59, /* No such entry present to perform the request */ 227 RIL_E_NETWORK_NOT_READY = 60, /* Network is not ready to perform the request */ 228 RIL_E_NOT_PROVISIONED = 61, /* Device does not have this value provisioned */ 229 RIL_E_NO_SUBSCRIPTION = 62, /* Device does not have subscription */ 230 RIL_E_NO_NETWORK_FOUND = 63, /* Network cannot be found */ 231 RIL_E_DEVICE_IN_USE = 64, /* Operation cannot be performed because the device 232 is currently in use */ 233 RIL_E_ABORTED = 65, /* Operation aborted */ 234 RIL_E_INVALID_RESPONSE = 66, /* Invalid response sent by vendor code */ 235 // OEM specific error codes. To be used by OEM when they don't want to reveal 236 // specific error codes which would be replaced by Generic failure. 237 RIL_E_OEM_ERROR_1 = 501, 238 RIL_E_OEM_ERROR_2 = 502, 239 RIL_E_OEM_ERROR_3 = 503, 240 RIL_E_OEM_ERROR_4 = 504, 241 RIL_E_OEM_ERROR_5 = 505, 242 RIL_E_OEM_ERROR_6 = 506, 243 RIL_E_OEM_ERROR_7 = 507, 244 RIL_E_OEM_ERROR_8 = 508, 245 RIL_E_OEM_ERROR_9 = 509, 246 RIL_E_OEM_ERROR_10 = 510, 247 RIL_E_OEM_ERROR_11 = 511, 248 RIL_E_OEM_ERROR_12 = 512, 249 RIL_E_OEM_ERROR_13 = 513, 250 RIL_E_OEM_ERROR_14 = 514, 251 RIL_E_OEM_ERROR_15 = 515, 252 RIL_E_OEM_ERROR_16 = 516, 253 RIL_E_OEM_ERROR_17 = 517, 254 RIL_E_OEM_ERROR_18 = 518, 255 RIL_E_OEM_ERROR_19 = 519, 256 RIL_E_OEM_ERROR_20 = 520, 257 RIL_E_OEM_ERROR_21 = 521, 258 RIL_E_OEM_ERROR_22 = 522, 259 RIL_E_OEM_ERROR_23 = 523, 260 RIL_E_OEM_ERROR_24 = 524, 261 RIL_E_OEM_ERROR_25 = 525 262 } RIL_Errno; 263 264 typedef enum { 265 RIL_CALL_ACTIVE = 0, 266 RIL_CALL_HOLDING = 1, 267 RIL_CALL_DIALING = 2, /* MO call only */ 268 RIL_CALL_ALERTING = 3, /* MO call only */ 269 RIL_CALL_INCOMING = 4, /* MT call only */ 270 RIL_CALL_WAITING = 5 /* MT call only */ 271 } RIL_CallState; 272 273 typedef enum { 274 RADIO_STATE_OFF = 0, /* Radio explicitly powered off (eg CFUN=0) */ 275 RADIO_STATE_UNAVAILABLE = 1, /* Radio unavailable (eg, resetting or not booted) */ 276 RADIO_STATE_ON = 10 /* Radio is on */ 277 } RIL_RadioState; 278 279 typedef enum { 280 RADIO_TECH_UNKNOWN = 0, 281 RADIO_TECH_GPRS = 1, 282 RADIO_TECH_EDGE = 2, 283 RADIO_TECH_UMTS = 3, 284 RADIO_TECH_IS95A = 4, 285 RADIO_TECH_IS95B = 5, 286 RADIO_TECH_1xRTT = 6, 287 RADIO_TECH_EVDO_0 = 7, 288 RADIO_TECH_EVDO_A = 8, 289 RADIO_TECH_HSDPA = 9, 290 RADIO_TECH_HSUPA = 10, 291 RADIO_TECH_HSPA = 11, 292 RADIO_TECH_EVDO_B = 12, 293 RADIO_TECH_EHRPD = 13, 294 RADIO_TECH_LTE = 14, 295 RADIO_TECH_HSPAP = 15, // HSPA+ 296 RADIO_TECH_GSM = 16, // Only supports voice 297 RADIO_TECH_TD_SCDMA = 17, 298 RADIO_TECH_IWLAN = 18, 299 RADIO_TECH_LTE_CA = 19, 300 RADIO_TECH_NR = 20 301 } RIL_RadioTechnology; 302 303 typedef enum { 304 RAF_UNKNOWN = (1 << RADIO_TECH_UNKNOWN), 305 RAF_GPRS = (1 << RADIO_TECH_GPRS), 306 RAF_EDGE = (1 << RADIO_TECH_EDGE), 307 RAF_UMTS = (1 << RADIO_TECH_UMTS), 308 RAF_IS95A = (1 << RADIO_TECH_IS95A), 309 RAF_IS95B = (1 << RADIO_TECH_IS95B), 310 RAF_1xRTT = (1 << RADIO_TECH_1xRTT), 311 RAF_EVDO_0 = (1 << RADIO_TECH_EVDO_0), 312 RAF_EVDO_A = (1 << RADIO_TECH_EVDO_A), 313 RAF_HSDPA = (1 << RADIO_TECH_HSDPA), 314 RAF_HSUPA = (1 << RADIO_TECH_HSUPA), 315 RAF_HSPA = (1 << RADIO_TECH_HSPA), 316 RAF_EVDO_B = (1 << RADIO_TECH_EVDO_B), 317 RAF_EHRPD = (1 << RADIO_TECH_EHRPD), 318 RAF_LTE = (1 << RADIO_TECH_LTE), 319 RAF_HSPAP = (1 << RADIO_TECH_HSPAP), 320 RAF_GSM = (1 << RADIO_TECH_GSM), 321 RAF_TD_SCDMA = (1 << RADIO_TECH_TD_SCDMA), 322 RAF_LTE_CA = (1 << RADIO_TECH_LTE_CA), 323 RAF_NR = (1 << RADIO_TECH_NR) 324 } RIL_RadioAccessFamily; 325 326 typedef enum { 327 BAND_MODE_UNSPECIFIED = 0, //"unspecified" (selected by baseband automatically) 328 BAND_MODE_EURO = 1, //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 329 BAND_MODE_USA = 2, //"US band" (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 330 BAND_MODE_JPN = 3, //"JPN band" (WCDMA-800 / WCDMA-IMT-2000) 331 BAND_MODE_AUS = 4, //"AUS band" (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 332 BAND_MODE_AUS_2 = 5, //"AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 333 BAND_MODE_CELL_800 = 6, //"Cellular" (800-MHz Band) 334 BAND_MODE_PCS = 7, //"PCS" (1900-MHz Band) 335 BAND_MODE_JTACS = 8, //"Band Class 3" (JTACS Band) 336 BAND_MODE_KOREA_PCS = 9, //"Band Class 4" (Korean PCS Band) 337 BAND_MODE_5_450M = 10, //"Band Class 5" (450-MHz Band) 338 BAND_MODE_IMT2000 = 11, //"Band Class 6" (2-GMHz IMT2000 Band) 339 BAND_MODE_7_700M_2 = 12, //"Band Class 7" (Upper 700-MHz Band) 340 BAND_MODE_8_1800M = 13, //"Band Class 8" (1800-MHz Band) 341 BAND_MODE_9_900M = 14, //"Band Class 9" (900-MHz Band) 342 BAND_MODE_10_800M_2 = 15, //"Band Class 10" (Secondary 800-MHz Band) 343 BAND_MODE_EURO_PAMR_400M = 16, //"Band Class 11" (400-MHz European PAMR Band) 344 BAND_MODE_AWS = 17, //"Band Class 15" (AWS Band) 345 BAND_MODE_USA_2500M = 18 //"Band Class 16" (US 2.5-GHz Band) 346 } RIL_RadioBandMode; 347 348 typedef enum { 349 RC_PHASE_CONFIGURED = 0, // LM is configured is initial value and value after FINISH completes 350 RC_PHASE_START = 1, // START is sent before Apply and indicates that an APPLY will be 351 // forthcoming with these same parameters 352 RC_PHASE_APPLY = 2, // APPLY is sent after all LM's receive START and returned 353 // RIL_RadioCapability.status = 0, if any START's fail no 354 // APPLY will be sent 355 RC_PHASE_UNSOL_RSP = 3, // UNSOL_RSP is sent with RIL_UNSOL_RADIO_CAPABILITY 356 RC_PHASE_FINISH = 4 // FINISH is sent after all commands have completed. If an error 357 // occurs in any previous command the RIL_RadioAccessesFamily and 358 // logicalModemUuid fields will be the prior configuration thus 359 // restoring the configuration to the previous value. An error 360 // returned by this command will generally be ignored or may 361 // cause that logical modem to be removed from service. 362 } RadioCapabilityPhase; 363 364 typedef enum { 365 RC_STATUS_NONE = 0, // This parameter has no meaning with RC_PHASE_START, 366 // RC_PHASE_APPLY 367 RC_STATUS_SUCCESS = 1, // Tell modem the action transaction of set radio 368 // capability was success with RC_PHASE_FINISH 369 RC_STATUS_FAIL = 2, // Tell modem the action transaction of set radio 370 // capability is fail with RC_PHASE_FINISH. 371 } RadioCapabilityStatus; 372 373 #define RIL_RADIO_CAPABILITY_VERSION 1 374 typedef struct { 375 int version; // Version of structure, RIL_RADIO_CAPABILITY_VERSION 376 int session; // Unique session value defined by framework returned in all "responses/unsol" 377 int phase; // CONFIGURED, START, APPLY, FINISH 378 int rat; // RIL_RadioAccessFamily for the radio 379 char logicalModemUuid[MAX_UUID_LENGTH]; // A UUID typically "com.xxxx.lmX where X is the logical modem. 380 int status; // Return status and an input parameter for RC_PHASE_FINISH 381 } RIL_RadioCapability; 382 383 // Do we want to split Data from Voice and the use 384 // RIL_RadioTechnology for get/setPreferredVoice/Data ? 385 typedef enum { 386 PREF_NET_TYPE_GSM_WCDMA = 0, /* GSM/WCDMA (WCDMA preferred) */ 387 PREF_NET_TYPE_GSM_ONLY = 1, /* GSM only */ 388 PREF_NET_TYPE_WCDMA = 2, /* WCDMA */ 389 PREF_NET_TYPE_GSM_WCDMA_AUTO = 3, /* GSM/WCDMA (auto mode, according to PRL) */ 390 PREF_NET_TYPE_CDMA_EVDO_AUTO = 4, /* CDMA and EvDo (auto mode, according to PRL) */ 391 PREF_NET_TYPE_CDMA_ONLY = 5, /* CDMA only */ 392 PREF_NET_TYPE_EVDO_ONLY = 6, /* EvDo only */ 393 PREF_NET_TYPE_GSM_WCDMA_CDMA_EVDO_AUTO = 7, /* GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) */ 394 PREF_NET_TYPE_LTE_CDMA_EVDO = 8, /* LTE, CDMA and EvDo */ 395 PREF_NET_TYPE_LTE_GSM_WCDMA = 9, /* LTE, GSM/WCDMA */ 396 PREF_NET_TYPE_LTE_CMDA_EVDO_GSM_WCDMA = 10, /* LTE, CDMA, EvDo, GSM/WCDMA */ 397 PREF_NET_TYPE_LTE_ONLY = 11, /* LTE only */ 398 PREF_NET_TYPE_LTE_WCDMA = 12, /* LTE/WCDMA */ 399 PREF_NET_TYPE_TD_SCDMA_ONLY = 13, /* TD-SCDMA only */ 400 PREF_NET_TYPE_TD_SCDMA_WCDMA = 14, /* TD-SCDMA and WCDMA */ 401 PREF_NET_TYPE_TD_SCDMA_LTE = 15, /* TD-SCDMA and LTE */ 402 PREF_NET_TYPE_TD_SCDMA_GSM = 16, /* TD-SCDMA and GSM */ 403 PREF_NET_TYPE_TD_SCDMA_GSM_LTE = 17, /* TD-SCDMA,GSM and LTE */ 404 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA = 18, /* TD-SCDMA, GSM/WCDMA */ 405 PREF_NET_TYPE_TD_SCDMA_WCDMA_LTE = 19, /* TD-SCDMA, WCDMA and LTE */ 406 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_LTE = 20, /* TD-SCDMA, GSM/WCDMA and LTE */ 407 PREF_NET_TYPE_TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO = 21, /* TD-SCDMA, GSM/WCDMA, CDMA and EvDo */ 408 PREF_NET_TYPE_TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA = 22 /* TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA */ 409 } RIL_PreferredNetworkType; 410 411 /* Source for cdma subscription */ 412 typedef enum { 413 CDMA_SUBSCRIPTION_SOURCE_RUIM_SIM = 0, 414 CDMA_SUBSCRIPTION_SOURCE_NV = 1 415 } RIL_CdmaSubscriptionSource; 416 417 /* User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 */ 418 typedef enum { 419 RIL_UUS_TYPE1_IMPLICIT = 0, 420 RIL_UUS_TYPE1_REQUIRED = 1, 421 RIL_UUS_TYPE1_NOT_REQUIRED = 2, 422 RIL_UUS_TYPE2_REQUIRED = 3, 423 RIL_UUS_TYPE2_NOT_REQUIRED = 4, 424 RIL_UUS_TYPE3_REQUIRED = 5, 425 RIL_UUS_TYPE3_NOT_REQUIRED = 6 426 } RIL_UUS_Type; 427 428 /* User-to-User Signaling Information data coding schemes. Possible values for 429 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 430 * specified in section 10.5.4.25 of 3GPP TS 24.008 */ 431 typedef enum { 432 RIL_UUS_DCS_USP = 0, /* User specified protocol */ 433 RIL_UUS_DCS_OSIHLP = 1, /* OSI higher layer protocol */ 434 RIL_UUS_DCS_X244 = 2, /* X.244 */ 435 RIL_UUS_DCS_RMCF = 3, /* Reserved for system management 436 convergence function */ 437 RIL_UUS_DCS_IA5c = 4 /* IA5 characters */ 438 } RIL_UUS_DCS; 439 440 /* User-to-User Signaling Information defined in 3GPP 23.087 v8.0 441 * This data is passed in RIL_ExtensionRecord and rec contains this 442 * structure when type is RIL_UUS_INFO_EXT_REC */ 443 typedef struct { 444 RIL_UUS_Type uusType; /* UUS Type */ 445 RIL_UUS_DCS uusDcs; /* UUS Data Coding Scheme */ 446 int uusLength; /* Length of UUS Data */ 447 char * uusData; /* UUS Data */ 448 } RIL_UUS_Info; 449 450 /* CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ 451 typedef struct { 452 char isPresent; /* non-zero if signal information record is present */ 453 char signalType; /* as defined 3.7.5.5-1 */ 454 char alertPitch; /* as defined 3.7.5.5-2 */ 455 char signal; /* as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 */ 456 } RIL_CDMA_SignalInfoRecord; 457 458 typedef struct { 459 RIL_CallState state; 460 int index; /* Connection Index for use with, eg, AT+CHLD */ 461 int toa; /* type of address, eg 145 = intl */ 462 char isMpty; /* nonzero if is mpty call */ 463 char isMT; /* nonzero if call is mobile terminated */ 464 char als; /* ALS line indicator if available 465 (0 = line 1) */ 466 char isVoice; /* nonzero if this is is a voice call */ 467 char isVoicePrivacy; /* nonzero if CDMA voice privacy mode is active */ 468 char * number; /* Remote party number */ 469 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 470 char * name; /* Remote party name */ 471 int namePresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown 3=Payphone */ 472 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 473 } RIL_Call; 474 475 /* Deprecated, use RIL_Data_Call_Response_v6 */ 476 typedef struct { 477 int cid; /* Context ID, uniquely identifies this call */ 478 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 479 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 480 For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 481 char * apn; /* ignored */ 482 char * address; /* An address, e.g., "192.0.1.3" or "2001:db8::1". */ 483 } RIL_Data_Call_Response_v4; 484 485 /* 486 * Returned by RIL_REQUEST_SETUP_DATA_CALL, RIL_REQUEST_DATA_CALL_LIST 487 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED, on error status != 0. 488 */ 489 typedef struct { 490 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 491 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 492 back-off timer value RIL wants to override the one 493 pre-configured in FW. 494 The unit is milliseconds. 495 The value < 0 means no value is suggested. 496 The value 0 means retry should be done ASAP. 497 The value of INT_MAX(0x7fffffff) means no retry. */ 498 int cid; /* Context ID, uniquely identifies this call */ 499 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 500 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 501 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 502 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 503 such as "IP" or "IPV6" */ 504 char * ifname; /* The network interface name */ 505 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 506 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 507 May not be empty, typically 1 IPv4 or 1 IPv6 or 508 one of each. If the prefix length is absent the addresses 509 are assumed to be point to point with IPv4 having a prefix 510 length of 32 and IPv6 128. */ 511 char * dnses; /* A space-delimited list of DNS server addresses, 512 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 513 May be empty. */ 514 char * gateways; /* A space-delimited list of default gateway addresses, 515 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 516 May be empty in which case the addresses represent point 517 to point connections. */ 518 } RIL_Data_Call_Response_v6; 519 520 typedef struct { 521 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 522 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 523 back-off timer value RIL wants to override the one 524 pre-configured in FW. 525 The unit is milliseconds. 526 The value < 0 means no value is suggested. 527 The value 0 means retry should be done ASAP. 528 The value of INT_MAX(0x7fffffff) means no retry. */ 529 int cid; /* Context ID, uniquely identifies this call */ 530 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 531 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 532 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 533 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 534 such as "IP" or "IPV6" */ 535 char * ifname; /* The network interface name */ 536 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 537 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 538 May not be empty, typically 1 IPv4 or 1 IPv6 or 539 one of each. If the prefix length is absent the addresses 540 are assumed to be point to point with IPv4 having a prefix 541 length of 32 and IPv6 128. */ 542 char * dnses; /* A space-delimited list of DNS server addresses, 543 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 544 May be empty. */ 545 char * gateways; /* A space-delimited list of default gateway addresses, 546 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 547 May be empty in which case the addresses represent point 548 to point connections. */ 549 char * pcscf; /* the Proxy Call State Control Function address 550 via PCO(Protocol Configuration Option) for IMS client. */ 551 } RIL_Data_Call_Response_v9; 552 553 typedef struct { 554 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 555 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 556 back-off timer value RIL wants to override the one 557 pre-configured in FW. 558 The unit is milliseconds. 559 The value < 0 means no value is suggested. 560 The value 0 means retry should be done ASAP. 561 The value of INT_MAX(0x7fffffff) means no retry. */ 562 int cid; /* Context ID, uniquely identifies this call */ 563 int active; /* 0=inactive, 1=active/physical link down, 2=active/physical link up */ 564 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 565 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 566 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 567 such as "IP" or "IPV6" */ 568 char * ifname; /* The network interface name */ 569 char * addresses; /* A space-delimited list of addresses with optional "/" prefix length, 570 e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 571 May not be empty, typically 1 IPv4 or 1 IPv6 or 572 one of each. If the prefix length is absent the addresses 573 are assumed to be point to point with IPv4 having a prefix 574 length of 32 and IPv6 128. */ 575 char * dnses; /* A space-delimited list of DNS server addresses, 576 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 577 May be empty. */ 578 char * gateways; /* A space-delimited list of default gateway addresses, 579 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 580 May be empty in which case the addresses represent point 581 to point connections. */ 582 char * pcscf; /* the Proxy Call State Control Function address 583 via PCO(Protocol Configuration Option) for IMS client. */ 584 int mtu; /* MTU received from network 585 Value <= 0 means network has either not sent a value or 586 sent an invalid value */ 587 } RIL_Data_Call_Response_v11; 588 589 typedef struct { 590 int status; /* A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error */ 591 int suggestedRetryTime; /* If status != 0, this fields indicates the suggested retry 592 back-off timer value RIL wants to override the one 593 pre-configured in FW. 594 The unit is milliseconds. 595 The value < 0 means no value is suggested. 596 The value 0 means retry should be done ASAP. 597 The value of INT_MAX(0x7fffffff) means no retry. */ 598 int cid; /* Context ID, uniquely identifies this call */ 599 int active; /* 0=inactive, 1=active/physical link down, 600 2=active/physical link up */ 601 char * type; /* One of the PDP_type values in TS 27.007 section 10.1.1. 602 For example, "IP", "IPV6", "IPV4V6", or "PPP". If status is 603 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED this is the type supported 604 such as "IP" or "IPV6" */ 605 char * ifname; /* The network interface name */ 606 char * addresses; /* A space-delimited list of addresses with optional "/" prefix 607 length, e.g., "192.0.1.3" or "192.0.1.11/16 2001:db8::1/64". 608 May not be empty, typically 1 IPv4 or 1 IPv6 or 609 one of each. If the prefix length is absent the addresses 610 are assumed to be point to point with IPv4 having a prefix 611 length of 32 and IPv6 128. */ 612 char * dnses; /* A space-delimited list of DNS server addresses, 613 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 614 May be empty. */ 615 char * gateways; /* A space-delimited list of default gateway addresses, 616 e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 617 May be empty in which case the addresses represent point 618 to point connections. */ 619 char * pcscf; /* the Proxy Call State Control Function address 620 via PCO(Protocol Configuration Option) for IMS client. */ 621 int mtuV4; /* MTU received from network for IPv4. 622 Value <= 0 means network has either not sent a value or 623 sent an invalid value. */ 624 int mtuV6; /* MTU received from network for IPv6. 625 Value <= 0 means network has either not sent a value or 626 sent an invalid value. */ 627 } RIL_Data_Call_Response_v12; 628 629 typedef enum { 630 RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */ 631 RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */ 632 } RIL_RadioTechnologyFamily; 633 634 typedef struct { 635 RIL_RadioTechnologyFamily tech; 636 unsigned char retry; /* 0 == not retry, nonzero == retry */ 637 int messageRef; /* Valid field if retry is set to nonzero. 638 Contains messageRef from RIL_SMS_Response 639 corresponding to failed MO SMS. 640 */ 641 642 union { 643 /* Valid field if tech is RADIO_TECH_3GPP2. See RIL_REQUEST_CDMA_SEND_SMS */ 644 RIL_CDMA_SMS_Message* cdmaMessage; 645 646 /* Valid field if tech is RADIO_TECH_3GPP. See RIL_REQUEST_SEND_SMS */ 647 char** gsmMessage; /* This is an array of pointers where pointers 648 are contiguous but elements pointed by those pointers 649 are not contiguous 650 */ 651 } message; 652 } RIL_IMS_SMS_Message; 653 654 typedef struct { 655 int messageRef; /* TP-Message-Reference for GSM, 656 and BearerData MessageId for CDMA 657 (See 3GPP2 C.S0015-B, v2.0, table 4.5-1). */ 658 char *ackPDU; /* or NULL if n/a */ 659 int errorCode; /* See 3GPP 27.005, 3.2.5 for GSM/UMTS, 660 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 661 -1 if unknown or not applicable*/ 662 } RIL_SMS_Response; 663 664 /** Used by RIL_REQUEST_WRITE_SMS_TO_SIM */ 665 typedef struct { 666 int status; /* Status of message. See TS 27.005 3.1, "<stat>": */ 667 /* 0 = "REC UNREAD" */ 668 /* 1 = "REC READ" */ 669 /* 2 = "STO UNSENT" */ 670 /* 3 = "STO SENT" */ 671 char * pdu; /* PDU of message to write, as an ASCII hex string less the SMSC address, 672 the TP-layer length is "strlen(pdu)/2". */ 673 char * smsc; /* SMSC address in GSM BCD format prefixed by a length byte 674 (as expected by TS 27.005) or NULL for default SMSC */ 675 } RIL_SMS_WriteArgs; 676 677 /** Used by RIL_REQUEST_DIAL */ 678 typedef struct { 679 char * address; 680 int clir; 681 /* (same as 'n' parameter in TS 27.007 7.7 "+CLIR" 682 * clir == 0 on "use subscription default value" 683 * clir == 1 on "CLIR invocation" (restrict CLI presentation) 684 * clir == 2 on "CLIR suppression" (allow CLI presentation) 685 */ 686 RIL_UUS_Info * uusInfo; /* NULL or Pointer to User-User Signaling Information */ 687 } RIL_Dial; 688 689 typedef struct { 690 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 691 int fileid; /* EF id */ 692 char *path; /* "pathid" from TS 27.007 +CRSM command. 693 Path is in hex asciii format eg "7f205f70" 694 Path must always be provided. 695 */ 696 int p1; 697 int p2; 698 int p3; 699 char *data; /* May be NULL*/ 700 char *pin2; /* May be NULL*/ 701 } RIL_SIM_IO_v5; 702 703 typedef struct { 704 int command; /* one of the commands listed for TS 27.007 +CRSM*/ 705 int fileid; /* EF id */ 706 char *path; /* "pathid" from TS 27.007 +CRSM command. 707 Path is in hex asciii format eg "7f205f70" 708 Path must always be provided. 709 */ 710 int p1; 711 int p2; 712 int p3; 713 char *data; /* May be NULL*/ 714 char *pin2; /* May be NULL*/ 715 char *aidPtr; /* AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. */ 716 } RIL_SIM_IO_v6; 717 718 /* Used by RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL and 719 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC. */ 720 typedef struct { 721 int sessionid; /* "sessionid" from TS 27.007 +CGLA command. Should be 722 ignored for +CSIM command. */ 723 724 /* Following fields are used to derive the APDU ("command" and "length" 725 values in TS 27.007 +CSIM and +CGLA commands). */ 726 int cla; 727 int instruction; 728 int p1; 729 int p2; 730 int p3; /* A negative P3 implies a 4 byte APDU. */ 731 char *data; /* May be NULL. In hex string format. */ 732 } RIL_SIM_APDU; 733 734 typedef struct { 735 int sw1; 736 int sw2; 737 char *simResponse; /* In hex string format ([a-fA-F0-9]*), except for SIM_AUTHENTICATION 738 response for which it is in Base64 format, see 3GPP TS 31.102 7.1.2 */ 739 } RIL_SIM_IO_Response; 740 741 /* See also com.android.internal.telephony.gsm.CallForwardInfo */ 742 743 typedef struct { 744 int status; /* 745 * For RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 746 * status 1 = active, 0 = not active 747 * 748 * For RIL_REQUEST_SET_CALL_FORWARD: 749 * status is: 750 * 0 = disable 751 * 1 = enable 752 * 2 = interrogate 753 * 3 = registration 754 * 4 = erasure 755 */ 756 757 int reason; /* from TS 27.007 7.11 "reason" */ 758 int serviceClass;/* From 27.007 +CCFC/+CLCK "class" 759 See table for Android mapping from 760 MMI service code 761 0 means user doesn't input class */ 762 int toa; /* "type" from TS 27.007 7.11 */ 763 char * number; /* "number" from TS 27.007 7.11. May be NULL */ 764 int timeSeconds; /* for CF no reply only */ 765 }RIL_CallForwardInfo; 766 767 typedef struct { 768 char * cid; /* Combination of LAC and Cell Id in 32 bits in GSM. 769 * Upper 16 bits is LAC and lower 16 bits 770 * is CID (as described in TS 27.005) 771 * Primary Scrambling Code (as described in TS 25.331) 772 * in 9 bits in UMTS 773 * Valid values are hexadecimal 0x0000 - 0xffffffff. 774 */ 775 int rssi; /* Received RSSI in GSM, 776 * Level index of CPICH Received Signal Code Power in UMTS 777 */ 778 } RIL_NeighboringCell; 779 780 typedef struct { 781 char lce_status; /* LCE service status: 782 * -1 = not supported; 783 * 0 = stopped; 784 * 1 = active. 785 */ 786 unsigned int actual_interval_ms; /* actual LCE reporting interval, 787 * meaningful only if LCEStatus = 1. 788 */ 789 } RIL_LceStatusInfo; 790 791 typedef struct { 792 unsigned int last_hop_capacity_kbps; /* last-hop cellular capacity: kilobits/second. */ 793 unsigned char confidence_level; /* capacity estimate confidence: 0-100 */ 794 unsigned char lce_suspended; /* LCE report going to be suspended? (e.g., radio 795 * moves to inactive state or network type change) 796 * 1 = suspended; 797 * 0 = not suspended. 798 */ 799 } RIL_LceDataInfo; 800 801 typedef enum { 802 RIL_MATCH_ALL = 0, /* Apply to all carriers with the same mcc/mnc */ 803 RIL_MATCH_SPN = 1, /* Use SPN and mcc/mnc to identify the carrier */ 804 RIL_MATCH_IMSI_PREFIX = 2, /* Use IMSI prefix and mcc/mnc to identify the carrier */ 805 RIL_MATCH_GID1 = 3, /* Use GID1 and mcc/mnc to identify the carrier */ 806 RIL_MATCH_GID2 = 4, /* Use GID2 and mcc/mnc to identify the carrier */ 807 } RIL_CarrierMatchType; 808 809 typedef struct { 810 const char * mcc; 811 const char * mnc; 812 RIL_CarrierMatchType match_type; /* Specify match type for the carrier. 813 * If it’s RIL_MATCH_ALL, match_data is null; 814 * otherwise, match_data is the value for the match type. 815 */ 816 const char * match_data; 817 } RIL_Carrier; 818 819 typedef struct { 820 int32_t len_allowed_carriers; /* length of array allowed_carriers */ 821 int32_t len_excluded_carriers; /* length of array excluded_carriers */ 822 RIL_Carrier * allowed_carriers; /* allowed carriers */ 823 RIL_Carrier * excluded_carriers; /* excluded carriers 824 * which match allowed_carriers. Eg. allowed_carriers match 825 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1 826 * is ABCD. It means except the carrier whose gid1 is ABCD, 827 * all carriers with the same mcc/mnc are allowed. 828 */ 829 } RIL_CarrierRestrictions; 830 831 typedef enum { 832 NO_MULTISIM_POLICY = 0, /* configuration applies to each slot independently. */ 833 ONE_VALID_SIM_MUST_BE_PRESENT = 1, /* Any SIM card can be used as far as one valid card is 834 * present in the device. 835 */ 836 } RIL_SimLockMultiSimPolicy; 837 838 typedef struct { 839 int32_t len_allowed_carriers; /* length of array allowed_carriers */ 840 int32_t len_excluded_carriers; /* length of array excluded_carriers */ 841 RIL_Carrier * allowed_carriers; /* allowed carriers */ 842 RIL_Carrier * excluded_carriers; /* explicitly excluded carriers 843 * which match allowed_carriers. Eg. allowed_carriers match 844 * mcc/mnc, excluded_carriers has same mcc/mnc and gid1 845 * is ABCD. It means except the carrier whose gid1 is ABCD, 846 * all carriers with the same mcc/mnc are allowed. 847 */ 848 int allowedCarriersPrioritized; /* allowed list prioritized */ 849 RIL_SimLockMultiSimPolicy multiSimPolicy; /* multisim policy */ 850 } RIL_CarrierRestrictionsWithPriority; 851 852 typedef struct { 853 char * mcc; /* MCC of the Carrier. */ 854 char * mnc ; /* MNC of the Carrier. */ 855 uint8_t * carrierKey; /* Public Key from the Carrier used to encrypt the 856 * IMSI/IMPI. 857 */ 858 int32_t carrierKeyLength; /* Length of the Public Key. */ 859 char * keyIdentifier; /* The keyIdentifier Attribute value pair that helps 860 * a server locate the private key to decrypt the 861 * permanent identity. 862 */ 863 int64_t expirationTime; /* Date-Time (in UTC) when the key will expire. */ 864 865 } RIL_CarrierInfoForImsiEncryption; 866 867 /** 868 * Public key type from carrier certificate. 869 */ 870 typedef enum { 871 EPDG = 1, /* Key type to be used for ePDG */ 872 WLAN = 2, /* Key type to be used for WLAN */ 873 } RIL_PublicKeyType; 874 875 typedef struct { 876 char* mcc; /* MCC of the Carrier. */ 877 char* mnc; /* MNC of the Carrier. */ 878 uint8_t* carrierKey; /* Public Key from the Carrier used to encrypt the 879 * IMSI/IMPI. 880 */ 881 int32_t carrierKeyLength; /* Length of the Public Key. */ 882 char* keyIdentifier; /* The keyIdentifier Attribute value pair that helps 883 * a server locate the private key to decrypt the 884 * permanent identity. 885 */ 886 int64_t expirationTime; /* Date-Time (in UTC) when the key will expire. */ 887 RIL_PublicKeyType keyType; /* Public key type */ 888 889 } RIL_CarrierInfoForImsiEncryption_v16; 890 891 /* See RIL_REQUEST_LAST_CALL_FAIL_CAUSE */ 892 typedef enum { 893 CALL_FAIL_UNOBTAINABLE_NUMBER = 1, 894 CALL_FAIL_NO_ROUTE_TO_DESTINATION = 3, 895 CALL_FAIL_CHANNEL_UNACCEPTABLE = 6, 896 CALL_FAIL_OPERATOR_DETERMINED_BARRING = 8, 897 CALL_FAIL_NORMAL = 16, 898 CALL_FAIL_BUSY = 17, 899 CALL_FAIL_NO_USER_RESPONDING = 18, 900 CALL_FAIL_NO_ANSWER_FROM_USER = 19, 901 CALL_FAIL_CALL_REJECTED = 21, 902 CALL_FAIL_NUMBER_CHANGED = 22, 903 CALL_FAIL_PREEMPTION = 25, 904 CALL_FAIL_DESTINATION_OUT_OF_ORDER = 27, 905 CALL_FAIL_INVALID_NUMBER_FORMAT = 28, 906 CALL_FAIL_FACILITY_REJECTED = 29, 907 CALL_FAIL_RESP_TO_STATUS_ENQUIRY = 30, 908 CALL_FAIL_NORMAL_UNSPECIFIED = 31, 909 CALL_FAIL_CONGESTION = 34, 910 CALL_FAIL_NETWORK_OUT_OF_ORDER = 38, 911 CALL_FAIL_TEMPORARY_FAILURE = 41, 912 CALL_FAIL_SWITCHING_EQUIPMENT_CONGESTION = 42, 913 CALL_FAIL_ACCESS_INFORMATION_DISCARDED = 43, 914 CALL_FAIL_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44, 915 CALL_FAIL_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47, 916 CALL_FAIL_QOS_UNAVAILABLE = 49, 917 CALL_FAIL_REQUESTED_FACILITY_NOT_SUBSCRIBED = 50, 918 CALL_FAIL_INCOMING_CALLS_BARRED_WITHIN_CUG = 55, 919 CALL_FAIL_BEARER_CAPABILITY_NOT_AUTHORIZED = 57, 920 CALL_FAIL_BEARER_CAPABILITY_UNAVAILABLE = 58, 921 CALL_FAIL_SERVICE_OPTION_NOT_AVAILABLE = 63, 922 CALL_FAIL_BEARER_SERVICE_NOT_IMPLEMENTED = 65, 923 CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, 924 CALL_FAIL_REQUESTED_FACILITY_NOT_IMPLEMENTED = 69, 925 CALL_FAIL_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70, 926 CALL_FAIL_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79, 927 CALL_FAIL_INVALID_TRANSACTION_IDENTIFIER = 81, 928 CALL_FAIL_USER_NOT_MEMBER_OF_CUG = 87, 929 CALL_FAIL_INCOMPATIBLE_DESTINATION = 88, 930 CALL_FAIL_INVALID_TRANSIT_NW_SELECTION = 91, 931 CALL_FAIL_SEMANTICALLY_INCORRECT_MESSAGE = 95, 932 CALL_FAIL_INVALID_MANDATORY_INFORMATION = 96, 933 CALL_FAIL_MESSAGE_TYPE_NON_IMPLEMENTED = 97, 934 CALL_FAIL_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98, 935 CALL_FAIL_INFORMATION_ELEMENT_NON_EXISTENT = 99, 936 CALL_FAIL_CONDITIONAL_IE_ERROR = 100, 937 CALL_FAIL_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101, 938 CALL_FAIL_RECOVERY_ON_TIMER_EXPIRED = 102, 939 CALL_FAIL_PROTOCOL_ERROR_UNSPECIFIED = 111, 940 CALL_FAIL_INTERWORKING_UNSPECIFIED = 127, 941 CALL_FAIL_CALL_BARRED = 240, 942 CALL_FAIL_FDN_BLOCKED = 241, 943 CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, 944 CALL_FAIL_IMEI_NOT_ACCEPTED = 243, 945 CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK Call Control */ 946 CALL_FAIL_DIAL_MODIFIED_TO_SS = 245, 947 CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246, 948 CALL_FAIL_RADIO_OFF = 247, /* Radio is OFF */ 949 CALL_FAIL_OUT_OF_SERVICE = 248, /* No cellular coverage */ 950 CALL_FAIL_NO_VALID_SIM = 249, /* No valid SIM is present */ 951 CALL_FAIL_RADIO_INTERNAL_ERROR = 250, /* Internal error at Modem */ 952 CALL_FAIL_NETWORK_RESP_TIMEOUT = 251, /* No response from network */ 953 CALL_FAIL_NETWORK_REJECT = 252, /* Explicit network reject */ 954 CALL_FAIL_RADIO_ACCESS_FAILURE = 253, /* RRC connection failure. Eg.RACH */ 955 CALL_FAIL_RADIO_LINK_FAILURE = 254, /* Radio Link Failure */ 956 CALL_FAIL_RADIO_LINK_LOST = 255, /* Radio link lost due to poor coverage */ 957 CALL_FAIL_RADIO_UPLINK_FAILURE = 256, /* Radio uplink failure */ 958 CALL_FAIL_RADIO_SETUP_FAILURE = 257, /* RRC connection setup failure */ 959 CALL_FAIL_RADIO_RELEASE_NORMAL = 258, /* RRC connection release, normal */ 960 CALL_FAIL_RADIO_RELEASE_ABNORMAL = 259, /* RRC connection release, abnormal */ 961 CALL_FAIL_ACCESS_CLASS_BLOCKED = 260, /* Access class barring */ 962 CALL_FAIL_NETWORK_DETACH = 261, /* Explicit network detach */ 963 CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, 964 CALL_FAIL_CDMA_DROP = 1001, 965 CALL_FAIL_CDMA_INTERCEPT = 1002, 966 CALL_FAIL_CDMA_REORDER = 1003, 967 CALL_FAIL_CDMA_SO_REJECT = 1004, 968 CALL_FAIL_CDMA_RETRY_ORDER = 1005, 969 CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, 970 CALL_FAIL_CDMA_PREEMPTED = 1007, 971 CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed 972 during emergency callback mode */ 973 CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ 974 975 /* OEM specific error codes. Used to distinguish error from 976 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */ 977 CALL_FAIL_OEM_CAUSE_1 = 0xf001, 978 CALL_FAIL_OEM_CAUSE_2 = 0xf002, 979 CALL_FAIL_OEM_CAUSE_3 = 0xf003, 980 CALL_FAIL_OEM_CAUSE_4 = 0xf004, 981 CALL_FAIL_OEM_CAUSE_5 = 0xf005, 982 CALL_FAIL_OEM_CAUSE_6 = 0xf006, 983 CALL_FAIL_OEM_CAUSE_7 = 0xf007, 984 CALL_FAIL_OEM_CAUSE_8 = 0xf008, 985 CALL_FAIL_OEM_CAUSE_9 = 0xf009, 986 CALL_FAIL_OEM_CAUSE_10 = 0xf00a, 987 CALL_FAIL_OEM_CAUSE_11 = 0xf00b, 988 CALL_FAIL_OEM_CAUSE_12 = 0xf00c, 989 CALL_FAIL_OEM_CAUSE_13 = 0xf00d, 990 CALL_FAIL_OEM_CAUSE_14 = 0xf00e, 991 CALL_FAIL_OEM_CAUSE_15 = 0xf00f, 992 993 CALL_FAIL_ERROR_UNSPECIFIED = 0xffff /* This error will be deprecated soon, 994 vendor code should make sure to map error 995 code to specific error */ 996 } RIL_LastCallFailCause; 997 998 typedef struct { 999 RIL_LastCallFailCause cause_code; 1000 char * vendor_cause; 1001 } RIL_LastCallFailCauseInfo; 1002 1003 /* See RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE */ 1004 typedef enum { 1005 PDP_FAIL_NONE = 0, /* No error, connection ok */ 1006 1007 /* an integer cause code defined in TS 24.008 1008 section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. 1009 If the implementation does not have access to the exact cause codes, 1010 then it should return one of the following values, 1011 as the UI layer needs to distinguish these 1012 cases for error notification and potential retries. */ 1013 PDP_FAIL_OPERATOR_BARRED = 0x08, /* no retry */ 1014 PDP_FAIL_NAS_SIGNALLING = 0x0E, 1015 PDP_FAIL_LLC_SNDCP = 0x19, 1016 PDP_FAIL_INSUFFICIENT_RESOURCES = 0x1A, 1017 PDP_FAIL_MISSING_UNKNOWN_APN = 0x1B, /* no retry */ 1018 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, /* no retry */ 1019 PDP_FAIL_USER_AUTHENTICATION = 0x1D, /* no retry */ 1020 PDP_FAIL_ACTIVATION_REJECT_GGSN = 0x1E, /* no retry */ 1021 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 0x1F, 1022 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 0x20, /* no retry */ 1023 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, /* no retry */ 1024 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 0x22, 1025 PDP_FAIL_NSAPI_IN_USE = 0x23, /* no retry */ 1026 PDP_FAIL_REGULAR_DEACTIVATION = 0x24, /* possibly restart radio, 1027 based on framework config */ 1028 PDP_FAIL_QOS_NOT_ACCEPTED = 0x25, 1029 PDP_FAIL_NETWORK_FAILURE = 0x26, 1030 PDP_FAIL_UMTS_REACTIVATION_REQ = 0x27, 1031 PDP_FAIL_FEATURE_NOT_SUPP = 0x28, 1032 PDP_FAIL_TFT_SEMANTIC_ERROR = 0x29, 1033 PDP_FAIL_TFT_SYTAX_ERROR = 0x2A, 1034 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 0x2B, 1035 PDP_FAIL_FILTER_SEMANTIC_ERROR = 0x2C, 1036 PDP_FAIL_FILTER_SYTAX_ERROR = 0x2D, 1037 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 0x2E, 1038 PDP_FAIL_ONLY_IPV4_ALLOWED = 0x32, /* no retry */ 1039 PDP_FAIL_ONLY_IPV6_ALLOWED = 0x33, /* no retry */ 1040 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 0x34, 1041 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 0x35, 1042 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 0x36, 1043 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37, 1044 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41, 1045 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42, 1046 PDP_FAIL_INVALID_TRANSACTION_ID = 0x51, 1047 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 0x5F, 1048 PDP_FAIL_INVALID_MANDATORY_INFO = 0x60, 1049 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 0x61, 1050 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 0x62, 1051 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 0x63, 1052 PDP_FAIL_CONDITIONAL_IE_ERROR = 0x64, 1053 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65, 1054 PDP_FAIL_PROTOCOL_ERRORS = 0x6F, /* no retry */ 1055 PDP_FAIL_APN_TYPE_CONFLICT = 0x70, 1056 PDP_FAIL_INVALID_PCSCF_ADDR = 0x71, 1057 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72, 1058 PDP_FAIL_EMM_ACCESS_BARRED = 0x73, 1059 PDP_FAIL_EMERGENCY_IFACE_ONLY = 0x74, 1060 PDP_FAIL_IFACE_MISMATCH = 0x75, 1061 PDP_FAIL_COMPANION_IFACE_IN_USE = 0x76, 1062 PDP_FAIL_IP_ADDRESS_MISMATCH = 0x77, 1063 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 0x78, 1064 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79, 1065 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A, 1066 // TODO: add new fail causes from IRadio 1.4 types.hal 1067 PDP_FAIL_SLICE_REJECTED = 0x8CC, 1068 PDP_FAIL_MATCH_ALL_RULE_NOT_ALLOWED = 0x8CD, 1069 ALL_MATCHING_RULES_FAILED = 0x8CE, 1070 1071 // OEM specific error codes. To be used by OEMs when they don't want to 1072 // reveal error code which would be replaced by PDP_FAIL_ERROR_UNSPECIFIED 1073 PDP_FAIL_OEM_DCFAILCAUSE_1 = 0x1001, 1074 PDP_FAIL_OEM_DCFAILCAUSE_2 = 0x1002, 1075 PDP_FAIL_OEM_DCFAILCAUSE_3 = 0x1003, 1076 PDP_FAIL_OEM_DCFAILCAUSE_4 = 0x1004, 1077 PDP_FAIL_OEM_DCFAILCAUSE_5 = 0x1005, 1078 PDP_FAIL_OEM_DCFAILCAUSE_6 = 0x1006, 1079 PDP_FAIL_OEM_DCFAILCAUSE_7 = 0x1007, 1080 PDP_FAIL_OEM_DCFAILCAUSE_8 = 0x1008, 1081 PDP_FAIL_OEM_DCFAILCAUSE_9 = 0x1009, 1082 PDP_FAIL_OEM_DCFAILCAUSE_10 = 0x100A, 1083 PDP_FAIL_OEM_DCFAILCAUSE_11 = 0x100B, 1084 PDP_FAIL_OEM_DCFAILCAUSE_12 = 0x100C, 1085 PDP_FAIL_OEM_DCFAILCAUSE_13 = 0x100D, 1086 PDP_FAIL_OEM_DCFAILCAUSE_14 = 0x100E, 1087 PDP_FAIL_OEM_DCFAILCAUSE_15 = 0x100F, 1088 1089 /* Not mentioned in the specification */ 1090 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1, 1091 PDP_FAIL_DATA_REGISTRATION_FAIL = -2, 1092 1093 /* reasons for data call drop - network/modem disconnect */ 1094 PDP_FAIL_SIGNAL_LOST = -3, 1095 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4, /* preferred technology has changed, should retry 1096 with parameters appropriate for new technology */ 1097 PDP_FAIL_RADIO_POWER_OFF = -5, /* data call was disconnected because radio was resetting, 1098 powered off - no retry */ 1099 PDP_FAIL_TETHERED_CALL_ACTIVE = -6, /* data call was disconnected by modem because tethered 1100 mode was up on same APN/data profile - no retry until 1101 tethered call is off */ 1102 1103 PDP_FAIL_ERROR_UNSPECIFIED = 0xffff, /* retry silently. Will be deprecated soon as 1104 new error codes are added making this unnecessary */ 1105 } RIL_DataCallFailCause; 1106 1107 /* See RIL_REQUEST_SETUP_DATA_CALL */ 1108 typedef enum { 1109 RIL_DATA_PROFILE_DEFAULT = 0, 1110 RIL_DATA_PROFILE_TETHERED = 1, 1111 RIL_DATA_PROFILE_IMS = 2, 1112 RIL_DATA_PROFILE_FOTA = 3, 1113 RIL_DATA_PROFILE_CBS = 4, 1114 RIL_DATA_PROFILE_OEM_BASE = 1000, /* Start of OEM-specific profiles */ 1115 RIL_DATA_PROFILE_INVALID = 0xFFFFFFFF 1116 } RIL_DataProfile; 1117 1118 /* Used by RIL_UNSOL_SUPP_SVC_NOTIFICATION */ 1119 typedef struct { 1120 int notificationType; /* 1121 * 0 = MO intermediate result code 1122 * 1 = MT unsolicited result code 1123 */ 1124 int code; /* See 27.007 7.17 1125 "code1" for MO 1126 "code2" for MT. */ 1127 int index; /* CUG index. See 27.007 7.17. */ 1128 int type; /* "type" from 27.007 7.17 (MT only). */ 1129 char * number; /* "number" from 27.007 7.17 1130 (MT only, may be NULL). */ 1131 } RIL_SuppSvcNotification; 1132 1133 #define RIL_CARD_MAX_APPS 8 1134 1135 typedef enum { 1136 RIL_CARDSTATE_ABSENT = 0, 1137 RIL_CARDSTATE_PRESENT = 1, 1138 RIL_CARDSTATE_ERROR = 2, 1139 RIL_CARDSTATE_RESTRICTED = 3 /* card is present but not usable due to carrier restrictions.*/ 1140 } RIL_CardState; 1141 1142 typedef enum { 1143 RIL_PERSOSUBSTATE_UNKNOWN = 0, /* initial state */ 1144 RIL_PERSOSUBSTATE_IN_PROGRESS = 1, /* in between each lock transition */ 1145 RIL_PERSOSUBSTATE_READY = 2, /* when either SIM or RUIM Perso is finished 1146 since each app can only have 1 active perso 1147 involved */ 1148 RIL_PERSOSUBSTATE_SIM_NETWORK = 3, 1149 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET = 4, 1150 RIL_PERSOSUBSTATE_SIM_CORPORATE = 5, 1151 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER = 6, 1152 RIL_PERSOSUBSTATE_SIM_SIM = 7, 1153 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK = 8, /* The corresponding perso lock is blocked */ 1154 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK = 9, 1155 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK = 10, 1156 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK = 11, 1157 RIL_PERSOSUBSTATE_SIM_SIM_PUK = 12, 1158 RIL_PERSOSUBSTATE_RUIM_NETWORK1 = 13, 1159 RIL_PERSOSUBSTATE_RUIM_NETWORK2 = 14, 1160 RIL_PERSOSUBSTATE_RUIM_HRPD = 15, 1161 RIL_PERSOSUBSTATE_RUIM_CORPORATE = 16, 1162 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER = 17, 1163 RIL_PERSOSUBSTATE_RUIM_RUIM = 18, 1164 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK = 19, /* The corresponding perso lock is blocked */ 1165 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK = 20, 1166 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK = 21, 1167 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK = 22, 1168 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK = 23, 1169 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK = 24 1170 } RIL_PersoSubstate; 1171 1172 typedef enum { 1173 RIL_APPSTATE_UNKNOWN = 0, 1174 RIL_APPSTATE_DETECTED = 1, 1175 RIL_APPSTATE_PIN = 2, /* If PIN1 or UPin is required */ 1176 RIL_APPSTATE_PUK = 3, /* If PUK1 or Puk for UPin is required */ 1177 RIL_APPSTATE_SUBSCRIPTION_PERSO = 4, /* perso_substate should be look at 1178 when app_state is assigned to this value */ 1179 RIL_APPSTATE_READY = 5 1180 } RIL_AppState; 1181 1182 typedef enum { 1183 RIL_PINSTATE_UNKNOWN = 0, 1184 RIL_PINSTATE_ENABLED_NOT_VERIFIED = 1, 1185 RIL_PINSTATE_ENABLED_VERIFIED = 2, 1186 RIL_PINSTATE_DISABLED = 3, 1187 RIL_PINSTATE_ENABLED_BLOCKED = 4, 1188 RIL_PINSTATE_ENABLED_PERM_BLOCKED = 5 1189 } RIL_PinState; 1190 1191 typedef enum { 1192 RIL_APPTYPE_UNKNOWN = 0, 1193 RIL_APPTYPE_SIM = 1, 1194 RIL_APPTYPE_USIM = 2, 1195 RIL_APPTYPE_RUIM = 3, 1196 RIL_APPTYPE_CSIM = 4, 1197 RIL_APPTYPE_ISIM = 5 1198 } RIL_AppType; 1199 1200 /* 1201 * Please note that registration state UNKNOWN is 1202 * treated as "out of service" in the Android telephony. 1203 * Registration state REG_DENIED must be returned if Location Update 1204 * Reject (with cause 17 - Network Failure) is received 1205 * repeatedly from the network, to facilitate 1206 * "managed roaming" 1207 */ 1208 typedef enum { 1209 RIL_NOT_REG_AND_NOT_SEARCHING = 0, // Not registered, MT is not currently searching 1210 // a new operator to register 1211 RIL_REG_HOME = 1, // Registered, home network 1212 RIL_NOT_REG_AND_SEARCHING = 2, // Not registered, but MT is currently searching 1213 // a new operator to register 1214 RIL_REG_DENIED = 3, // Registration denied 1215 RIL_UNKNOWN = 4, // Unknown 1216 RIL_REG_ROAMING = 5, // Registered, roaming 1217 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_NOT_SEARCHING = 10, // Same as 1218 // RIL_NOT_REG_AND_NOT_SEARCHING but indicates that 1219 // emergency calls are enabled. 1220 RIL_NOT_REG_AND_EMERGENCY_AVAILABLE_AND_SEARCHING = 12, // Same as RIL_NOT_REG_AND_SEARCHING 1221 // but indicates that 1222 // emergency calls are enabled. 1223 RIL_REG_DENIED_AND_EMERGENCY_AVAILABLE = 13, // Same as REG_DENIED but indicates that 1224 // emergency calls are enabled. 1225 RIL_UNKNOWN_AND_EMERGENCY_AVAILABLE = 14, // Same as UNKNOWN but indicates that 1226 // emergency calls are enabled. 1227 } RIL_RegState; 1228 1229 typedef struct 1230 { 1231 RIL_AppType app_type; 1232 RIL_AppState app_state; 1233 RIL_PersoSubstate perso_substate; /* applicable only if app_state == 1234 RIL_APPSTATE_SUBSCRIPTION_PERSO */ 1235 char *aid_ptr; /* null terminated string, e.g., from 0xA0, 0x00 -> 0x41, 1236 0x30, 0x30, 0x30 */ 1237 char *app_label_ptr; /* null terminated string */ 1238 int pin1_replaced; /* applicable to USIM, CSIM & ISIM */ 1239 RIL_PinState pin1; 1240 RIL_PinState pin2; 1241 } RIL_AppStatus; 1242 1243 /* Deprecated, use RIL_CardStatus_v6 */ 1244 typedef struct 1245 { 1246 RIL_CardState card_state; 1247 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 1248 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1249 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1250 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 1251 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 1252 } RIL_CardStatus_v5; 1253 1254 typedef struct 1255 { 1256 RIL_CardState card_state; 1257 RIL_PinState universal_pin_state; /* applicable to USIM and CSIM: RIL_PINSTATE_xxx */ 1258 int gsm_umts_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1259 int cdma_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1260 int ims_subscription_app_index; /* value < RIL_CARD_MAX_APPS, -1 if none */ 1261 int num_applications; /* value <= RIL_CARD_MAX_APPS */ 1262 RIL_AppStatus applications[RIL_CARD_MAX_APPS]; 1263 } RIL_CardStatus_v6; 1264 1265 typedef struct { 1266 RIL_CardStatus_v6 base; 1267 1268 uint32_t physicalSlotId; 1269 /** 1270 * An Answer To Reset (ATR) is a message output by a Smart Card conforming to ISO/IEC 7816 1271 * standards, following electrical reset of the card's chip. The ATR conveys information about 1272 * the communication parameters proposed by the card, and the card's nature and state. 1273 * 1274 * This data is applicable only when cardState is CardState:PRESENT. 1275 */ 1276 char *atr; 1277 /** 1278 * Integrated Circuit Card IDentifier (ICCID) is Unique Identifier of the SIM CARD. File is 1279 * located in the SIM card at EFiccid (0x2FE2) as per ETSI 102.221. The ICCID is defined by 1280 * the ITU-T recommendation E.118 ISO/IEC 7816. 1281 * 1282 * This data is applicable only when cardState is CardState:PRESENT. 1283 */ 1284 char *iccid; 1285 } RIL_CardStatus_v1_2; 1286 1287 typedef struct { 1288 RIL_CardStatus_v1_2 base; 1289 char * eid; /* The EID is the eUICC identifier. The EID shall be stored within the ECASD and can be 1290 * retrieved by the Device at any time using the standard GlobalPlatform GET DATA command. 1291 * 1292 * This data is mandatory and applicable only when cardState is CardState:PRESENT and SIM card 1293 * supports eUICC. */ 1294 } RIL_CardStatus_v1_4; 1295 1296 typedef enum { 1297 RIL_PERSOSUBSTATE_UNKNOWN_1_5 = 0, /* initial state */ 1298 RIL_PERSOSUBSTATE_IN_PROGRESS_1_5 = 1, /* in between each lock transition */ 1299 RIL_PERSOSUBSTATE_READY_1_5 = 2, /* when either SIM or RUIM Perso is finished 1300 since each app can only have 1 active perso 1301 involved */ 1302 RIL_PERSOSUBSTATE_SIM_NETWORK_1_5 = 3, 1303 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_1_5 = 4, 1304 RIL_PERSOSUBSTATE_SIM_CORPORATE_1_5 = 5, 1305 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_1_5 = 6, 1306 RIL_PERSOSUBSTATE_SIM_SIM_1_5 = 7, 1307 RIL_PERSOSUBSTATE_SIM_NETWORK_PUK_1_5 = 8, /* The corresponding perso lock is blocked */ 1308 RIL_PERSOSUBSTATE_SIM_NETWORK_SUBSET_PUK_1_5 = 9, 1309 RIL_PERSOSUBSTATE_SIM_CORPORATE_PUK_1_5 = 10, 1310 RIL_PERSOSUBSTATE_SIM_SERVICE_PROVIDER_PUK_1_5 = 11, 1311 RIL_PERSOSUBSTATE_SIM_SIM_PUK_1_5 = 12, 1312 RIL_PERSOSUBSTATE_RUIM_NETWORK1_1_5 = 13, 1313 RIL_PERSOSUBSTATE_RUIM_NETWORK2_1_5 = 14, 1314 RIL_PERSOSUBSTATE_RUIM_HRPD_1_5 = 15, 1315 RIL_PERSOSUBSTATE_RUIM_CORPORATE_1_5 = 16, 1316 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_1_5 = 17, 1317 RIL_PERSOSUBSTATE_RUIM_RUIM_1_5 = 18, 1318 RIL_PERSOSUBSTATE_RUIM_NETWORK1_PUK_1_5 = 19, /* The corresponding perso lock is blocked */ 1319 RIL_PERSOSUBSTATE_RUIM_NETWORK2_PUK_1_5 = 20, 1320 RIL_PERSOSUBSTATE_RUIM_HRPD_PUK_1_5 = 21, 1321 RIL_PERSOSUBSTATE_RUIM_CORPORATE_PUK_1_5 = 22, 1322 RIL_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK_1_5 = 23, 1323 RIL_PERSOSUBSTATE_RUIM_RUIM_PUK_1_5 = 24, 1324 /** 1325 * The device is personalized using the content of the Service Provider Name (SPN) in the SIM 1326 * card. 1327 */ 1328 RIL_PERSOSUBSTATE_SIM_SPN, 1329 RIL_PERSOSUBSTATE_SIM_SPN_PUK, 1330 /** 1331 * Service Provider and Equivalent Home PLMN 1332 * The device is personalized using both the content of the GID1 (equivalent to service provider 1333 * personalization) and the content of the Equivalent Home PLMN (EHPLMN) in the SIM card. 1334 * If the GID1 in the SIM is absent, then just the content of the Equivalent Home PLMN 1335 * is matched. 1336 */ 1337 RIL_PERSOSUBSTATE_SIM_SP_EHPLMN, 1338 RIL_PERSOSUBSTATE_SIM_SP_EHPLMN_PUK, 1339 /** 1340 * Device is personalized using the first digits of the ICCID of the SIM card. 1341 */ 1342 RIL_PERSOSUBSTATE_SIM_ICCID, 1343 RIL_PERSOSUBSTATE_SIM_ICCID_PUK, 1344 /** 1345 * Device is personalized using the content of the IMPI in the ISIM. 1346 */ 1347 RIL_PERSOSUBSTATE_SIM_IMPI, 1348 RIL_PERSOSUBSTATE_SIM_IMPI_PUK, 1349 /** 1350 * Network Subset and Service Provider 1351 * Device is personalized using both the content of GID1 (equivalent to service provider 1352 * personalization) and the first digits of the IMSI (equivalent to network subset 1353 * personalization). 1354 */ 1355 RIL_PERSOSUBSTATE_SIM_NS_SP, 1356 RIL_PERSOSUBSTATE_SIM_NS_SP_PUK, 1357 } RIL_PersoSubstateV1_5; 1358 1359 typedef struct { 1360 RIL_AppStatus base; 1361 RIL_PersoSubstateV1_5 persoSubstate; 1362 } RIL_AppStatusV1_5; 1363 1364 typedef struct { 1365 RIL_CardStatus_v1_4 base; 1366 1367 /** size <= RadioConst::CARD_MAX_APPS */ 1368 RIL_AppStatusV1_5 applications[RIL_CARD_MAX_APPS]; 1369 } RIL_CardStatus_v1_5; // 1.5 1370 1371 /** The result of a SIM refresh, returned in data[0] of RIL_UNSOL_SIM_REFRESH 1372 * or as part of RIL_SimRefreshResponse_v7 1373 */ 1374 typedef enum { 1375 /* A file on SIM has been updated. data[1] contains the EFID. */ 1376 SIM_FILE_UPDATE = 0, 1377 /* SIM initialized. All files should be re-read. */ 1378 SIM_INIT = 1, 1379 /* SIM reset. SIM power required, SIM may be locked and all files should be re-read. */ 1380 SIM_RESET = 2 1381 } RIL_SimRefreshResult; 1382 1383 typedef struct { 1384 RIL_SimRefreshResult result; 1385 int ef_id; /* is the EFID of the updated file if the result is */ 1386 /* SIM_FILE_UPDATE or 0 for any other result. */ 1387 char * aid; /* is AID(application ID) of the card application */ 1388 /* See ETSI 102.221 8.1 and 101.220 4 */ 1389 /* For SIM_FILE_UPDATE result it can be set to AID of */ 1390 /* application in which updated EF resides or it can be */ 1391 /* NULL if EF is outside of an application. */ 1392 /* For SIM_INIT result this field is set to AID of */ 1393 /* application that caused REFRESH */ 1394 /* For SIM_RESET result it is NULL. */ 1395 } RIL_SimRefreshResponse_v7; 1396 1397 /* Deprecated, use RIL_CDMA_CallWaiting_v6 */ 1398 typedef struct { 1399 char * number; /* Remote party number */ 1400 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 1401 char * name; /* Remote party name */ 1402 RIL_CDMA_SignalInfoRecord signalInfoRecord; 1403 } RIL_CDMA_CallWaiting_v5; 1404 1405 typedef struct { 1406 char * number; /* Remote party number */ 1407 int numberPresentation; /* 0=Allowed, 1=Restricted, 2=Not Specified/Unknown */ 1408 char * name; /* Remote party name */ 1409 RIL_CDMA_SignalInfoRecord signalInfoRecord; 1410 /* Number type/Number plan required to support International Call Waiting */ 1411 int number_type; /* 0=Unknown, 1=International, 2=National, 1412 3=Network specific, 4=subscriber */ 1413 int number_plan; /* 0=Unknown, 1=ISDN, 3=Data, 4=Telex, 8=Nat'l, 9=Private */ 1414 } RIL_CDMA_CallWaiting_v6; 1415 1416 /** 1417 * Which types of Cell Broadcast Message (CBM) are to be received by the ME 1418 * 1419 * uFromServiceID - uToServiceID defines a range of CBM message identifiers 1420 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS 1421 * and 9.4.4.2.2 for UMTS. All other values can be treated as empty 1422 * CBM message ID. 1423 * 1424 * uFromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes 1425 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS 1426 * and 9.4.4.2.3 for UMTS. 1427 * All other values can be treated as empty CBM data coding scheme. 1428 * 1429 * selected 0 means message types specified in <fromServiceId, toServiceId> 1430 * and <fromCodeScheme, toCodeScheme>are not accepted, while 1 means accepted. 1431 * 1432 * Used by RIL_REQUEST_GSM_GET_BROADCAST_CONFIG and 1433 * RIL_REQUEST_GSM_SET_BROADCAST_CONFIG. 1434 */ 1435 typedef struct { 1436 int fromServiceId; 1437 int toServiceId; 1438 int fromCodeScheme; 1439 int toCodeScheme; 1440 unsigned char selected; 1441 } RIL_GSM_BroadcastSmsConfigInfo; 1442 1443 /* No restriction at all including voice/SMS/USSD/SS/AV64 and packet data. */ 1444 #define RIL_RESTRICTED_STATE_NONE 0x00 1445 /* Block emergency call due to restriction. But allow all normal voice/SMS/USSD/SS/AV64. */ 1446 #define RIL_RESTRICTED_STATE_CS_EMERGENCY 0x01 1447 /* Block all normal voice/SMS/USSD/SS/AV64 due to restriction. Only Emergency call allowed. */ 1448 #define RIL_RESTRICTED_STATE_CS_NORMAL 0x02 1449 /* Block all voice/SMS/USSD/SS/AV64 including emergency call due to restriction.*/ 1450 #define RIL_RESTRICTED_STATE_CS_ALL 0x04 1451 /* Block packet data access due to restriction. */ 1452 #define RIL_RESTRICTED_STATE_PS_ALL 0x10 1453 1454 /* The status for an OTASP/OTAPA session */ 1455 typedef enum { 1456 CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, 1457 CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, 1458 CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, 1459 CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, 1460 CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, 1461 CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, 1462 CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, 1463 CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, 1464 CDMA_OTA_PROVISION_STATUS_COMMITTED, 1465 CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, 1466 CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, 1467 CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED 1468 } RIL_CDMA_OTA_ProvisionStatus; 1469 1470 typedef struct { 1471 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1472 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 1473 } RIL_GW_SignalStrength; 1474 1475 typedef struct { 1476 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1477 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 1478 int timingAdvance; /* Timing Advance in bit periods. 1 bit period = 48/13 us. 1479 * INT_MAX denotes invalid value */ 1480 } RIL_GSM_SignalStrength_v12; 1481 1482 typedef struct { 1483 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1484 int bitErrorRate; /* bit error rate (0-7, 99) as defined in TS 27.007 8.5 */ 1485 } RIL_SignalStrengthWcdma; 1486 1487 typedef struct { 1488 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 1489 * multiplied by -1. Example: If the actual RSSI is -75, then this response 1490 * value will be 75. 1491 */ 1492 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 1493 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 1494 * will be 125. 1495 */ 1496 } RIL_CDMA_SignalStrength; 1497 1498 typedef struct { 1499 int dbm; /* Valid values are positive integers. This value is the actual RSSI value 1500 * multiplied by -1. Example: If the actual RSSI is -75, then this response 1501 * value will be 75. 1502 */ 1503 int ecio; /* Valid values are positive integers. This value is the actual Ec/Io multiplied 1504 * by -10. Example: If the actual Ec/Io is -12.5 dB, then this response value 1505 * will be 125. 1506 */ 1507 int signalNoiseRatio; /* Valid values are 0-8. 8 is the highest signal to noise ratio. */ 1508 } RIL_EVDO_SignalStrength; 1509 1510 typedef struct { 1511 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1512 int rsrp; /* The current Reference Signal Receive Power in dBm multiplied by -1. 1513 * Range: 44 to 140 dBm 1514 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1515 * Reference: 3GPP TS 36.133 9.1.4 */ 1516 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 1517 * Range: 20 to 3 dB. 1518 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1519 * Reference: 3GPP TS 36.133 9.1.7 */ 1520 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 1521 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 1522 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1523 * Reference: 3GPP TS 36.101 8.1.1 */ 1524 int cqi; /* The current Channel Quality Indicator. 1525 * Range: 0 to 15. 1526 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1527 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 1528 } RIL_LTE_SignalStrength; 1529 1530 typedef struct { 1531 int signalStrength; /* Valid values are (0-31, 99) as defined in TS 27.007 8.5 */ 1532 int rsrp; /* The current Reference Signal Receive Power in dBm multiplied by -1. 1533 * Range: 44 to 140 dBm 1534 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1535 * Reference: 3GPP TS 36.133 9.1.4 */ 1536 int rsrq; /* The current Reference Signal Receive Quality in dB multiplied by -1. 1537 * Range: 20 to 3 dB. 1538 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1539 * Reference: 3GPP TS 36.133 9.1.7 */ 1540 int rssnr; /* The current reference signal signal-to-noise ratio in 0.1 dB units. 1541 * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 1542 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1543 * Reference: 3GPP TS 36.101 8.1.1 */ 1544 int cqi; /* The current Channel Quality Indicator. 1545 * Range: 0 to 15. 1546 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1547 * Reference: 3GPP TS 36.101 9.2, 9.3, A.4 */ 1548 int timingAdvance; /* timing advance in micro seconds for a one way trip from cell to device. 1549 * Approximate distance can be calculated using 300m/us * timingAdvance. 1550 * Range: 0 to 0x7FFFFFFE 1551 * INT_MAX : 0x7FFFFFFF denotes invalid value. 1552 * Reference: 3GPP 36.321 section 6.1.3.5 1553 * also: http://www.cellular-planningoptimization.com/2010/02/timing-advance-with-calculation.html */ 1554 } RIL_LTE_SignalStrength_v8; 1555 1556 typedef struct { 1557 int rscp; /* The Received Signal Code Power in dBm multiplied by -1. 1558 * Range : 25 to 120 1559 * INT_MAX: 0x7FFFFFFF denotes invalid value. 1560 * Reference: 3GPP TS 25.123, section 9.1.1.1 */ 1561 } RIL_TD_SCDMA_SignalStrength; 1562 1563 typedef struct { 1564 int32_t ssRsrp; /* SS reference signal received power, multiplied by -1. 1565 * Reference: 3GPP TS 38.215. 1566 * Range [44, 140], INT_MAX means invalid/unreported. */ 1567 int32_t ssRsrq; /* SS reference signal received quality, multiplied by -1. 1568 * Reference: 3GPP TS 38.215. 1569 * Range [3, 20], INT_MAX means invalid/unreported. */ 1570 int32_t ssSinr; /* SS signal-to-noise and interference ratio. 1571 * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1. 1572 * Range [-23, 40], INT_MAX means invalid/unreported. */ 1573 int32_t csiRsrp; /* CSI reference signal received power, multiplied by -1. 1574 * Reference: 3GPP TS 38.215. 1575 * Range [44, 140], INT_MAX means invalid/unreported. */ 1576 int32_t csiRsrq; /* CSI reference signal received quality, multiplied by -1. 1577 * Reference: 3GPP TS 38.215. 1578 * Range [3, 20], INT_MAX means invalid/unreported. */ 1579 int32_t csiSinr; /* CSI signal-to-noise and interference ratio. 1580 * Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1. 1581 * Range [-23, 40], INT_MAX means invalid/unreported. */ 1582 } RIL_NR_SignalStrength; 1583 1584 /* Deprecated, use RIL_SignalStrength_v6 */ 1585 typedef struct { 1586 RIL_GW_SignalStrength GW_SignalStrength; 1587 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1588 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1589 } RIL_SignalStrength_v5; 1590 1591 typedef struct { 1592 RIL_GW_SignalStrength GW_SignalStrength; 1593 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1594 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1595 RIL_LTE_SignalStrength LTE_SignalStrength; 1596 } RIL_SignalStrength_v6; 1597 1598 typedef struct { 1599 RIL_GW_SignalStrength GW_SignalStrength; 1600 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1601 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1602 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 1603 } RIL_SignalStrength_v8; 1604 1605 typedef struct { 1606 RIL_GW_SignalStrength GW_SignalStrength; 1607 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1608 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1609 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 1610 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength; 1611 } RIL_SignalStrength_v10; 1612 1613 typedef struct { 1614 RIL_GW_SignalStrength GW_SignalStrength; 1615 RIL_CDMA_SignalStrength CDMA_SignalStrength; 1616 RIL_EVDO_SignalStrength EVDO_SignalStrength; 1617 RIL_LTE_SignalStrength_v8 LTE_SignalStrength; 1618 RIL_TD_SCDMA_SignalStrength TD_SCDMA_SignalStrength; 1619 RIL_SignalStrengthWcdma WCDMA_SignalStrength; 1620 RIL_NR_SignalStrength NR_SignalStrength; 1621 } RIL_SignalStrength_v12; 1622 1623 /** 1624 * Defining signal strength type. 1625 */ 1626 typedef enum { 1627 /** 1628 * Received Signal Strength Indication. 1629 * Range: -113 dBm and -51 dBm 1630 * Used RAN: GERAN, CDMA2000 1631 * Reference: 3GPP TS 27.007 section 8.5. 1632 */ 1633 RSSI = 1, 1634 /** 1635 * Received Signal Code Power. 1636 * Range: -120 dBm to -25 dBm; 1637 * Used RAN: UTRAN 1638 * Reference: 3GPP TS 25.123, section 9.1.1.1 1639 */ 1640 RSCP = 2, 1641 /** 1642 * Reference Signal Received Power. 1643 * Range: -140 dBm to -44 dBm; 1644 * Used RAN: EUTRAN 1645 * Reference: 3GPP TS 36.133 9.1.4 1646 */ 1647 RSRP = 3, 1648 /** 1649 * Reference Signal Received Quality 1650 * Range: -34 dB to 3 dB; 1651 * Used RAN: EUTRAN 1652 * Reference: 3GPP TS 36.133 v12.6.0 section 9.1.7 1653 */ 1654 RSRQ = 4, 1655 /** 1656 * Reference Signal Signal to Noise Ratio 1657 * Range: -20 dB to 30 dB; 1658 * Used RAN: EUTRAN 1659 * Note: this field is optional; how to support it can be decided by the 1660 * corresponding vendor. Though the response code is not enforced, 1661 * vendor's implementation must ensure this interface not crashing. 1662 */ 1663 RSSNR = 5, 1664 /** 1665 * 5G SS reference signal received power. 1666 * Range: -140 dBm to -44 dBm. 1667 * Used RAN: NGRAN 1668 * Reference: 3GPP TS 38.215. 1669 */ 1670 SSRSRP = 6, 1671 /** 1672 * 5G SS reference signal received quality. 1673 * Range: -20 dB to -3 dB. 1674 * Used RAN: NGRAN 1675 * Reference: 3GPP TS 38.215. 1676 */ 1677 SSRSRQ = 7, 1678 /** 1679 * 5G SS signal-to-noise and interference ratio. 1680 * Range: -23 dB to 40 dB 1681 * Used RAN: NGRAN 1682 * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1. 1683 */ 1684 SSSINR = 8, 1685 } SignalMeasurementType; 1686 1687 typedef enum { 1688 RADIO_ACCESS_UNKNOWN = 0, /* Unknown access network */ 1689 RADIO_ACCESS_NET_GERAN = 1, /* GSM EDGE Radio Access Network */ 1690 RADIO_ACCESS_NET_UTRAN = 2, /* Universal Terrestrial Radio Access Network */ 1691 RADIO_ACCESS_NET_EUTRAN = 3, /* Evolved Universal Terrestrial Radio Access Network */ 1692 RADIO_ACCESS_NET_CDMA2000 = 4, /* CDMA 2000 network */ 1693 RADIO_ACCESS_NET_IWLAN = 5, /* Interworking Wireless LAN */ 1694 RADIO_ACCESS_NET_NGRAN = 6, /* Next-Generation Radio Access Network */ 1695 /* the following definitions are extended in radio/1.4 */ 1696 } RIL_RadioAccessNetworks_v1_5; 1697 1698 typedef struct { 1699 int32_t hysteresisMs; 1700 int32_t hysteresisDb; 1701 int32_t thresholdsDbmNumber; 1702 int32_t *thresholdsDbm; 1703 bool isEnabled; 1704 SignalMeasurementType signalMeasurement; 1705 RIL_RadioAccessNetworks_v1_5 accessNetwork; 1706 } RIL_SignalStrengthReportingCriteria_v1_5; 1707 1708 typedef struct { 1709 int32_t hysteresisMs; 1710 int32_t hysteresisDlKbps; 1711 int32_t hysteresisUlKbps; 1712 int32_t thresholdsDownlinkKbpsLength; 1713 int32_t *thresholdsDownlinkKbps; 1714 int32_t thresholdsUplinkKbpsLength; 1715 int32_t *thresholdsUplinkKbps; 1716 RIL_RadioAccessNetworks_v1_5 accessNetwork; 1717 } RIL_LinkCapacityReportingCriteria; 1718 1719 typedef struct { 1720 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1721 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1722 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1723 INT_MAX if unknown */ 1724 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1725 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 1726 } RIL_CellIdentityGsm; 1727 1728 typedef struct { 1729 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1730 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1731 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1732 INT_MAX if unknown */ 1733 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1734 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 1735 int arfcn; /* 16-bit GSM Absolute RF channel number; this value must be reported */ 1736 uint8_t bsic; /* 6-bit Base Station Identity Code; 0xFF if unknown */ 1737 } RIL_CellIdentityGsm_v12; 1738 1739 typedef struct { 1740 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1741 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1742 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1743 INT_MAX if unknown */ 1744 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1745 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1746 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ 1747 } RIL_CellIdentityWcdma; 1748 1749 typedef struct { 1750 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1751 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1752 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1753 INT_MAX if unknown */ 1754 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1755 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1756 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511; this value must be reported */ 1757 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number; this value must be reported */ 1758 } RIL_CellIdentityWcdma_v12; 1759 1760 typedef struct { 1761 int networkId; /* Network Id 0..65535, INT_MAX if unknown */ 1762 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ 1763 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ 1764 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 1765 * It is represented in units of 0.25 seconds and ranges from -2592000 1766 * to 2592000, both values inclusive (corresponding to a range of -180 1767 * to +180 degrees). INT_MAX if unknown */ 1768 1769 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 1770 * It is represented in units of 0.25 seconds and ranges from -1296000 1771 * to 1296000, both values inclusive (corresponding to a range of -90 1772 * to +90 degrees). INT_MAX if unknown */ 1773 } RIL_CellIdentityCdma; 1774 1775 typedef struct { 1776 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1777 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1778 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1779 INT_MAX if unknown */ 1780 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 1781 int pci; /* physical cell id 0..503, INT_MAX if unknown */ 1782 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 1783 } RIL_CellIdentityLte; 1784 1785 typedef struct { 1786 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1787 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1788 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1789 INT_MAX if unknown */ 1790 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 1791 int pci; /* physical cell id 0..503; this value must be reported */ 1792 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 1793 int earfcn; /* 18-bit LTE Absolute RF Channel Number; this value must be reported */ 1794 } RIL_CellIdentityLte_v12; 1795 1796 typedef struct { 1797 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1798 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999; 1799 the most significant nibble encodes the number of digits - {2, 3, 0 (unset)}; 1800 INT_MAX if unknown */ 1801 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1802 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1803 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ 1804 } RIL_CellIdentityTdscdma; 1805 1806 typedef struct { 1807 char alphaLong[32]; /* Long alpha Operator Name String or Enhanced Operator Name String.*/ 1808 char alphaShort[32]; /* Short alpha Operator Name String or Enhanced Operator Name String */ 1809 } RIL_CellIdentityOperatorNames; 1810 1811 typedef struct { 1812 int mcc; /* 3-digit Mobile Country Code, in range[0, 999]; This value must 1813 * be valid for registered or camped cells; INT_MAX means invalid/unreported. */ 1814 int mnc; /* 2 or 3-digit Mobile Network Code, in range [0, 999], This value must be valid for 1815 * registered or camped cells; INT_MAX means invalid/unreported. */ 1816 uint64_t nci; /* NR Cell Identity in range [0, 68719476735] (36 bits) described in 3GPP TS 38.331, which 1817 * unambiguously identifies a cell within a PLMN. This value must be valid for registered or 1818 * camped cells; LONG_MAX (2^63-1) means invalid/unreported.*/ 1819 uint32_t pci; /* Physical cell id in range [0, 1007] described in 3GPP TS 38.331. This value must be valid. */ 1820 int32_t tac; /* 16-bit tracking area code, INT_MAX means invalid/unreported. */ 1821 int32_t nrarfcn; /* NR Absolute Radio Frequency Channel Number, in range [0, 3279165]. 1822 * Reference: 3GPP TS 38.101-1 and 3GPP TS 38.101-2 section 5.4.2.1. 1823 * This value must be valid. */ 1824 1825 RIL_CellIdentityOperatorNames operatorNames; 1826 } RIL_CellIdentityNr; 1827 1828 typedef struct { 1829 RIL_CellIdentityGsm cellIdentityGsm; 1830 RIL_GW_SignalStrength signalStrengthGsm; 1831 } RIL_CellInfoGsm; 1832 1833 typedef struct { 1834 RIL_CellIdentityGsm_v12 cellIdentityGsm; 1835 RIL_GSM_SignalStrength_v12 signalStrengthGsm; 1836 } RIL_CellInfoGsm_v12; 1837 1838 typedef struct { 1839 RIL_CellIdentityWcdma cellIdentityWcdma; 1840 RIL_SignalStrengthWcdma signalStrengthWcdma; 1841 } RIL_CellInfoWcdma; 1842 1843 typedef struct { 1844 RIL_CellIdentityWcdma_v12 cellIdentityWcdma; 1845 RIL_SignalStrengthWcdma signalStrengthWcdma; 1846 } RIL_CellInfoWcdma_v12; 1847 1848 typedef struct { 1849 RIL_CellIdentityCdma cellIdentityCdma; 1850 RIL_CDMA_SignalStrength signalStrengthCdma; 1851 RIL_EVDO_SignalStrength signalStrengthEvdo; 1852 } RIL_CellInfoCdma; 1853 1854 typedef struct { 1855 RIL_CellIdentityLte cellIdentityLte; 1856 RIL_LTE_SignalStrength_v8 signalStrengthLte; 1857 } RIL_CellInfoLte; 1858 1859 typedef struct { 1860 RIL_CellIdentityLte_v12 cellIdentityLte; 1861 RIL_LTE_SignalStrength_v8 signalStrengthLte; 1862 } RIL_CellInfoLte_v12; 1863 1864 typedef struct { 1865 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1866 RIL_TD_SCDMA_SignalStrength signalStrengthTdscdma; 1867 } RIL_CellInfoTdscdma; 1868 1869 typedef struct { 1870 RIL_CellIdentityNr cellidentity; 1871 RIL_NR_SignalStrength signalStrength; 1872 } RIL_CellInfoNr; 1873 1874 // Must be the same as CellInfo.TYPE_XXX 1875 typedef enum { 1876 RIL_CELL_INFO_TYPE_NONE = 0, /* indicates no cell information */ 1877 RIL_CELL_INFO_TYPE_GSM = 1, 1878 RIL_CELL_INFO_TYPE_CDMA = 2, 1879 RIL_CELL_INFO_TYPE_LTE = 3, 1880 RIL_CELL_INFO_TYPE_WCDMA = 4, 1881 RIL_CELL_INFO_TYPE_TD_SCDMA = 5, 1882 RIL_CELL_INFO_TYPE_NR = 6 1883 } RIL_CellInfoType; 1884 1885 // Must be the same as CellInfo.TIMESTAMP_TYPE_XXX 1886 typedef enum { 1887 RIL_TIMESTAMP_TYPE_UNKNOWN = 0, 1888 RIL_TIMESTAMP_TYPE_ANTENNA = 1, 1889 RIL_TIMESTAMP_TYPE_MODEM = 2, 1890 RIL_TIMESTAMP_TYPE_OEM_RIL = 3, 1891 RIL_TIMESTAMP_TYPE_JAVA_RIL = 4, 1892 } RIL_TimeStampType; 1893 1894 typedef enum { 1895 CELL_CONNECTION_NONE = 0, // Cell is not a serving cell. 1896 CELL_CONNECTION_PRIMARY_SERVING, // UE has connection to cell for signalling and 1897 // possibly data (3GPP 36.331, 25.331). 1898 CELL_CONNECTION_SECONDARY_SERVING, // UE has connection to cell for data (3GPP 36.331, 25.331). 1899 } RIL_CellConnectionStatus; 1900 1901 typedef struct { 1902 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1903 int registered; /* !0 if this cell is registered 0 if not registered */ 1904 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ 1905 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ 1906 union { 1907 RIL_CellInfoGsm gsm; 1908 RIL_CellInfoCdma cdma; 1909 RIL_CellInfoLte lte; 1910 RIL_CellInfoWcdma wcdma; 1911 RIL_CellInfoTdscdma tdscdma; 1912 } CellInfo; 1913 } RIL_CellInfo; 1914 1915 typedef struct { 1916 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1917 int registered; /* !0 if this cell is registered 0 if not registered */ 1918 RIL_TimeStampType timeStampType; /* type of time stamp represented by timeStamp */ 1919 uint64_t timeStamp; /* Time in nanos as returned by ril_nano_time */ 1920 union { 1921 RIL_CellInfoGsm_v12 gsm; 1922 RIL_CellInfoCdma cdma; 1923 RIL_CellInfoLte_v12 lte; 1924 RIL_CellInfoWcdma_v12 wcdma; 1925 RIL_CellInfoTdscdma tdscdma; 1926 } CellInfo; 1927 } RIL_CellInfo_v12; 1928 1929 typedef struct { 1930 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1931 int registered; /* !0 if this cell is registered 0 if not registered */ 1932 RIL_CellConnectionStatus connectionStatus; /* Connection status for the cell. */ 1933 union { 1934 RIL_CellInfoGsm_v12 gsm; 1935 RIL_CellInfoCdma cdma; 1936 RIL_CellInfoLte_v12 lte; 1937 RIL_CellInfoWcdma_v12 wcdma; 1938 RIL_CellInfoTdscdma tdscdma; 1939 RIL_CellInfoNr nr; 1940 } CellInfo; 1941 } RIL_CellInfo_v16; 1942 1943 typedef struct { 1944 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1945 union { 1946 RIL_CellIdentityGsm_v12 cellIdentityGsm; 1947 RIL_CellIdentityWcdma_v12 cellIdentityWcdma; 1948 RIL_CellIdentityLte_v12 cellIdentityLte; 1949 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1950 RIL_CellIdentityCdma cellIdentityCdma; 1951 }; 1952 }RIL_CellIdentity_v16; 1953 1954 typedef struct { 1955 RIL_CellInfoType cellInfoType; /* cell type for selecting from union CellInfo */ 1956 union { 1957 RIL_CellIdentityGsm_v12 cellIdentityGsm; 1958 RIL_CellIdentityWcdma_v12 cellIdentityWcdma; 1959 RIL_CellIdentityLte_v12 cellIdentityLte; 1960 RIL_CellIdentityTdscdma cellIdentityTdscdma; 1961 RIL_CellIdentityCdma cellIdentityCdma; 1962 RIL_CellIdentityNr cellIdentityNr; 1963 }; 1964 } RIL_CellIdentity_v20; 1965 1966 typedef struct { 1967 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1968 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1969 int mnc_digit;/*2 or 3-digit*/ 1970 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1971 int cid; /* 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown */ 1972 int arfcn; /* 16-bit GSM Absolute RF channel number, INT_MAX if unknown */ 1973 uint8_t bsic;/* 6-bit Base Station Identity Code, 0xFF if unknown */ 1974 1975 RIL_CellIdentityOperatorNames operatorNames; 1976 } RIL_CellIdentityGsm_v1_2; 1977 1978 typedef struct { 1979 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1980 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1981 int mnc_digit;/*2 or 3-digit*/ 1982 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 1983 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 1984 int psc; /* 9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, INT_MAX if unknown */ 1985 int uarfcn; /* 16-bit UMTS Absolute RF Channel Number, INT_MAX if unknown */ 1986 1987 RIL_CellIdentityOperatorNames operatorNames; 1988 } RIL_CellIdentityWcdma_v1_2; 1989 1990 typedef struct { 1991 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 1992 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 1993 int mnc_digit;/*2 or 3-digit*/ 1994 int ci; /* 28-bit Cell Identity described in TS ???, INT_MAX if unknown */ 1995 int pci; /* physical cell id 0..503; this value must be reported */ 1996 int tac; /* 16-bit tracking area code, INT_MAX if unknown */ 1997 int earfcn; /* 18-bit LTE Absolute RF Channel Number; this value must be reported */ 1998 1999 RIL_CellIdentityOperatorNames operatorNames; 2000 int32_t bandwidth; /* Cell bandwidth, in kHz. */ 2001 } RIL_CellIdentityLte_v1_2; 2002 2003 typedef struct { 2004 int mcc; /* 3-digit Mobile Country Code, 0..999, INT_MAX if unknown */ 2005 int mnc; /* 2 or 3-digit Mobile Network Code, 0..999, INT_MAX if unknown */ 2006 int mnc_digit;/*2 or 3-digit*/ 2007 int lac; /* 16-bit Location Area Code, 0..65535, INT_MAX if unknown */ 2008 int cid; /* 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown */ 2009 int cpid; /* 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown */ 2010 2011 int32_t uarfcn; /* 16-bit UMTS Absolute RF Channel Number defined in TS 25.102 5.4.4; this value must be valid. */ 2012 RIL_CellIdentityOperatorNames operatorNames; 2013 } RIL_CellIdentityTdscdma_v1_2; 2014 2015 typedef struct { 2016 int networkId; /* Network Id 0..65535, INT_MAX if unknown */ 2017 int systemId; /* CDMA System Id 0..32767, INT_MAX if unknown */ 2018 int basestationId; /* Base Station Id 0..65535, INT_MAX if unknown */ 2019 int longitude; /* Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 2020 * It is represented in units of 0.25 seconds and ranges from -2592000 2021 * to 2592000, both values inclusive (corresponding to a range of -180 2022 * to +180 degrees). INT_MAX if unknown */ 2023 2024 int latitude; /* Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. 2025 * It is represented in units of 0.25 seconds and ranges from -1296000 2026 * to 1296000, both values inclusive (corresponding to a range of -90 2027 * to +90 degrees). INT_MAX if unknown */ 2028 2029 RIL_CellIdentityOperatorNames operatorNames; 2030 } RIL_CellIdentityCdma_v1_2; 2031 2032 typedef struct { 2033 /** 2034 * Cell type for selecting from union CellInfo. 2035 * Only one of the below vectors must be of size 1 based on a 2036 * valid CellInfoType and others must be of size 0. 2037 * If cell info type is NONE, then all the vectors must be of size 0. 2038 */ 2039 RIL_CellInfoType cellInfoType; 2040 union { 2041 RIL_CellIdentityGsm_v1_2 cellIdentityGsm; 2042 RIL_CellIdentityWcdma_v1_2 cellIdentityWcdma; 2043 RIL_CellIdentityLte_v1_2 cellIdentityLte; 2044 RIL_CellIdentityTdscdma_v1_2 cellIdentityTdscdma; 2045 RIL_CellIdentityCdma_v1_2 cellIdentityCdma; 2046 }; 2047 } RIL_CellIdentity_v1_2; 2048 2049 typedef struct { 2050 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING, 2051 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED, 2052 // UNKNOWN, REG_ROAMING defined in RegState 2053 RIL_RadioTechnology rat; // indicates the available voice radio technology, 2054 // valid values as defined by RadioTechnology. 2055 int32_t cssSupported; // concurrent services support indicator. if 2056 // registered on a CDMA system. 2057 // 0 - Concurrent services not supported, 2058 // 1 - Concurrent services supported 2059 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered 2060 // on a CDMA or EVDO system or -1 if not. 2061 // Valid values are 0-255. 2062 int32_t systemIsInPrl; // indicates whether the current system is in the 2063 // PRL if registered on a CDMA or EVDO system or -1 if 2064 // not. 0=not in the PRL, 1=in the PRL 2065 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL, 2066 // if registered on a CDMA or EVDO system or -1 if not. 2067 // Valid values are 0-255. 2068 int32_t reasonForDenial; // reasonForDenial if registration state is 3 2069 // (Registration denied) this is an enumerated reason why 2070 // registration was denied. See 3GPP TS 24.008, 2071 // 10.5.3.6 and Annex G. 2072 // 0 - General 2073 // 1 - Authentication Failure 2074 // 2 - IMSI unknown in HLR 2075 // 3 - Illegal MS 2076 // 4 - Illegal ME 2077 // 5 - PLMN not allowed 2078 // 6 - Location area not allowed 2079 // 7 - Roaming not allowed 2080 // 8 - No Suitable Cells in this Location Area 2081 // 9 - Network failure 2082 // 10 - Persistent location update reject 2083 // 11 - PLMN not allowed 2084 // 12 - Location area not allowed 2085 // 13 - Roaming not allowed in this Location Area 2086 // 15 - No Suitable Cells in this Location Area 2087 // 17 - Network Failure 2088 // 20 - MAC Failure 2089 // 21 - Sync Failure 2090 // 22 - Congestion 2091 // 23 - GSM Authentication unacceptable 2092 // 25 - Not Authorized for this CSG 2093 // 32 - Service option not supported 2094 // 33 - Requested service option not subscribed 2095 // 34 - Service option temporarily out of order 2096 // 38 - Call cannot be identified 2097 // 48-63 - Retry upon entry into a new cell 2098 // 95 - Semantically incorrect message 2099 // 96 - Invalid mandatory information 2100 // 97 - Message type non-existent or not implemented 2101 // 98 - Message type not compatible with protocol state 2102 // 99 - Information element non-existent or 2103 // not implemented 2104 // 100 - Conditional IE error 2105 // 101 - Message not compatible with protocol state; 2106 RIL_CellIdentity_v16 cellIdentity; // current cell information 2107 }RIL_VoiceRegistrationStateResponse; 2108 2109 typedef struct { 2110 RIL_RegState regState; // Valid reg states are RIL_NOT_REG_AND_NOT_SEARCHING, 2111 // REG_HOME, RIL_NOT_REG_AND_SEARCHING, REG_DENIED, 2112 // UNKNOWN, REG_ROAMING defined in RegState 2113 RIL_RadioTechnology rat; // indicates the available data radio technology, 2114 // valid values as defined by RadioTechnology. 2115 int32_t reasonDataDenied; // if registration state is 3 (Registration 2116 // denied) this is an enumerated reason why 2117 // registration was denied. See 3GPP TS 24.008, 2118 // Annex G.6 "Additional cause codes for GMM". 2119 // 7 == GPRS services not allowed 2120 // 8 == GPRS services and non-GPRS services not allowed 2121 // 9 == MS identity cannot be derived by the network 2122 // 10 == Implicitly detached 2123 // 14 == GPRS services not allowed in this PLMN 2124 // 16 == MSC temporarily not reachable 2125 // 40 == No PDP context activated 2126 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that 2127 // must be established using setupDataCall(). 2128 RIL_CellIdentity_v16 cellIdentity; // Current cell information 2129 }RIL_DataRegistrationStateResponse; 2130 2131 /* Names of the CDMA info records (C.S0005 section 3.7.5) */ 2132 typedef enum { 2133 RIL_CDMA_DISPLAY_INFO_REC, 2134 RIL_CDMA_CALLED_PARTY_NUMBER_INFO_REC, 2135 RIL_CDMA_CALLING_PARTY_NUMBER_INFO_REC, 2136 RIL_CDMA_CONNECTED_NUMBER_INFO_REC, 2137 RIL_CDMA_SIGNAL_INFO_REC, 2138 RIL_CDMA_REDIRECTING_NUMBER_INFO_REC, 2139 RIL_CDMA_LINE_CONTROL_INFO_REC, 2140 RIL_CDMA_EXTENDED_DISPLAY_INFO_REC, 2141 RIL_CDMA_T53_CLIR_INFO_REC, 2142 RIL_CDMA_T53_RELEASE_INFO_REC, 2143 RIL_CDMA_T53_AUDIO_CONTROL_INFO_REC 2144 } RIL_CDMA_InfoRecName; 2145 2146 /* Display Info Rec as defined in C.S0005 section 3.7.5.1 2147 Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 2148 Note: the Extended Display info rec contains multiple records of the 2149 form: display_tag, display_len, and display_len occurrences of the 2150 chari field if the display_tag is not 10000000 or 10000001. 2151 To save space, the records are stored consecutively in a byte buffer. 2152 The display_tag, display_len and chari fields are all 1 byte. 2153 */ 2154 2155 typedef struct { 2156 char alpha_len; 2157 char alpha_buf[CDMA_ALPHA_INFO_BUFFER_LENGTH]; 2158 } RIL_CDMA_DisplayInfoRecord; 2159 2160 /* Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 2161 Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 2162 Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 2163 */ 2164 2165 typedef struct { 2166 char len; 2167 char buf[CDMA_NUMBER_INFO_BUFFER_LENGTH]; 2168 char number_type; 2169 char number_plan; 2170 char pi; 2171 char si; 2172 } RIL_CDMA_NumberInfoRecord; 2173 2174 /* Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ 2175 typedef enum { 2176 RIL_REDIRECTING_REASON_UNKNOWN = 0, 2177 RIL_REDIRECTING_REASON_CALL_FORWARDING_BUSY = 1, 2178 RIL_REDIRECTING_REASON_CALL_FORWARDING_NO_REPLY = 2, 2179 RIL_REDIRECTING_REASON_CALLED_DTE_OUT_OF_ORDER = 9, 2180 RIL_REDIRECTING_REASON_CALL_FORWARDING_BY_THE_CALLED_DTE = 10, 2181 RIL_REDIRECTING_REASON_CALL_FORWARDING_UNCONDITIONAL = 15, 2182 RIL_REDIRECTING_REASON_RESERVED 2183 } RIL_CDMA_RedirectingReason; 2184 2185 typedef struct { 2186 RIL_CDMA_NumberInfoRecord redirectingNumber; 2187 /* redirectingReason is set to RIL_REDIRECTING_REASON_UNKNOWN if not included */ 2188 RIL_CDMA_RedirectingReason redirectingReason; 2189 } RIL_CDMA_RedirectingNumberInfoRecord; 2190 2191 /* Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ 2192 typedef struct { 2193 char lineCtrlPolarityIncluded; 2194 char lineCtrlToggle; 2195 char lineCtrlReverse; 2196 char lineCtrlPowerDenial; 2197 } RIL_CDMA_LineControlInfoRecord; 2198 2199 /* T53 CLIR Information Record */ 2200 typedef struct { 2201 char cause; 2202 } RIL_CDMA_T53_CLIRInfoRecord; 2203 2204 /* T53 Audio Control Information Record */ 2205 typedef struct { 2206 char upLink; 2207 char downLink; 2208 } RIL_CDMA_T53_AudioControlInfoRecord; 2209 2210 typedef struct { 2211 2212 RIL_CDMA_InfoRecName name; 2213 2214 union { 2215 /* Display and Extended Display Info Rec */ 2216 RIL_CDMA_DisplayInfoRecord display; 2217 2218 /* Called Party Number, Calling Party Number, Connected Number Info Rec */ 2219 RIL_CDMA_NumberInfoRecord number; 2220 2221 /* Signal Info Rec */ 2222 RIL_CDMA_SignalInfoRecord signal; 2223 2224 /* Redirecting Number Info Rec */ 2225 RIL_CDMA_RedirectingNumberInfoRecord redir; 2226 2227 /* Line Control Info Rec */ 2228 RIL_CDMA_LineControlInfoRecord lineCtrl; 2229 2230 /* T53 CLIR Info Rec */ 2231 RIL_CDMA_T53_CLIRInfoRecord clir; 2232 2233 /* T53 Audio Control Info Rec */ 2234 RIL_CDMA_T53_AudioControlInfoRecord audioCtrl; 2235 } rec; 2236 } RIL_CDMA_InformationRecord; 2237 2238 #define RIL_CDMA_MAX_NUMBER_OF_INFO_RECS 10 2239 2240 typedef struct { 2241 char numberOfInfoRecs; 2242 RIL_CDMA_InformationRecord infoRec[RIL_CDMA_MAX_NUMBER_OF_INFO_RECS]; 2243 } RIL_CDMA_InformationRecords; 2244 2245 /* See RIL_REQUEST_NV_READ_ITEM */ 2246 typedef struct { 2247 RIL_NV_Item itemID; 2248 } RIL_NV_ReadItem; 2249 2250 /* See RIL_REQUEST_NV_WRITE_ITEM */ 2251 typedef struct { 2252 RIL_NV_Item itemID; 2253 char * value; 2254 } RIL_NV_WriteItem; 2255 2256 typedef enum { 2257 HANDOVER_STARTED = 0, 2258 HANDOVER_COMPLETED = 1, 2259 HANDOVER_FAILED = 2, 2260 HANDOVER_CANCELED = 3 2261 } RIL_SrvccState; 2262 2263 /* hardware configuration reported to RILJ. */ 2264 typedef enum { 2265 RIL_HARDWARE_CONFIG_MODEM = 0, 2266 RIL_HARDWARE_CONFIG_SIM = 1, 2267 } RIL_HardwareConfig_Type; 2268 2269 typedef enum { 2270 RIL_HARDWARE_CONFIG_STATE_ENABLED = 0, 2271 RIL_HARDWARE_CONFIG_STATE_STANDBY = 1, 2272 RIL_HARDWARE_CONFIG_STATE_DISABLED = 2, 2273 } RIL_HardwareConfig_State; 2274 2275 typedef struct { 2276 int rilModel; 2277 uint32_t rat; /* bitset - ref. RIL_RadioTechnology. */ 2278 int maxVoice; 2279 int maxData; 2280 int maxStandby; 2281 } RIL_HardwareConfig_Modem; 2282 2283 typedef struct { 2284 char modemUuid[MAX_UUID_LENGTH]; 2285 } RIL_HardwareConfig_Sim; 2286 2287 typedef struct { 2288 RIL_HardwareConfig_Type type; 2289 char uuid[MAX_UUID_LENGTH]; 2290 RIL_HardwareConfig_State state; 2291 union { 2292 RIL_HardwareConfig_Modem modem; 2293 RIL_HardwareConfig_Sim sim; 2294 } cfg; 2295 } RIL_HardwareConfig; 2296 2297 typedef enum { 2298 SS_CFU, 2299 SS_CF_BUSY, 2300 SS_CF_NO_REPLY, 2301 SS_CF_NOT_REACHABLE, 2302 SS_CF_ALL, 2303 SS_CF_ALL_CONDITIONAL, 2304 SS_CLIP, 2305 SS_CLIR, 2306 SS_COLP, 2307 SS_COLR, 2308 SS_WAIT, 2309 SS_BAOC, 2310 SS_BAOIC, 2311 SS_BAOIC_EXC_HOME, 2312 SS_BAIC, 2313 SS_BAIC_ROAMING, 2314 SS_ALL_BARRING, 2315 SS_OUTGOING_BARRING, 2316 SS_INCOMING_BARRING 2317 } RIL_SsServiceType; 2318 2319 typedef enum { 2320 SS_ACTIVATION, 2321 SS_DEACTIVATION, 2322 SS_INTERROGATION, 2323 SS_REGISTRATION, 2324 SS_ERASURE 2325 } RIL_SsRequestType; 2326 2327 typedef enum { 2328 SS_ALL_TELE_AND_BEARER_SERVICES, 2329 SS_ALL_TELESEVICES, 2330 SS_TELEPHONY, 2331 SS_ALL_DATA_TELESERVICES, 2332 SS_SMS_SERVICES, 2333 SS_ALL_TELESERVICES_EXCEPT_SMS 2334 } RIL_SsTeleserviceType; 2335 2336 #define SS_INFO_MAX 4 2337 #define NUM_SERVICE_CLASSES 7 2338 2339 typedef struct { 2340 int numValidIndexes; /* This gives the number of valid values in cfInfo. 2341 For example if voice is forwarded to one number and data 2342 is forwarded to a different one then numValidIndexes will be 2343 2 indicating total number of valid values in cfInfo. 2344 Similarly if all the services are forwarded to the same 2345 number then the value of numValidIndexes will be 1. */ 2346 2347 RIL_CallForwardInfo cfInfo[NUM_SERVICE_CLASSES]; /* This is the response data 2348 for SS request to query call 2349 forward status. see 2350 RIL_REQUEST_QUERY_CALL_FORWARD_STATUS */ 2351 } RIL_CfData; 2352 2353 typedef struct { 2354 RIL_SsServiceType serviceType; 2355 RIL_SsRequestType requestType; 2356 RIL_SsTeleserviceType teleserviceType; 2357 int serviceClass; 2358 RIL_Errno result; 2359 2360 union { 2361 int ssInfo[SS_INFO_MAX]; /* This is the response data for most of the SS GET/SET 2362 RIL requests. E.g. RIL_REQUSET_GET_CLIR returns 2363 two ints, so first two values of ssInfo[] will be 2364 used for response if serviceType is SS_CLIR and 2365 requestType is SS_INTERROGATION */ 2366 2367 RIL_CfData cfData; 2368 }; 2369 } RIL_StkCcUnsolSsResponse; 2370 2371 /** 2372 * Data connection power state 2373 */ 2374 typedef enum { 2375 RIL_DC_POWER_STATE_LOW = 1, // Low power state 2376 RIL_DC_POWER_STATE_MEDIUM = 2, // Medium power state 2377 RIL_DC_POWER_STATE_HIGH = 3, // High power state 2378 RIL_DC_POWER_STATE_UNKNOWN = INT32_MAX // Unknown state 2379 } RIL_DcPowerStates; 2380 2381 /** 2382 * Data connection real time info 2383 */ 2384 typedef struct { 2385 uint64_t time; // Time in nanos as returned by ril_nano_time 2386 RIL_DcPowerStates powerState; // Current power state 2387 } RIL_DcRtInfo; 2388 2389 /** 2390 * Data profile to modem 2391 */ 2392 typedef struct { 2393 /* id of the data profile */ 2394 int profileId; 2395 /* the APN to connect to */ 2396 char* apn; 2397 /** one of the PDP_type values in TS 27.007 section 10.1.1. 2398 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 2399 */ 2400 char* protocol; 2401 /** authentication protocol used for this PDP context 2402 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) 2403 */ 2404 int authType; 2405 /* the username for APN, or NULL */ 2406 char* user; 2407 /* the password for APN, or NULL */ 2408 char* password; 2409 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ 2410 int type; 2411 /* the period in seconds to limit the maximum connections */ 2412 int maxConnsTime; 2413 /* the maximum connections during maxConnsTime */ 2414 int maxConns; 2415 /** the required wait time in seconds after a successful UE initiated 2416 * disconnect of a given PDN connection before the device can send 2417 * a new PDN connection request for that given PDN 2418 */ 2419 int waitTime; 2420 /* true to enable the profile, 0 to disable, 1 to enable */ 2421 int enabled; 2422 } RIL_DataProfileInfo; 2423 2424 typedef struct { 2425 /* id of the data profile */ 2426 int profileId; 2427 /* the APN to connect to */ 2428 char* apn; 2429 /** one of the PDP_type values in TS 27.007 section 10.1.1. 2430 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 2431 */ 2432 char* protocol; 2433 /** one of the PDP_type values in TS 27.007 section 10.1.1 used on roaming network. 2434 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 2435 */ 2436 char *roamingProtocol; 2437 /** authentication protocol used for this PDP context 2438 * (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) 2439 */ 2440 int authType; 2441 /* the username for APN, or NULL */ 2442 char* user; 2443 /* the password for APN, or NULL */ 2444 char* password; 2445 /* the profile type, TYPE_COMMON-0, TYPE_3GPP-1, TYPE_3GPP2-2 */ 2446 int type; 2447 /* the period in seconds to limit the maximum connections */ 2448 int maxConnsTime; 2449 /* the maximum connections during maxConnsTime */ 2450 int maxConns; 2451 /** the required wait time in seconds after a successful UE initiated 2452 * disconnect of a given PDN connection before the device can send 2453 * a new PDN connection request for that given PDN 2454 */ 2455 int waitTime; 2456 /* true to enable the profile, 0 to disable, 1 to enable */ 2457 int enabled; 2458 /* supported APN types bitmask. See RIL_ApnTypes for the value of each bit. */ 2459 int supportedTypesBitmask; 2460 /** the bearer bitmask. See RIL_RadioAccessFamily for the value of each bit. */ 2461 int bearerBitmask; 2462 /** maximum transmission unit (MTU) size in bytes */ 2463 int mtu; 2464 /** the MVNO type: possible values are "imsi", "gid", "spn" */ 2465 char *mvnoType; 2466 /** MVNO match data. Can be anything defined by the carrier. For example, 2467 * SPN like: "A MOBILE", "BEN NL", etc... 2468 * IMSI like: "302720x94", "2060188", etc... 2469 * GID like: "4E", "33", etc... 2470 */ 2471 char *mvnoMatchData; 2472 } RIL_DataProfileInfo_v15; 2473 2474 /* Tx Power Levels */ 2475 #define RIL_NUM_TX_POWER_LEVELS 5 2476 2477 /** 2478 * Aggregate modem activity information 2479 */ 2480 typedef struct { 2481 2482 /* total time (in ms) when modem is in a low power or 2483 * sleep state 2484 */ 2485 uint32_t sleep_mode_time_ms; 2486 2487 /* total time (in ms) when modem is awake but neither 2488 * the transmitter nor receiver are active/awake */ 2489 uint32_t idle_mode_time_ms; 2490 2491 /* total time (in ms) during which the transmitter is active/awake, 2492 * subdivided by manufacturer-defined device-specific 2493 * contiguous increasing ranges of transmit power between 2494 * 0 and the transmitter's maximum transmit power. 2495 */ 2496 uint32_t tx_mode_time_ms[RIL_NUM_TX_POWER_LEVELS]; 2497 2498 /* total time (in ms) for which receiver is active/awake and 2499 * the transmitter is inactive */ 2500 uint32_t rx_mode_time_ms; 2501 } RIL_ActivityStatsInfo; 2502 2503 typedef enum { 2504 RIL_APN_TYPE_UNKNOWN = 0x0, // Unknown 2505 RIL_APN_TYPE_DEFAULT = 0x1, // APN type for default data traffic 2506 RIL_APN_TYPE_MMS = 0x2, // APN type for MMS traffic 2507 RIL_APN_TYPE_SUPL = 0x4, // APN type for SUPL assisted GPS 2508 RIL_APN_TYPE_DUN = 0x8, // APN type for DUN traffic 2509 RIL_APN_TYPE_HIPRI = 0x10, // APN type for HiPri traffic 2510 RIL_APN_TYPE_FOTA = 0x20, // APN type for FOTA 2511 RIL_APN_TYPE_IMS = 0x40, // APN type for IMS 2512 RIL_APN_TYPE_CBS = 0x80, // APN type for CBS 2513 RIL_APN_TYPE_IA = 0x100, // APN type for IA Initial Attach APN 2514 RIL_APN_TYPE_EMERGENCY = 0x200, // APN type for Emergency PDN. This is not an IA apn, 2515 // but is used for access to carrier services in an 2516 // emergency call situation. 2517 RIL_APN_TYPE_MCX = 0x400, // APN type for Mission Critical Service 2518 RIL_APN_TYPE_XCAP = 0x800, // APN type for XCAP 2519 RIL_APN_TYPE_ALL = 0xFFFFFFFF // All APN types 2520 } RIL_ApnTypes; 2521 2522 typedef enum { 2523 RIL_DST_POWER_SAVE_MODE, // Device power save mode (provided by PowerManager) 2524 // True indicates the device is in power save mode. 2525 RIL_DST_CHARGING_STATE, // Device charging state (provided by BatteryManager) 2526 // True indicates the device is charging. 2527 RIL_DST_LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic 2528 // is expected, for example, when the device is idle 2529 // (e.g. not doing tethering in the background). Note 2530 // this doesn't mean no data is expected. 2531 } RIL_DeviceStateType; 2532 2533 typedef enum { 2534 RIL_UR_SIGNAL_STRENGTH = 0x01, // When this bit is set, modem should always send the 2535 // signal strength update through 2536 // RIL_UNSOL_SIGNAL_STRENGTH, otherwise suppress it. 2537 RIL_UR_FULL_NETWORK_STATE = 0x02, // When this bit is set, modem should always send 2538 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 2539 // when any field in 2540 // RIL_REQUEST_VOICE_REGISTRATION_STATE or 2541 // RIL_REQUEST_DATA_REGISTRATION_STATE changes. When 2542 // this bit is not set, modem should suppress 2543 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 2544 // only when insignificant fields change 2545 // (e.g. cell info). 2546 // Modem should continue sending 2547 // RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 2548 // when significant fields are updated even when this 2549 // bit is not set. The following fields are 2550 // considered significant, registration state and 2551 // radio technology. 2552 RIL_UR_DATA_CALL_DORMANCY_CHANGED = 0x04 // When this bit is set, modem should send the data 2553 // call list changed unsolicited response 2554 // RIL_UNSOL_DATA_CALL_LIST_CHANGED whenever any 2555 // field in RIL_Data_Call_Response changes. 2556 // Otherwise modem should suppress the unsolicited 2557 // response when the only changed field is 'active' 2558 // (for data dormancy). For all other fields change, 2559 // modem should continue sending 2560 // RIL_UNSOL_DATA_CALL_LIST_CHANGED regardless this 2561 // bit is set or not. 2562 } RIL_UnsolicitedResponseFilter; 2563 2564 typedef struct { 2565 char * aidPtr; /* AID value, See ETSI 102.221 and 101.220*/ 2566 int p2; /* P2 parameter (described in ISO 7816-4) 2567 P2Constants:NO_P2 if to be ignored */ 2568 } RIL_OpenChannelParams; 2569 2570 typedef enum { 2571 RIL_ONE_SHOT = 0x01, // Performs the scan only once 2572 RIL_PERIODIC = 0x02 // Performs the scan periodically until cancelled 2573 } RIL_ScanType; 2574 2575 typedef enum { 2576 UNKNOWN = 0x00, // Unknown Radio Access Network 2577 GERAN = 0x01, // GSM EDGE Radio Access Network 2578 UTRAN = 0x02, // Universal Terrestrial Radio Access Network 2579 EUTRAN = 0x03, // Evolved Universal Terrestrial Radio Access Network 2580 NGRAN = 0x04, // Next-Generation Radio Access Network 2581 CDMA2000 = 0x05, // CDMA 2000 Radio AccessNetwork 2582 } RIL_RadioAccessNetworks; 2583 2584 typedef struct { 2585 char *operatorNumeric; 2586 RIL_RadioAccessNetworks act; 2587 } RIL_NetworkOperator; 2588 2589 typedef enum { 2590 GERAN_BAND_T380 = 1, 2591 GERAN_BAND_T410 = 2, 2592 GERAN_BAND_450 = 3, 2593 GERAN_BAND_480 = 4, 2594 GERAN_BAND_710 = 5, 2595 GERAN_BAND_750 = 6, 2596 GERAN_BAND_T810 = 7, 2597 GERAN_BAND_850 = 8, 2598 GERAN_BAND_P900 = 9, 2599 GERAN_BAND_E900 = 10, 2600 GERAN_BAND_R900 = 11, 2601 GERAN_BAND_DCS1800 = 12, 2602 GERAN_BAND_PCS1900 = 13, 2603 GERAN_BAND_ER900 = 14, 2604 } RIL_GeranBands; 2605 2606 typedef enum { 2607 UTRAN_BAND_1 = 1, 2608 UTRAN_BAND_2 = 2, 2609 UTRAN_BAND_3 = 3, 2610 UTRAN_BAND_4 = 4, 2611 UTRAN_BAND_5 = 5, 2612 UTRAN_BAND_6 = 6, 2613 UTRAN_BAND_7 = 7, 2614 UTRAN_BAND_8 = 8, 2615 UTRAN_BAND_9 = 9, 2616 UTRAN_BAND_10 = 10, 2617 UTRAN_BAND_11 = 11, 2618 UTRAN_BAND_12 = 12, 2619 UTRAN_BAND_13 = 13, 2620 UTRAN_BAND_14 = 14, 2621 UTRAN_BAND_19 = 19, 2622 UTRAN_BAND_20 = 20, 2623 UTRAN_BAND_21 = 21, 2624 UTRAN_BAND_22 = 22, 2625 UTRAN_BAND_25 = 25, 2626 UTRAN_BAND_26 = 26, 2627 } RIL_UtranBands; 2628 2629 typedef enum { 2630 EUTRAN_BAND_1 = 1, 2631 EUTRAN_BAND_2 = 2, 2632 EUTRAN_BAND_3 = 3, 2633 EUTRAN_BAND_4 = 4, 2634 EUTRAN_BAND_5 = 5, 2635 EUTRAN_BAND_6 = 6, 2636 EUTRAN_BAND_7 = 7, 2637 EUTRAN_BAND_8 = 8, 2638 EUTRAN_BAND_9 = 9, 2639 EUTRAN_BAND_10 = 10, 2640 EUTRAN_BAND_11 = 11, 2641 EUTRAN_BAND_12 = 12, 2642 EUTRAN_BAND_13 = 13, 2643 EUTRAN_BAND_14 = 14, 2644 EUTRAN_BAND_17 = 17, 2645 EUTRAN_BAND_18 = 18, 2646 EUTRAN_BAND_19 = 19, 2647 EUTRAN_BAND_20 = 20, 2648 EUTRAN_BAND_21 = 21, 2649 EUTRAN_BAND_22 = 22, 2650 EUTRAN_BAND_23 = 23, 2651 EUTRAN_BAND_24 = 24, 2652 EUTRAN_BAND_25 = 25, 2653 EUTRAN_BAND_26 = 26, 2654 EUTRAN_BAND_27 = 27, 2655 EUTRAN_BAND_28 = 28, 2656 EUTRAN_BAND_30 = 30, 2657 EUTRAN_BAND_31 = 31, 2658 EUTRAN_BAND_33 = 33, 2659 EUTRAN_BAND_34 = 34, 2660 EUTRAN_BAND_35 = 35, 2661 EUTRAN_BAND_36 = 36, 2662 EUTRAN_BAND_37 = 37, 2663 EUTRAN_BAND_38 = 38, 2664 EUTRAN_BAND_39 = 39, 2665 EUTRAN_BAND_40 = 40, 2666 EUTRAN_BAND_41 = 41, 2667 EUTRAN_BAND_42 = 42, 2668 EUTRAN_BAND_43 = 43, 2669 EUTRAN_BAND_44 = 44, 2670 EUTRAN_BAND_45 = 45, 2671 EUTRAN_BAND_46 = 46, 2672 EUTRAN_BAND_47 = 47, 2673 EUTRAN_BAND_48 = 48, 2674 EUTRAN_BAND_65 = 65, 2675 EUTRAN_BAND_66 = 66, 2676 EUTRAN_BAND_68 = 68, 2677 EUTRAN_BAND_70 = 70, 2678 } RIL_EutranBands; 2679 2680 typedef enum { 2681 NGRAN_BAND_1 = 1, 2682 NGRAN_BAND_2 = 2, 2683 NGRAN_BAND_3 = 3, 2684 NGRAN_BAND_5 = 5, 2685 NGRAN_BAND_7 = 7, 2686 NGRAN_BAND_8 = 8, 2687 NGRAN_BAND_12 = 12, 2688 NGRAN_BAND_20 = 20, 2689 NGRAN_BAND_25 = 25, 2690 NGRAN_BAND_28 = 28, 2691 NGRAN_BAND_34 = 34, 2692 NGRAN_BAND_38 = 38, 2693 NGRAN_BAND_39 = 39, 2694 NGRAN_BAND_40 = 40, 2695 NGRAN_BAND_41 = 41, 2696 NGRAN_BAND_50 = 50, 2697 NGRAN_BAND_51 = 51, 2698 NGRAN_BAND_66 = 66, 2699 NGRAN_BAND_70 = 70, 2700 NGRAN_BAND_71 = 71, 2701 NGRAN_BAND_74 = 74, 2702 NGRAN_BAND_75 = 75, 2703 NGRAN_BAND_76 = 76, 2704 NGRAN_BAND_77 = 77, 2705 NGRAN_BAND_78 = 78, 2706 NGRAN_BAND_79 = 79, 2707 NGRAN_BAND_80 = 80, 2708 NGRAN_BAND_81 = 81, 2709 NGRAN_BAND_82 = 82, 2710 NGRAN_BAND_83 = 83, 2711 NGRAN_BAND_84 = 84, 2712 NGRAN_BAND_86 = 86, 2713 NGRAN_BAND_257 = 257, 2714 NGRAN_BAND_258 = 258, 2715 NGRAN_BAND_260 = 260, 2716 NGRAN_BAND_261 = 261, 2717 } RIL_NgranBands; 2718 2719 typedef struct { 2720 RIL_RadioAccessNetworks radio_access_network; // The type of network to scan. 2721 uint32_t bands_length; // Length of bands 2722 union { 2723 RIL_GeranBands geran_bands[MAX_BANDS]; 2724 RIL_UtranBands utran_bands[MAX_BANDS]; 2725 RIL_EutranBands eutran_bands[MAX_BANDS]; 2726 RIL_NgranBands ngran_bands[MAX_BANDS]; 2727 } bands; 2728 uint32_t channels_length; // Length of channels 2729 uint32_t channels[MAX_CHANNELS]; // Frequency channels to scan 2730 } RIL_RadioAccessSpecifier; 2731 2732 typedef struct { 2733 RIL_ScanType type; // Type of the scan 2734 int32_t interval; // Time interval in seconds 2735 // between periodic scans, only 2736 // valid when type=RIL_PERIODIC 2737 uint32_t specifiers_length; // Length of specifiers 2738 RIL_RadioAccessSpecifier specifiers[MAX_RADIO_ACCESS_NETWORKS]; // Radio access networks 2739 // with bands/channels. 2740 } RIL_NetworkScanRequest; 2741 2742 typedef struct { 2743 RIL_RadioAccessNetworks_v1_5 radio_access_network; // The type of network to scan. 2744 uint32_t bands_length; // Length of bands 2745 union { 2746 RIL_GeranBands geran_bands[MAX_BANDS]; 2747 RIL_UtranBands utran_bands[MAX_BANDS]; 2748 RIL_EutranBands eutran_bands[MAX_BANDS]; 2749 RIL_NgranBands ngran_bands[MAX_BANDS]; 2750 } bands; 2751 uint32_t channels_length; // Length of channels 2752 uint32_t channels[MAX_CHANNELS]; // Frequency channels to scan 2753 } RIL_RadioAccessSpecifier_v1_5; 2754 2755 typedef struct { 2756 RIL_ScanType type; 2757 2758 int32_t interval; 2759 2760 uint32_t specifiers_length; // Length of specifiers 2761 2762 RIL_RadioAccessSpecifier_v1_5 specifiers[RIL_RADIO_ACCESS_SPECIFIER_MAX_SIZE]; 2763 2764 int32_t maxSearchTime; 2765 2766 int32_t incrementalResults; 2767 2768 int32_t incrementalResultsPeriodicity; 2769 2770 uint32_t mccMncsNumbers; 2771 2772 char **mccMncs; 2773 } RIL_NetworkScanRequest_v1_5; 2774 2775 typedef struct { 2776 int specifyChannels; 2777 uint32_t specifiers_length; // Length of specifiers 2778 RIL_RadioAccessSpecifier_v1_5 specifiers[RIL_RADIO_ACCESS_SPECIFIER_MAX_SIZE]; // Radio access networks with bands/channels. 2779 } RIL_SystemSelectionChannels_v1_5; 2780 2781 typedef enum { 2782 PARTIAL = 0x01, // The result contains a part of the scan results 2783 COMPLETE = 0x02, // The result contains the last part of the scan results 2784 } RIL_ScanStatus; 2785 2786 typedef struct { 2787 RIL_ScanStatus status; // The status of the scan 2788 uint32_t network_infos_length; // Total length of RIL_CellInfo 2789 RIL_CellInfo_v12* network_infos; // List of network information 2790 RIL_Errno error; 2791 } RIL_NetworkScanResult; 2792 2793 2794 2795 /*********************Structs and Enums Extended in 1.4************************/ 2796 /** 2797 * Defining Emergency Service Category as follows: 2798 * - General emergency call, all categories; 2799 * - Police; 2800 * - Ambulance; 2801 * - Fire Brigade; 2802 * - Marine Guard; 2803 * - Mountain Rescue; 2804 * - Manually Initiated eCall (MIeC); 2805 * - Automatically Initiated eCall (AIeC); 2806 * 2807 * Category UNSPECIFIED (General emergency call, all categories) indicates that no specific 2808 * services are associated with this emergency number. 2809 * 2810 * Reference: 3gpp 22.101, Section 10 - Emergency Calls 2811 */ 2812 typedef enum { 2813 CATEGORY_UNSPECIFIED = 0, /* General emergency call, all categories */ 2814 CATEGORY_POLICE = 1 << 0, 2815 CATEGORY_AMBULANCE = 1 << 1, 2816 CATEGORY_FIRE_BRIGADE = 1 << 2, 2817 CATEGORY_MARINE_GUARD = 1 << 3, 2818 CATEGORY_MOUNTAIN_RESCUE = 1 << 4, 2819 CATEGORY_MIEC = 1 << 5, /* Manually Initiated eCall (MIeC) */ 2820 CATEGORY_AIEC = 1 << 6, /* Automatically Initiated eCall (AIeC) */ 2821 } RIL_EmergencyServiceCategory; 2822 2823 /** 2824 * The source to tell where the corresponding @1.4::EmergencyNumber comes from. 2825 * Reference: 3gpp 22.101, Section 10 - Emergency Calls 2826 */ 2827 typedef enum { 2828 SOURCE_NETWORK_SIGNALING = 1 << 0, /* Indicates the number is from the network signal. */ 2829 SOURCE_SIM = 1 << 1, /* Indicates the number is from the sim card. */ 2830 SOURCE_MODEM_CONFIG = 1 << 2, /* Indicates the number is from the modem config. */ 2831 SOURCE_DEFAULT = 1 << 3, /* Indicates the number is available as default. 2832 * Per the reference, 112, 911 must always be available; 2833 * additionally, 000, 08, 110, 999, 118 and 119 must be available 2834 * when sim is not present. */ 2835 } RIL_EmergencyNumberSource; 2836 2837 /** 2838 * Indicates how the implementation should handle the emergency call if it is required by Android. 2839 */ 2840 typedef enum { 2841 ROUTING_UNKNOWN = 0, /* Indicates Android does not require how to handle 2842 * the corresponding emergency call; it is decided by implementation. */ 2843 ROUTING_MERGENCY = 1, /* Indicates the implementation must handle the call through emergency routing. */ 2844 ROUTING_NORMAL = 2, /* Indicates the implementation must handle the call through normal call routing. */ 2845 } RIL_EmergencyCallRouting; 2846 2847 /** 2848 * Emergency number contains information of number, one or more service category(s), zero or more 2849 * emergency uniform resource names, mobile country code (mcc), mobile network country (mnc) and 2850 * source(s) that indicate where it comes from. 2851 * 2852 * If the emergency number is associated with country, field ‘mcc’ must be provided, otherwise 2853 * field ‘mcc’ must be an empty string. If the emergency number is associated with network 2854 * operator, field ‘mcc’ and 'mnc' must be provided, otherwise field ‘mnc’ must be an empty 2855 * string. If the emergency number is specified with emergency service category(s), field 2856 * 'categories' must be provided, otherwise field 'categories' must be 2857 * @1.4::EmergencyServiceCategories::UNSPECIFIED. If the emergency number is specified with 2858 * emergency uniform resource names (URN), field 'urns' must be provided, otherwise field 'urns' 2859 * must be an empty list. 2860 * 2861 * A unique EmergencyNumber has a unique combination of ‘number’, ‘mcc’, 'mnc', 'categories' and 2862 * 'urns' fields. Multiple @1.4::EmergencyNumberSource should be merged into one 'sources' field 2863 * via bitwise-OR combination for the same EmergencyNumber. 2864 * 2865 * Reference: 3gpp 22.101, Section 10 - Emergency Calls; 2866 * 3gpp 23.167, Section 6 - Functional description; 2867 * 3gpp 24.503, Section 5.1.6.8.1 - General; 2868 * RFC 5031 2869 */ 2870 typedef struct { 2871 RIL_Dial dialInfo; 2872 RIL_EmergencyServiceCategory categories; /* The bitfield of @1.4::EmergencyServiceCategory(s). 2873 * See RIL_EmergencyServiceCategory for the value of each bit. */ 2874 uint32_t urnsNumber; 2875 char ** urns; /* The list of emergency Uniform Resource Names (URN). */ 2876 RIL_EmergencyNumberSource sources; /* The bitfield of @1.4::EmergencyNumberSource(s). 2877 * See RIL_EmergencyNumberSource for the value of each bit. */ 2878 RIL_EmergencyCallRouting routing; 2879 bool fromEmergencyDialer; 2880 } RIL_EmergencyDial; 2881 2882 /******************************************************************************/ 2883 /* Radio Config structure @{ */ 2884 typedef enum { 2885 /* Physical slot is inactive*/ 2886 SLOT_STATE_INACTIVE = 0x00, 2887 /* Physical slot is active */ 2888 SLOT_STATE_ACTIVE = 0x01, 2889 } RIL_SlotState; 2890 2891 typedef struct { 2892 /* Card state in the physical slot*/ 2893 RIL_CardState cardState; 2894 /* Slot state Active/Inactive */ 2895 RIL_SlotState slotState; 2896 /** 2897 * An Answer To Reset (ATR) is a message output by a Smart Card conforming to ISO/IEC 7816 2898 * standards, following electrical reset of the card's chip. The ATR conveys information about 2899 * the communication parameters proposed by the card, and the card's nature and state. 2900 * This data is applicable only when cardState is CardState:PRESENT. 2901 */ 2902 char* atr; 2903 int logicalSlotId; 2904 /** 2905 * Integrated Circuit Card IDentifier (ICCID) is Unique Identifier of the SIM CARD. File is 2906 * located in the SIM card at EFiccid (0x2FE2) as per ETSI 102.221. The ICCID is defined by 2907 * the ITU-T recommendation E.118 ISO/IEC 7816. 2908 * This data is applicable only when cardState is CardState:PRESENT. 2909 */ 2910 char* iccid; 2911 } RIL_SimSlotStatus; 2912 2913 typedef struct { 2914 RIL_SimSlotStatus base; 2915 /** 2916 * The EID is the eUICC identifier. The EID shall be stored within the ECASD and can be 2917 * retrieved by the Device at any time using the standard GlobalPlatform GET DATA command. 2918 * 2919 * This data is mandatory and applicable only when cardState is CardState:PRESENT and SIM card 2920 * supports eUICC. 2921 */ 2922 char* eid; 2923 } RIL_SimSlotStatus_V1_2; 2924 2925 #define MAX_LOGICAL_MODEM_NUM 4 2926 2927 typedef struct { 2928 /* Logical modem ID. */ 2929 int modemId; 2930 } RIL_ModemInfo; 2931 2932 typedef struct { 2933 /** 2934 * maxActiveData defines how many logical modems can have 2935 * PS attached simultaneously. For example, for L+L modem it 2936 * should be 2. 2937 */ 2938 int maxActiveData; 2939 /** 2940 * maxActiveData defines how many logical modems can have 2941 * internet PDN connections simultaneously. For example, for L+L 2942 * DSDS modem it’s 1, and for DSDA modem it’s 2. 2943 */ 2944 int maxActiveInternetData; 2945 /** 2946 * Whether modem supports both internet PDN up so 2947 * that we can do ping test before tearing down the 2948 * other one. 2949 */ 2950 int isInternetLingeringSupported; 2951 /** 2952 * List of logical modem information. 2953 */ 2954 RIL_ModemInfo logicalModemList[MAX_LOGICAL_MODEM_NUM]; 2955 } RIL_PhoneCapability; 2956 2957 typedef struct { 2958 int numOfLiveModems; 2959 } RIL_ModemConfig; 2960 /* }@ */ 2961 2962 typedef enum { 2963 DATA_REQ_REASOPN_NORMAL = 0x01, // The reason of the data request is normal 2964 DATA_REQ_REASOPN_SHUTDOWN = 0x02, // The reason of the data request is device shutdown 2965 DATA_REQ_REASOPN_HANDOVER = 0x03, // The reason of the data request is IWLAN data handover 2966 // to another transport (e.g. from cellular to wifi or vice versa) 2967 } RIL_DataRequestReason; 2968 2969 /** 2970 * RIL_REQUEST_GET_SIM_STATUS 2971 * 2972 * Requests status of the SIM interface and the SIM card 2973 * 2974 * "data" is NULL 2975 * 2976 * "response" is const RIL_CardStatus_v6 * 2977 * 2978 * Valid errors: 2979 * 2980 * SUCCESS 2981 * RADIO_NOT_AVAILABLE 2982 * INTERNAL_ERR 2983 * NO_MEMORY 2984 * NO_RESOURCES 2985 * CANCELLED 2986 * REQUEST_NOT_SUPPORTED 2987 */ 2988 #define RIL_REQUEST_GET_SIM_STATUS 1 2989 2990 /** 2991 * RIL_REQUEST_ENTER_SIM_PIN 2992 * 2993 * Supplies SIM PIN. Only called if RIL_CardStatus has RIL_APPSTATE_PIN state 2994 * 2995 * "data" is const char ** 2996 * ((const char **)data)[0] is PIN value 2997 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 2998 * 2999 * "response" is int * 3000 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3001 * 3002 * Valid errors: 3003 * 3004 * SUCCESS 3005 * RADIO_NOT_AVAILABLE (radio resetting) 3006 * PASSWORD_INCORRECT 3007 * INTERNAL_ERR 3008 * NO_MEMORY 3009 * NO_RESOURCES 3010 * CANCELLED 3011 * INVALID_ARGUMENTS 3012 * INVALID_SIM_STATE 3013 * REQUEST_NOT_SUPPORTED 3014 */ 3015 3016 #define RIL_REQUEST_ENTER_SIM_PIN 2 3017 3018 /** 3019 * RIL_REQUEST_ENTER_SIM_PUK 3020 * 3021 * Supplies SIM PUK and new PIN. 3022 * 3023 * "data" is const char ** 3024 * ((const char **)data)[0] is PUK value 3025 * ((const char **)data)[1] is new PIN value 3026 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3027 * 3028 * "response" is int * 3029 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3030 * 3031 * Valid errors: 3032 * 3033 * SUCCESS 3034 * RADIO_NOT_AVAILABLE (radio resetting) 3035 * PASSWORD_INCORRECT 3036 * (PUK is invalid) 3037 * INTERNAL_ERR 3038 * NO_MEMORY 3039 * NO_RESOURCES 3040 * CANCELLED 3041 * INVALID_ARGUMENTS 3042 * INVALID_SIM_STATE 3043 * REQUEST_NOT_SUPPORTED 3044 */ 3045 3046 #define RIL_REQUEST_ENTER_SIM_PUK 3 3047 3048 /** 3049 * RIL_REQUEST_ENTER_SIM_PIN2 3050 * 3051 * Supplies SIM PIN2. Only called following operation where SIM_PIN2 was 3052 * returned as a a failure from a previous operation. 3053 * 3054 * "data" is const char ** 3055 * ((const char **)data)[0] is PIN2 value 3056 * ((const char **)data)[1] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3057 * 3058 * "response" is int * 3059 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3060 * 3061 * Valid errors: 3062 * 3063 * SUCCESS 3064 * RADIO_NOT_AVAILABLE (radio resetting) 3065 * PASSWORD_INCORRECT 3066 * INTERNAL_ERR 3067 * NO_MEMORY 3068 * NO_RESOURCES 3069 * CANCELLED 3070 * INVALID_ARGUMENTS 3071 * INVALID_SIM_STATE 3072 * REQUEST_NOT_SUPPORTED 3073 */ 3074 3075 #define RIL_REQUEST_ENTER_SIM_PIN2 4 3076 3077 /** 3078 * RIL_REQUEST_ENTER_SIM_PUK2 3079 * 3080 * Supplies SIM PUK2 and new PIN2. 3081 * 3082 * "data" is const char ** 3083 * ((const char **)data)[0] is PUK2 value 3084 * ((const char **)data)[1] is new PIN2 value 3085 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3086 * 3087 * "response" is int * 3088 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3089 * 3090 * Valid errors: 3091 * 3092 * SUCCESS 3093 * RADIO_NOT_AVAILABLE (radio resetting) 3094 * PASSWORD_INCORRECT 3095 * (PUK2 is invalid) 3096 * INTERNAL_ERR 3097 * NO_MEMORY 3098 * NO_RESOURCES 3099 * CANCELLED 3100 * INVALID_ARGUMENTS 3101 * INVALID_SIM_STATE 3102 * REQUEST_NOT_SUPPORTED 3103 */ 3104 3105 #define RIL_REQUEST_ENTER_SIM_PUK2 5 3106 3107 /** 3108 * RIL_REQUEST_CHANGE_SIM_PIN 3109 * 3110 * Supplies old SIM PIN and new PIN. 3111 * 3112 * "data" is const char ** 3113 * ((const char **)data)[0] is old PIN value 3114 * ((const char **)data)[1] is new PIN value 3115 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3116 * 3117 * "response" is int * 3118 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3119 * 3120 * Valid errors: 3121 * 3122 * SUCCESS 3123 * RADIO_NOT_AVAILABLE (radio resetting) 3124 * PASSWORD_INCORRECT 3125 * (old PIN is invalid) 3126 * INTERNAL_ERR 3127 * NO_MEMORY 3128 * NO_RESOURCES 3129 * CANCELLED 3130 * INVALID_ARGUMENTS 3131 * INVALID_SIM_STATE 3132 * REQUEST_NOT_SUPPORTED 3133 */ 3134 3135 #define RIL_REQUEST_CHANGE_SIM_PIN 6 3136 3137 3138 /** 3139 * RIL_REQUEST_CHANGE_SIM_PIN2 3140 * 3141 * Supplies old SIM PIN2 and new PIN2. 3142 * 3143 * "data" is const char ** 3144 * ((const char **)data)[0] is old PIN2 value 3145 * ((const char **)data)[1] is new PIN2 value 3146 * ((const char **)data)[2] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3147 * 3148 * "response" is int * 3149 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3150 * 3151 * Valid errors: 3152 * 3153 * SUCCESS 3154 * RADIO_NOT_AVAILABLE (radio resetting) 3155 * PASSWORD_INCORRECT 3156 * (old PIN2 is invalid) 3157 * INTERNAL_ERR 3158 * NO_MEMORY 3159 * NO_RESOURCES 3160 * CANCELLED 3161 * INVALID_ARGUMENTS 3162 * INVALID_SIM_STATE 3163 * REQUEST_NOT_SUPPORTED 3164 * 3165 */ 3166 3167 #define RIL_REQUEST_CHANGE_SIM_PIN2 7 3168 3169 /** 3170 * RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 3171 * 3172 * Requests that network personlization be deactivated 3173 * 3174 * "data" is const char ** 3175 * ((const char **)(data))[0]] is network depersonlization code 3176 * 3177 * "response" is int * 3178 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 3179 * 3180 * Valid errors: 3181 * 3182 * SUCCESS 3183 * RADIO_NOT_AVAILABLE (radio resetting) 3184 * PASSWORD_INCORRECT 3185 * SIM_ABSENT 3186 * (code is invalid) 3187 * INTERNAL_ERR 3188 * NO_MEMORY 3189 * NO_RESOURCES 3190 * CANCELLED 3191 * REQUEST_NOT_SUPPORTED 3192 */ 3193 3194 #define RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION 8 3195 3196 /** 3197 * RIL_REQUEST_GET_CURRENT_CALLS 3198 * 3199 * Requests current call list 3200 * 3201 * "data" is NULL 3202 * 3203 * "response" must be a "const RIL_Call **" 3204 * 3205 * Valid errors: 3206 * 3207 * SUCCESS 3208 * RADIO_NOT_AVAILABLE (radio resetting) 3209 * NO_MEMORY 3210 * (request will be made again in a few hundred msec) 3211 * INTERNAL_ERR 3212 * NO_RESOURCES 3213 * CANCELLED 3214 * REQUEST_NOT_SUPPORTED 3215 */ 3216 3217 #define RIL_REQUEST_GET_CURRENT_CALLS 9 3218 3219 3220 /** 3221 * RIL_REQUEST_DIAL 3222 * 3223 * Initiate voice call 3224 * 3225 * "data" is const RIL_Dial * 3226 * "response" is NULL 3227 * 3228 * This method is never used for supplementary service codes 3229 * 3230 * Valid errors: 3231 * SUCCESS 3232 * RADIO_NOT_AVAILABLE (radio resetting) 3233 * DIAL_MODIFIED_TO_USSD 3234 * DIAL_MODIFIED_TO_SS 3235 * DIAL_MODIFIED_TO_DIAL 3236 * INVALID_ARGUMENTS 3237 * NO_MEMORY 3238 * INVALID_STATE 3239 * NO_RESOURCES 3240 * INTERNAL_ERR 3241 * FDN_CHECK_FAILURE 3242 * MODEM_ERR 3243 * NO_SUBSCRIPTION 3244 * NO_NETWORK_FOUND 3245 * INVALID_CALL_ID 3246 * DEVICE_IN_USE 3247 * OPERATION_NOT_ALLOWED 3248 * ABORTED 3249 * CANCELLED 3250 * REQUEST_NOT_SUPPORTED 3251 */ 3252 #define RIL_REQUEST_DIAL 10 3253 3254 /** 3255 * RIL_REQUEST_GET_IMSI 3256 * 3257 * Get the SIM IMSI 3258 * 3259 * Only valid when radio state is "RADIO_STATE_ON" 3260 * 3261 * "data" is const char ** 3262 * ((const char **)data)[0] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 3263 * "response" is a const char * containing the IMSI 3264 * 3265 * Valid errors: 3266 * SUCCESS 3267 * RADIO_NOT_AVAILABLE (radio resetting) 3268 * INTERNAL_ERR 3269 * NO_MEMORY 3270 * NO_RESOURCES 3271 * CANCELLED 3272 * INVALID_SIM_STATE 3273 * REQUEST_NOT_SUPPORTED 3274 */ 3275 3276 #define RIL_REQUEST_GET_IMSI 11 3277 3278 /** 3279 * RIL_REQUEST_HANGUP 3280 * 3281 * Hang up a specific line (like AT+CHLD=1x) 3282 * 3283 * After this HANGUP request returns, RIL should show the connection is NOT 3284 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 3285 * 3286 * "data" is an int * 3287 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) 3288 * 3289 * "response" is NULL 3290 * 3291 * Valid errors: 3292 * SUCCESS 3293 * RADIO_NOT_AVAILABLE (radio resetting) 3294 * INVALID_ARGUMENTS 3295 * NO_MEMORY 3296 * INVALID_STATE 3297 * MODEM_ERR 3298 * INTERNAL_ERR 3299 * NO_MEMORY 3300 * INVALID_CALL_ID 3301 * INVALID_ARGUMENTS 3302 * NO_RESOURCES 3303 * CANCELLED 3304 * REQUEST_NOT_SUPPORTED 3305 */ 3306 3307 #define RIL_REQUEST_HANGUP 12 3308 3309 /** 3310 * RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 3311 * 3312 * Hang up waiting or held (like AT+CHLD=0) 3313 * 3314 * After this HANGUP request returns, RIL should show the connection is NOT 3315 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 3316 * 3317 * "data" is NULL 3318 * "response" is NULL 3319 * 3320 * Valid errors: 3321 * SUCCESS 3322 * RADIO_NOT_AVAILABLE (radio resetting) 3323 * INVALID_STATE 3324 * NO_MEMORY 3325 * MODEM_ERR 3326 * INTERNAL_ERR 3327 * NO_MEMORY 3328 * INVALID_CALL_ID 3329 * NO_RESOURCES 3330 * OPERATION_NOT_ALLOWED 3331 * INVALID_ARGUMENTS 3332 * NO_RESOURCES 3333 * CANCELLED 3334 * REQUEST_NOT_SUPPORTED 3335 */ 3336 3337 #define RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND 13 3338 3339 /** 3340 * RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 3341 * 3342 * Hang up waiting or held (like AT+CHLD=1) 3343 * 3344 * After this HANGUP request returns, RIL should show the connection is NOT 3345 * active anymore in next RIL_REQUEST_GET_CURRENT_CALLS query. 3346 * 3347 * "data" is NULL 3348 * "response" is NULL 3349 * 3350 * Valid errors: 3351 * SUCCESS 3352 * RADIO_NOT_AVAILABLE (radio resetting) 3353 * INVALID_STATE 3354 * NO_MEMORY 3355 * MODEM_ERR 3356 * INTERNAL_ERR 3357 * INVALID_CALL_ID 3358 * OPERATION_NOT_ALLOWED 3359 * INVALID_ARGUMENTS 3360 * NO_RESOURCES 3361 * CANCELLED 3362 * REQUEST_NOT_SUPPORTED 3363 */ 3364 3365 #define RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND 14 3366 3367 /** 3368 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 3369 * 3370 * Switch waiting or holding call and active call (like AT+CHLD=2) 3371 * 3372 * State transitions should be is follows: 3373 * 3374 * If call 1 is waiting and call 2 is active, then if this re 3375 * 3376 * BEFORE AFTER 3377 * Call 1 Call 2 Call 1 Call 2 3378 * ACTIVE HOLDING HOLDING ACTIVE 3379 * ACTIVE WAITING HOLDING ACTIVE 3380 * HOLDING WAITING HOLDING ACTIVE 3381 * ACTIVE IDLE HOLDING IDLE 3382 * IDLE IDLE IDLE IDLE 3383 * 3384 * "data" is NULL 3385 * "response" is NULL 3386 * 3387 * Valid errors: 3388 * SUCCESS 3389 * RADIO_NOT_AVAILABLE (radio resetting) 3390 * INVALID_STATE 3391 * NO_MEMORY 3392 * MODEM_ERR 3393 * INTERNAL_ERR 3394 * INVALID_STATE 3395 * INVALID_ARGUMENTS 3396 * INVALID_CALL_ID 3397 * OPERATION_NOT_ALLOWED 3398 * NO_RESOURCES 3399 * CANCELLED 3400 * REQUEST_NOT_SUPPORTED 3401 */ 3402 3403 #define RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE 15 3404 #define RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE 15 3405 3406 /** 3407 * RIL_REQUEST_CONFERENCE 3408 * 3409 * Conference holding and active (like AT+CHLD=3) 3410 3411 * "data" is NULL 3412 * "response" is NULL 3413 * 3414 * Valid errors: 3415 * SUCCESS 3416 * RADIO_NOT_AVAILABLE (radio resetting) 3417 * NO_MEMORY 3418 * MODEM_ERR 3419 * INTERNAL_ERR 3420 * INVALID_STATE 3421 * INVALID_CALL_ID 3422 * INVALID_ARGUMENTS 3423 * OPERATION_NOT_ALLOWED 3424 * NO_RESOURCES 3425 * CANCELLED 3426 * REQUEST_NOT_SUPPORTED 3427 */ 3428 #define RIL_REQUEST_CONFERENCE 16 3429 3430 /** 3431 * RIL_REQUEST_UDUB 3432 * 3433 * Send UDUB (user determined used busy) to ringing or 3434 * waiting call answer)(RIL_BasicRequest r); 3435 * 3436 * "data" is NULL 3437 * "response" is NULL 3438 * 3439 * Valid errors: 3440 * SUCCESS 3441 * RADIO_NOT_AVAILABLE (radio resetting) 3442 * INVALID_STATE 3443 * NO_RESOURCES 3444 * NO_MEMORY 3445 * MODEM_ERR 3446 * INTERNAL_ERR 3447 * INVALID_CALL_ID 3448 * OPERATION_NOT_ALLOWED 3449 * INVALID_ARGUMENTS 3450 * CANCELLED 3451 * REQUEST_NOT_SUPPORTED 3452 */ 3453 #define RIL_REQUEST_UDUB 17 3454 3455 /** 3456 * RIL_REQUEST_LAST_CALL_FAIL_CAUSE 3457 * 3458 * Requests the failure cause code for the most recently terminated call 3459 * 3460 * "data" is NULL 3461 * "response" is a const RIL_LastCallFailCauseInfo * 3462 * RIL_LastCallFailCauseInfo contains LastCallFailCause and vendor cause. 3463 * The vendor cause code must be used for debugging purpose only. 3464 * The implementation must return one of the values of LastCallFailCause 3465 * as mentioned below. 3466 * 3467 * GSM failure reasons codes for the cause codes defined in TS 24.008 Annex H 3468 * where possible. 3469 * CDMA failure reasons codes for the possible call failure scenarios 3470 * described in the "CDMA IS-2000 Release A (C.S0005-A v6.0)" standard. 3471 * Any of the following reason codes if the call is failed or dropped due to reason 3472 * mentioned with in the braces. 3473 * 3474 * CALL_FAIL_RADIO_OFF (Radio is OFF) 3475 * CALL_FAIL_OUT_OF_SERVICE (No cell coverage) 3476 * CALL_FAIL_NO_VALID_SIM (No valid SIM) 3477 * CALL_FAIL_RADIO_INTERNAL_ERROR (Modem hit unexpected error scenario) 3478 * CALL_FAIL_NETWORK_RESP_TIMEOUT (No response from network) 3479 * CALL_FAIL_NETWORK_REJECT (Explicit network reject) 3480 * CALL_FAIL_RADIO_ACCESS_FAILURE (RRC connection failure. Eg.RACH) 3481 * CALL_FAIL_RADIO_LINK_FAILURE (Radio Link Failure) 3482 * CALL_FAIL_RADIO_LINK_LOST (Radio link lost due to poor coverage) 3483 * CALL_FAIL_RADIO_UPLINK_FAILURE (Radio uplink failure) 3484 * CALL_FAIL_RADIO_SETUP_FAILURE (RRC connection setup failure) 3485 * CALL_FAIL_RADIO_RELEASE_NORMAL (RRC connection release, normal) 3486 * CALL_FAIL_RADIO_RELEASE_ABNORMAL (RRC connection release, abnormal) 3487 * CALL_FAIL_ACCESS_CLASS_BLOCKED (Access class barring) 3488 * CALL_FAIL_NETWORK_DETACH (Explicit network detach) 3489 * 3490 * OEM causes (CALL_FAIL_OEM_CAUSE_XX) must be used for debug purpose only 3491 * 3492 * If the implementation does not have access to the exact cause codes, 3493 * then it should return one of the values listed in RIL_LastCallFailCause, 3494 * as the UI layer needs to distinguish these cases for tone generation or 3495 * error notification. 3496 * 3497 * Valid errors: 3498 * SUCCESS 3499 * RADIO_NOT_AVAILABLE 3500 * NO_MEMORY 3501 * INTERNAL_ERR 3502 * NO_RESOURCES 3503 * CANCELLED 3504 * REQUEST_NOT_SUPPORTED 3505 * 3506 * See also: RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 3507 */ 3508 #define RIL_REQUEST_LAST_CALL_FAIL_CAUSE 18 3509 3510 /** 3511 * RIL_REQUEST_SIGNAL_STRENGTH 3512 * 3513 * Requests current signal strength and associated information 3514 * 3515 * Must succeed if radio is on. 3516 * 3517 * "data" is NULL 3518 * 3519 * "response" is a const RIL_SignalStrength * 3520 * 3521 * Valid errors: 3522 * SUCCESS 3523 * RADIO_NOT_AVAILABLE 3524 * NO_MEMORY 3525 * INTERNAL_ERR 3526 * SYSTEM_ERR 3527 * MODEM_ERR 3528 * NOT_PROVISIONED 3529 * REQUEST_NOT_SUPPORTED 3530 * NO_RESOURCES 3531 * CANCELLED 3532 */ 3533 #define RIL_REQUEST_SIGNAL_STRENGTH 19 3534 3535 /** 3536 * RIL_REQUEST_VOICE_REGISTRATION_STATE 3537 * 3538 * Request current registration state 3539 * 3540 * "data" is NULL 3541 * "response" is a const RIL_VoiceRegistrationStateResponse * 3542 * 3543 * Valid errors: 3544 * SUCCESS 3545 * RADIO_NOT_AVAILABLE 3546 * INTERNAL_ERR 3547 * NO_MEMORY 3548 * NO_RESOURCES 3549 * CANCELLED 3550 * REQUEST_NOT_SUPPORTED 3551 */ 3552 #define RIL_REQUEST_VOICE_REGISTRATION_STATE 20 3553 3554 /** 3555 * RIL_REQUEST_DATA_REGISTRATION_STATE 3556 * 3557 * Request current DATA registration state 3558 * 3559 * "data" is NULL 3560 * "response" is a const RIL_DataRegistrationStateResponse * 3561 * 3562 * Valid errors: 3563 * SUCCESS 3564 * RADIO_NOT_AVAILABLE 3565 * NO_MEMORY 3566 * INTERNAL_ERR 3567 * SYSTEM_ERR 3568 * MODEM_ERR 3569 * NOT_PROVISIONED 3570 * REQUEST_NOT_SUPPORTED 3571 * NO_RESOURCES 3572 * CANCELLED 3573 */ 3574 #define RIL_REQUEST_DATA_REGISTRATION_STATE 21 3575 3576 /** 3577 * RIL_REQUEST_OPERATOR 3578 * 3579 * Request current operator ONS or EONS 3580 * 3581 * "data" is NULL 3582 * "response" is a "const char **" 3583 * ((const char **)response)[0] is long alpha ONS or EONS 3584 * or NULL if unregistered 3585 * 3586 * ((const char **)response)[1] is short alpha ONS or EONS 3587 * or NULL if unregistered 3588 * ((const char **)response)[2] is 5 or 6 digit numeric code (MCC + MNC) 3589 * or NULL if unregistered 3590 * 3591 * Valid errors: 3592 * SUCCESS 3593 * RADIO_NOT_AVAILABLE 3594 * NO_MEMORY 3595 * INTERNAL_ERR 3596 * SYSTEM_ERR 3597 * REQUEST_NOT_SUPPORTED 3598 * NO_RESOURCES 3599 * CANCELLED 3600 */ 3601 #define RIL_REQUEST_OPERATOR 22 3602 3603 /** 3604 * RIL_REQUEST_RADIO_POWER 3605 * 3606 * Toggle radio on and off (for "airplane" mode) 3607 * If the radio is is turned off/on the radio modem subsystem 3608 * is expected return to an initialized state. For instance, 3609 * any voice and data calls will be terminated and all associated 3610 * lists emptied. 3611 * 3612 * "data" is int * 3613 * ((int *)data)[0] is > 0 for "Radio On" 3614 * ((int *)data)[0] is == 0 for "Radio Off" 3615 * 3616 * "response" is NULL 3617 * 3618 * Turn radio on if "on" > 0 3619 * Turn radio off if "on" == 0 3620 * 3621 * Valid errors: 3622 * SUCCESS 3623 * RADIO_NOT_AVAILABLE 3624 * OPERATION_NOT_ALLOWED 3625 * INVALID_STATE 3626 * NO_MEMORY 3627 * INTERNAL_ERR 3628 * SYSTEM_ERR 3629 * INVALID_ARGUMENTS 3630 * MODEM_ERR 3631 * DEVICE_IN_USE 3632 * OPERATION_NOT_ALLOWED 3633 * INVALID_MODEM_STATE 3634 * REQUEST_NOT_SUPPORTED 3635 * NO_RESOURCES 3636 * CANCELLED 3637 */ 3638 #define RIL_REQUEST_RADIO_POWER 23 3639 3640 /** 3641 * RIL_REQUEST_DTMF 3642 * 3643 * Send a DTMF tone 3644 * 3645 * If the implementation is currently playing a tone requested via 3646 * RIL_REQUEST_DTMF_START, that tone should be cancelled and the new tone 3647 * should be played instead 3648 * 3649 * "data" is a char * containing a single character with one of 12 values: 0-9,*,# 3650 * "response" is NULL 3651 * 3652 * FIXME should this block/mute microphone? 3653 * How does this interact with local DTMF feedback? 3654 * 3655 * Valid errors: 3656 * SUCCESS 3657 * RADIO_NOT_AVAILABLE 3658 * INVALID_ARGUMENTS 3659 * NO_RESOURCES 3660 * NO_MEMORY 3661 * MODEM_ERR 3662 * INTERNAL_ERR 3663 * INVALID_CALL_ID 3664 * NO_RESOURCES 3665 * CANCELLED 3666 * INVALID_MODEM_STATE 3667 * REQUEST_NOT_SUPPORTED 3668 * 3669 * See also: RIL_REQUEST_DTMF_STOP, RIL_REQUEST_DTMF_START 3670 * 3671 */ 3672 #define RIL_REQUEST_DTMF 24 3673 3674 /** 3675 * RIL_REQUEST_SEND_SMS 3676 * 3677 * Send an SMS message 3678 * 3679 * "data" is const char ** 3680 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 3681 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 3682 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 3683 * less the SMSC address 3684 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 3685 * 3686 * "response" is a const RIL_SMS_Response * 3687 * 3688 * Based on the return error, caller decides to resend if sending sms 3689 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 3690 * 3691 * Valid errors: 3692 * SUCCESS 3693 * RADIO_NOT_AVAILABLE 3694 * SMS_SEND_FAIL_RETRY 3695 * FDN_CHECK_FAILURE 3696 * NETWORK_REJECT 3697 * INVALID_STATE 3698 * INVALID_ARGUMENTS 3699 * NO_MEMORY 3700 * REQUEST_RATE_LIMITED 3701 * INVALID_SMS_FORMAT 3702 * SYSTEM_ERR 3703 * ENCODING_ERR 3704 * INVALID_SMSC_ADDRESS 3705 * MODEM_ERR 3706 * NETWORK_ERR 3707 * OPERATION_NOT_ALLOWED 3708 * NO_MEMORY 3709 * NO_RESOURCES 3710 * CANCELLED 3711 * REQUEST_NOT_SUPPORTED 3712 * MODE_NOT_SUPPORTED 3713 * SIM_ABSENT 3714 * 3715 * FIXME how do we specify TP-Message-Reference if we need to resend? 3716 */ 3717 #define RIL_REQUEST_SEND_SMS 25 3718 3719 3720 /** 3721 * RIL_REQUEST_SEND_SMS_EXPECT_MORE 3722 * 3723 * Send an SMS message. Identical to RIL_REQUEST_SEND_SMS, 3724 * except that more messages are expected to be sent soon. If possible, 3725 * keep SMS relay protocol link open (eg TS 27.005 AT+CMMS command) 3726 * 3727 * "data" is const char ** 3728 * ((const char **)data)[0] is SMSC address in GSM BCD format prefixed 3729 * by a length byte (as expected by TS 27.005) or NULL for default SMSC 3730 * ((const char **)data)[1] is SMS in PDU format as an ASCII hex string 3731 * less the SMSC address 3732 * TP-Layer-Length is be "strlen(((const char **)data)[1])/2" 3733 * 3734 * "response" is a const RIL_SMS_Response * 3735 * 3736 * Based on the return error, caller decides to resend if sending sms 3737 * fails. SMS_SEND_FAIL_RETRY means retry (i.e. error cause is 332) 3738 * 3739 * Valid errors: 3740 * SUCCESS 3741 * RADIO_NOT_AVAILABLE 3742 * SMS_SEND_FAIL_RETRY 3743 * NETWORK_REJECT 3744 * INVALID_STATE 3745 * INVALID_ARGUMENTS 3746 * NO_MEMORY 3747 * INVALID_SMS_FORMAT 3748 * SYSTEM_ERR 3749 * REQUEST_RATE_LIMITED 3750 * FDN_CHECK_FAILURE 3751 * MODEM_ERR 3752 * NETWORK_ERR 3753 * ENCODING_ERR 3754 * INVALID_SMSC_ADDRESS 3755 * OPERATION_NOT_ALLOWED 3756 * INTERNAL_ERR 3757 * NO_RESOURCES 3758 * CANCELLED 3759 * REQUEST_NOT_SUPPORTED 3760 * MODE_NOT_SUPPORTED 3761 * SIM_ABSENT 3762 * 3763 */ 3764 #define RIL_REQUEST_SEND_SMS_EXPECT_MORE 26 3765 3766 3767 /** 3768 * RIL_REQUEST_SETUP_DATA_CALL 3769 * 3770 * Setup a packet data connection. If RIL_Data_Call_Response_v6.status 3771 * return success it is added to the list of data calls and a 3772 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is sent. The call remains in the 3773 * list until RIL_REQUEST_DEACTIVATE_DATA_CALL is issued or the 3774 * radio is powered off/on. This list is returned by RIL_REQUEST_DATA_CALL_LIST 3775 * and RIL_UNSOL_DATA_CALL_LIST_CHANGED. 3776 * 3777 * The RIL is expected to: 3778 * - Create one data call context. 3779 * - Create and configure a dedicated interface for the context 3780 * - The interface must be point to point. 3781 * - The interface is configured with one or more addresses and 3782 * is capable of sending and receiving packets. The prefix length 3783 * of the addresses must be /32 for IPv4 and /128 for IPv6. 3784 * - Must NOT change the linux routing table. 3785 * - Support up to RIL_REQUEST_DATA_REGISTRATION_STATE response[5] 3786 * number of simultaneous data call contexts. 3787 * 3788 * "data" is a const char ** 3789 * ((const char **)data)[0] Radio technology to use: 0-CDMA, 1-GSM/UMTS, 2... 3790 * for values above 2 this is RIL_RadioTechnology + 2. 3791 * ((const char **)data)[1] is a RIL_DataProfile (support is optional) 3792 * ((const char **)data)[2] is the APN to connect to if radio technology is GSM/UMTS. This APN will 3793 * override the one in the profile. NULL indicates no APN override. 3794 * ((const char **)data)[3] is the username for APN, or NULL 3795 * ((const char **)data)[4] is the password for APN, or NULL 3796 * ((const char **)data)[5] is the PAP / CHAP auth type. Values: 3797 * 0 => PAP and CHAP is never performed. 3798 * 1 => PAP may be performed; CHAP is never performed. 3799 * 2 => CHAP may be performed; PAP is never performed. 3800 * 3 => PAP / CHAP may be performed - baseband dependent. 3801 * ((const char **)data)[6] is the non-roaming/home connection type to request. Must be one of the 3802 * PDP_type values in TS 27.007 section 10.1.1. 3803 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 3804 * ((const char **)data)[7] is the roaming connection type to request. Must be one of the 3805 * PDP_type values in TS 27.007 section 10.1.1. 3806 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 3807 * ((const char **)data)[8] is the bitmask of APN type in decimal string format. The 3808 * bitmask will encapsulate the following values: 3809 * ia,mms,agps,supl,hipri,fota,dun,ims,default. 3810 * ((const char **)data)[9] is the bearer bitmask in decimal string format. Each bit is a 3811 * RIL_RadioAccessFamily. "0" or NULL indicates all RATs. 3812 * ((const char **)data)[10] is the boolean in string format indicating the APN setting was 3813 * sent to the modem through RIL_REQUEST_SET_DATA_PROFILE earlier. 3814 * ((const char **)data)[11] is the mtu size in bytes of the mobile interface to which 3815 * the apn is connected. 3816 * ((const char **)data)[12] is the MVNO type: 3817 * possible values are "imsi", "gid", "spn". 3818 * ((const char **)data)[13] is MVNO match data in string. Can be anything defined by the carrier. 3819 * For example, 3820 * SPN like: "A MOBILE", "BEN NL", etc... 3821 * IMSI like: "302720x94", "2060188", etc... 3822 * GID like: "4E", "33", etc... 3823 * ((const char **)data)[14] is the boolean string indicating data roaming is allowed or not. "1" 3824 * indicates data roaming is enabled by the user, "0" indicates disabled. 3825 * 3826 * "response" is a RIL_Data_Call_Response_v11 3827 * 3828 * FIXME may need way to configure QoS settings 3829 * 3830 * Valid errors: 3831 * SUCCESS should be returned on both success and failure of setup with 3832 * the RIL_Data_Call_Response_v6.status containing the actual status. 3833 * For all other errors the RIL_Data_Call_Resonse_v6 is ignored. 3834 * 3835 * Other errors could include: 3836 * RADIO_NOT_AVAILABLE, OP_NOT_ALLOWED_BEFORE_REG_TO_NW, 3837 * OP_NOT_ALLOWED_DURING_VOICE_CALL, REQUEST_NOT_SUPPORTED, 3838 * INVALID_ARGUMENTS, INTERNAL_ERR, NO_MEMORY, NO_RESOURCES, 3839 * CANCELLED and SIM_ABSENT 3840 * 3841 * See also: RIL_REQUEST_DEACTIVATE_DATA_CALL 3842 */ 3843 #define RIL_REQUEST_SETUP_DATA_CALL 27 3844 3845 3846 /** 3847 * RIL_REQUEST_SIM_IO 3848 * 3849 * Request SIM I/O operation. 3850 * This is similar to the TS 27.007 "restricted SIM" operation 3851 * where it assumes all of the EF selection will be done by the 3852 * callee. 3853 * 3854 * "data" is a const RIL_SIM_IO_v6 * 3855 * Please note that RIL_SIM_IO has a "PIN2" field which may be NULL, 3856 * or may specify a PIN2 for operations that require a PIN2 (eg 3857 * updating FDN records) 3858 * 3859 * "response" is a const RIL_SIM_IO_Response * 3860 * 3861 * Arguments and responses that are unused for certain 3862 * values of "command" should be ignored or set to NULL 3863 * 3864 * Valid errors: 3865 * SUCCESS 3866 * RADIO_NOT_AVAILABLE 3867 * SIM_PIN2 3868 * SIM_PUK2 3869 * INVALID_SIM_STATE 3870 * SIM_ERR 3871 * REQUEST_NOT_SUPPORTED 3872 */ 3873 #define RIL_REQUEST_SIM_IO 28 3874 3875 /** 3876 * RIL_REQUEST_SEND_USSD 3877 * 3878 * Send a USSD message 3879 * 3880 * If a USSD session already exists, the message should be sent in the 3881 * context of that session. Otherwise, a new session should be created. 3882 * 3883 * The network reply should be reported via RIL_UNSOL_ON_USSD 3884 * 3885 * Only one USSD session may exist at a time, and the session is assumed 3886 * to exist until: 3887 * a) The android system invokes RIL_REQUEST_CANCEL_USSD 3888 * b) The implementation sends a RIL_UNSOL_ON_USSD with a type code 3889 * of "0" (USSD-Notify/no further action) or "2" (session terminated) 3890 * 3891 * "data" is a const char * containing the USSD request in UTF-8 format 3892 * "response" is NULL 3893 * 3894 * Valid errors: 3895 * SUCCESS 3896 * RADIO_NOT_AVAILABLE 3897 * FDN_CHECK_FAILURE 3898 * USSD_MODIFIED_TO_DIAL 3899 * USSD_MODIFIED_TO_SS 3900 * USSD_MODIFIED_TO_USSD 3901 * SIM_BUSY 3902 * OPERATION_NOT_ALLOWED 3903 * INVALID_ARGUMENTS 3904 * NO_MEMORY 3905 * MODEM_ERR 3906 * INTERNAL_ERR 3907 * ABORTED 3908 * SYSTEM_ERR 3909 * INVALID_STATE 3910 * NO_RESOURCES 3911 * CANCELLED 3912 * REQUEST_NOT_SUPPORTED 3913 * 3914 * See also: RIL_REQUEST_CANCEL_USSD, RIL_UNSOL_ON_USSD 3915 */ 3916 3917 #define RIL_REQUEST_SEND_USSD 29 3918 3919 /** 3920 * RIL_REQUEST_CANCEL_USSD 3921 * 3922 * Cancel the current USSD session if one exists 3923 * 3924 * "data" is null 3925 * "response" is NULL 3926 * 3927 * Valid errors: 3928 * SUCCESS 3929 * RADIO_NOT_AVAILABLE 3930 * SIM_BUSY 3931 * OPERATION_NOT_ALLOWED 3932 * MODEM_ERR 3933 * INTERNAL_ERR 3934 * NO_MEMORY 3935 * INVALID_STATE 3936 * NO_RESOURCES 3937 * CANCELLED 3938 * REQUEST_NOT_SUPPORTED 3939 */ 3940 3941 #define RIL_REQUEST_CANCEL_USSD 30 3942 3943 /** 3944 * RIL_REQUEST_GET_CLIR 3945 * 3946 * Gets current CLIR status 3947 * "data" is NULL 3948 * "response" is int * 3949 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 3950 * ((int *)data)[1] is "m" parameter from TS 27.007 7.7 3951 * 3952 * Valid errors: 3953 * SUCCESS 3954 * RADIO_NOT_AVAILABLE 3955 * SS_MODIFIED_TO_DIAL 3956 * SS_MODIFIED_TO_USSD 3957 * SS_MODIFIED_TO_SS 3958 * NO_MEMORY 3959 * MODEM_ERR 3960 * INTERNAL_ERR 3961 * FDN_CHECK_FAILURE 3962 * SYSTEM_ERR 3963 * NO_RESOURCES 3964 * CANCELLED 3965 * REQUEST_NOT_SUPPORTED 3966 */ 3967 #define RIL_REQUEST_GET_CLIR 31 3968 3969 /** 3970 * RIL_REQUEST_SET_CLIR 3971 * 3972 * "data" is int * 3973 * ((int *)data)[0] is "n" parameter from TS 27.007 7.7 3974 * 3975 * "response" is NULL 3976 * 3977 * Valid errors: 3978 * SUCCESS 3979 * RADIO_NOT_AVAILABLE 3980 * SS_MODIFIED_TO_DIAL 3981 * SS_MODIFIED_TO_USSD 3982 * SS_MODIFIED_TO_SS 3983 * INVALID_ARGUMENTS 3984 * SYSTEM_ERR 3985 * INTERNAL_ERR 3986 * NO_MEMORY 3987 * NO_RESOURCES 3988 * CANCELLED 3989 * REQUEST_NOT_SUPPORTED 3990 */ 3991 #define RIL_REQUEST_SET_CLIR 32 3992 3993 /** 3994 * RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 3995 * 3996 * "data" is const RIL_CallForwardInfo * 3997 * 3998 * "response" is const RIL_CallForwardInfo ** 3999 * "response" points to an array of RIL_CallForwardInfo *'s, one for 4000 * each distinct registered phone number. 4001 * 4002 * For example, if data is forwarded to +18005551212 and voice is forwarded 4003 * to +18005559999, then two separate RIL_CallForwardInfo's should be returned 4004 * 4005 * If, however, both data and voice are forwarded to +18005551212, then 4006 * a single RIL_CallForwardInfo can be returned with the service class 4007 * set to "data + voice = 3") 4008 * 4009 * Valid errors: 4010 * SUCCESS 4011 * RADIO_NOT_AVAILABLE 4012 * SS_MODIFIED_TO_DIAL 4013 * SS_MODIFIED_TO_USSD 4014 * SS_MODIFIED_TO_SS 4015 * INVALID_ARGUMENTS 4016 * NO_MEMORY 4017 * SYSTEM_ERR 4018 * MODEM_ERR 4019 * INTERNAL_ERR 4020 * NO_MEMORY 4021 * FDN_CHECK_FAILURE 4022 * NO_RESOURCES 4023 * CANCELLED 4024 * REQUEST_NOT_SUPPORTED 4025 */ 4026 #define RIL_REQUEST_QUERY_CALL_FORWARD_STATUS 33 4027 4028 4029 /** 4030 * RIL_REQUEST_SET_CALL_FORWARD 4031 * 4032 * Configure call forward rule 4033 * 4034 * "data" is const RIL_CallForwardInfo * 4035 * "response" is NULL 4036 * 4037 * Valid errors: 4038 * SUCCESS 4039 * RADIO_NOT_AVAILABLE 4040 * SS_MODIFIED_TO_DIAL 4041 * SS_MODIFIED_TO_USSD 4042 * SS_MODIFIED_TO_SS 4043 * INVALID_ARGUMENTS 4044 * NO_MEMORY 4045 * SYSTEM_ERR 4046 * MODEM_ERR 4047 * INTERNAL_ERR 4048 * INVALID_STATE 4049 * FDN_CHECK_FAILURE 4050 * NO_RESOURCES 4051 * CANCELLED 4052 * REQUEST_NOT_SUPPORTED 4053 */ 4054 #define RIL_REQUEST_SET_CALL_FORWARD 34 4055 4056 4057 /** 4058 * RIL_REQUEST_QUERY_CALL_WAITING 4059 * 4060 * Query current call waiting state 4061 * 4062 * "data" is const int * 4063 * ((const int *)data)[0] is the TS 27.007 service class to query. 4064 * "response" is a const int * 4065 * ((const int *)response)[0] is 0 for "disabled" and 1 for "enabled" 4066 * 4067 * If ((const int *)response)[0] is = 1, then ((const int *)response)[1] 4068 * must follow, with the TS 27.007 service class bit vector of services 4069 * for which call waiting is enabled. 4070 * 4071 * For example, if ((const int *)response)[0] is 1 and 4072 * ((const int *)response)[1] is 3, then call waiting is enabled for data 4073 * and voice and disabled for everything else 4074 * 4075 * Valid errors: 4076 * SUCCESS 4077 * RADIO_NOT_AVAILABLE 4078 * SS_MODIFIED_TO_DIAL 4079 * SS_MODIFIED_TO_USSD 4080 * SS_MODIFIED_TO_SS 4081 * NO_MEMORY 4082 * MODEM_ERR 4083 * INTERNAL_ERR 4084 * NO_MEMORY 4085 * FDN_CHECK_FAILURE 4086 * INVALID_ARGUMENTS 4087 * NO_RESOURCES 4088 * CANCELLED 4089 * REQUEST_NOT_SUPPORTED 4090 */ 4091 #define RIL_REQUEST_QUERY_CALL_WAITING 35 4092 4093 4094 /** 4095 * RIL_REQUEST_SET_CALL_WAITING 4096 * 4097 * Configure current call waiting state 4098 * 4099 * "data" is const int * 4100 * ((const int *)data)[0] is 0 for "disabled" and 1 for "enabled" 4101 * ((const int *)data)[1] is the TS 27.007 service class bit vector of 4102 * services to modify 4103 * "response" is NULL 4104 * 4105 * Valid errors: 4106 * SUCCESS 4107 * RADIO_NOT_AVAILABLE 4108 * SS_MODIFIED_TO_DIAL 4109 * SS_MODIFIED_TO_USSD 4110 * SS_MODIFIED_TO_SS 4111 * INVALID_ARGUMENTS 4112 * NO_MEMORY 4113 * MODEM_ERR 4114 * INTERNAL_ERR 4115 * INVALID_STATE 4116 * FDN_CHECK_FAILURE 4117 * NO_RESOURCES 4118 * CANCELLED 4119 * REQUEST_NOT_SUPPORTED 4120 */ 4121 #define RIL_REQUEST_SET_CALL_WAITING 36 4122 4123 /** 4124 * RIL_REQUEST_SMS_ACKNOWLEDGE 4125 * 4126 * Acknowledge successful or failed receipt of SMS previously indicated 4127 * via RIL_UNSOL_RESPONSE_NEW_SMS 4128 * 4129 * "data" is int * 4130 * ((int *)data)[0] is 1 on successful receipt 4131 * (basically, AT+CNMA=1 from TS 27.005 4132 * is 0 on failed receipt 4133 * (basically, AT+CNMA=2 from TS 27.005) 4134 * ((int *)data)[1] if data[0] is 0, this contains the failure cause as defined 4135 * in TS 23.040, 9.2.3.22. Currently only 0xD3 (memory 4136 * capacity exceeded) and 0xFF (unspecified error) are 4137 * reported. 4138 * 4139 * "response" is NULL 4140 * 4141 * FIXME would like request that specified RP-ACK/RP-ERROR PDU 4142 * 4143 * Valid errors: 4144 * SUCCESS 4145 * RADIO_NOT_AVAILABLE 4146 * INTERNAL_ERR 4147 * NO_MEMORY 4148 * NO_RESOURCES 4149 * CANCELLED 4150 * REQUEST_NOT_SUPPORTED 4151 */ 4152 #define RIL_REQUEST_SMS_ACKNOWLEDGE 37 4153 4154 /** 4155 * RIL_REQUEST_GET_IMEI - DEPRECATED 4156 * 4157 * Get the device IMEI, including check digit 4158 * 4159 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 4160 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 4161 * 4162 * "data" is NULL 4163 * "response" is a const char * containing the IMEI 4164 * 4165 * Valid errors: 4166 * SUCCESS 4167 * RADIO_NOT_AVAILABLE (radio resetting) 4168 * NO_MEMORY 4169 * INTERNAL_ERR 4170 * SYSTEM_ERR 4171 * MODEM_ERR 4172 * NOT_PROVISIONED 4173 * REQUEST_NOT_SUPPORTED 4174 * NO_RESOURCES 4175 * CANCELLED 4176 */ 4177 4178 #define RIL_REQUEST_GET_IMEI 38 4179 4180 /** 4181 * RIL_REQUEST_GET_IMEISV - DEPRECATED 4182 * 4183 * Get the device IMEISV, which should be two decimal digits 4184 * 4185 * The request is DEPRECATED, use RIL_REQUEST_DEVICE_IDENTITY 4186 * Valid when RadioState is not RADIO_STATE_UNAVAILABLE 4187 * 4188 * "data" is NULL 4189 * "response" is a const char * containing the IMEISV 4190 * 4191 * Valid errors: 4192 * SUCCESS 4193 * RADIO_NOT_AVAILABLE (radio resetting) 4194 * NO_MEMORY 4195 * INTERNAL_ERR 4196 * SYSTEM_ERR 4197 * MODEM_ERR 4198 * NOT_PROVISIONED 4199 * REQUEST_NOT_SUPPORTED 4200 * NO_RESOURCES 4201 * CANCELLED 4202 */ 4203 4204 #define RIL_REQUEST_GET_IMEISV 39 4205 4206 4207 /** 4208 * RIL_REQUEST_ANSWER 4209 * 4210 * Answer incoming call 4211 * 4212 * Will not be called for WAITING calls. 4213 * RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE will be used in this case 4214 * instead 4215 * 4216 * "data" is NULL 4217 * "response" is NULL 4218 * 4219 * Valid errors: 4220 * SUCCESS 4221 * RADIO_NOT_AVAILABLE (radio resetting) 4222 * INVALID_STATE 4223 * NO_MEMORY 4224 * SYSTEM_ERR 4225 * MODEM_ERR 4226 * INTERNAL_ERR 4227 * INVALID_CALL_ID 4228 * NO_RESOURCES 4229 * CANCELLED 4230 * REQUEST_NOT_SUPPORTED 4231 */ 4232 4233 #define RIL_REQUEST_ANSWER 40 4234 4235 /** 4236 * RIL_REQUEST_DEACTIVATE_DATA_CALL 4237 * 4238 * Deactivate packet data connection and remove from the 4239 * data call list if SUCCESS is returned. Any other return 4240 * values should also try to remove the call from the list, 4241 * but that may not be possible. In any event a 4242 * RIL_REQUEST_RADIO_POWER off/on must clear the list. An 4243 * RIL_UNSOL_DATA_CALL_LIST_CHANGED is not expected to be 4244 * issued because of an RIL_REQUEST_DEACTIVATE_DATA_CALL. 4245 * 4246 * "data" is const char ** 4247 * ((char**)data)[0] indicating CID 4248 * ((char**)data)[1] indicating Disconnect Reason 4249 * 0 => No specific reason specified 4250 * 1 => Radio shutdown requested 4251 * 4252 * "response" is NULL 4253 * 4254 * Valid errors: 4255 * SUCCESS 4256 * RADIO_NOT_AVAILABLE 4257 * INVALID_CALL_ID 4258 * INVALID_STATE 4259 * INVALID_ARGUMENTS 4260 * REQUEST_NOT_SUPPORTED 4261 * INTERNAL_ERR 4262 * NO_MEMORY 4263 * NO_RESOURCES 4264 * CANCELLED 4265 * SIM_ABSENT 4266 * 4267 * See also: RIL_REQUEST_SETUP_DATA_CALL 4268 */ 4269 #define RIL_REQUEST_DEACTIVATE_DATA_CALL 41 4270 4271 /** 4272 * RIL_REQUEST_QUERY_FACILITY_LOCK 4273 * 4274 * Query the status of a facility lock state 4275 * 4276 * "data" is const char ** 4277 * ((const char **)data)[0] is the facility string code from TS 27.007 7.4 4278 * (eg "AO" for BAOC, "SC" for SIM lock) 4279 * ((const char **)data)[1] is the password, or "" if not required 4280 * ((const char **)data)[2] is the TS 27.007 service class bit vector of 4281 * services to query 4282 * ((const char **)data)[3] is AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 4283 * This is only applicable in the case of Fixed Dialing Numbers 4284 * (FDN) requests. 4285 * 4286 * "response" is an int * 4287 * ((const int *)response) 0 is the TS 27.007 service class bit vector of 4288 * services for which the specified barring facility 4289 * is active. "0" means "disabled for all" 4290 * 4291 * 4292 * Valid errors: 4293 * SUCCESS 4294 * RADIO_NOT_AVAILABLE 4295 * SS_MODIFIED_TO_DIAL 4296 * SS_MODIFIED_TO_USSD 4297 * SS_MODIFIED_TO_SS 4298 * INVALID_ARGUMENTS 4299 * NO_MEMORY 4300 * INTERNAL_ERR 4301 * SYSTEM_ERR 4302 * MODEM_ERR 4303 * FDN_CHECK_FAILURE 4304 * NO_RESOURCES 4305 * CANCELLED 4306 * REQUEST_NOT_SUPPORTED 4307 * 4308 */ 4309 #define RIL_REQUEST_QUERY_FACILITY_LOCK 42 4310 4311 /** 4312 * RIL_REQUEST_SET_FACILITY_LOCK 4313 * 4314 * Enable/disable one facility lock 4315 * 4316 * "data" is const char ** 4317 * 4318 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 4319 * (eg "AO" for BAOC) 4320 * ((const char **)data)[1] = "0" for "unlock" and "1" for "lock" 4321 * ((const char **)data)[2] = password 4322 * ((const char **)data)[3] = string representation of decimal TS 27.007 4323 * service class bit vector. Eg, the string 4324 * "1" means "set this facility for voice services" 4325 * ((const char **)data)[4] = AID value, See ETSI 102.221 8.1 and 101.220 4, NULL if no value. 4326 * This is only applicable in the case of Fixed Dialing Numbers 4327 * (FDN) requests. 4328 * 4329 * "response" is int * 4330 * ((int *)response)[0] is the number of retries remaining, or -1 if unknown 4331 * 4332 * Valid errors: 4333 * SUCCESS 4334 * RADIO_NOT_AVAILABLE 4335 * SS_MODIFIED_TO_DIAL 4336 * SS_MODIFIED_TO_USSD 4337 * SS_MODIFIED_TO_SS 4338 * INVALID_ARGUMENTS 4339 * INTERNAL_ERR 4340 * NO_MEMORY 4341 * MODEM_ERR 4342 * INVALID_STATE 4343 * FDN_CHECK_FAILURE 4344 * NO_RESOURCES 4345 * CANCELLED 4346 * REQUEST_NOT_SUPPORTED 4347 * 4348 */ 4349 #define RIL_REQUEST_SET_FACILITY_LOCK 43 4350 4351 /** 4352 * RIL_REQUEST_CHANGE_BARRING_PASSWORD 4353 * 4354 * Change call barring facility password 4355 * 4356 * "data" is const char ** 4357 * 4358 * ((const char **)data)[0] = facility string code from TS 27.007 7.4 4359 * (eg "AO" for BAOC) 4360 * ((const char **)data)[1] = old password 4361 * ((const char **)data)[2] = new password 4362 * 4363 * "response" is NULL 4364 * 4365 * Valid errors: 4366 * SUCCESS 4367 * RADIO_NOT_AVAILABLE 4368 * SS_MODIFIED_TO_DIAL 4369 * SS_MODIFIED_TO_USSD 4370 * SS_MODIFIED_TO_SS 4371 * INVALID_ARGUMENTS 4372 * NO_MEMORY 4373 * MODEM_ERR 4374 * INTERNAL_ERR 4375 * SYSTEM_ERR 4376 * FDN_CHECK_FAILURE 4377 * NO_RESOURCES 4378 * CANCELLED 4379 * REQUEST_NOT_SUPPORTED 4380 * 4381 */ 4382 #define RIL_REQUEST_CHANGE_BARRING_PASSWORD 44 4383 4384 /** 4385 * RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 4386 * 4387 * Query current network selection mode 4388 * 4389 * "data" is NULL 4390 * 4391 * "response" is int * 4392 * ((const int *)response)[0] is 4393 * 0 for automatic selection 4394 * 1 for manual selection 4395 * 4396 * Valid errors: 4397 * SUCCESS 4398 * RADIO_NOT_AVAILABLE 4399 * NO_MEMORY 4400 * INTERNAL_ERR 4401 * SYSTEM_ERR 4402 * INVALID_ARGUMENTS 4403 * MODEM_ERR 4404 * REQUEST_NOT_SUPPORTED 4405 * NO_RESOURCES 4406 * CANCELLED 4407 * 4408 */ 4409 #define RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE 45 4410 4411 /** 4412 * RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 4413 * 4414 * Specify that the network should be selected automatically 4415 * 4416 * "data" is NULL 4417 * "response" is NULL 4418 * 4419 * This request must not respond until the new operator is selected 4420 * and registered 4421 * 4422 * Valid errors: 4423 * SUCCESS 4424 * RADIO_NOT_AVAILABLE 4425 * ILLEGAL_SIM_OR_ME 4426 * OPERATION_NOT_ALLOWED 4427 * NO_MEMORY 4428 * INTERNAL_ERR 4429 * SYSTEM_ERR 4430 * INVALID_ARGUMENTS 4431 * MODEM_ERR 4432 * REQUEST_NOT_SUPPORTED 4433 * NO_RESOURCES 4434 * CANCELLED 4435 * 4436 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 4437 * no retries needed, such as illegal SIM or ME. 4438 * 4439 */ 4440 #define RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC 46 4441 4442 /** 4443 * RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 4444 * 4445 * Manually select a specified network. 4446 * 4447 * "data" is const char * specifying MCCMNC of network to select (eg "310170") 4448 * "response" is NULL 4449 * 4450 * This request must not respond until the new operator is selected 4451 * and registered 4452 * 4453 * Valid errors: 4454 * SUCCESS 4455 * RADIO_NOT_AVAILABLE 4456 * ILLEGAL_SIM_OR_ME 4457 * OPERATION_NOT_ALLOWED 4458 * INVALID_STATE 4459 * NO_MEMORY 4460 * INTERNAL_ERR 4461 * SYSTEM_ERR 4462 * INVALID_ARGUMENTS 4463 * MODEM_ERR 4464 * REQUEST_NOT_SUPPORTED 4465 * NO_RESOURCES 4466 * CANCELLED 4467 * 4468 * Note: Returns ILLEGAL_SIM_OR_ME when the failure is permanent and 4469 * no retries needed, such as illegal SIM or ME. 4470 * 4471 */ 4472 #define RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL 47 4473 4474 /** 4475 * RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 4476 * 4477 * Scans for available networks 4478 * 4479 * "data" is NULL 4480 * "response" is const char ** that should be an array of n*4 strings, where 4481 * n is the number of available networks 4482 * For each available network: 4483 * 4484 * ((const char **)response)[n+0] is long alpha ONS or EONS 4485 * ((const char **)response)[n+1] is short alpha ONS or EONS 4486 * ((const char **)response)[n+2] is 5 or 6 digit numeric code (MCC + MNC) 4487 * ((const char **)response)[n+3] is a string value of the status: 4488 * "unknown" 4489 * "available" 4490 * "current" 4491 * "forbidden" 4492 * 4493 * Valid errors: 4494 * SUCCESS 4495 * RADIO_NOT_AVAILABLE 4496 * OPERATION_NOT_ALLOWED 4497 * ABORTED 4498 * DEVICE_IN_USE 4499 * INTERNAL_ERR 4500 * NO_MEMORY 4501 * MODEM_ERR 4502 * REQUEST_NOT_SUPPORTED 4503 * CANCELLED 4504 * OPERATION_NOT_ALLOWED 4505 * NO_RESOURCES 4506 * CANCELLED 4507 * 4508 */ 4509 #define RIL_REQUEST_QUERY_AVAILABLE_NETWORKS 48 4510 4511 /** 4512 * RIL_REQUEST_DTMF_START 4513 * 4514 * Start playing a DTMF tone. Continue playing DTMF tone until 4515 * RIL_REQUEST_DTMF_STOP is received 4516 * 4517 * If a RIL_REQUEST_DTMF_START is received while a tone is currently playing, 4518 * it should cancel the previous tone and play the new one. 4519 * 4520 * "data" is a char * 4521 * ((char *)data)[0] is a single character with one of 12 values: 0-9,*,# 4522 * "response" is NULL 4523 * 4524 * Valid errors: 4525 * SUCCESS 4526 * RADIO_NOT_AVAILABLE 4527 * INVALID_ARGUMENTS 4528 * NO_RESOURCES 4529 * NO_MEMORY 4530 * SYSTEM_ERR 4531 * MODEM_ERR 4532 * INTERNAL_ERR 4533 * INVALID_CALL_ID 4534 * CANCELLED 4535 * INVALID_MODEM_STATE 4536 * REQUEST_NOT_SUPPORTED 4537 * 4538 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_STOP 4539 */ 4540 #define RIL_REQUEST_DTMF_START 49 4541 4542 /** 4543 * RIL_REQUEST_DTMF_STOP 4544 * 4545 * Stop playing a currently playing DTMF tone. 4546 * 4547 * "data" is NULL 4548 * "response" is NULL 4549 * 4550 * Valid errors: 4551 * SUCCESS 4552 * RADIO_NOT_AVAILABLE 4553 * OPERATION_NOT_ALLOWED 4554 * NO_RESOURCES 4555 * NO_MEMORY 4556 * INVALID_ARGUMENTS 4557 * SYSTEM_ERR 4558 * MODEM_ERR 4559 * INTERNAL_ERR 4560 * INVALID_CALL_ID 4561 * CANCELLED 4562 * INVALID_MODEM_STATE 4563 * REQUEST_NOT_SUPPORTED 4564 * 4565 * See also: RIL_REQUEST_DTMF, RIL_REQUEST_DTMF_START 4566 */ 4567 #define RIL_REQUEST_DTMF_STOP 50 4568 4569 /** 4570 * RIL_REQUEST_BASEBAND_VERSION 4571 * 4572 * Return string value indicating baseband version, eg 4573 * response from AT+CGMR 4574 * 4575 * "data" is NULL 4576 * "response" is const char * containing version string for log reporting 4577 * 4578 * Valid errors: 4579 * SUCCESS 4580 * RADIO_NOT_AVAILABLE 4581 * EMPTY_RECORD 4582 * NO_MEMORY 4583 * INTERNAL_ERR 4584 * SYSTEM_ERR 4585 * MODEM_ERR 4586 * NOT_PROVISIONED 4587 * REQUEST_NOT_SUPPORTED 4588 * NO_RESOURCES 4589 * CANCELLED 4590 * 4591 */ 4592 #define RIL_REQUEST_BASEBAND_VERSION 51 4593 4594 /** 4595 * RIL_REQUEST_SEPARATE_CONNECTION 4596 * 4597 * Separate a party from a multiparty call placing the multiparty call 4598 * (less the specified party) on hold and leaving the specified party 4599 * as the only other member of the current (active) call 4600 * 4601 * Like AT+CHLD=2x 4602 * 4603 * See TS 22.084 1.3.8.2 (iii) 4604 * TS 22.030 6.5.5 "Entering "2X followed by send" 4605 * TS 27.007 "AT+CHLD=2x" 4606 * 4607 * "data" is an int * 4608 * (int *)data)[0] contains Connection index (value of 'x' in CHLD above) "response" is NULL 4609 * 4610 * "response" is NULL 4611 * 4612 * Valid errors: 4613 * SUCCESS 4614 * RADIO_NOT_AVAILABLE (radio resetting) 4615 * INVALID_ARGUMENTS 4616 * INVALID_STATE 4617 * NO_RESOURCES 4618 * NO_MEMORY 4619 * SYSTEM_ERR 4620 * MODEM_ERR 4621 * INTERNAL_ERR 4622 * INVALID_CALL_ID 4623 * INVALID_STATE 4624 * OPERATION_NOT_ALLOWED 4625 * CANCELLED 4626 * REQUEST_NOT_SUPPORTED 4627 */ 4628 #define RIL_REQUEST_SEPARATE_CONNECTION 52 4629 4630 4631 /** 4632 * RIL_REQUEST_SET_MUTE 4633 * 4634 * Turn on or off uplink (microphone) mute. 4635 * 4636 * Will only be sent while voice call is active. 4637 * Will always be reset to "disable mute" when a new voice call is initiated 4638 * 4639 * "data" is an int * 4640 * (int *)data)[0] is 1 for "enable mute" and 0 for "disable mute" 4641 * 4642 * "response" is NULL 4643 * 4644 * Valid errors: 4645 * SUCCESS 4646 * RADIO_NOT_AVAILABLE (radio resetting) 4647 * INVALID_ARGUMENTS 4648 * NO_MEMORY 4649 * REQUEST_RATE_LIMITED 4650 * INTERNAL_ERR 4651 * NO_RESOURCES 4652 * CANCELLED 4653 * REQUEST_NOT_SUPPORTED 4654 */ 4655 4656 #define RIL_REQUEST_SET_MUTE 53 4657 4658 /** 4659 * RIL_REQUEST_GET_MUTE 4660 * 4661 * Queries the current state of the uplink mute setting 4662 * 4663 * "data" is NULL 4664 * "response" is an int * 4665 * (int *)response)[0] is 1 for "mute enabled" and 0 for "mute disabled" 4666 * 4667 * Valid errors: 4668 * SUCCESS 4669 * RADIO_NOT_AVAILABLE (radio resetting) 4670 * SS_MODIFIED_TO_DIAL 4671 * SS_MODIFIED_TO_USSD 4672 * SS_MODIFIED_TO_SS 4673 * NO_MEMORY 4674 * REQUEST_RATE_LIMITED 4675 * INTERNAL_ERR 4676 * NO_RESOURCES 4677 * CANCELLED 4678 * REQUEST_NOT_SUPPORTED 4679 */ 4680 4681 #define RIL_REQUEST_GET_MUTE 54 4682 4683 /** 4684 * RIL_REQUEST_QUERY_CLIP 4685 * 4686 * Queries the status of the CLIP supplementary service 4687 * 4688 * (for MMI code "*#30#") 4689 * 4690 * "data" is NULL 4691 * "response" is an int * 4692 * (int *)response)[0] is 1 for "CLIP provisioned" 4693 * and 0 for "CLIP not provisioned" 4694 * and 2 for "unknown, e.g. no network etc" 4695 * 4696 * Valid errors: 4697 * SUCCESS 4698 * RADIO_NOT_AVAILABLE (radio resetting) 4699 * NO_MEMORY 4700 * SYSTEM_ERR 4701 * MODEM_ERR 4702 * INTERNAL_ERR 4703 * FDN_CHECK_FAILURE 4704 * NO_RESOURCES 4705 * CANCELLED 4706 * REQUEST_NOT_SUPPORTED 4707 */ 4708 4709 #define RIL_REQUEST_QUERY_CLIP 55 4710 4711 /** 4712 * RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE - Deprecated use the status 4713 * field in RIL_Data_Call_Response_v6. 4714 * 4715 * Requests the failure cause code for the most recently failed PDP 4716 * context or CDMA data connection active 4717 * replaces RIL_REQUEST_LAST_PDP_FAIL_CAUSE 4718 * 4719 * "data" is NULL 4720 * 4721 * "response" is a "int *" 4722 * ((int *)response)[0] is an integer cause code defined in TS 24.008 4723 * section 6.1.3.1.3 or close approximation 4724 * 4725 * If the implementation does not have access to the exact cause codes, 4726 * then it should return one of the values listed in 4727 * RIL_DataCallFailCause, as the UI layer needs to distinguish these 4728 * cases for error notification 4729 * and potential retries. 4730 * 4731 * Valid errors: 4732 * SUCCESS 4733 * RADIO_NOT_AVAILABLE 4734 * INTERNAL_ERR 4735 * NO_MEMORY 4736 * NO_RESOURCES 4737 * CANCELLED 4738 * REQUEST_NOT_SUPPORTED 4739 * 4740 * See also: RIL_REQUEST_LAST_CALL_FAIL_CAUSE 4741 * 4742 * Deprecated use the status field in RIL_Data_Call_Response_v6. 4743 */ 4744 4745 #define RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE 56 4746 4747 /** 4748 * RIL_REQUEST_DATA_CALL_LIST 4749 * 4750 * Returns the data call list. An entry is added when a 4751 * RIL_REQUEST_SETUP_DATA_CALL is issued and removed on a 4752 * RIL_REQUEST_DEACTIVATE_DATA_CALL. The list is emptied 4753 * when RIL_REQUEST_RADIO_POWER off/on is issued. 4754 * 4755 * "data" is NULL 4756 * "response" is an array of RIL_Data_Call_Response_v6 4757 * 4758 * Valid errors: 4759 * SUCCESS 4760 * RADIO_NOT_AVAILABLE (radio resetting) 4761 * INTERNAL_ERR 4762 * NO_MEMORY 4763 * NO_RESOURCES 4764 * CANCELLED 4765 * REQUEST_NOT_SUPPORTED 4766 * SIM_ABSENT 4767 * 4768 * See also: RIL_UNSOL_DATA_CALL_LIST_CHANGED 4769 */ 4770 4771 #define RIL_REQUEST_DATA_CALL_LIST 57 4772 4773 /** 4774 * RIL_REQUEST_RESET_RADIO - DEPRECATED 4775 * 4776 * Request a radio reset. The RIL implementation may postpone 4777 * the reset until after this request is responded to if the baseband 4778 * is presently busy. 4779 * 4780 * The request is DEPRECATED, use RIL_REQUEST_RADIO_POWER 4781 * 4782 * "data" is NULL 4783 * "response" is NULL 4784 * 4785 * Valid errors: 4786 * SUCCESS 4787 * RADIO_NOT_AVAILABLE (radio resetting) 4788 * REQUEST_NOT_SUPPORTED 4789 */ 4790 4791 #define RIL_REQUEST_RESET_RADIO 58 4792 4793 /** 4794 * RIL_REQUEST_OEM_HOOK_RAW 4795 * 4796 * This request reserved for OEM-specific uses. It passes raw byte arrays 4797 * back and forth. 4798 * 4799 * It can be invoked on the Java side from 4800 * com.android.internal.telephony.Phone.invokeOemRilRequestRaw() 4801 * 4802 * "data" is a char * of bytes copied from the byte[] data argument in java 4803 * "response" is a char * of bytes that will returned via the 4804 * caller's "response" Message here: 4805 * (byte[])(((AsyncResult)response.obj).result) 4806 * 4807 * An error response here will result in 4808 * (((AsyncResult)response.obj).result) == null and 4809 * (((AsyncResult)response.obj).exception) being an instance of 4810 * com.android.internal.telephony.gsm.CommandException 4811 * 4812 * Valid errors: 4813 * All 4814 */ 4815 4816 #define RIL_REQUEST_OEM_HOOK_RAW 59 4817 4818 /** 4819 * RIL_REQUEST_OEM_HOOK_STRINGS 4820 * 4821 * This request reserved for OEM-specific uses. It passes strings 4822 * back and forth. 4823 * 4824 * It can be invoked on the Java side from 4825 * com.android.internal.telephony.Phone.invokeOemRilRequestStrings() 4826 * 4827 * "data" is a const char **, representing an array of null-terminated UTF-8 4828 * strings copied from the "String[] strings" argument to 4829 * invokeOemRilRequestStrings() 4830 * 4831 * "response" is a const char **, representing an array of null-terminated UTF-8 4832 * strings that will be returned via the caller's response message here: 4833 * 4834 * (String[])(((AsyncResult)response.obj).result) 4835 * 4836 * An error response here will result in 4837 * (((AsyncResult)response.obj).result) == null and 4838 * (((AsyncResult)response.obj).exception) being an instance of 4839 * com.android.internal.telephony.gsm.CommandException 4840 * 4841 * Valid errors: 4842 * All 4843 */ 4844 4845 #define RIL_REQUEST_OEM_HOOK_STRINGS 60 4846 4847 /** 4848 * RIL_REQUEST_SCREEN_STATE - DEPRECATED 4849 * 4850 * Indicates the current state of the screen. When the screen is off, the 4851 * RIL should notify the baseband to suppress certain notifications (eg, 4852 * signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude) 4853 * in an effort to conserve power. These notifications should resume when the 4854 * screen is on. 4855 * 4856 * Note this request is deprecated. Use RIL_REQUEST_SEND_DEVICE_STATE to report the device state 4857 * to the modem and use RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER to turn on/off unsolicited 4858 * response from the modem in different scenarios. 4859 * 4860 * "data" is int * 4861 * ((int *)data)[0] is == 1 for "Screen On" 4862 * ((int *)data)[0] is == 0 for "Screen Off" 4863 * 4864 * "response" is NULL 4865 * 4866 * Valid errors: 4867 * SUCCESS 4868 * NO_MEMORY 4869 * INTERNAL_ERR 4870 * SYSTEM_ERR 4871 * INVALID_ARGUMENTS 4872 * NO_RESOURCES 4873 * CANCELLED 4874 * REQUEST_NOT_SUPPORTED 4875 */ 4876 #define RIL_REQUEST_SCREEN_STATE 61 4877 4878 4879 /** 4880 * RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 4881 * 4882 * Enables/disables supplementary service related notifications 4883 * from the network. 4884 * 4885 * Notifications are reported via RIL_UNSOL_SUPP_SVC_NOTIFICATION. 4886 * 4887 * "data" is int * 4888 * ((int *)data)[0] is == 1 for notifications enabled 4889 * ((int *)data)[0] is == 0 for notifications disabled 4890 * 4891 * "response" is NULL 4892 * 4893 * Valid errors: 4894 * SUCCESS 4895 * RADIO_NOT_AVAILABLE 4896 * SIM_BUSY 4897 * INVALID_ARGUMENTS 4898 * NO_MEMORY 4899 * SYSTEM_ERR 4900 * MODEM_ERR 4901 * INTERNAL_ERR 4902 * NO_RESOURCES 4903 * CANCELLED 4904 * REQUEST_NOT_SUPPORTED 4905 * 4906 * See also: RIL_UNSOL_SUPP_SVC_NOTIFICATION. 4907 */ 4908 #define RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION 62 4909 4910 /** 4911 * RIL_REQUEST_WRITE_SMS_TO_SIM 4912 * 4913 * Stores a SMS message to SIM memory. 4914 * 4915 * "data" is RIL_SMS_WriteArgs * 4916 * 4917 * "response" is int * 4918 * ((const int *)response)[0] is the record index where the message is stored. 4919 * 4920 * Valid errors: 4921 * SUCCESS 4922 * SIM_FULL 4923 * INVALID_ARGUMENTS 4924 * INVALID_SMS_FORMAT 4925 * INTERNAL_ERR 4926 * MODEM_ERR 4927 * ENCODING_ERR 4928 * NO_MEMORY 4929 * NO_RESOURCES 4930 * INVALID_MODEM_STATE 4931 * OPERATION_NOT_ALLOWED 4932 * INVALID_SMSC_ADDRESS 4933 * CANCELLED 4934 * INVALID_MODEM_STATE 4935 * REQUEST_NOT_SUPPORTED 4936 * SIM_ABSENT 4937 * 4938 */ 4939 #define RIL_REQUEST_WRITE_SMS_TO_SIM 63 4940 4941 /** 4942 * RIL_REQUEST_DELETE_SMS_ON_SIM 4943 * 4944 * Deletes a SMS message from SIM memory. 4945 * 4946 * "data" is int * 4947 * ((int *)data)[0] is the record index of the message to delete. 4948 * 4949 * "response" is NULL 4950 * 4951 * Valid errors: 4952 * SUCCESS 4953 * SIM_FULL 4954 * INVALID_ARGUMENTS 4955 * NO_MEMORY 4956 * REQUEST_RATE_LIMITED 4957 * SYSTEM_ERR 4958 * MODEM_ERR 4959 * NO_SUCH_ENTRY 4960 * INTERNAL_ERR 4961 * NO_RESOURCES 4962 * CANCELLED 4963 * INVALID_MODEM_STATE 4964 * REQUEST_NOT_SUPPORTED 4965 * SIM_ABSENT 4966 * 4967 */ 4968 #define RIL_REQUEST_DELETE_SMS_ON_SIM 64 4969 4970 /** 4971 * RIL_REQUEST_SET_BAND_MODE 4972 * 4973 * Assign a specified band for RF configuration. 4974 * 4975 * "data" is int * 4976 * ((int *)data)[0] is a RIL_RadioBandMode 4977 * 4978 * "response" is NULL 4979 * 4980 * Valid errors: 4981 * SUCCESS 4982 * RADIO_NOT_AVAILABLE 4983 * OPERATION_NOT_ALLOWED 4984 * NO_MEMORY 4985 * INTERNAL_ERR 4986 * SYSTEM_ERR 4987 * INVALID_ARGUMENTS 4988 * MODEM_ERR 4989 * REQUEST_NOT_SUPPORTED 4990 * NO_RESOURCES 4991 * CANCELLED 4992 * 4993 * See also: RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 4994 */ 4995 #define RIL_REQUEST_SET_BAND_MODE 65 4996 4997 /** 4998 * RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 4999 * 5000 * Query the list of band mode supported by RF. 5001 * 5002 * "data" is NULL 5003 * 5004 * "response" is int * 5005 * "response" points to an array of int's, the int[0] is the size of array; 5006 * subsequent values are a list of RIL_RadioBandMode listing supported modes. 5007 * 5008 * Valid errors: 5009 * SUCCESS 5010 * RADIO_NOT_AVAILABLE 5011 * NO_MEMORY 5012 * INTERNAL_ERR 5013 * SYSTEM_ERR 5014 * MODEM_ERR 5015 * REQUEST_NOT_SUPPORTED 5016 * NO_RESOURCES 5017 * CANCELLED 5018 * 5019 * See also: RIL_REQUEST_SET_BAND_MODE 5020 */ 5021 #define RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE 66 5022 5023 /** 5024 * RIL_REQUEST_STK_GET_PROFILE 5025 * 5026 * Requests the profile of SIM tool kit. 5027 * The profile indicates the SAT/USAT features supported by ME. 5028 * The SAT/USAT features refer to 3GPP TS 11.14 and 3GPP TS 31.111 5029 * 5030 * "data" is NULL 5031 * 5032 * "response" is a const char * containing SAT/USAT profile 5033 * in hexadecimal format string starting with first byte of terminal profile 5034 * 5035 * Valid errors: 5036 * RIL_E_SUCCESS 5037 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 5038 * INTERNAL_ERR 5039 * NO_MEMORY 5040 * NO_RESOURCES 5041 * CANCELLED 5042 * REQUEST_NOT_SUPPORTED 5043 */ 5044 #define RIL_REQUEST_STK_GET_PROFILE 67 5045 5046 /** 5047 * RIL_REQUEST_STK_SET_PROFILE 5048 * 5049 * Download the STK terminal profile as part of SIM initialization 5050 * procedure 5051 * 5052 * "data" is a const char * containing SAT/USAT profile 5053 * in hexadecimal format string starting with first byte of terminal profile 5054 * 5055 * "response" is NULL 5056 * 5057 * Valid errors: 5058 * RIL_E_SUCCESS 5059 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 5060 * INTERNAL_ERR 5061 * NO_MEMORY 5062 * NO_RESOURCES 5063 * CANCELLED 5064 * REQUEST_NOT_SUPPORTED 5065 */ 5066 #define RIL_REQUEST_STK_SET_PROFILE 68 5067 5068 /** 5069 * RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 5070 * 5071 * Requests to send a SAT/USAT envelope command to SIM. 5072 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111 5073 * 5074 * "data" is a const char * containing SAT/USAT command 5075 * in hexadecimal format string starting with command tag 5076 * 5077 * "response" is a const char * containing SAT/USAT response 5078 * in hexadecimal format string starting with first byte of response 5079 * (May be NULL) 5080 * 5081 * Valid errors: 5082 * RIL_E_SUCCESS 5083 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 5084 * SIM_BUSY 5085 * OPERATION_NOT_ALLOWED 5086 * INTERNAL_ERR 5087 * NO_MEMORY 5088 * NO_RESOURCES 5089 * CANCELLED 5090 * INVALID_ARGUMENTS 5091 * MODEM_ERR 5092 * REQUEST_NOT_SUPPORTED 5093 */ 5094 #define RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND 69 5095 5096 /** 5097 * RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 5098 * 5099 * Requests to send a terminal response to SIM for a received 5100 * proactive command 5101 * 5102 * "data" is a const char * containing SAT/USAT response 5103 * in hexadecimal format string starting with first byte of response data 5104 * 5105 * "response" is NULL 5106 * 5107 * Valid errors: 5108 * RIL_E_SUCCESS 5109 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 5110 * RIL_E_OPERATION_NOT_ALLOWED 5111 * INTERNAL_ERR 5112 * NO_MEMORY 5113 * NO_RESOURCES 5114 * CANCELLED 5115 * INVALID_MODEM_STATE 5116 * REQUEST_NOT_SUPPORTED 5117 */ 5118 #define RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE 70 5119 5120 /** 5121 * RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 5122 * 5123 * When STK application gets RIL_UNSOL_STK_CALL_SETUP, the call actually has 5124 * been initialized by ME already. (We could see the call has been in the 'call 5125 * list') So, STK application needs to accept/reject the call according as user 5126 * operations. 5127 * 5128 * "data" is int * 5129 * ((int *)data)[0] is > 0 for "accept" the call setup 5130 * ((int *)data)[0] is == 0 for "reject" the call setup 5131 * 5132 * "response" is NULL 5133 * 5134 * Valid errors: 5135 * RIL_E_SUCCESS 5136 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 5137 * RIL_E_OPERATION_NOT_ALLOWED 5138 * INTERNAL_ERR 5139 * NO_MEMORY 5140 * NO_RESOURCES 5141 * CANCELLED 5142 * REQUEST_NOT_SUPPORTED 5143 */ 5144 #define RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM 71 5145 5146 /** 5147 * RIL_REQUEST_EXPLICIT_CALL_TRANSFER 5148 * 5149 * Connects the two calls and disconnects the subscriber from both calls. 5150 * 5151 * "data" is NULL 5152 * "response" is NULL 5153 * 5154 * Valid errors: 5155 * SUCCESS 5156 * RADIO_NOT_AVAILABLE (radio resetting) 5157 * INVALID_STATE 5158 * NO_RESOURCES 5159 * NO_MEMORY 5160 * INVALID_ARGUMENTS 5161 * SYSTEM_ERR 5162 * MODEM_ERR 5163 * INTERNAL_ERR 5164 * INVALID_CALL_ID 5165 * INVALID_STATE 5166 * OPERATION_NOT_ALLOWED 5167 * NO_RESOURCES 5168 * CANCELLED 5169 * REQUEST_NOT_SUPPORTED 5170 */ 5171 #define RIL_REQUEST_EXPLICIT_CALL_TRANSFER 72 5172 5173 /** 5174 * RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 5175 * 5176 * Requests to set the preferred network type for searching and registering 5177 * (CS/PS domain, RAT, and operation mode) 5178 * 5179 * "data" is int * which is RIL_PreferredNetworkType 5180 * 5181 * "response" is NULL 5182 * 5183 * Valid errors: 5184 * SUCCESS 5185 * RADIO_NOT_AVAILABLE (radio resetting) 5186 * OPERATION_NOT_ALLOWED 5187 * MODE_NOT_SUPPORTED 5188 * NO_MEMORY 5189 * INTERNAL_ERR 5190 * SYSTEM_ERR 5191 * INVALID_ARGUMENTS 5192 * MODEM_ERR 5193 * REQUEST_NOT_SUPPORTED 5194 * NO_RESOURCES 5195 * CANCELLED 5196 */ 5197 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 73 5198 5199 /** 5200 * RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 5201 * 5202 * Query the preferred network type (CS/PS domain, RAT, and operation mode) 5203 * for searching and registering 5204 * 5205 * "data" is NULL 5206 * 5207 * "response" is int * 5208 * ((int *)response)[0] is == RIL_PreferredNetworkType 5209 * 5210 * Valid errors: 5211 * SUCCESS 5212 * RADIO_NOT_AVAILABLE 5213 * NO_MEMORY 5214 * INTERNAL_ERR 5215 * SYSTEM_ERR 5216 * INVALID_ARGUMENTS 5217 * MODEM_ERR 5218 * REQUEST_NOT_SUPPORTED 5219 * NO_RESOURCES 5220 * CANCELLED 5221 * 5222 * See also: RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE 5223 */ 5224 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE 74 5225 5226 /** 5227 * RIL_REQUEST_NEIGHBORING_CELL_IDS 5228 * 5229 * Request neighboring cell id in GSM network 5230 * 5231 * "data" is NULL 5232 * "response" must be a " const RIL_NeighboringCell** " 5233 * 5234 * Valid errors: 5235 * SUCCESS 5236 * RADIO_NOT_AVAILABLE 5237 * NO_MEMORY 5238 * INTERNAL_ERR 5239 * SYSTEM_ERR 5240 * MODEM_ERR 5241 * NO_NETWORK_FOUND 5242 * REQUEST_NOT_SUPPORTED 5243 * NO_RESOURCES 5244 * CANCELLED 5245 */ 5246 #define RIL_REQUEST_GET_NEIGHBORING_CELL_IDS 75 5247 5248 /** 5249 * RIL_REQUEST_SET_LOCATION_UPDATES 5250 * 5251 * Enables/disables network state change notifications due to changes in 5252 * LAC and/or CID (for GSM) or BID/SID/NID/latitude/longitude (for CDMA). 5253 * Basically +CREG=2 vs. +CREG=1 (TS 27.007). 5254 * 5255 * Note: The RIL implementation should default to "updates enabled" 5256 * when the screen is on and "updates disabled" when the screen is off. 5257 * 5258 * "data" is int * 5259 * ((int *)data)[0] is == 1 for updates enabled (+CREG=2) 5260 * ((int *)data)[0] is == 0 for updates disabled (+CREG=1) 5261 * 5262 * "response" is NULL 5263 * 5264 * Valid errors: 5265 * SUCCESS 5266 * RADIO_NOT_AVAILABLE 5267 * NO_MEMORY 5268 * INTERNAL_ERR 5269 * SYSTEM_ERR 5270 * INVALID_ARGUMENTS 5271 * MODEM_ERR 5272 * REQUEST_NOT_SUPPORTED 5273 * NO_RESOURCES 5274 * CANCELLED 5275 * 5276 * See also: RIL_REQUEST_SCREEN_STATE, RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED 5277 */ 5278 #define RIL_REQUEST_SET_LOCATION_UPDATES 76 5279 5280 /** 5281 * RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 5282 * 5283 * Request to set the location where the CDMA subscription shall 5284 * be retrieved 5285 * 5286 * "data" is int * 5287 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 5288 * 5289 * "response" is NULL 5290 * 5291 * Valid errors: 5292 * SUCCESS 5293 * RADIO_NOT_AVAILABLE 5294 * SIM_ABSENT 5295 * SUBSCRIPTION_NOT_AVAILABLE 5296 * INTERNAL_ERR 5297 * NO_MEMORY 5298 * NO_RESOURCES 5299 * CANCELLED 5300 * REQUEST_NOT_SUPPORTED 5301 * 5302 * See also: RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 5303 */ 5304 #define RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 77 5305 5306 /** 5307 * RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 5308 * 5309 * Request to set the roaming preferences in CDMA 5310 * 5311 * "data" is int * 5312 * ((int *)data)[0] is == 0 for Home Networks only, as defined in PRL 5313 * ((int *)data)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 5314 * ((int *)data)[0] is == 2 for Roaming on Any Network, as defined in the PRL 5315 * 5316 * "response" is NULL 5317 * 5318 * Valid errors: 5319 * SUCCESS 5320 * RADIO_NOT_AVAILABLE 5321 * NO_MEMORY 5322 * INTERNAL_ERR 5323 * SYSTEM_ERR 5324 * INVALID_ARGUMENTS 5325 * MODEM_ERR 5326 * REQUEST_NOT_SUPPORTED 5327 * OPERATION_NOT_ALLOWED 5328 * NO_RESOURCES 5329 * CANCELLED 5330 */ 5331 #define RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE 78 5332 5333 /** 5334 * RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 5335 * 5336 * Request the actual setting of the roaming preferences in CDMA in the modem 5337 * 5338 * "data" is NULL 5339 * 5340 * "response" is int * 5341 * ((int *)response)[0] is == 0 for Home Networks only, as defined in PRL 5342 * ((int *)response)[0] is == 1 for Roaming on Affiliated networks, as defined in PRL 5343 * ((int *)response)[0] is == 2 for Roaming on Any Network, as defined in the PRL 5344 * 5345 * "response" is NULL 5346 * 5347 * Valid errors: 5348 * SUCCESS 5349 * RADIO_NOT_AVAILABLE 5350 * NO_MEMORY 5351 * INTERNAL_ERR 5352 * SYSTEM_ERR 5353 * INVALID_ARGUMENTS 5354 * MODEM_ERR 5355 * REQUEST_NOT_SUPPORTED 5356 * NO_RESOURCES 5357 * CANCELLED 5358 */ 5359 #define RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE 79 5360 5361 /** 5362 * RIL_REQUEST_SET_TTY_MODE 5363 * 5364 * Request to set the TTY mode 5365 * 5366 * "data" is int * 5367 * ((int *)data)[0] is == 0 for TTY off 5368 * ((int *)data)[0] is == 1 for TTY Full 5369 * ((int *)data)[0] is == 2 for TTY HCO (hearing carryover) 5370 * ((int *)data)[0] is == 3 for TTY VCO (voice carryover) 5371 * 5372 * "response" is NULL 5373 * 5374 * Valid errors: 5375 * SUCCESS 5376 * RADIO_NOT_AVAILABLE 5377 * INVALID_ARGUMENTS 5378 * MODEM_ERR 5379 * INTERNAL_ERR 5380 * NO_MEMORY 5381 * INVALID_ARGUMENTS 5382 * MODEM_ERR 5383 * INTERNAL_ERR 5384 * NO_MEMORY 5385 * NO_RESOURCES 5386 * CANCELLED 5387 * REQUEST_NOT_SUPPORTED 5388 */ 5389 #define RIL_REQUEST_SET_TTY_MODE 80 5390 5391 /** 5392 * RIL_REQUEST_QUERY_TTY_MODE 5393 * 5394 * Request the setting of TTY mode 5395 * 5396 * "data" is NULL 5397 * 5398 * "response" is int * 5399 * ((int *)response)[0] is == 0 for TTY off 5400 * ((int *)response)[0] is == 1 for TTY Full 5401 * ((int *)response)[0] is == 2 for TTY HCO (hearing carryover) 5402 * ((int *)response)[0] is == 3 for TTY VCO (voice carryover) 5403 * 5404 * "response" is NULL 5405 * 5406 * Valid errors: 5407 * SUCCESS 5408 * RADIO_NOT_AVAILABLE 5409 * MODEM_ERR 5410 * INTERNAL_ERR 5411 * NO_MEMORY 5412 * INVALID_ARGUMENTS 5413 * NO_RESOURCES 5414 * CANCELLED 5415 * REQUEST_NOT_SUPPORTED 5416 */ 5417 #define RIL_REQUEST_QUERY_TTY_MODE 81 5418 5419 /** 5420 * RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 5421 * 5422 * Request to set the preferred voice privacy mode used in voice 5423 * scrambling 5424 * 5425 * "data" is int * 5426 * ((int *)data)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 5427 * ((int *)data)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 5428 * 5429 * "response" is NULL 5430 * 5431 * Valid errors: 5432 * SUCCESS 5433 * RADIO_NOT_AVAILABLE 5434 * INVALID_ARGUMENTS 5435 * SYSTEM_ERR 5436 * MODEM_ERR 5437 * INTERNAL_ERR 5438 * NO_MEMORY 5439 * INVALID_CALL_ID 5440 * NO_RESOURCES 5441 * CANCELLED 5442 * REQUEST_NOT_SUPPORTED 5443 */ 5444 #define RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE 82 5445 5446 /** 5447 * RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 5448 * 5449 * Request the setting of preferred voice privacy mode 5450 * 5451 * "data" is NULL 5452 * 5453 * "response" is int * 5454 * ((int *)response)[0] is == 0 for Standard Privacy Mode (Public Long Code Mask) 5455 * ((int *)response)[0] is == 1 for Enhanced Privacy Mode (Private Long Code Mask) 5456 * 5457 * "response" is NULL 5458 * 5459 * Valid errors: 5460 * SUCCESS 5461 * RADIO_NOT_AVAILABLE 5462 * MODEM_ERR 5463 * INTERNAL_ERR 5464 * NO_MEMORY 5465 * INVALID_ARGUMENTS 5466 * NO_RESOURCES 5467 * CANCELLED 5468 * REQUEST_NOT_SUPPORTED 5469 */ 5470 #define RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE 83 5471 5472 /** 5473 * RIL_REQUEST_CDMA_FLASH 5474 * 5475 * Send FLASH 5476 * 5477 * "data" is const char * 5478 * ((const char *)data)[0] is a FLASH string 5479 * 5480 * "response" is NULL 5481 * 5482 * Valid errors: 5483 * SUCCESS 5484 * RADIO_NOT_AVAILABLE 5485 * INVALID_ARGUMENTS 5486 * NO_MEMORY 5487 * SYSTEM_ERR 5488 * MODEM_ERR 5489 * INTERNAL_ERR 5490 * INVALID_CALL_ID 5491 * INVALID_STATE 5492 * NO_RESOURCES 5493 * CANCELLED 5494 * REQUEST_NOT_SUPPORTED 5495 * 5496 */ 5497 #define RIL_REQUEST_CDMA_FLASH 84 5498 5499 /** 5500 * RIL_REQUEST_CDMA_BURST_DTMF 5501 * 5502 * Send DTMF string 5503 * 5504 * "data" is const char ** 5505 * ((const char **)data)[0] is a DTMF string 5506 * ((const char **)data)[1] is the DTMF ON length in milliseconds, or 0 to use 5507 * default 5508 * ((const char **)data)[2] is the DTMF OFF length in milliseconds, or 0 to use 5509 * default 5510 * 5511 * "response" is NULL 5512 * 5513 * Valid errors: 5514 * SUCCESS 5515 * RADIO_NOT_AVAILABLE 5516 * INVALID_ARGUMENTS 5517 * NO_MEMORY 5518 * SYSTEM_ERR 5519 * MODEM_ERR 5520 * INTERNAL_ERR 5521 * INVALID_CALL_ID 5522 * NO_RESOURCES 5523 * CANCELLED 5524 * OPERATION_NOT_ALLOWED 5525 * REQUEST_NOT_SUPPORTED 5526 * 5527 */ 5528 #define RIL_REQUEST_CDMA_BURST_DTMF 85 5529 5530 /** 5531 * RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 5532 * 5533 * Takes a 26 digit string (20 digit AKEY + 6 digit checksum). 5534 * If the checksum is valid the 20 digit AKEY is written to NV, 5535 * replacing the existing AKEY no matter what it was before. 5536 * 5537 * "data" is const char * 5538 * ((const char *)data)[0] is a 26 digit string (ASCII digits '0'-'9') 5539 * where the last 6 digits are a checksum of the 5540 * first 20, as specified in TR45.AHAG 5541 * "Common Cryptographic Algorithms, Revision D.1 5542 * Section 2.2" 5543 * 5544 * "response" is NULL 5545 * 5546 * Valid errors: 5547 * SUCCESS 5548 * RADIO_NOT_AVAILABLE 5549 * NO_MEMORY 5550 * INTERNAL_ERR 5551 * SYSTEM_ERR 5552 * INVALID_ARGUMENTS 5553 * MODEM_ERR 5554 * REQUEST_NOT_SUPPORTED 5555 * NO_RESOURCES 5556 * CANCELLED 5557 * 5558 */ 5559 #define RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY 86 5560 5561 /** 5562 * RIL_REQUEST_CDMA_SEND_SMS 5563 * 5564 * Send a CDMA SMS message 5565 * 5566 * "data" is const RIL_CDMA_SMS_Message * 5567 * 5568 * "response" is a const RIL_SMS_Response * 5569 * 5570 * Based on the return error, caller decides to resend if sending sms 5571 * fails. The CDMA error class is derived as follows, 5572 * SUCCESS is error class 0 (no error) 5573 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 5574 * 5575 * Valid errors: 5576 * SUCCESS 5577 * RADIO_NOT_AVAILABLE 5578 * SMS_SEND_FAIL_RETRY 5579 * NETWORK_REJECT 5580 * INVALID_STATE 5581 * INVALID_ARGUMENTS 5582 * NO_MEMORY 5583 * REQUEST_RATE_LIMITED 5584 * INVALID_SMS_FORMAT 5585 * SYSTEM_ERR 5586 * FDN_CHECK_FAILURE 5587 * MODEM_ERR 5588 * NETWORK_ERR 5589 * ENCODING_ERR 5590 * INVALID_SMSC_ADDRESS 5591 * OPERATION_NOT_ALLOWED 5592 * NO_RESOURCES 5593 * CANCELLED 5594 * REQUEST_NOT_SUPPORTED 5595 * MODE_NOT_SUPPORTED 5596 * SIM_ABSENT 5597 * 5598 */ 5599 #define RIL_REQUEST_CDMA_SEND_SMS 87 5600 5601 /** 5602 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 5603 * 5604 * Acknowledge the success or failure in the receipt of SMS 5605 * previously indicated via RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 5606 * 5607 * "data" is const RIL_CDMA_SMS_Ack * 5608 * 5609 * "response" is NULL 5610 * 5611 * Valid errors: 5612 * SUCCESS 5613 * RADIO_NOT_AVAILABLE 5614 * INVALID_ARGUMENTS 5615 * NO_SMS_TO_ACK 5616 * INVALID_STATE 5617 * NO_MEMORY 5618 * REQUEST_RATE_LIMITED 5619 * SYSTEM_ERR 5620 * MODEM_ERR 5621 * INVALID_STATE 5622 * OPERATION_NOT_ALLOWED 5623 * NETWORK_NOT_READY 5624 * INVALID_MODEM_STATE 5625 * REQUEST_NOT_SUPPORTED 5626 * 5627 */ 5628 #define RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 88 5629 5630 /** 5631 * RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 5632 * 5633 * Request the setting of GSM/WCDMA Cell Broadcast SMS config. 5634 * 5635 * "data" is NULL 5636 * 5637 * "response" is a const RIL_GSM_BroadcastSmsConfigInfo ** 5638 * "responselen" is count * sizeof (RIL_GSM_BroadcastSmsConfigInfo *) 5639 * 5640 * Valid errors: 5641 * SUCCESS 5642 * RADIO_NOT_AVAILABLE 5643 * INVALID_STATE 5644 * NO_MEMORY 5645 * REQUEST_RATE_LIMITED 5646 * SYSTEM_ERR 5647 * NO_RESOURCES 5648 * MODEM_ERR 5649 * SYSTEM_ERR 5650 * INTERNAL_ERR 5651 * NO_RESOURCES 5652 * CANCELLED 5653 * INVALID_MODEM_STATE 5654 * REQUEST_NOT_SUPPORTED 5655 */ 5656 #define RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG 89 5657 5658 /** 5659 * RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 5660 * 5661 * Set GSM/WCDMA Cell Broadcast SMS config 5662 * 5663 * "data" is a const RIL_GSM_BroadcastSmsConfigInfo ** 5664 * "datalen" is count * sizeof(RIL_GSM_BroadcastSmsConfigInfo *) 5665 * 5666 * "response" is NULL 5667 * 5668 * Valid errors: 5669 * SUCCESS 5670 * RADIO_NOT_AVAILABLE 5671 * INVALID_STATE 5672 * INVALID_ARGUMENTS 5673 * NO_MEMORY 5674 * SYSTEM_ERR 5675 * REQUEST_RATE_LIMITED 5676 * MODEM_ERR 5677 * SYSTEM_ERR 5678 * INTERNAL_ERR 5679 * NO_RESOURCES 5680 * CANCELLED 5681 * INVALID_MODEM_STATE 5682 * REQUEST_NOT_SUPPORTED 5683 * 5684 */ 5685 #define RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG 90 5686 5687 /** 5688 * RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 5689 * 5690 * Enable or disable the reception of GSM/WCDMA Cell Broadcast SMS 5691 * 5692 * "data" is const int * 5693 * (const int *)data[0] indicates to activate or turn off the 5694 * reception of GSM/WCDMA Cell Broadcast SMS, 0-1, 5695 * 0 - Activate, 1 - Turn off 5696 * 5697 * "response" is NULL 5698 * 5699 * Valid errors: 5700 * SUCCESS 5701 * RADIO_NOT_AVAILABLE 5702 * INVALID_STATE 5703 * INVALID_ARGUMENTS 5704 * NO_MEMORY 5705 * SYSTEM_ERR 5706 * REQUEST_RATE_LIMITED 5707 * MODEM_ERR 5708 * INTERNAL_ERR 5709 * NO_RESOURCES 5710 * CANCELLED 5711 * INVALID_MODEM_STATE 5712 * REQUEST_NOT_SUPPORTED 5713 * 5714 */ 5715 #define RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION 91 5716 5717 /** 5718 * RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 5719 * 5720 * Request the setting of CDMA Broadcast SMS config 5721 * 5722 * "data" is NULL 5723 * 5724 * "response" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 5725 * "responselen" is count * sizeof (RIL_CDMA_BroadcastSmsConfigInfo *) 5726 * 5727 * Valid errors: 5728 * SUCCESS 5729 * RADIO_NOT_AVAILABLE 5730 * INVALID_STATE 5731 * NO_MEMORY 5732 * REQUEST_RATE_LIMITED 5733 * SYSTEM_ERR 5734 * NO_RESOURCES 5735 * MODEM_ERR 5736 * SYSTEM_ERR 5737 * INTERNAL_ERR 5738 * NO_RESOURCES 5739 * CANCELLED 5740 * INVALID_MODEM_STATE 5741 * REQUEST_NOT_SUPPORTED 5742 * 5743 */ 5744 #define RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG 92 5745 5746 /** 5747 * RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 5748 * 5749 * Set CDMA Broadcast SMS config 5750 * 5751 * "data" is a const RIL_CDMA_BroadcastSmsConfigInfo ** 5752 * "datalen" is count * sizeof(const RIL_CDMA_BroadcastSmsConfigInfo *) 5753 * 5754 * "response" is NULL 5755 * 5756 * Valid errors: 5757 * SUCCESS 5758 * RADIO_NOT_AVAILABLE 5759 * INVALID_STATE 5760 * INVALID_ARGUMENTS 5761 * NO_MEMORY 5762 * SYSTEM_ERR 5763 * REQUEST_RATE_LIMITED 5764 * MODEM_ERR 5765 * SYSTEM_ERR 5766 * INTERNAL_ERR 5767 * NO_RESOURCES 5768 * CANCELLED 5769 * INVALID_MODEM_STATE 5770 * REQUEST_NOT_SUPPORTED 5771 * 5772 */ 5773 #define RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG 93 5774 5775 /** 5776 * RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 5777 * 5778 * Enable or disable the reception of CDMA Broadcast SMS 5779 * 5780 * "data" is const int * 5781 * (const int *)data[0] indicates to activate or turn off the 5782 * reception of CDMA Broadcast SMS, 0-1, 5783 * 0 - Activate, 1 - Turn off 5784 * 5785 * "response" is NULL 5786 * 5787 * Valid errors: 5788 * SUCCESS 5789 * RADIO_NOT_AVAILABLE 5790 * INVALID_STATE 5791 * INVALID_ARGUMENTS 5792 * NO_MEMORY 5793 * SYSTEM_ERR 5794 * REQUEST_RATE_LIMITED 5795 * MODEM_ERR 5796 * INTERNAL_ERR 5797 * NO_RESOURCES 5798 * CANCELLED 5799 * INVALID_MODEM_STATE 5800 * REQUEST_NOT_SUPPORTED 5801 * 5802 */ 5803 #define RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION 94 5804 5805 /** 5806 * RIL_REQUEST_CDMA_SUBSCRIPTION 5807 * 5808 * Request the device MDN / H_SID / H_NID. 5809 * 5810 * The request is only allowed when CDMA subscription is available. When CDMA 5811 * subscription is changed, application layer should re-issue the request to 5812 * update the subscription information. 5813 * 5814 * If a NULL value is returned for any of the device id, it means that error 5815 * accessing the device. 5816 * 5817 * "response" is const char ** 5818 * ((const char **)response)[0] is MDN if CDMA subscription is available 5819 * ((const char **)response)[1] is a comma separated list of H_SID (Home SID) if 5820 * CDMA subscription is available, in decimal format 5821 * ((const char **)response)[2] is a comma separated list of H_NID (Home NID) if 5822 * CDMA subscription is available, in decimal format 5823 * ((const char **)response)[3] is MIN (10 digits, MIN2+MIN1) if CDMA subscription is available 5824 * ((const char **)response)[4] is PRL version if CDMA subscription is available 5825 * 5826 * Valid errors: 5827 * SUCCESS 5828 * RIL_E_SUBSCRIPTION_NOT_AVAILABLE 5829 * NO_MEMORY 5830 * INTERNAL_ERR 5831 * SYSTEM_ERR 5832 * INVALID_ARGUMENTS 5833 * MODEM_ERR 5834 * NOT_PROVISIONED 5835 * REQUEST_NOT_SUPPORTED 5836 * INTERNAL_ERR 5837 * NO_RESOURCES 5838 * CANCELLED 5839 * 5840 */ 5841 5842 #define RIL_REQUEST_CDMA_SUBSCRIPTION 95 5843 5844 /** 5845 * RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 5846 * 5847 * Stores a CDMA SMS message to RUIM memory. 5848 * 5849 * "data" is RIL_CDMA_SMS_WriteArgs * 5850 * 5851 * "response" is int * 5852 * ((const int *)response)[0] is the record index where the message is stored. 5853 * 5854 * Valid errors: 5855 * SUCCESS 5856 * RADIO_NOT_AVAILABLE 5857 * SIM_FULL 5858 * INVALID_ARGUMENTS 5859 * INVALID_SMS_FORMAT 5860 * INTERNAL_ERR 5861 * MODEM_ERR 5862 * ENCODING_ERR 5863 * NO_MEMORY 5864 * NO_RESOURCES 5865 * INVALID_MODEM_STATE 5866 * OPERATION_NOT_ALLOWED 5867 * INVALID_SMSC_ADDRESS 5868 * CANCELLED 5869 * INVALID_MODEM_STATE 5870 * REQUEST_NOT_SUPPORTED 5871 * SIM_ABSENT 5872 * 5873 */ 5874 #define RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM 96 5875 5876 /** 5877 * RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 5878 * 5879 * Deletes a CDMA SMS message from RUIM memory. 5880 * 5881 * "data" is int * 5882 * ((int *)data)[0] is the record index of the message to delete. 5883 * 5884 * "response" is NULL 5885 * 5886 * Valid errors: 5887 * SUCCESS 5888 * RADIO_NOT_AVAILABLE 5889 * INVALID_ARGUMENTS 5890 * NO_MEMORY 5891 * REQUEST_RATE_LIMITED 5892 * SYSTEM_ERR 5893 * MODEM_ERR 5894 * NO_SUCH_ENTRY 5895 * INTERNAL_ERR 5896 * NO_RESOURCES 5897 * CANCELLED 5898 * INVALID_MODEM_STATE 5899 * REQUEST_NOT_SUPPORTED 5900 * SIM_ABSENT 5901 */ 5902 #define RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM 97 5903 5904 /** 5905 * RIL_REQUEST_DEVICE_IDENTITY 5906 * 5907 * Request the device ESN / MEID / IMEI / IMEISV. 5908 * 5909 * The request is always allowed and contains GSM and CDMA device identity; 5910 * it substitutes the deprecated requests RIL_REQUEST_GET_IMEI and 5911 * RIL_REQUEST_GET_IMEISV. 5912 * 5913 * If a NULL value is returned for any of the device id, it means that error 5914 * accessing the device. 5915 * 5916 * When CDMA subscription is changed the ESN/MEID may change. The application 5917 * layer should re-issue the request to update the device identity in this case. 5918 * 5919 * "response" is const char ** 5920 * ((const char **)response)[0] is IMEI if GSM subscription is available 5921 * ((const char **)response)[1] is IMEISV if GSM subscription is available 5922 * ((const char **)response)[2] is ESN if CDMA subscription is available 5923 * ((const char **)response)[3] is MEID if CDMA subscription is available 5924 * 5925 * Valid errors: 5926 * SUCCESS 5927 * RADIO_NOT_AVAILABLE 5928 * NO_MEMORY 5929 * INTERNAL_ERR 5930 * SYSTEM_ERR 5931 * INVALID_ARGUMENTS 5932 * MODEM_ERR 5933 * NOT_PROVISIONED 5934 * REQUEST_NOT_SUPPORTED 5935 * NO_RESOURCES 5936 * CANCELLED 5937 * 5938 */ 5939 #define RIL_REQUEST_DEVICE_IDENTITY 98 5940 5941 /** 5942 * RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 5943 * 5944 * Request the radio's system selection module to exit emergency 5945 * callback mode. RIL will not respond with SUCCESS until the modem has 5946 * completely exited from Emergency Callback Mode. 5947 * 5948 * "data" is NULL 5949 * 5950 * "response" is NULL 5951 * 5952 * Valid errors: 5953 * SUCCESS 5954 * RADIO_NOT_AVAILABLE 5955 * OPERATION_NOT_ALLOWED 5956 * NO_MEMORY 5957 * INTERNAL_ERR 5958 * SYSTEM_ERR 5959 * INVALID_ARGUMENTS 5960 * MODEM_ERR 5961 * REQUEST_NOT_SUPPORTED 5962 * NO_RESOURCES 5963 * CANCELLED 5964 * 5965 */ 5966 #define RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE 99 5967 5968 /** 5969 * RIL_REQUEST_GET_SMSC_ADDRESS 5970 * 5971 * Queries the default Short Message Service Center address on the device. 5972 * 5973 * "data" is NULL 5974 * 5975 * "response" is const char * containing the SMSC address. 5976 * 5977 * Valid errors: 5978 * SUCCESS 5979 * RADIO_NOT_AVAILABLE 5980 * NO_MEMORY 5981 * REQUEST_RATE_LIMITED 5982 * SYSTEM_ERR 5983 * INTERNAL_ERR 5984 * MODEM_ERR 5985 * INVALID_ARGUMENTS 5986 * INVALID_MODEM_STATE 5987 * NOT_PROVISIONED 5988 * NO_RESOURCES 5989 * CANCELLED 5990 * REQUEST_NOT_SUPPORTED 5991 * SIM_ABSENT 5992 * 5993 */ 5994 #define RIL_REQUEST_GET_SMSC_ADDRESS 100 5995 5996 /** 5997 * RIL_REQUEST_SET_SMSC_ADDRESS 5998 * 5999 * Sets the default Short Message Service Center address on the device. 6000 * 6001 * "data" is const char * containing the SMSC address. 6002 * 6003 * "response" is NULL 6004 * 6005 * Valid errors: 6006 * SUCCESS 6007 * RADIO_NOT_AVAILABLE 6008 * INVALID_ARGUMENTS 6009 * INVALID_SMS_FORMAT 6010 * NO_MEMORY 6011 * SYSTEM_ERR 6012 * REQUEST_RATE_LIMITED 6013 * MODEM_ERR 6014 * NO_RESOURCES 6015 * INTERNAL_ERR 6016 * CANCELLED 6017 * REQUEST_NOT_SUPPORTED 6018 * SIM_ABSENT 6019 */ 6020 #define RIL_REQUEST_SET_SMSC_ADDRESS 101 6021 6022 /** 6023 * RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 6024 * 6025 * Indicates whether there is storage available for new SMS messages. 6026 * 6027 * "data" is int * 6028 * ((int *)data)[0] is 1 if memory is available for storing new messages 6029 * is 0 if memory capacity is exceeded 6030 * 6031 * "response" is NULL 6032 * 6033 * Valid errors: 6034 * SUCCESS 6035 * RADIO_NOT_AVAILABLE 6036 * INVALID_ARGUMENTS 6037 * NO_MEMORY 6038 * INVALID_STATE 6039 * SYSTEM_ERR 6040 * REQUEST_RATE_LIMITED 6041 * MODEM_ERR 6042 * INTERNAL_ERR 6043 * NO_RESOURCES 6044 * CANCELLED 6045 * REQUEST_NOT_SUPPORTED 6046 * 6047 */ 6048 #define RIL_REQUEST_REPORT_SMS_MEMORY_STATUS 102 6049 6050 /** 6051 * RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 6052 * 6053 * Indicates that the StkSerivce is running and is 6054 * ready to receive RIL_UNSOL_STK_XXXXX commands. 6055 * 6056 * "data" is NULL 6057 * "response" is NULL 6058 * 6059 * Valid errors: 6060 * SUCCESS 6061 * RADIO_NOT_AVAILABLE 6062 * INTERNAL_ERR 6063 * NO_MEMORY 6064 * NO_RESOURCES 6065 * CANCELLED 6066 * REQUEST_NOT_SUPPORTED 6067 * 6068 */ 6069 #define RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING 103 6070 6071 /** 6072 * RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 6073 * 6074 * Request to query the location where the CDMA subscription shall 6075 * be retrieved 6076 * 6077 * "data" is NULL 6078 * 6079 * "response" is int * 6080 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 6081 * 6082 * Valid errors: 6083 * SUCCESS 6084 * RADIO_NOT_AVAILABLE 6085 * SUBSCRIPTION_NOT_AVAILABLE 6086 * INTERNAL_ERR 6087 * NO_MEMORY 6088 * NO_RESOURCES 6089 * CANCELLED 6090 * REQUEST_NOT_SUPPORTED 6091 * 6092 * See also: RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE 6093 */ 6094 #define RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE 104 6095 6096 /** 6097 * RIL_REQUEST_ISIM_AUTHENTICATION 6098 * 6099 * Request the ISIM application on the UICC to perform AKA 6100 * challenge/response algorithm for IMS authentication 6101 * 6102 * "data" is a const char * containing the challenge string in Base64 format 6103 * "response" is a const char * containing the response in Base64 format 6104 * 6105 * Valid errors: 6106 * SUCCESS 6107 * RADIO_NOT_AVAILABLE 6108 * INTERNAL_ERR 6109 * NO_MEMORY 6110 * NO_RESOURCES 6111 * CANCELLED 6112 * REQUEST_NOT_SUPPORTED 6113 */ 6114 #define RIL_REQUEST_ISIM_AUTHENTICATION 105 6115 6116 /** 6117 * RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 6118 * 6119 * Acknowledge successful or failed receipt of SMS previously indicated 6120 * via RIL_UNSOL_RESPONSE_NEW_SMS, including acknowledgement TPDU to send 6121 * as the RP-User-Data element of the RP-ACK or RP-ERROR PDU. 6122 * 6123 * "data" is const char ** 6124 * ((const char **)data)[0] is "1" on successful receipt (send RP-ACK) 6125 * is "0" on failed receipt (send RP-ERROR) 6126 * ((const char **)data)[1] is the acknowledgement TPDU in hexadecimal format 6127 * 6128 * "response" is NULL 6129 * 6130 * Valid errors: 6131 * SUCCESS 6132 * RADIO_NOT_AVAILABLE 6133 * INTERNAL_ERR 6134 * NO_MEMORY 6135 * NO_RESOURCES 6136 * CANCELLED 6137 * REQUEST_NOT_SUPPORTED 6138 */ 6139 #define RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU 106 6140 6141 /** 6142 * RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 6143 * 6144 * Requests to send a SAT/USAT envelope command to SIM. 6145 * The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111. 6146 * 6147 * This request has one difference from RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND: 6148 * the SW1 and SW2 status bytes from the UICC response are returned along with 6149 * the response data, using the same structure as RIL_REQUEST_SIM_IO. 6150 * 6151 * The RIL implementation shall perform the normal processing of a '91XX' 6152 * response in SW1/SW2 to retrieve the pending proactive command and send it 6153 * as an unsolicited response, as RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND does. 6154 * 6155 * "data" is a const char * containing the SAT/USAT command 6156 * in hexadecimal format starting with command tag 6157 * 6158 * "response" is a const RIL_SIM_IO_Response * 6159 * 6160 * Valid errors: 6161 * RIL_E_SUCCESS 6162 * RIL_E_RADIO_NOT_AVAILABLE (radio resetting) 6163 * SIM_BUSY 6164 * OPERATION_NOT_ALLOWED 6165 * INTERNAL_ERR 6166 * NO_MEMORY 6167 * NO_RESOURCES 6168 * CANCELLED 6169 * REQUEST_NOT_SUPPORTED 6170 * SIM_ABSENT 6171 */ 6172 #define RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS 107 6173 6174 /** 6175 * RIL_REQUEST_VOICE_RADIO_TECH 6176 * 6177 * Query the radio technology type (3GPP/3GPP2) used for voice. Query is valid only 6178 * when radio state is not RADIO_STATE_UNAVAILABLE 6179 * 6180 * "data" is NULL 6181 * "response" is int * 6182 * ((int *) response)[0] is of type const RIL_RadioTechnology 6183 * 6184 * Valid errors: 6185 * SUCCESS 6186 * RADIO_NOT_AVAILABLE 6187 * INTERNAL_ERR 6188 * NO_MEMORY 6189 * NO_RESOURCES 6190 * CANCELLED 6191 * REQUEST_NOT_SUPPORTED 6192 */ 6193 #define RIL_REQUEST_VOICE_RADIO_TECH 108 6194 6195 /** 6196 * RIL_REQUEST_GET_CELL_INFO_LIST 6197 * 6198 * Request all of the current cell information known to the radio. The radio 6199 * must a list of all current cells, including the neighboring cells. If for a particular 6200 * cell information isn't known then the appropriate unknown value will be returned. 6201 * This does not cause or change the rate of RIL_UNSOL_CELL_INFO_LIST. 6202 * 6203 * "data" is NULL 6204 * 6205 * "response" is an array of RIL_CellInfo_v12. 6206 * 6207 * Valid errors: 6208 * SUCCESS 6209 * RADIO_NOT_AVAILABLE 6210 * NO_MEMORY 6211 * INTERNAL_ERR 6212 * SYSTEM_ERR 6213 * MODEM_ERR 6214 * NO_NETWORK_FOUND 6215 * REQUEST_NOT_SUPPORTED 6216 * NO_RESOURCES 6217 * CANCELLED 6218 * 6219 */ 6220 #define RIL_REQUEST_GET_CELL_INFO_LIST 109 6221 6222 /** 6223 * RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 6224 * 6225 * Sets the minimum time between when RIL_UNSOL_CELL_INFO_LIST should be invoked. 6226 * A value of 0, means invoke RIL_UNSOL_CELL_INFO_LIST when any of the reported 6227 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 6228 * a RIL_UNSOL_CELL_INFO_LIST. 6229 * 6230 * "data" is int * 6231 * ((int *)data)[0] is minimum time in milliseconds 6232 * 6233 * "response" is NULL 6234 * 6235 * Valid errors: 6236 * SUCCESS 6237 * RADIO_NOT_AVAILABLE 6238 * NO_MEMORY 6239 * INTERNAL_ERR 6240 * SYSTEM_ERR 6241 * INVALID_ARGUMENTS 6242 * REQUEST_NOT_SUPPORTED 6243 * NO_RESOURCES 6244 * CANCELLED 6245 */ 6246 #define RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE 110 6247 6248 /** 6249 * RIL_REQUEST_SET_INITIAL_ATTACH_APN 6250 * 6251 * Set an apn to initial attach network 6252 * 6253 * "data" is a const char ** 6254 * ((const char **)data)[0] is the APN to connect if radio technology is LTE 6255 * ((const char **)data)[1] is the connection type to request must be one of the 6256 * PDP_type values in TS 27.007 section 10.1.1. 6257 * For example, "IP", "IPV6", "IPV4V6", or "PPP". 6258 * ((const char **)data)[2] is the PAP / CHAP auth type. Values: 6259 * 0 => PAP and CHAP is never performed. 6260 * 1 => PAP may be performed; CHAP is never performed. 6261 * 2 => CHAP may be performed; PAP is never performed. 6262 * 3 => PAP / CHAP may be performed - baseband dependent. 6263 * ((const char **)data)[3] is the username for APN, or NULL 6264 * ((const char **)data)[4] is the password for APN, or NULL 6265 * 6266 * "response" is NULL 6267 * 6268 * Valid errors: 6269 * SUCCESS 6270 * RADIO_NOT_AVAILABLE (radio resetting) 6271 * SUBSCRIPTION_NOT_AVAILABLE 6272 * NO_MEMORY 6273 * INTERNAL_ERR 6274 * SYSTEM_ERR 6275 * INVALID_ARGUMENTS 6276 * MODEM_ERR 6277 * NOT_PROVISIONED 6278 * REQUEST_NOT_SUPPORTED 6279 * NO_RESOURCES 6280 * CANCELLED 6281 * 6282 */ 6283 #define RIL_REQUEST_SET_INITIAL_ATTACH_APN 111 6284 6285 /** 6286 * RIL_REQUEST_IMS_REGISTRATION_STATE 6287 * 6288 * This message is DEPRECATED and shall be removed in a future release (target: 2018); 6289 * instead, provide IMS registration status via an IMS Service. 6290 * 6291 * Request current IMS registration state 6292 * 6293 * "data" is NULL 6294 * 6295 * "response" is int * 6296 * ((int *)response)[0] is registration state: 6297 * 0 - Not registered 6298 * 1 - Registered 6299 * 6300 * If ((int*)response)[0] is = 1, then ((int *) response)[1] 6301 * must follow with IMS SMS format: 6302 * 6303 * ((int *) response)[1] is of type RIL_RadioTechnologyFamily 6304 * 6305 * Valid errors: 6306 * SUCCESS 6307 * RADIO_NOT_AVAILABLE 6308 * INTERNAL_ERR 6309 * NO_MEMORY 6310 * NO_RESOURCES 6311 * CANCELLED 6312 * INVALID_MODEM_STATE 6313 * REQUEST_NOT_SUPPORTED 6314 */ 6315 #define RIL_REQUEST_IMS_REGISTRATION_STATE 112 6316 6317 /** 6318 * RIL_REQUEST_IMS_SEND_SMS 6319 * 6320 * Send a SMS message over IMS 6321 * 6322 * "data" is const RIL_IMS_SMS_Message * 6323 * 6324 * "response" is a const RIL_SMS_Response * 6325 * 6326 * Based on the return error, caller decides to resend if sending sms 6327 * fails. SMS_SEND_FAIL_RETRY means retry, and other errors means no retry. 6328 * In case of retry, data is encoded based on Voice Technology available. 6329 * 6330 * Valid errors: 6331 * SUCCESS 6332 * RADIO_NOT_AVAILABLE 6333 * SMS_SEND_FAIL_RETRY 6334 * FDN_CHECK_FAILURE 6335 * NETWORK_REJECT 6336 * INVALID_ARGUMENTS 6337 * INVALID_STATE 6338 * NO_MEMORY 6339 * INVALID_SMS_FORMAT 6340 * SYSTEM_ERR 6341 * REQUEST_RATE_LIMITED 6342 * MODEM_ERR 6343 * NETWORK_ERR 6344 * ENCODING_ERR 6345 * INVALID_SMSC_ADDRESS 6346 * OPERATION_NOT_ALLOWED 6347 * INTERNAL_ERR 6348 * NO_RESOURCES 6349 * CANCELLED 6350 * REQUEST_NOT_SUPPORTED 6351 * 6352 */ 6353 #define RIL_REQUEST_IMS_SEND_SMS 113 6354 6355 /** 6356 * RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 6357 * 6358 * Request APDU exchange on the basic channel. This command reflects TS 27.007 6359 * "generic SIM access" operation (+CSIM). The modem must ensure proper function 6360 * of GSM/CDMA, and filter commands appropriately. It should filter 6361 * channel management and SELECT by DF name commands. 6362 * 6363 * "data" is a const RIL_SIM_APDU * 6364 * "sessionid" field should be ignored. 6365 * 6366 * "response" is a const RIL_SIM_IO_Response * 6367 * 6368 * Valid errors: 6369 * SUCCESS 6370 * RADIO_NOT_AVAILABLE 6371 * INTERNAL_ERR 6372 * NO_MEMORY 6373 * NO_RESOURCES 6374 * CANCELLED 6375 * REQUEST_NOT_SUPPORTED 6376 */ 6377 #define RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC 114 6378 6379 /** 6380 * RIL_REQUEST_SIM_OPEN_CHANNEL 6381 * 6382 * Open a new logical channel and select the given application. This command 6383 * reflects TS 27.007 "open logical channel" operation (+CCHO). This request 6384 * also specifies the P2 parameter (described in ISO 7816-4). 6385 * 6386 * "data" is a const RIL_OpenChannelParam * 6387 * 6388 * "response" is int * 6389 * ((int *)data)[0] contains the session id of the logical channel. 6390 * ((int *)data)[1] onwards may optionally contain the select response for the 6391 * open channel command with one byte per integer. 6392 * 6393 * Valid errors: 6394 * SUCCESS 6395 * RADIO_NOT_AVAILABLE 6396 * MISSING_RESOURCE 6397 * NO_SUCH_ELEMENT 6398 * INTERNAL_ERR 6399 * NO_MEMORY 6400 * NO_RESOURCES 6401 * CANCELLED 6402 * SIM_ERR 6403 * INVALID_SIM_STATE 6404 * MISSING_RESOURCE 6405 * REQUEST_NOT_SUPPORTED 6406 */ 6407 #define RIL_REQUEST_SIM_OPEN_CHANNEL 115 6408 6409 /** 6410 * RIL_REQUEST_SIM_CLOSE_CHANNEL 6411 * 6412 * Close a previously opened logical channel. This command reflects TS 27.007 6413 * "close logical channel" operation (+CCHC). 6414 * 6415 * "data" is int * 6416 * ((int *)data)[0] is the session id of logical the channel to close. 6417 * 6418 * "response" is NULL 6419 * 6420 * Valid errors: 6421 * SUCCESS 6422 * RADIO_NOT_AVAILABLE 6423 * INTERNAL_ERR 6424 * NO_MEMORY 6425 * NO_RESOURCES 6426 * CANCELLED 6427 * REQUEST_NOT_SUPPORTED 6428 */ 6429 #define RIL_REQUEST_SIM_CLOSE_CHANNEL 116 6430 6431 /** 6432 * RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 6433 * 6434 * Exchange APDUs with a UICC over a previously opened logical channel. This 6435 * command reflects TS 27.007 "generic logical channel access" operation 6436 * (+CGLA). The modem should filter channel management and SELECT by DF name 6437 * commands. 6438 * 6439 * "data" is a const RIL_SIM_APDU* 6440 * 6441 * "response" is a const RIL_SIM_IO_Response * 6442 * 6443 * Valid errors: 6444 * SUCCESS 6445 * RADIO_NOT_AVAILABLE 6446 * INTERNAL_ERR 6447 * NO_MEMORY 6448 * NO_RESOURCES 6449 * CANCELLED 6450 * REQUEST_NOT_SUPPORTED 6451 */ 6452 #define RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL 117 6453 6454 /** 6455 * RIL_REQUEST_NV_READ_ITEM 6456 * 6457 * Read one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 6458 * This is used for device configuration by some CDMA operators. 6459 * 6460 * "data" is a const RIL_NV_ReadItem * 6461 * 6462 * "response" is const char * containing the contents of the NV item 6463 * 6464 * Valid errors: 6465 * SUCCESS 6466 * RADIO_NOT_AVAILABLE 6467 * REQUEST_NOT_SUPPORTED 6468 */ 6469 #define RIL_REQUEST_NV_READ_ITEM 118 6470 6471 /** 6472 * RIL_REQUEST_NV_WRITE_ITEM 6473 * 6474 * Write one of the radio NV items defined in RadioNVItems.java / ril_nv_items.h. 6475 * This is used for device configuration by some CDMA operators. 6476 * 6477 * "data" is a const RIL_NV_WriteItem * 6478 * 6479 * "response" is NULL 6480 * 6481 * Valid errors: 6482 * SUCCESS 6483 * RADIO_NOT_AVAILABLE 6484 * REQUEST_NOT_SUPPORTED 6485 */ 6486 #define RIL_REQUEST_NV_WRITE_ITEM 119 6487 6488 /** 6489 * RIL_REQUEST_NV_WRITE_CDMA_PRL 6490 * 6491 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 6492 * This is used for device configuration by some CDMA operators. 6493 * 6494 * "data" is a const char * containing the PRL as a byte array 6495 * 6496 * "response" is NULL 6497 * 6498 * Valid errors: 6499 * SUCCESS 6500 * RADIO_NOT_AVAILABLE 6501 * REQUEST_NOT_SUPPORTED 6502 */ 6503 #define RIL_REQUEST_NV_WRITE_CDMA_PRL 120 6504 6505 /** 6506 * RIL_REQUEST_NV_RESET_CONFIG 6507 * 6508 * Reset the radio NV configuration to the factory state. 6509 * This is used for device configuration by some CDMA operators. 6510 * 6511 * "data" is int * 6512 * ((int *)data)[0] is 1 to reload all NV items 6513 * ((int *)data)[0] is 2 for erase NV reset (SCRTN) 6514 * ((int *)data)[0] is 3 for factory reset (RTN) 6515 * 6516 * "response" is NULL 6517 * 6518 * Valid errors: 6519 * SUCCESS 6520 * RADIO_NOT_AVAILABLE 6521 * REQUEST_NOT_SUPPORTED 6522 */ 6523 #define RIL_REQUEST_NV_RESET_CONFIG 121 6524 6525 /** RIL_REQUEST_SET_UICC_SUBSCRIPTION 6526 * FIXME This API needs to have more documentation. 6527 * 6528 * Selection/de-selection of a subscription from a SIM card 6529 * "data" is const RIL_SelectUiccSub* 6530 6531 * 6532 * "response" is NULL 6533 * 6534 * Valid errors: 6535 * SUCCESS 6536 * RADIO_NOT_AVAILABLE (radio resetting) 6537 * SUBSCRIPTION_NOT_SUPPORTED 6538 * NO_MEMORY 6539 * INTERNAL_ERR 6540 * SYSTEM_ERR 6541 * INVALID_ARGUMENTS 6542 * MODEM_ERR 6543 * REQUEST_NOT_SUPPORTED 6544 * NO_RESOURCES 6545 * CANCELLED 6546 * 6547 */ 6548 #define RIL_REQUEST_SET_UICC_SUBSCRIPTION 122 6549 6550 /** 6551 * RIL_REQUEST_ALLOW_DATA 6552 * 6553 * Tells the modem whether data calls are allowed or not 6554 * 6555 * "data" is int * 6556 * FIXME slotId and aid will be added. 6557 * ((int *)data)[0] is == 0 to allow data calls 6558 * ((int *)data)[0] is == 1 to disallow data calls 6559 * 6560 * "response" is NULL 6561 * 6562 * Valid errors: 6563 * 6564 * SUCCESS 6565 * RADIO_NOT_AVAILABLE (radio resetting) 6566 * NO_MEMORY 6567 * INTERNAL_ERR 6568 * SYSTEM_ERR 6569 * MODEM_ERR 6570 * INVALID_ARGUMENTS 6571 * DEVICE_IN_USE 6572 * INVALID_MODEM_STATE 6573 * REQUEST_NOT_SUPPORTED 6574 * NO_RESOURCES 6575 * CANCELLED 6576 * 6577 */ 6578 #define RIL_REQUEST_ALLOW_DATA 123 6579 6580 /** 6581 * RIL_REQUEST_GET_HARDWARE_CONFIG 6582 * 6583 * Request all of the current hardware (modem and sim) associated 6584 * with the RIL. 6585 * 6586 * "data" is NULL 6587 * 6588 * "response" is an array of RIL_HardwareConfig. 6589 * 6590 * Valid errors: 6591 * RADIO_NOT_AVAILABLE 6592 * REQUEST_NOT_SUPPORTED 6593 */ 6594 #define RIL_REQUEST_GET_HARDWARE_CONFIG 124 6595 6596 /** 6597 * RIL_REQUEST_SIM_AUTHENTICATION 6598 * 6599 * Returns the response of SIM Authentication through RIL to a 6600 * challenge request. 6601 * 6602 * "data" Base64 encoded string containing challenge: 6603 * int authContext; P2 value of authentication command, see P2 parameter in 6604 * 3GPP TS 31.102 7.1.2 6605 * char *authData; the challenge string in Base64 format, see 3GPP 6606 * TS 31.102 7.1.2 6607 * char *aid; AID value, See ETSI 102.221 8.1 and 101.220 4, 6608 * NULL if no value 6609 * 6610 * "response" Base64 encoded strings containing response: 6611 * int sw1; Status bytes per 3GPP TS 31.102 section 7.3 6612 * int sw2; 6613 * char *simResponse; Response in Base64 format, see 3GPP TS 31.102 7.1.2 6614 * 6615 * Valid errors: 6616 * RADIO_NOT_AVAILABLE 6617 * INTERNAL_ERR 6618 * NO_MEMORY 6619 * NO_RESOURCES 6620 * CANCELLED 6621 * INVALID_MODEM_STATE 6622 * INVALID_ARGUMENTS 6623 * SIM_ERR 6624 * REQUEST_NOT_SUPPORTED 6625 */ 6626 #define RIL_REQUEST_SIM_AUTHENTICATION 125 6627 6628 /** 6629 * RIL_REQUEST_GET_DC_RT_INFO 6630 * 6631 * The request is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO 6632 * Requests the Data Connection Real Time Info 6633 * 6634 * "data" is NULL 6635 * 6636 * "response" is the most recent RIL_DcRtInfo 6637 * 6638 * Valid errors: 6639 * SUCCESS 6640 * RADIO_NOT_AVAILABLE 6641 * REQUEST_NOT_SUPPORTED 6642 * INTERNAL_ERR 6643 * NO_MEMORY 6644 * NO_RESOURCES 6645 * CANCELLED 6646 * 6647 * See also: RIL_UNSOL_DC_RT_INFO_CHANGED 6648 */ 6649 #define RIL_REQUEST_GET_DC_RT_INFO 126 6650 6651 /** 6652 * RIL_REQUEST_SET_DC_RT_INFO_RATE 6653 * 6654 * The request is DEPRECATED 6655 * This is the minimum number of milliseconds between successive 6656 * RIL_UNSOL_DC_RT_INFO_CHANGED messages and defines the highest rate 6657 * at which RIL_UNSOL_DC_RT_INFO_CHANGED's will be sent. A value of 6658 * 0 means send as fast as possible. 6659 * 6660 * "data" The number of milliseconds as an int 6661 * 6662 * "response" is null 6663 * 6664 * Valid errors: 6665 * SUCCESS must not fail 6666 */ 6667 #define RIL_REQUEST_SET_DC_RT_INFO_RATE 127 6668 6669 /** 6670 * RIL_REQUEST_SET_DATA_PROFILE 6671 * 6672 * Set data profile in modem 6673 * Modem should erase existed profiles from framework, and apply new profiles 6674 * "data" is a const RIL_DataProfileInfo ** 6675 * "datalen" is count * sizeof(const RIL_DataProfileInfo *) 6676 * "response" is NULL 6677 * 6678 * Valid errors: 6679 * SUCCESS 6680 * RADIO_NOT_AVAILABLE (radio resetting) 6681 * SUBSCRIPTION_NOT_AVAILABLE 6682 * INTERNAL_ERR 6683 * NO_MEMORY 6684 * NO_RESOURCES 6685 * CANCELLED 6686 * REQUEST_NOT_SUPPORTED 6687 * SIM_ABSENT 6688 */ 6689 #define RIL_REQUEST_SET_DATA_PROFILE 128 6690 6691 /** 6692 * RIL_REQUEST_SHUTDOWN 6693 * 6694 * Device is shutting down. All further commands are ignored 6695 * and RADIO_NOT_AVAILABLE must be returned. 6696 * 6697 * "data" is null 6698 * "response" is NULL 6699 * 6700 * Valid errors: 6701 * SUCCESS 6702 * RADIO_NOT_AVAILABLE 6703 * OPERATION_NOT_ALLOWED 6704 * NO_MEMORY 6705 * INTERNAL_ERR 6706 * SYSTEM_ERR 6707 * REQUEST_NOT_SUPPORTED 6708 * NO_RESOURCES 6709 * CANCELLED 6710 */ 6711 #define RIL_REQUEST_SHUTDOWN 129 6712 6713 /** 6714 * RIL_REQUEST_GET_RADIO_CAPABILITY 6715 * 6716 * Used to get phone radio capability. 6717 * 6718 * "data" is the RIL_RadioCapability structure 6719 * 6720 * Valid errors: 6721 * SUCCESS 6722 * RADIO_NOT_AVAILABLE 6723 * OPERATION_NOT_ALLOWED 6724 * INVALID_STATE 6725 * REQUEST_NOT_SUPPORTED 6726 * INTERNAL_ERR 6727 * NO_MEMORY 6728 * NO_RESOURCES 6729 * CANCELLED 6730 */ 6731 #define RIL_REQUEST_GET_RADIO_CAPABILITY 130 6732 6733 /** 6734 * RIL_REQUEST_SET_RADIO_CAPABILITY 6735 * 6736 * Used to set the phones radio capability. Be VERY careful 6737 * using this request as it may cause some vendor modems to reset. Because 6738 * of the possible modem reset any RIL commands after this one may not be 6739 * processed. 6740 * 6741 * "data" is the RIL_RadioCapability structure 6742 * 6743 * "response" is the RIL_RadioCapability structure, used to feedback return status 6744 * 6745 * Valid errors: 6746 * SUCCESS means a RIL_UNSOL_RADIO_CAPABILITY will be sent within 30 seconds. 6747 * RADIO_NOT_AVAILABLE 6748 * OPERATION_NOT_ALLOWED 6749 * NO_MEMORY 6750 * INTERNAL_ERR 6751 * SYSTEM_ERR 6752 * INVALID_ARGUMENTS 6753 * MODEM_ERR 6754 * INVALID_STATE 6755 * REQUEST_NOT_SUPPORTED 6756 * NO_RESOURCES 6757 * CANCELLED 6758 */ 6759 #define RIL_REQUEST_SET_RADIO_CAPABILITY 131 6760 6761 /** 6762 * RIL_REQUEST_START_LCE 6763 * 6764 * Start Link Capacity Estimate (LCE) service if supported by the radio. 6765 * 6766 * "data" is const int * 6767 * ((const int*)data)[0] specifies the desired reporting interval (ms). 6768 * ((const int*)data)[1] specifies the LCE service mode. 1: PULL; 0: PUSH. 6769 * 6770 * "response" is the RIL_LceStatusInfo. 6771 * 6772 * Valid errors: 6773 * SUCCESS 6774 * RADIO_NOT_AVAILABLE 6775 * LCE_NOT_SUPPORTED 6776 * INTERNAL_ERR 6777 * REQUEST_NOT_SUPPORTED 6778 * NO_MEMORY 6779 * NO_RESOURCES 6780 * CANCELLED 6781 * SIM_ABSENT 6782 */ 6783 #define RIL_REQUEST_START_LCE 132 6784 6785 /** 6786 * RIL_REQUEST_STOP_LCE 6787 * 6788 * Stop Link Capacity Estimate (LCE) service, the STOP operation should be 6789 * idempotent for the radio modem. 6790 * 6791 * "response" is the RIL_LceStatusInfo. 6792 * 6793 * Valid errors: 6794 * SUCCESS 6795 * RADIO_NOT_AVAILABLE 6796 * LCE_NOT_SUPPORTED 6797 * INTERNAL_ERR 6798 * NO_MEMORY 6799 * NO_RESOURCES 6800 * CANCELLED 6801 * REQUEST_NOT_SUPPORTED 6802 * SIM_ABSENT 6803 */ 6804 #define RIL_REQUEST_STOP_LCE 133 6805 6806 /** 6807 * RIL_REQUEST_PULL_LCEDATA 6808 * 6809 * Pull LCE service for capacity information. 6810 * 6811 * "response" is the RIL_LceDataInfo. 6812 * 6813 * Valid errors: 6814 * SUCCESS 6815 * RADIO_NOT_AVAILABLE 6816 * LCE_NOT_SUPPORTED 6817 * INTERNAL_ERR 6818 * NO_MEMORY 6819 * NO_RESOURCES 6820 * CANCELLED 6821 * REQUEST_NOT_SUPPORTED 6822 * SIM_ABSENT 6823 */ 6824 #define RIL_REQUEST_PULL_LCEDATA 134 6825 6826 /** 6827 * RIL_REQUEST_GET_ACTIVITY_INFO 6828 * 6829 * Get modem activity information for power consumption estimation. 6830 * 6831 * Request clear-on-read statistics information that is used for 6832 * estimating the per-millisecond power consumption of the cellular 6833 * modem. 6834 * 6835 * "data" is null 6836 * "response" is const RIL_ActivityStatsInfo * 6837 * 6838 * Valid errors: 6839 * 6840 * SUCCESS 6841 * RADIO_NOT_AVAILABLE (radio resetting) 6842 * NO_MEMORY 6843 * INTERNAL_ERR 6844 * SYSTEM_ERR 6845 * MODEM_ERR 6846 * NOT_PROVISIONED 6847 * REQUEST_NOT_SUPPORTED 6848 * NO_RESOURCES CANCELLED 6849 */ 6850 #define RIL_REQUEST_GET_ACTIVITY_INFO 135 6851 6852 /** 6853 * RIL_REQUEST_SET_CARRIER_RESTRICTIONS 6854 * 6855 * Set carrier restrictions for this sim slot. Expected modem behavior: 6856 * If never receives this command 6857 * - Must allow all carriers 6858 * Receives this command with data being NULL 6859 * - Must allow all carriers. If a previously allowed SIM is present, modem must not reload 6860 * the SIM. If a previously disallowed SIM is present, reload the SIM and notify Android. 6861 * Receives this command with a list of carriers 6862 * - Only allow specified carriers, persist across power cycles and FDR. If a present SIM 6863 * is in the allowed list, modem must not reload the SIM. If a present SIM is *not* in 6864 * the allowed list, modem must detach from the registered network and only keep emergency 6865 * service, and notify Android SIM refresh reset with new SIM state being 6866 * RIL_CARDSTATE_RESTRICTED. Emergency service must be enabled. 6867 * 6868 * "data" is const RIL_CarrierRestrictions * 6869 * A list of allowed carriers and possibly a list of excluded carriers. 6870 * If data is NULL, means to clear previous carrier restrictions and allow all carriers 6871 * 6872 * "response" is int * 6873 * ((int *)data)[0] contains the number of allowed carriers which have been set correctly. 6874 * On success, it should match the length of list data->allowed_carriers. 6875 * If data is NULL, the value must be 0. 6876 * 6877 * Valid errors: 6878 * RIL_E_SUCCESS 6879 * RIL_E_INVALID_ARGUMENTS 6880 * RIL_E_RADIO_NOT_AVAILABLE 6881 * RIL_E_REQUEST_NOT_SUPPORTED 6882 * INTERNAL_ERR 6883 * NO_MEMORY 6884 * NO_RESOURCES 6885 * CANCELLED 6886 */ 6887 #define RIL_REQUEST_SET_CARRIER_RESTRICTIONS 136 6888 6889 /** 6890 * RIL_REQUEST_GET_CARRIER_RESTRICTIONS 6891 * 6892 * Get carrier restrictions for this sim slot. Expected modem behavior: 6893 * Return list of allowed carriers, or null if all carriers are allowed. 6894 * 6895 * "data" is NULL 6896 * 6897 * "response" is const RIL_CarrierRestrictions *. 6898 * If response is NULL, it means all carriers are allowed. 6899 * 6900 * Valid errors: 6901 * RIL_E_SUCCESS 6902 * RIL_E_RADIO_NOT_AVAILABLE 6903 * RIL_E_REQUEST_NOT_SUPPORTED 6904 * INTERNAL_ERR 6905 * NO_MEMORY 6906 * NO_RESOURCES 6907 * CANCELLED 6908 */ 6909 #define RIL_REQUEST_GET_CARRIER_RESTRICTIONS 137 6910 6911 /** 6912 * RIL_REQUEST_SEND_DEVICE_STATE 6913 * 6914 * Send the updated device state. 6915 * Modem can perform power saving based on the provided device state. 6916 * "data" is const int * 6917 * ((const int*)data)[0] A RIL_DeviceStateType that specifies the device state type. 6918 * ((const int*)data)[1] Specifies the state. See RIL_DeviceStateType for the definition of each 6919 * type. 6920 * 6921 * "datalen" is count * sizeof(const RIL_DeviceState *) 6922 * "response" is NULL 6923 * 6924 * Valid errors: 6925 * SUCCESS 6926 * RADIO_NOT_AVAILABLE (radio resetting) 6927 * NO_MEMORY 6928 * INTERNAL_ERR 6929 * SYSTEM_ERR 6930 * INVALID_ARGUMENTS 6931 * REQUEST_NOT_SUPPORTED 6932 * NO_RESOURCES 6933 * CANCELLED 6934 */ 6935 #define RIL_REQUEST_SEND_DEVICE_STATE 138 6936 6937 /** 6938 * RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 6939 * 6940 * Set the unsolicited response filter 6941 * This is used to prevent unnecessary application processor 6942 * wake up for power saving purposes by suppressing the 6943 * unsolicited responses in certain scenarios. 6944 * 6945 * "data" is an int * 6946 * 6947 * ((int *)data)[0] is a 32-bit bitmask of RIL_UnsolicitedResponseFilter 6948 * 6949 * "response" is NULL 6950 * 6951 * Valid errors: 6952 * SUCCESS 6953 * INVALID_ARGUMENTS (e.g. the requested filter doesn't exist) 6954 * RADIO_NOT_AVAILABLE (radio resetting) 6955 * NO_MEMORY 6956 * INTERNAL_ERR 6957 * SYSTEM_ERR 6958 * REQUEST_NOT_SUPPORTED 6959 * NO_RESOURCES 6960 * CANCELLED 6961 */ 6962 #define RIL_REQUEST_SET_UNSOLICITED_RESPONSE_FILTER 139 6963 6964 /** 6965 * RIL_REQUEST_SET_SIM_CARD_POWER 6966 * 6967 * Set SIM card power up or down 6968 * 6969 * Request is equivalent to inserting and removing the card, with 6970 * an additional effect where the ability to detect card removal/insertion 6971 * is disabled when the SIM card is powered down. 6972 * 6973 * This will generate RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 6974 * as if the SIM had been inserted or removed. 6975 * 6976 * "data" is int * 6977 * ((int *)data)[0] is 1 for "SIM POWER UP" 6978 * ((int *)data)[0] is 0 for "SIM POWER DOWN" 6979 * 6980 * "response" is NULL 6981 * 6982 * Valid errors: 6983 * SUCCESS 6984 * RADIO_NOT_AVAILABLE 6985 * REQUEST_NOT_SUPPORTED 6986 * SIM_ABSENT 6987 * INVALID_ARGUMENTS 6988 * INTERNAL_ERR 6989 * NO_MEMORY 6990 * NO_RESOURCES 6991 * CANCELLED 6992 */ 6993 #define RIL_REQUEST_SET_SIM_CARD_POWER 140 6994 6995 /** 6996 * RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 6997 * 6998 * Provide Carrier specific information to the modem that will be used to 6999 * encrypt the IMSI and IMPI. Sent by the framework during boot, carrier 7000 * switch and every time we receive a new certificate. 7001 * 7002 * "data" is the RIL_CarrierInfoForImsiEncryption * structure. 7003 * 7004 * "response" is NULL 7005 * 7006 * Valid errors: 7007 * RIL_E_SUCCESS 7008 * RIL_E_RADIO_NOT_AVAILABLE 7009 * SIM_ABSENT 7010 * RIL_E_REQUEST_NOT_SUPPORTED 7011 * INVALID_ARGUMENTS 7012 * MODEM_INTERNAL_FAILURE 7013 * INTERNAL_ERR 7014 * NO_MEMORY 7015 * NO_RESOURCES 7016 * CANCELLED 7017 */ 7018 #define RIL_REQUEST_SET_CARRIER_INFO_IMSI_ENCRYPTION 141 7019 7020 /** 7021 * RIL_REQUEST_START_NETWORK_SCAN 7022 * 7023 * Starts a new network scan 7024 * 7025 * Request to start a network scan with specified radio access networks with frequency bands and/or 7026 * channels. 7027 * 7028 * "data" is a const RIL_NetworkScanRequest *. 7029 * "response" is NULL 7030 * 7031 * Valid errors: 7032 * SUCCESS 7033 * RADIO_NOT_AVAILABLE 7034 * OPERATION_NOT_ALLOWED 7035 * DEVICE_IN_USE 7036 * INTERNAL_ERR 7037 * NO_MEMORY 7038 * MODEM_ERR 7039 * INVALID_ARGUMENTS 7040 * REQUEST_NOT_SUPPORTED 7041 * NO_RESOURCES 7042 * CANCELLED 7043 * 7044 */ 7045 #define RIL_REQUEST_START_NETWORK_SCAN 142 7046 7047 /** 7048 * RIL_REQUEST_STOP_NETWORK_SCAN 7049 * 7050 * Stops an ongoing network scan 7051 * 7052 * Request to stop the ongoing network scan. Since the modem can only perform one scan at a time, 7053 * there is no parameter for this request. 7054 * 7055 * "data" is NULL 7056 * "response" is NULL 7057 * 7058 * Valid errors: 7059 * SUCCESS 7060 * INTERNAL_ERR 7061 * MODEM_ERR 7062 * NO_MEMORY 7063 * NO_RESOURCES 7064 * CANCELLED 7065 * REQUEST_NOT_SUPPORTED 7066 * 7067 */ 7068 #define RIL_REQUEST_STOP_NETWORK_SCAN 143 7069 7070 /** 7071 * RIL_REQUEST_START_KEEPALIVE 7072 * 7073 * Start a keepalive session 7074 * 7075 * Request that the modem begin sending keepalive packets on a particular 7076 * data call, with a specified source, destination, and format. 7077 * 7078 * "data" is a const RIL_RequestKeepalive 7079 * "response" is RIL_KeepaliveStatus with a valid "handle" 7080 * 7081 * Valid errors: 7082 * SUCCESS 7083 * NO_RESOURCES 7084 * INVALID_ARGUMENTS 7085 * 7086 */ 7087 #define RIL_REQUEST_START_KEEPALIVE 144 7088 7089 /** 7090 * RIL_REQUEST_STOP_KEEPALIVE 7091 * 7092 * Stops an ongoing keepalive session 7093 * 7094 * Requests that a keepalive session with the given handle be stopped. 7095 * there is no parameter for this request. 7096 * 7097 * "data" is an integer handle 7098 * "response" is NULL 7099 * 7100 * Valid errors: 7101 * SUCCESS 7102 * INVALID_ARGUMENTS 7103 * 7104 */ 7105 #define RIL_REQUEST_STOP_KEEPALIVE 145 7106 7107 /** 7108 * RIL_REQUEST_GET_MODEM_STACK_STATUS 7109 * 7110 * Request status of a logical modem 7111 * 7112 * Valid errors: 7113 * SUCCESS 7114 * RADIO_NOT_AVAILABLE 7115 * MODEM_ERR 7116 * 7117 */ 7118 #define RIL_REQUEST_GET_MODEM_STACK_STATUS 146 7119 7120 /** 7121 * @param info Response info struct containing response type, serial no. and error 7122 * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily. 7123 * 7124 * Valid errors returned: 7125 * RadioError:NONE 7126 * RadioError:RADIO_NOT_AVAILABLE 7127 * RadioError:INTERNAL_ERR 7128 * RadioError:INVALID_ARGUMENTS 7129 * RadioError:MODEM_ERR 7130 * RadioError:REQUEST_NOT_SUPPORTED 7131 * RadioError:NO_RESOURCES 7132 */ 7133 #define RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE_BITMAP 147 7134 7135 /** 7136 * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>) 7137 * 7138 * @param info Response info struct containing response type, serial no. and error 7139 * 7140 * Valid errors returned: 7141 * RadioError:NONE 7142 * RadioError:RADIO_NOT_AVAILABLE 7143 * RadioError:OPERATION_NOT_ALLOWED 7144 * RadioError:MODE_NOT_SUPPORTED 7145 * RadioError:INTERNAL_ERR 7146 * RadioError:INVALID_ARGUMENTS 7147 * RadioError:MODEM_ERR 7148 * RadioError:REQUEST_NOT_SUPPORTED 7149 * RadioError:NO_RESOURCES 7150 */ 7151 #define RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE_BITMAP 148 7152 7153 /** 7154 * RIL_REQUEST_EMERGENCY_DIAL 7155 * 7156 * Initiate emergency voice call, with zero or more emergency service category(s), zero or 7157 * more emergency Uniform Resource Names (URN), and routing information for handling the call. 7158 * Android uses this request to make its emergency call instead of using @1.0::IRadio.dial 7159 * if the 'address' in the 'dialInfo' field is identified as an emergency number by Android. 7160 * 7161 * In multi-sim scenario, if the emergency number is from a specific subscription, this radio 7162 * request is sent through the IRadio service that serves the subscription, no matter of the 7163 * PUK/PIN state of the subscription and the service state of the radio. 7164 * 7165 * Some countries or carriers require some emergency numbers that must be handled with normal 7166 * call routing or emergency routing. If the 'routing' field is specified as 7167 * @1.4::EmergencyNumberRouting#NORMAL, the implementation must use normal call routing to 7168 * handle the call; if it is specified as @1.4::EmergencyNumberRouting#EMERGENCY, the 7169 * implementation must use emergency routing to handle the call; if it is 7170 * @1.4::EmergencyNumberRouting#UNKNOWN, Android does not know how to handle the call. 7171 * 7172 * If the dialed emergency number does not have a specified emergency service category, the 7173 * 'categories' field is set to @1.4::EmergencyServiceCategory#UNSPECIFIED; if the dialed 7174 * emergency number does not have specified emergency Uniform Resource Names, the 'urns' field 7175 * is set to an empty list. If the underlying technology used to request emergency services 7176 * does not support the emergency service category or emergency uniform resource names, the 7177 * field 'categories' or 'urns' may be ignored. 7178 * 7179 * 'fromEmergencyDialer' indicates if this request originated from emergency dialer/shortcut, 7180 * which means an explicit intent from the user to dial an emergency number. The modem must 7181 * treat this as an actual emergency dial and not try to disambiguate. 7182 * 7183 * If 'isTesting' is true, this request is for testing purpose, and must not be sent to a real 7184 * emergency service; otherwise it's for a real emergency call request. 7185 * Valid errors: 7186 * NONE 7187 * RADIO_NOT_AVAILABLE (radio resetting) 7188 * DIAL_MODIFIED_TO_USSD 7189 * DIAL_MODIFIED_TO_SS 7190 * DIAL_MODIFIED_TO_DIAL 7191 * INVALID_ARGUMENTS 7192 * NO_RESOURCES 7193 * INTERNAL_ERR 7194 * FDN_CHECK_FAILURE 7195 * MODEM_ERR 7196 * NO_SUBSCRIPTION 7197 * NO_NETWORK_FOUND 7198 * INVALID_CALL_ID 7199 * DEVICE_IN_USE 7200 * ABORTED 7201 * INVALID_MODEM_STATE 7202 */ 7203 #define RIL_REQUEST_EMERGENCY_DIAL 149 7204 7205 /** 7206 * Specify which bands modem's background scan must act on. 7207 * If specifyChannels is true, it only scans bands specified in specifiers. 7208 * If specifyChannels is false, it scans all bands. 7209 * 7210 * For example, CBRS is only on LTE band 48. By specifying this band, 7211 * modem saves more power. 7212 * 7213 * Valid errors: 7214 * SUCCESS 7215 * RADIO_NOT_AVAILABLE 7216 * INTERNAL_ERR 7217 * 7218 */ 7219 #define RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS 150 7220 7221 /** 7222 * RIL_REQUEST_ENABLE_MODEM 7223 * 7224 * Enable a logical modem 7225 * 7226 * Valid errors: 7227 * SUCCESS 7228 * RADIO_NOT_AVAILABLE 7229 * MODEM_ERR 7230 * 7231 */ 7232 #define RIL_REQUEST_ENABLE_MODEM 151 7233 7234 /** 7235 * RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA 7236 * 7237 * Sets the signal strength reporting criteria. 7238 * 7239 * The resulting reporting rules are the AND of all the supplied criteria. For each RAN 7240 * The hysteresisDb apply to only the following measured quantities: 7241 * -GERAN - RSSI 7242 * -CDMA2000 - RSSI 7243 * -UTRAN - RSCP 7244 * -EUTRAN - RSRP/RSRQ/RSSNR 7245 * 7246 * The thresholds apply to only the following measured quantities: 7247 * -GERAN - RSSI 7248 * -CDMA2000 - RSSI 7249 * -UTRAN - RSCP 7250 * -EUTRAN - RSRP/RSRQ/RSSNR 7251 * -NGRAN - SSRSRP/SSRSRQ/SSSINR 7252 * 7253 * Note: Reporting criteria must be individually set for each RAN. For any unset reporting 7254 * criteria, the value is implementation-defined. 7255 * 7256 * Note: @1.5::SignalThresholdInfo includes fields 'hysteresisDb', 'hysteresisMs', 7257 * and 'thresholds'. As this mechanism generally only constrains reports based on one 7258 * measured quantity per RAN, if multiple measured quantities must be used to trigger a report 7259 * for a given RAN, the only valid field may be hysteresisMs: hysteresisDb and thresholds must 7260 * be set to zero and length zero respectively. If either hysteresisDb or thresholds is set, 7261 * then reports shall only be triggered by the respective measured quantity, subject to the 7262 * applied constraints. 7263 * 7264 * Valid errors returned: 7265 * RadioError:NONE 7266 * RadioError:INVALID_ARGUMENTS 7267 * RadioError:RADIO_NOT_AVAILABLE 7268 */ 7269 #define RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA 152 7270 7271 /** 7272 * RIL_REQUEST_SET_LINK_CAPACITY_REPORTING_CRITERIA 7273 * 7274 * Sets the link capacity reporting criteria. The resulting reporting criteria are the AND of 7275 * all the supplied criteria. 7276 * 7277 * Note: Reporting criteria ust be individually set for each RAN. If unset, reporting criteria 7278 * for that RAN are implementation-defined. 7279 * 7280 * Valid errors returned: 7281 * RadioError:NONE 7282 * RadioError:INVALID_ARGUMENTS 7283 * RadioError:RADIO_NOT_AVAILABLE 7284 * RadioError:INTERNAL_ERR 7285 */ 7286 #define RIL_REQUEST_SET_LINK_CAPACITY_REPORTING_CRITERIA 153 7287 7288 /** 7289 * RIL_REQUEST_ENABLE_UICC_APPLICATIONS 7290 * 7291 * Enable or disable uicc applications. 7292 * 7293 * Valid errors: 7294 * SUCCESS 7295 * RADIO_NOT_AVAILABLE 7296 * SIM_ABSENT 7297 * INTERNAL_ERR 7298 * REQUEST_NOT_SUPPORTED 7299 */ 7300 #define RIL_REQUEST_ENABLE_UICC_APPLICATIONS 154 7301 7302 /** 7303 * RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED 7304 * 7305 * Whether uicc applications are enabled. 7306 * 7307 * Response: a boolean of enable or not. 7308 * 7309 * Valid errors: 7310 * SUCCESS 7311 * RADIO_NOT_AVAILABLE 7312 * SIM_ABSENT 7313 * INTERNAL_ERR 7314 * REQUEST_NOT_SUPPORTED 7315 */ 7316 #define RIL_REQUEST_ARE_UICC_APPLICATIONS_ENABLED 155 7317 7318 /** 7319 * RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION 7320 * 7321 * Requests that sim personlization be deactivated 7322 * 7323 * "data" is const char ** 7324 * ((const char **)(data))[0]] is sim depersonlization code 7325 * 7326 * "response" is int * 7327 * ((int *)response)[0] is the number of retries remaining, 7328 * or -1 if number of retries are infinite. 7329 * 7330 * Valid errors: 7331 * 7332 * SUCCESS 7333 * RADIO_NOT_AVAILABLE (radio resetting) 7334 * PASSWORD_INCORRECT 7335 * SIM_ABSENT (code is invalid) 7336 * INTERNAL_ERR 7337 * NO_MEMORY 7338 * NO_RESOURCES 7339 * CANCELLED 7340 * REQUEST_NOT_SUPPORTED 7341 */ 7342 7343 #define RIL_REQUEST_ENTER_SIM_DEPERSONALIZATION 156 7344 7345 /** 7346 * RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE 7347 * 7348 * Send a CDMA SMS message 7349 * 7350 * "data" is const RIL_CDMA_SMS_Message * 7351 * 7352 * "response" is a const RIL_SMS_Response * 7353 * 7354 * Based on the return error, caller decides to resend if sending sms 7355 * fails. The CDMA error class is derived as follows, 7356 * SUCCESS is error class 0 (no error) 7357 * SMS_SEND_FAIL_RETRY is error class 2 (temporary failure) 7358 * 7359 * Valid errors: 7360 * SUCCESS 7361 * RADIO_NOT_AVAILABLE 7362 * SMS_SEND_FAIL_RETRY 7363 * NETWORK_REJECT 7364 * INVALID_STATE 7365 * INVALID_ARGUMENTS 7366 * NO_MEMORY 7367 * REQUEST_RATE_LIMITED 7368 * INVALID_SMS_FORMAT 7369 * SYSTEM_ERR 7370 * FDN_CHECK_FAILURE 7371 * MODEM_ERR 7372 * NETWORK_ERR 7373 * ENCODING_ERR 7374 * INVALID_SMSC_ADDRESS 7375 * OPERATION_NOT_ALLOWED 7376 * NO_RESOURCES 7377 * CANCELLED 7378 * REQUEST_NOT_SUPPORTED 7379 * MODE_NOT_SUPPORTED 7380 * SIM_ABSENT 7381 */ 7382 #define RIL_REQUEST_CDMA_SEND_SMS_EXPECT_MORE 157 7383 7384 /** 7385 * Get all the barring info for the current camped cell applicable to the current user. 7386 * 7387 * @param serial Serial number of request. 7388 * 7389 * Response callback is IRadioResponse.getBarringInfoResponse() 7390 */ 7391 #define RIL_REQUEST_GET_BARRING_INFO 158 7392 7393 /** 7394 * RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY 7395 * 7396 * Enable or disable E-UTRA-NR dual connectivity. 7397 * 7398 * Valid errors: 7399 * SUCCESS 7400 * RADIO_NOT_AVAILABLE 7401 * SIM_ABSENT 7402 * INTERNAL_ERR 7403 */ 7404 #define RIL_REQUEST_ENABLE_NR_DUAL_CONNECTIVITY 159 7405 7406 /** 7407 * RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED 7408 * 7409 * Whether E-UTRA-NR dual connectivity is enabled. 7410 * 7411 * Response: a boolean of enable or not. 7412 * 7413 * Valid errors: 7414 * SUCCESS 7415 * RADIO_NOT_AVAILABLE 7416 * SIM_ABSENT 7417 * INTERNAL_ERR 7418 */ 7419 #define RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED 160 7420 7421 /** 7422 * Allocates a pdu session id 7423 * 7424 * @param serial Serial number of request. 7425 * 7426 * Response callback is IRadioResponse.allocatePduSessionIdResponse() 7427 */ 7428 #define RIL_REQUEST_ALLOCATE_PDU_SESSION_ID 161 7429 7430 /** 7431 * Releases a pdu session id 7432 * 7433 * @param serial Serial number of request. 7434 * @param id Pdu session id to release 7435 * 7436 * Response callback is IRadioResponse.releasePduSessionIdResponse() 7437 */ 7438 #define RIL_REQUEST_RELEASE_PDU_SESSION_ID 162 7439 7440 /** 7441 * Indicates that handover has begun 7442 * 7443 * @param serial Serial number of request. 7444 * @param callId The unique identifier of the corresponding data call 7445 * 7446 * Response callback is IRadioResponse.startHandoverResponse() 7447 */ 7448 #define RIL_REQUEST_START_HANDOVER 163 7449 7450 /** 7451 * Indicates that a handover has been cancelled 7452 * 7453 * @param serial Serial number of request. 7454 * @param callId The unique identifier of the corresponding data call 7455 * 7456 * Response callback is IRadioResponse.cancelHandoverResponse() 7457 */ 7458 #define RIL_REQUEST_CANCEL_HANDOVER 164 7459 7460 /** 7461 * RIL_REQUEST_SET_ALLOWED_NETWORK_TYPES_BITMAP 7462 * 7463 * Instruct the radio to *only* accept the types of network provided. This 7464 * is stronger than setPreferredNetworkType which is a suggestion. 7465 * 7466 * Valid errors: 7467 * SUCCESS 7468 * RADIO_NOT_AVAILABLE (radio resetting) 7469 * OPERATION_NOT_ALLOWED 7470 * MODE_NOT_SUPPORTED 7471 * NO_MEMORY 7472 * INTERNAL_ERR 7473 * SYSTEM_ERR 7474 * INVALID_ARGUMENTS 7475 * MODEM_ERR 7476 * REQUEST_NOT_SUPPORTED 7477 * NO_RESOURCES 7478 * CANCELLED 7479 */ 7480 #define RIL_REQUEST_SET_ALLOWED_NETWORK_TYPES_BITMAP 165 7481 7482 /** 7483 * RIL_REQUEST_SET_DATA_THROTTLING 7484 * 7485 * Set the data throttling on device. 7486 * 7487 * Response: an int enum of type ThermalMitigationResult as defined in 7488 * android.telephony.Annotation. 7489 * 7490 * Valid errors: 7491 * SUCCESS 7492 * RADIO_NOT_AVAILABLE 7493 * MODEM_ERR 7494 * INVALID_ARGUMENTS 7495 */ 7496 #define RIL_REQUEST_SET_DATA_THROTTLING 166 7497 7498 /** 7499 * Get which bands the modem's background scan is acting on. 7500 * 7501 * Valid errors: 7502 * SUCCESS 7503 * RADIO_NOT_AVAILABLE 7504 * INTERNAL_ERR 7505 * 7506 */ 7507 #define RIL_REQUEST_GET_SYSTEM_SELECTION_CHANNELS 167 7508 7509 /** 7510 * RIL_REQUEST_GET_ALLOWED_NETWORK_TYPES_BITMAP 7511 * 7512 * Request previously set allowed network types from the radio. 7513 * 7514 * Valid errors: 7515 * SUCCESS 7516 * RADIO_NOT_AVAILABLE (radio resetting) 7517 * OPERATION_NOT_ALLOWED 7518 * MODE_NOT_SUPPORTED 7519 * NO_MEMORY 7520 * INTERNAL_ERR 7521 * SYSTEM_ERR 7522 * INVALID_ARGUMENTS 7523 * MODEM_ERR 7524 * REQUEST_NOT_SUPPORTED 7525 * NO_RESOURCES 7526 * CANCELLED 7527 */ 7528 #define RIL_REQUEST_GET_ALLOWED_NETWORK_TYPES_BITMAP 168 7529 7530 /** 7531 * RIL_REQUEST_GET_SLICING_CONFIG 7532 * 7533 * Request to get the current slicing configuration including URSP rules and 7534 * NSSAIs (configured, allowed and rejected). 7535 * 7536 * Response callback is IRadioResponse.getSlicingConfigResponse() 7537 */ 7538 #define RIL_REQUEST_GET_SLICING_CONFIG 169 7539 7540 #define RIL_REQUEST_GET_SIM_PHONEBOOK_RECORDS 170 7541 7542 #define RIL_REQUEST_GET_SIM_PHONEBOOK_CAPACITY 171 7543 7544 #define RIL_REQUEST_UPDATE_SIM_PHONEBOOK_RECORDS 172 7545 7546 /** 7547 * Same as RIL_REQUEST_GET_CELL_INFO_LIST but "response" is an array of RIL_CellInfo_v16. 7548 */ 7549 #define RIL_REQUEST_GET_CELL_INFO_LIST_1_6 173 7550 7551 #define RIL_REQUEST_LAST RIL_REQUEST_GET_CELL_INFO_LIST_1_6 7552 7553 /***********************************************************************/ 7554 7555 /* Radio Config @{ */ 7556 #define RIL_REQUEST_RADIO_CONFIG_BASE 600 7557 7558 /** 7559 * Get SIM Slot status. 7560 * 7561 * Request provides the slot status of all active and inactive SIM slots and whether card is 7562 * present in the slots or not. 7563 * 7564 * @param serial Serial number of request. 7565 * 7566 * Response callback is IRadioConfigResponse.getSimSlotsStatusResponse() 7567 */ 7568 #define RIL_REQUEST_CONFIG_GET_SLOT_STATUS 601 7569 7570 /** 7571 * Set SIM Slot mapping. 7572 7573 * Maps the logical slots to the physical slots. Logical slot is the slot that is seen by modem. 7574 * Physical slot is the actual physical slot. Request maps the physical slot to logical slot. 7575 * Logical slots that are already mapped to the requested physical slot are not impacted. 7576 * 7577 * Example no. of logical slots 1 and physical slots 2: 7578 * The only logical slot (index 0) can be mapped to first physical slot (value 0) or second 7579 * physical slot(value 1), while the other physical slot remains unmapped and inactive. 7580 * slotMap[0] = 1 or slotMap[0] = 0 7581 * 7582 * Example no. of logical slots 2 and physical slots 2: 7583 * First logical slot (index 0) can be mapped to physical slot 1 or 2 and other logical slot 7584 * can be mapped to other physical slot. Each logical slot must be mapped to a physical slot. 7585 * slotMap[0] = 0 and slotMap[1] = 1 or slotMap[0] = 1 and slotMap[1] = 0 7586 * 7587 * @param serial Serial number of request 7588 * @param slotMap Logical to physical slot mapping, size == no. of radio instances. Index is 7589 * mapping to logical slot and value to physical slot, need to provide all the slots 7590 * mapping when sending request in case of multi slot device. 7591 * EX: uint32_t slotMap[logical slot] = physical slot 7592 * index 0 is the first logical_slot number of logical slots is equal to number of Radio 7593 * instances and number of physical slots is equal to size of slotStatus in 7594 * getSimSlotsStatusResponse 7595 * 7596 * Response callback is IRadioConfigResponse.setSimSlotsMappingResponse() 7597 */ 7598 #define RIL_REQUEST_CONFIG_SET_SLOT_MAPPING 602 7599 7600 /** 7601 * Request current phone capability. 7602 * 7603 * @param serial Serial number of request. 7604 * 7605 * Response callback is IRadioResponse.getPhoneCapabilityResponse() which 7606 * will return <@1.1::PhoneCapability>. 7607 */ 7608 #define RIL_REQUEST_CONFIG_GET_PHONE_CAPABILITY 603 7609 7610 /** 7611 * Set preferred data modem Id. 7612 * In a multi-SIM device, notify modem layer which logical modem will be used primarily 7613 * for data. It helps modem with resource optimization and decisions of what data connections 7614 * should be satisfied. 7615 * 7616 * @param serial Serial number of request. 7617 * @param modem Id the logical modem ID, which should match one of modem IDs returned 7618 * from getPhoneCapability(). 7619 * 7620 * Response callback is IRadioConfigResponse.setPreferredDataModemResponse() 7621 */ 7622 #define RIL_REQUEST_CONFIG_SET_PREFER_DATA_MODEM 604 7623 7624 /** 7625 * Set modems configurations by specifying the number of live modems (i.e modems that are 7626 * enabled and actively working as part of a working telephony stack). 7627 * 7628 * Example: this interface can be used to switch to single/multi sim mode by specifying 7629 * the number of live modems as 1, 2, etc 7630 * 7631 * Note: by setting the number of live modems in this API, that number of modems will 7632 * subsequently get enabled/disabled 7633 * 7634 * @param serial serial number of request. 7635 * @param modemsConfig ModemsConfig object including the number of live modems 7636 * 7637 * Response callback is IRadioResponse.setModemsConfigResponse() 7638 */ 7639 #define RIL_REQUEST_CONFIG_SET_MODEM_CONFIG 605 7640 7641 /** 7642 * Get modems configurations. This interface is used to get modem configurations 7643 * which includes the number of live modems (i.e modems that are 7644 * enabled and actively working as part of a working telephony stack) 7645 * 7646 * Note: in order to get the overall number of modems available on the phone, 7647 * refer to getPhoneCapability API 7648 * 7649 * @param serial Serial number of request. 7650 * 7651 * Response callback is IRadioResponse.getModemsConfigResponse() which 7652 * will return <@1.1::ModemsConfig>. 7653 */ 7654 #define RIL_REQUEST_CONFIG_GET_MODEM_CONFIG 606 7655 7656 #define RIL_REQUEST_CONFIG_GET_HAL_DEVICE_CAPABILITIES 607 7657 7658 /* Make sure to update ril_config_commands.h when changing this constant. */ 7659 #define RIL_REQUEST_RADIO_CONFIG_LAST RIL_REQUEST_CONFIG_GET_HAL_DEVICE_CAPABILITIES 7660 /* }@ */ 7661 7662 /***********************************************************************/ 7663 7664 /** 7665 * RIL_RESPONSE_ACKNOWLEDGEMENT 7666 * 7667 * This is used by Asynchronous solicited messages and Unsolicited messages 7668 * to acknowledge the receipt of those messages in RIL.java so that the ack 7669 * can be used to let ril.cpp to release wakelock. 7670 * 7671 * Valid errors 7672 * SUCCESS 7673 * RADIO_NOT_AVAILABLE 7674 */ 7675 7676 #define RIL_RESPONSE_ACKNOWLEDGEMENT 800 7677 7678 /***********************************************************************/ 7679 7680 7681 #define RIL_UNSOL_RESPONSE_BASE 1000 7682 7683 /** 7684 * RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 7685 * 7686 * Indicate when value of RIL_RadioState has changed. 7687 * 7688 * Callee will invoke RIL_RadioStateRequest method on main thread 7689 * 7690 * "data" is NULL 7691 */ 7692 7693 #define RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED 1000 7694 7695 7696 /** 7697 * RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 7698 * 7699 * Indicate when call state has changed 7700 * 7701 * Callee will invoke RIL_REQUEST_GET_CURRENT_CALLS on main thread 7702 * 7703 * "data" is NULL 7704 * 7705 * Response should be invoked on, for example, 7706 * "RING", "BUSY", "NO CARRIER", and also call state 7707 * transitions (DIALING->ALERTING ALERTING->ACTIVE) 7708 * 7709 * Redundant or extraneous invocations are tolerated 7710 */ 7711 #define RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED 1001 7712 7713 7714 /** 7715 * RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 7716 * 7717 * Called when the voice network state changed 7718 * 7719 * Callee will invoke the following requests on main thread: 7720 * 7721 * RIL_REQUEST_VOICE_REGISTRATION_STATE 7722 * RIL_REQUEST_OPERATOR 7723 * 7724 * "data" is NULL 7725 * 7726 * FIXME should this happen when SIM records are loaded? (eg, for 7727 * EONS) 7728 */ 7729 #define RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED 1002 7730 7731 /** 7732 * RIL_UNSOL_RESPONSE_NEW_SMS 7733 * 7734 * Called when new SMS is received. 7735 * 7736 * "data" is const char * 7737 * This is a pointer to a string containing the PDU of an SMS-DELIVER 7738 * as an ascii string of hex digits. The PDU starts with the SMSC address 7739 * per TS 27.005 (+CMT:) 7740 * 7741 * Callee will subsequently confirm the receipt of the SMS with a 7742 * RIL_REQUEST_SMS_ACKNOWLEDGE 7743 * 7744 * No new RIL_UNSOL_RESPONSE_NEW_SMS 7745 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 7746 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 7747 */ 7748 7749 #define RIL_UNSOL_RESPONSE_NEW_SMS 1003 7750 7751 /** 7752 * RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 7753 * 7754 * Called when new SMS Status Report is received. 7755 * 7756 * "data" is const char * 7757 * This is a pointer to a string containing the PDU of an SMS-STATUS-REPORT 7758 * as an ascii string of hex digits. The PDU starts with the SMSC address 7759 * per TS 27.005 (+CDS:). 7760 * 7761 * Callee will subsequently confirm the receipt of the SMS with a 7762 * RIL_REQUEST_SMS_ACKNOWLEDGE 7763 * 7764 * No new RIL_UNSOL_RESPONSE_NEW_SMS 7765 * or RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT messages should be sent until a 7766 * RIL_REQUEST_SMS_ACKNOWLEDGE has been received 7767 */ 7768 7769 #define RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT 1004 7770 7771 /** 7772 * RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 7773 * 7774 * Called when new SMS has been stored on SIM card 7775 * 7776 * "data" is const int * 7777 * ((const int *)data)[0] contains the slot index on the SIM that contains 7778 * the new message 7779 */ 7780 7781 #define RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM 1005 7782 7783 /** 7784 * RIL_UNSOL_ON_USSD 7785 * 7786 * Called when a new USSD message is received. 7787 * 7788 * "data" is const char ** 7789 * ((const char **)data)[0] points to a type code, which is 7790 * one of these string values: 7791 * "0" USSD-Notify -- text in ((const char **)data)[1] 7792 * "1" USSD-Request -- text in ((const char **)data)[1] 7793 * "2" Session terminated by network 7794 * "3" other local client (eg, SIM Toolkit) has responded 7795 * "4" Operation not supported 7796 * "5" Network timeout 7797 * 7798 * The USSD session is assumed to persist if the type code is "1", otherwise 7799 * the current session (if any) is assumed to have terminated. 7800 * 7801 * ((const char **)data)[1] points to a message string if applicable, which 7802 * should always be in UTF-8. 7803 */ 7804 #define RIL_UNSOL_ON_USSD 1006 7805 /* Previously #define RIL_UNSOL_ON_USSD_NOTIFY 1006 */ 7806 7807 /** 7808 * RIL_UNSOL_ON_USSD_REQUEST 7809 * 7810 * Obsolete. Send via RIL_UNSOL_ON_USSD 7811 */ 7812 #define RIL_UNSOL_ON_USSD_REQUEST 1007 7813 7814 /** 7815 * RIL_UNSOL_NITZ_TIME_RECEIVED 7816 * 7817 * Called when radio has received a NITZ time message 7818 * 7819 * "data" is const char * pointing to NITZ time string 7820 * in the form "yy/mm/dd,hh:mm:ss(+/-)tz,dt" 7821 */ 7822 #define RIL_UNSOL_NITZ_TIME_RECEIVED 1008 7823 7824 /** 7825 * RIL_UNSOL_SIGNAL_STRENGTH 7826 * 7827 * Radio may report signal strength rather han have it polled. 7828 * 7829 * "data" is a const RIL_SignalStrength * 7830 */ 7831 #define RIL_UNSOL_SIGNAL_STRENGTH 1009 7832 7833 7834 /** 7835 * RIL_UNSOL_DATA_CALL_LIST_CHANGED 7836 * 7837 * "data" is an array of RIL_Data_Call_Response_v6 identical to that 7838 * returned by RIL_REQUEST_DATA_CALL_LIST. It is the complete list 7839 * of current data contexts including new contexts that have been 7840 * activated. A data call is only removed from this list when the 7841 * framework sends a RIL_REQUEST_DEACTIVATE_DATA_CALL or the radio 7842 * is powered off/on. 7843 * 7844 * See also: RIL_REQUEST_DATA_CALL_LIST 7845 */ 7846 7847 #define RIL_UNSOL_DATA_CALL_LIST_CHANGED 1010 7848 7849 /** 7850 * RIL_UNSOL_SUPP_SVC_NOTIFICATION 7851 * 7852 * Reports supplementary service related notification from the network. 7853 * 7854 * "data" is a const RIL_SuppSvcNotification * 7855 * 7856 */ 7857 7858 #define RIL_UNSOL_SUPP_SVC_NOTIFICATION 1011 7859 7860 /** 7861 * RIL_UNSOL_STK_SESSION_END 7862 * 7863 * Indicate when STK session is terminated by SIM. 7864 * 7865 * "data" is NULL 7866 */ 7867 #define RIL_UNSOL_STK_SESSION_END 1012 7868 7869 /** 7870 * RIL_UNSOL_STK_PROACTIVE_COMMAND 7871 * 7872 * Indicate when SIM issue a STK proactive command to applications 7873 * 7874 * "data" is a const char * containing SAT/USAT proactive command 7875 * in hexadecimal format string starting with command tag 7876 * 7877 */ 7878 #define RIL_UNSOL_STK_PROACTIVE_COMMAND 1013 7879 7880 /** 7881 * RIL_UNSOL_STK_EVENT_NOTIFY 7882 * 7883 * Indicate when SIM notifies applications some event happens. 7884 * Generally, application does not need to have any feedback to 7885 * SIM but shall be able to indicate appropriate messages to users. 7886 * 7887 * "data" is a const char * containing SAT/USAT commands or responses 7888 * sent by ME to SIM or commands handled by ME, in hexadecimal format string 7889 * starting with first byte of response data or command tag 7890 * 7891 */ 7892 #define RIL_UNSOL_STK_EVENT_NOTIFY 1014 7893 7894 /** 7895 * RIL_UNSOL_STK_CALL_SETUP 7896 * 7897 * Indicate when SIM wants application to setup a voice call. 7898 * 7899 * "data" is const int * 7900 * ((const int *)data)[0] contains timeout value (in milliseconds) 7901 */ 7902 #define RIL_UNSOL_STK_CALL_SETUP 1015 7903 7904 /** 7905 * RIL_UNSOL_SIM_SMS_STORAGE_FULL 7906 * 7907 * Indicates that SMS storage on the SIM is full. Sent when the network 7908 * attempts to deliver a new SMS message. Messages cannot be saved on the 7909 * SIM until space is freed. In particular, incoming Class 2 messages 7910 * cannot be stored. 7911 * 7912 * "data" is null 7913 * 7914 */ 7915 #define RIL_UNSOL_SIM_SMS_STORAGE_FULL 1016 7916 7917 /** 7918 * RIL_UNSOL_SIM_REFRESH 7919 * 7920 * Indicates that file(s) on the SIM have been updated, or the SIM 7921 * has been reinitialized. 7922 * 7923 * In the case where RIL is version 6 or older: 7924 * "data" is an int * 7925 * ((int *)data)[0] is a RIL_SimRefreshResult. 7926 * ((int *)data)[1] is the EFID of the updated file if the result is 7927 * SIM_FILE_UPDATE or NULL for any other result. 7928 * 7929 * In the case where RIL is version 7: 7930 * "data" is a RIL_SimRefreshResponse_v7 * 7931 * 7932 * Note: If the SIM state changes as a result of the SIM refresh (eg, 7933 * SIM_READY -> SIM_LOCKED_OR_ABSENT), RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 7934 * should be sent. 7935 */ 7936 #define RIL_UNSOL_SIM_REFRESH 1017 7937 7938 /** 7939 * RIL_UNSOL_CALL_RING 7940 * 7941 * Ring indication for an incoming call (eg, RING or CRING event). 7942 * There must be at least one RIL_UNSOL_CALL_RING at the beginning 7943 * of a call and sending multiple is optional. If the system property 7944 * ro.telephony.call_ring.multiple is false then the upper layers 7945 * will generate the multiple events internally. Otherwise the vendor 7946 * ril must generate multiple RIL_UNSOL_CALL_RING if 7947 * ro.telephony.call_ring.multiple is true or if it is absent. 7948 * 7949 * The rate of these events is controlled by ro.telephony.call_ring.delay 7950 * and has a default value of 3000 (3 seconds) if absent. 7951 * 7952 * "data" is null for GSM 7953 * "data" is const RIL_CDMA_SignalInfoRecord * if CDMA 7954 */ 7955 #define RIL_UNSOL_CALL_RING 1018 7956 7957 /** 7958 * RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 7959 * 7960 * Indicates that SIM state changes. 7961 * 7962 * Callee will invoke RIL_REQUEST_GET_SIM_STATUS on main thread 7963 7964 * "data" is null 7965 */ 7966 #define RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED 1019 7967 7968 /** 7969 * RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 7970 * 7971 * Called when new CDMA SMS is received 7972 * 7973 * "data" is const RIL_CDMA_SMS_Message * 7974 * 7975 * Callee will subsequently confirm the receipt of the SMS with 7976 * a RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE 7977 * 7978 * No new RIL_UNSOL_RESPONSE_CDMA_NEW_SMS should be sent until 7979 * RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE has been received 7980 * 7981 */ 7982 #define RIL_UNSOL_RESPONSE_CDMA_NEW_SMS 1020 7983 7984 /** 7985 * RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 7986 * 7987 * Called when new Broadcast SMS is received 7988 * 7989 * "data" can be one of the following: 7990 * If received from GSM network, "data" is const char of 88 bytes 7991 * which indicates each page of a CBS Message sent to the MS by the 7992 * BTS as coded in 3GPP 23.041 Section 9.4.1.2. 7993 * If received from UMTS network, "data" is const char of 90 up to 1252 7994 * bytes which contain between 1 and 15 CBS Message pages sent as one 7995 * packet to the MS by the BTS as coded in 3GPP 23.041 Section 9.4.2.2. 7996 * 7997 */ 7998 #define RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS 1021 7999 8000 /** 8001 * RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 8002 * 8003 * Indicates that SMS storage on the RUIM is full. Messages 8004 * cannot be saved on the RUIM until space is freed. 8005 * 8006 * "data" is null 8007 * 8008 */ 8009 #define RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL 1022 8010 8011 /** 8012 * RIL_UNSOL_RESTRICTED_STATE_CHANGED 8013 * 8014 * Indicates a restricted state change (eg, for Domain Specific Access Control). 8015 * 8016 * Radio need send this msg after radio off/on cycle no matter it is changed or not. 8017 * 8018 * "data" is an int * 8019 * ((int *)data)[0] contains a bitmask of RIL_RESTRICTED_STATE_* values. 8020 */ 8021 #define RIL_UNSOL_RESTRICTED_STATE_CHANGED 1023 8022 8023 /** 8024 * RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 8025 * 8026 * Indicates that the radio system selection module has 8027 * autonomously entered emergency callback mode. 8028 * 8029 * "data" is null 8030 * 8031 */ 8032 #define RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE 1024 8033 8034 /** 8035 * RIL_UNSOL_CDMA_CALL_WAITING 8036 * 8037 * Called when CDMA radio receives a call waiting indication. 8038 * 8039 * "data" is const RIL_CDMA_CallWaiting * 8040 * 8041 */ 8042 #define RIL_UNSOL_CDMA_CALL_WAITING 1025 8043 8044 /** 8045 * RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 8046 * 8047 * Called when CDMA radio receives an update of the progress of an 8048 * OTASP/OTAPA call. 8049 * 8050 * "data" is const int * 8051 * For CDMA this is an integer OTASP/OTAPA status listed in 8052 * RIL_CDMA_OTA_ProvisionStatus. 8053 * 8054 */ 8055 #define RIL_UNSOL_CDMA_OTA_PROVISION_STATUS 1026 8056 8057 /** 8058 * RIL_UNSOL_CDMA_INFO_REC 8059 * 8060 * Called when CDMA radio receives one or more info recs. 8061 * 8062 * "data" is const RIL_CDMA_InformationRecords * 8063 * 8064 */ 8065 #define RIL_UNSOL_CDMA_INFO_REC 1027 8066 8067 /** 8068 * RIL_UNSOL_OEM_HOOK_RAW 8069 * 8070 * This is for OEM specific use. 8071 * 8072 * "data" is a byte[] 8073 */ 8074 #define RIL_UNSOL_OEM_HOOK_RAW 1028 8075 8076 /** 8077 * RIL_UNSOL_RINGBACK_TONE 8078 * 8079 * Indicates that network doesn't have in-band information, need to 8080 * play out-band tone. 8081 * 8082 * "data" is an int * 8083 * ((int *)data)[0] == 0 for stop play ringback tone. 8084 * ((int *)data)[0] == 1 for start play ringback tone. 8085 */ 8086 #define RIL_UNSOL_RINGBACK_TONE 1029 8087 8088 /** 8089 * RIL_UNSOL_RESEND_INCALL_MUTE 8090 * 8091 * Indicates that framework/application need reset the uplink mute state. 8092 * 8093 * There may be situations where the mute state becomes out of sync 8094 * between the application and device in some GSM infrastructures. 8095 * 8096 * "data" is null 8097 */ 8098 #define RIL_UNSOL_RESEND_INCALL_MUTE 1030 8099 8100 /** 8101 * RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 8102 * 8103 * Called when CDMA subscription source changed. 8104 * 8105 * "data" is int * 8106 * ((int *)data)[0] is == RIL_CdmaSubscriptionSource 8107 */ 8108 #define RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED 1031 8109 8110 /** 8111 * RIL_UNSOL_CDMA_PRL_CHANGED 8112 * 8113 * Called when PRL (preferred roaming list) changes. 8114 * 8115 * "data" is int * 8116 * ((int *)data)[0] is PRL_VERSION as would be returned by RIL_REQUEST_CDMA_SUBSCRIPTION 8117 */ 8118 #define RIL_UNSOL_CDMA_PRL_CHANGED 1032 8119 8120 /** 8121 * RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 8122 * 8123 * Called when Emergency Callback Mode Ends 8124 * 8125 * Indicates that the radio system selection module has 8126 * proactively exited emergency callback mode. 8127 * 8128 * "data" is NULL 8129 * 8130 */ 8131 #define RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE 1033 8132 8133 /** 8134 * RIL_UNSOL_RIL_CONNECTED 8135 * 8136 * Called the ril connects and returns the version 8137 * 8138 * "data" is int * 8139 * ((int *)data)[0] is RIL_VERSION 8140 */ 8141 #define RIL_UNSOL_RIL_CONNECTED 1034 8142 8143 /** 8144 * RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 8145 * 8146 * Indicates that voice technology has changed. Contains new radio technology 8147 * as a data in the message. 8148 * 8149 * "data" is int * 8150 * ((int *)data)[0] is of type const RIL_RadioTechnology 8151 * 8152 */ 8153 #define RIL_UNSOL_VOICE_RADIO_TECH_CHANGED 1035 8154 8155 /** 8156 * RIL_UNSOL_CELL_INFO_LIST 8157 * 8158 * Same information as returned by RIL_REQUEST_GET_CELL_INFO_LIST, but returned 8159 * at the rate no greater than specified by RIL_REQUEST_SET_UNSOL_CELL_INFO_RATE. 8160 * 8161 * "data" is NULL 8162 * 8163 * "response" is an array of RIL_CellInfo_v12. 8164 */ 8165 #define RIL_UNSOL_CELL_INFO_LIST 1036 8166 8167 /** 8168 * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 8169 * 8170 * This message is DEPRECATED and shall be removed in a future release (target: 2018); 8171 * instead, provide IMS registration status via an IMS Service. 8172 * 8173 * Called when IMS registration state has changed 8174 * 8175 * To get IMS registration state and IMS SMS format, callee needs to invoke the 8176 * following request on main thread: 8177 * 8178 * RIL_REQUEST_IMS_REGISTRATION_STATE 8179 * 8180 * "data" is NULL 8181 * 8182 */ 8183 #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 8184 8185 /** 8186 * RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 8187 * 8188 * Indicated when there is a change in subscription status. 8189 * This event will be sent in the following scenarios 8190 * - subscription readiness at modem, which was selected by telephony layer 8191 * - when subscription is deactivated by modem due to UICC card removal 8192 * - When network invalidates the subscription i.e. attach reject due to authentication reject 8193 * 8194 * "data" is const int * 8195 * ((const int *)data)[0] == 0 for Subscription Deactivated 8196 * ((const int *)data)[0] == 1 for Subscription Activated 8197 * 8198 */ 8199 #define RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED 1038 8200 8201 /** 8202 * RIL_UNSOL_SRVCC_STATE_NOTIFY 8203 * 8204 * Called when Single Radio Voice Call Continuity(SRVCC) 8205 * progress state has changed 8206 * 8207 * "data" is int * 8208 * ((int *)data)[0] is of type const RIL_SrvccState 8209 * 8210 */ 8211 8212 #define RIL_UNSOL_SRVCC_STATE_NOTIFY 1039 8213 8214 /** 8215 * RIL_UNSOL_HARDWARE_CONFIG_CHANGED 8216 * 8217 * Called when the hardware configuration associated with the RILd changes 8218 * 8219 * "data" is an array of RIL_HardwareConfig 8220 * 8221 */ 8222 #define RIL_UNSOL_HARDWARE_CONFIG_CHANGED 1040 8223 8224 /** 8225 * RIL_UNSOL_DC_RT_INFO_CHANGED 8226 * 8227 * The message is DEPRECATED, use RIL_REQUEST_GET_ACTIVITY_INFO 8228 * Sent when the DC_RT_STATE changes but the time 8229 * between these messages must not be less than the 8230 * value set by RIL_REQUEST_SET_DC_RT_RATE. 8231 * 8232 * "data" is the most recent RIL_DcRtInfo 8233 * 8234 */ 8235 #define RIL_UNSOL_DC_RT_INFO_CHANGED 1041 8236 8237 /** 8238 * RIL_UNSOL_RADIO_CAPABILITY 8239 * 8240 * Sent when RIL_REQUEST_SET_RADIO_CAPABILITY completes. 8241 * Returns the phone radio capability exactly as 8242 * RIL_REQUEST_GET_RADIO_CAPABILITY and should be the 8243 * same set as sent by RIL_REQUEST_SET_RADIO_CAPABILITY. 8244 * 8245 * "data" is the RIL_RadioCapability structure 8246 */ 8247 #define RIL_UNSOL_RADIO_CAPABILITY 1042 8248 8249 /* 8250 * RIL_UNSOL_ON_SS 8251 * 8252 * Called when SS response is received when DIAL/USSD/SS is changed to SS by 8253 * call control. 8254 * 8255 * "data" is const RIL_StkCcUnsolSsResponse * 8256 * 8257 */ 8258 #define RIL_UNSOL_ON_SS 1043 8259 8260 /** 8261 * RIL_UNSOL_STK_CC_ALPHA_NOTIFY 8262 * 8263 * Called when there is an ALPHA from UICC during Call Control. 8264 * 8265 * "data" is const char * containing ALPHA string from UICC in UTF-8 format. 8266 * 8267 */ 8268 #define RIL_UNSOL_STK_CC_ALPHA_NOTIFY 1044 8269 8270 /** 8271 * RIL_UNSOL_LCEDATA_RECV 8272 * 8273 * Called when there is an incoming Link Capacity Estimate (LCE) info report. 8274 * 8275 * "data" is the RIL_LceDataInfo structure. 8276 * 8277 */ 8278 #define RIL_UNSOL_LCEDATA_RECV 1045 8279 8280 /** 8281 * RIL_UNSOL_PCO_DATA 8282 * 8283 * Called when there is new Carrier PCO data received for a data call. Ideally 8284 * only new data will be forwarded, though this is not required. Multiple 8285 * boxes of carrier PCO data for a given call should result in a series of 8286 * RIL_UNSOL_PCO_DATA calls. 8287 * 8288 * "data" is the RIL_PCO_Data structure. 8289 * 8290 */ 8291 #define RIL_UNSOL_PCO_DATA 1046 8292 8293 /** 8294 * RIL_UNSOL_MODEM_RESTART 8295 * 8296 * Called when there is a modem reset. 8297 * 8298 * "reason" is "const char *" containing the reason for the reset. It 8299 * could be a crash signature if the restart was due to a crash or some 8300 * string such as "user-initiated restart" or "AT command initiated 8301 * restart" that explains the cause of the modem restart. 8302 * 8303 * When modem restarts, one of the following radio state transitions will happen 8304 * 1) RADIO_STATE_ON->RADIO_STATE_UNAVAILABLE->RADIO_STATE_ON or 8305 * 2) RADIO_STATE_OFF->RADIO_STATE_UNAVAILABLE->RADIO_STATE_OFF 8306 * This message can be sent either just before the RADIO_STATE changes to RADIO_STATE_UNAVAILABLE 8307 * or just after but should never be sent after the RADIO_STATE changes from UNAVAILABLE to 8308 * AVAILABLE(RADIO_STATE_ON/RADIO_STATE_OFF) again. 8309 * 8310 * It should NOT be sent after the RADIO_STATE changes to AVAILABLE after the 8311 * modem restart as that could be interpreted as a second modem reset by the 8312 * framework. 8313 */ 8314 #define RIL_UNSOL_MODEM_RESTART 1047 8315 8316 /** 8317 * RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 8318 * 8319 * Called when the modem needs Carrier specific information that will 8320 * be used to encrypt IMSI and IMPI. 8321 * 8322 * "data" is NULL 8323 * 8324 */ 8325 #define RIL_UNSOL_CARRIER_INFO_IMSI_ENCRYPTION 1048 8326 8327 /** 8328 * RIL_UNSOL_NETWORK_SCAN_RESULT 8329 * 8330 * Returns incremental result for the network scan which is started by 8331 * RIL_REQUEST_START_NETWORK_SCAN, sent to report results, status, or errors. 8332 * 8333 * "data" is NULL 8334 * "response" is a const RIL_NetworkScanResult * 8335 */ 8336 #define RIL_UNSOL_NETWORK_SCAN_RESULT 1049 8337 8338 /** 8339 * RIL_UNSOL_KEEPALIVE_STATUS 8340 * 8341 * "data" is NULL 8342 * "response" is a const RIL_KeepaliveStatus * 8343 */ 8344 #define RIL_UNSOL_KEEPALIVE_STATUS 1050 8345 8346 #define RIL_UNSOL_PHYSICAL_CHANNEL_CONFIGS 1051 8347 8348 #define RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED 1056 8349 8350 #define RIL_UNSOL_SECURITY_ALGORITHM_UPDATED 1057 8351 8352 #define RIL_UNSOL_RESPONSE_LAST RIL_UNSOL_SECURITY_ALGORITHM_UPDATED 8353 8354 /***********************************************************************/ 8355 8356 #define RIL_UNSOL_RESPONSE_RADIO_CONFIG_BASE 1100 8357 /** 8358 * RIL_UNSOL_CONFIG_ICC_SLOT_STATUS 8359 * 8360 * "data" is the RIL_SimSlotStatus_V1_2 structure 8361 */ 8362 #define RIL_UNSOL_CONFIG_ICC_SLOT_STATUS 1100 8363 8364 #define RIL_UNSOL_RESPONSE_RADIO_CONFIG_LAST RIL_UNSOL_CONFIG_ICC_SLOT_STATUS 8365 8366 /***********************************************************************/ 8367 8368 8369 #if defined(ANDROID_MULTI_SIM) 8370 /** 8371 * RIL_Request Function pointer 8372 * 8373 * @param request is one of RIL_REQUEST_* 8374 * @param data is pointer to data defined for that RIL_REQUEST_* 8375 * data is owned by caller, and should not be modified or freed by callee 8376 * structures passed as data may contain pointers to non-contiguous memory 8377 * @param t should be used in subsequent call to RIL_onResponse 8378 * @param datalen is the length of "data" which is defined as other argument. It may or may 8379 * not be equal to sizeof(data). Refer to the documentation of individual structures 8380 * to find if pointers listed in the structure are contiguous and counted in the datalen 8381 * length or not. 8382 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data)) 8383 * 8384 */ 8385 typedef void (*RIL_RequestFunc) (int request, void *data, 8386 size_t datalen, RIL_Token t, RIL_SOCKET_ID socket_id); 8387 8388 /** 8389 * This function should return the current radio state synchronously 8390 */ 8391 typedef RIL_RadioState (*RIL_RadioStateRequest)(RIL_SOCKET_ID socket_id); 8392 8393 #else 8394 /* Backward compatible */ 8395 8396 /** 8397 * RIL_Request Function pointer 8398 * 8399 * @param request is one of RIL_REQUEST_* 8400 * @param data is pointer to data defined for that RIL_REQUEST_* 8401 * data is owned by caller, and should not be modified or freed by callee 8402 * structures passed as data may contain pointers to non-contiguous memory 8403 * @param t should be used in subsequent call to RIL_onResponse 8404 * @param datalen is the length of "data" which is defined as other argument. It may or may 8405 * not be equal to sizeof(data). Refer to the documentation of individual structures 8406 * to find if pointers listed in the structure are contiguous and counted in the datalen 8407 * length or not. 8408 * (Eg: RIL_IMS_SMS_Message where we don't have datalen equal to sizeof(data)) 8409 * 8410 */ 8411 typedef void (*RIL_RequestFunc) (int request, void *data, 8412 size_t datalen, RIL_Token t); 8413 8414 /** 8415 * This function should return the current radio state synchronously 8416 */ 8417 typedef RIL_RadioState (*RIL_RadioStateRequest)(); 8418 8419 #endif 8420 8421 8422 /** 8423 * This function returns "1" if the specified RIL_REQUEST code is 8424 * supported and 0 if it is not 8425 * 8426 * @param requestCode is one of RIL_REQUEST codes 8427 */ 8428 8429 typedef int (*RIL_Supports)(int requestCode); 8430 8431 /** 8432 * This function is called from a separate thread--not the 8433 * thread that calls RIL_RequestFunc--and indicates that a pending 8434 * request should be cancelled. 8435 * 8436 * On cancel, the callee should do its best to abandon the request and 8437 * call RIL_onRequestComplete with RIL_Errno CANCELLED at some later point. 8438 * 8439 * Subsequent calls to RIL_onRequestComplete for this request with 8440 * other results will be tolerated but ignored. (That is, it is valid 8441 * to ignore the cancellation request) 8442 * 8443 * RIL_Cancel calls should return immediately, and not wait for cancellation 8444 * 8445 * Please see ITU v.250 5.6.1 for how one might implement this on a TS 27.007 8446 * interface 8447 * 8448 * @param t token wants to be canceled 8449 */ 8450 8451 typedef void (*RIL_Cancel)(RIL_Token t); 8452 8453 typedef void (*RIL_TimedCallback) (void *param); 8454 8455 /** 8456 * Return a version string for your RIL implementation 8457 */ 8458 typedef const char * (*RIL_GetVersion) (void); 8459 8460 typedef struct { 8461 int version; /* set to RIL_VERSION */ 8462 RIL_RequestFunc onRequest; 8463 RIL_RadioStateRequest onStateRequest; 8464 RIL_Supports supports; 8465 RIL_Cancel onCancel; 8466 RIL_GetVersion getVersion; 8467 } RIL_RadioFunctions; 8468 8469 typedef struct { 8470 char *apn; /* the APN to connect to */ 8471 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on 8472 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/ 8473 int authtype; /* authentication protocol used for this PDP context 8474 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */ 8475 char *username; /* the username for APN, or NULL */ 8476 char *password; /* the password for APN, or NULL */ 8477 } RIL_InitialAttachApn; 8478 8479 typedef struct { 8480 char *apn; /* the APN to connect to */ 8481 char *protocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on 8482 home network. For example, "IP", "IPV6", "IPV4V6", or "PPP". */ 8483 char *roamingProtocol; /* one of the PDP_type values in TS 27.007 section 10.1.1 used on 8484 roaming network. For example, "IP", "IPV6", "IPV4V6", or "PPP".*/ 8485 int authtype; /* authentication protocol used for this PDP context 8486 (None: 0, PAP: 1, CHAP: 2, PAP&CHAP: 3) */ 8487 char *username; /* the username for APN, or NULL */ 8488 char *password; /* the password for APN, or NULL */ 8489 int supportedTypesBitmask; /* supported APN types bitmask. See RIL_ApnTypes for the value of 8490 each bit. */ 8491 int bearerBitmask; /* the bearer bitmask. See RIL_RadioAccessFamily for the value of 8492 each bit. */ 8493 int modemCognitive; /* indicating the APN setting was sent to the modem through 8494 setDataProfile earlier. */ 8495 int mtu; /* maximum transmission unit (MTU) size in bytes */ 8496 char *mvnoType; /* the MVNO type: possible values are "imsi", "gid", "spn" */ 8497 char *mvnoMatchData; /* MVNO match data. Can be anything defined by the carrier. 8498 For example, 8499 SPN like: "A MOBILE", "BEN NL", etc... 8500 IMSI like: "302720x94", "2060188", etc... 8501 GID like: "4E", "33", etc... */ 8502 } RIL_InitialAttachApn_v15; 8503 8504 typedef struct { 8505 int authContext; /* P2 value of authentication command, see P2 parameter in 8506 3GPP TS 31.102 7.1.2 */ 8507 char *authData; /* the challenge string in Base64 format, see 3GPP 8508 TS 31.102 7.1.2 */ 8509 char *aid; /* AID value, See ETSI 102.221 8.1 and 101.220 4, 8510 NULL if no value. */ 8511 } RIL_SimAuthentication; 8512 8513 typedef struct { 8514 int cid; /* Context ID, uniquely identifies this call */ 8515 char *bearer_proto; /* One of the PDP_type values in TS 27.007 section 10.1.1. 8516 For example, "IP", "IPV6", "IPV4V6". */ 8517 int pco_id; /* The protocol ID for this box. Note that only IDs from 8518 FF00H - FFFFH are accepted. If more than one is included 8519 from the network, multiple calls should be made to send all 8520 of them. */ 8521 int contents_length; /* The number of octets in the contents. */ 8522 char *contents; /* Carrier-defined content. It is binary, opaque and 8523 loosely defined in LTE Layer 3 spec 24.008 */ 8524 } RIL_PCO_Data; 8525 8526 typedef enum { 8527 NATT_IPV4 = 0, /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv4 */ 8528 NATT_IPV6 = 1 /* Keepalive specified by RFC 3948 Sec. 2.3 using IPv6 */ 8529 } RIL_KeepaliveType; 8530 8531 #define MAX_INADDR_LEN 16 8532 typedef struct { 8533 RIL_KeepaliveType type; /* Type of keepalive packet */ 8534 char sourceAddress[MAX_INADDR_LEN]; /* Source address in network-byte order */ 8535 int sourcePort; /* Source port if applicable, or 0x7FFFFFFF; 8536 the maximum value is 65535 */ 8537 char destinationAddress[MAX_INADDR_LEN]; /* Destination address in network-byte order */ 8538 int destinationPort; /* Destination port if applicable or 0x7FFFFFFF; 8539 the maximum value is 65535 */ 8540 int maxKeepaliveIntervalMillis; /* Maximum milliseconds between two packets */ 8541 int cid; /* Context ID, uniquely identifies this call */ 8542 } RIL_KeepaliveRequest; 8543 8544 typedef enum { 8545 KEEPALIVE_ACTIVE, /* Keepalive session is active */ 8546 KEEPALIVE_INACTIVE, /* Keepalive session is inactive */ 8547 KEEPALIVE_PENDING /* Keepalive session status not available */ 8548 } RIL_KeepaliveStatusCode; 8549 8550 typedef struct { 8551 int32_t sessionHandle; 8552 RIL_KeepaliveStatusCode code; 8553 } RIL_KeepaliveStatus; 8554 8555 /** 8556 * A C-representation of aidl::android::hardware::radio::network::CellularIdentifierDisclosure 8557 */ 8558 typedef struct { 8559 int32_t identifierType; 8560 int32_t protocolMessage; 8561 char* plmn; 8562 bool isEmergency; 8563 } RIL_CellularIdentifierDisclosure; 8564 8565 /** 8566 * A C-representation of aidl::android::hardware::radio::network::SecurityAlgorithmUpdate 8567 */ 8568 typedef struct { 8569 int32_t connectionEvent; 8570 int32_t encryption; 8571 int32_t integrity; 8572 bool isUnprotectedEmergency; 8573 } RIL_SecurityAlgorithmUpdate; 8574 8575 #ifdef RIL_SHLIB 8576 struct RIL_Env { 8577 /** 8578 * "t" is parameter passed in on previous call to RIL_Notification 8579 * routine. 8580 * 8581 * If "e" != SUCCESS, then response can be null/is ignored 8582 * 8583 * "response" is owned by caller, and should not be modified or 8584 * freed by callee 8585 * 8586 * RIL_onRequestComplete will return as soon as possible 8587 */ 8588 void (*OnRequestComplete)(RIL_Token t, RIL_Errno e, 8589 void *response, size_t responselen); 8590 8591 #if defined(ANDROID_MULTI_SIM) 8592 /** 8593 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 8594 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 8595 * 8596 * "data" is owned by caller, and should not be modified or freed by callee 8597 */ 8598 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen, RIL_SOCKET_ID socket_id); 8599 #else 8600 /** 8601 * "unsolResponse" is one of RIL_UNSOL_RESPONSE_* 8602 * "data" is pointer to data defined for that RIL_UNSOL_RESPONSE_* 8603 * 8604 * "data" is owned by caller, and should not be modified or freed by callee 8605 */ 8606 void (*OnUnsolicitedResponse)(int unsolResponse, const void *data, size_t datalen); 8607 #endif 8608 /** 8609 * Call user-specifed "callback" function on on the same thread that 8610 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 8611 * a relative time value at which the callback is invoked. If relativeTime is 8612 * NULL or points to a 0-filled structure, the callback will be invoked as 8613 * soon as possible 8614 */ 8615 8616 void (*RequestTimedCallback) (RIL_TimedCallback callback, 8617 void *param, const struct timeval *relativeTime); 8618 /** 8619 * "t" is parameter passed in on previous call RIL_Notification routine 8620 * 8621 * RIL_onRequestAck will be called by vendor when an Async RIL request was received 8622 * by them and an ack needs to be sent back to java ril. 8623 */ 8624 void (*OnRequestAck) (RIL_Token t); 8625 }; 8626 8627 8628 /** 8629 * RIL implementations must defined RIL_Init 8630 * argc and argv will be command line arguments intended for the RIL implementation 8631 * Return NULL on error 8632 * 8633 * @param env is environment point defined as RIL_Env 8634 * @param argc number of arguments 8635 * @param argv list of arguments 8636 * 8637 */ 8638 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv); 8639 8640 /** 8641 * If BT SAP(SIM Access Profile) is supported, then RIL implementations must define RIL_SAP_Init 8642 * for initializing RIL_RadioFunctions used for BT SAP communications. It is called whenever RILD 8643 * starts or modem restarts. Returns handlers for SAP related request that are made on SAP 8644 * specific socket, analogous to the RIL_RadioFunctions returned by the call to RIL_Init 8645 * and used on the general RIL socket. 8646 * argc and argv will be command line arguments intended for the RIL implementation 8647 * Return NULL on error. 8648 * 8649 * @param env is environment point defined as RIL_Env 8650 * @param argc number of arguments 8651 * @param argv list of arguments 8652 * 8653 */ 8654 const RIL_RadioFunctions *RIL_SAP_Init(const struct RIL_Env *env, int argc, char **argv); 8655 8656 #else /* RIL_SHLIB */ 8657 8658 /** 8659 * Call this once at startup to register notification routine 8660 * 8661 * @param callbacks user-specifed callback function 8662 */ 8663 void RIL_register (const RIL_RadioFunctions *callbacks); 8664 8665 void rilc_thread_pool(); 8666 8667 8668 /** 8669 * 8670 * RIL_onRequestComplete will return as soon as possible 8671 * 8672 * @param t is parameter passed in on previous call to RIL_Notification 8673 * routine. 8674 * @param e error code 8675 * if "e" != SUCCESS, then response can be null/is ignored 8676 * @param response is owned by caller, and should not be modified or 8677 * freed by callee 8678 * @param responselen the length of response in byte 8679 */ 8680 void RIL_onRequestComplete(RIL_Token t, RIL_Errno e, 8681 void *response, size_t responselen); 8682 8683 /** 8684 * RIL_onRequestAck will be called by vendor when an Async RIL request was received by them and 8685 * an ack needs to be sent back to java ril. This doesn't mark the end of the command or it's 8686 * results, just that the command was received and will take a while. After sending this Ack 8687 * its vendor's responsibility to make sure that AP is up whenever needed while command is 8688 * being processed. 8689 * 8690 * @param t is parameter passed in on previous call to RIL_Notification 8691 * routine. 8692 */ 8693 void RIL_onRequestAck(RIL_Token t); 8694 8695 #if defined(ANDROID_MULTI_SIM) 8696 /** 8697 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 8698 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 8699 * "data" is owned by caller, and should not be modified or freed by callee 8700 * @param datalen the length of data in byte 8701 */ 8702 8703 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 8704 size_t datalen, RIL_SOCKET_ID socket_id); 8705 #else 8706 /** 8707 * @param unsolResponse is one of RIL_UNSOL_RESPONSE_* 8708 * @param data is pointer to data defined for that RIL_UNSOL_RESPONSE_* 8709 * "data" is owned by caller, and should not be modified or freed by callee 8710 * @param datalen the length of data in byte 8711 */ 8712 8713 void RIL_onUnsolicitedResponse(int unsolResponse, const void *data, 8714 size_t datalen); 8715 #endif 8716 8717 /** 8718 * Call user-specifed "callback" function on on the same thread that 8719 * RIL_RequestFunc is called. If "relativeTime" is specified, then it specifies 8720 * a relative time value at which the callback is invoked. If relativeTime is 8721 * NULL or points to a 0-filled structure, the callback will be invoked as 8722 * soon as possible 8723 * 8724 * @param callback user-specifed callback function 8725 * @param param parameter list 8726 * @param relativeTime a relative time value at which the callback is invoked 8727 */ 8728 8729 void RIL_requestTimedCallback (RIL_TimedCallback callback, 8730 void *param, const struct timeval *relativeTime); 8731 8732 #endif /* RIL_SHLIB */ 8733 8734 #ifdef __cplusplus 8735 } 8736 #endif 8737 8738 #endif /*ANDROID_RIL_H*/ 8739