1/* 2 * Copyright (C) 2016 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 17package android.hardware.radio@1.0; 18 19enum RadioConst : int32_t { 20 CDMA_ALPHA_INFO_BUFFER_LENGTH = 64, 21 CDMA_NUMBER_INFO_BUFFER_LENGTH = 81, 22 MAX_RILDS = 3, 23 MAX_SOCKET_NAME_LENGTH = 6, 24 MAX_CLIENT_ID_LENGTH = 2, 25 MAX_DEBUG_SOCKET_NAME_LENGTH = 12, 26 MAX_QEMU_PIPE_NAME_LENGTH = 11, 27 MAX_UUID_LENGTH = 64, 28 CARD_MAX_APPS = 8, 29 CDMA_MAX_NUMBER_OF_INFO_RECS = 10, 30 SS_INFO_MAX = 4, 31 NUM_SERVICE_CLASSES = 7, 32 NUM_TX_POWER_LEVELS = 5, 33}; 34 35enum RadioCdmaSmsConst : int32_t { 36 ADDRESS_MAX = 36, 37 SUBADDRESS_MAX = 36, 38 BEARER_DATA_MAX = 255, 39 UDH_MAX_SND_SIZE = 128, 40 UDH_EO_DATA_SEGMENT_MAX = 131, 41 MAX_UD_HEADERS = 7, 42 USER_DATA_MAX = 229, 43 UDH_LARGE_PIC_SIZE = 128, 44 UDH_SMALL_PIC_SIZE = 32, 45 UDH_VAR_PIC_SIZE = 134, 46 UDH_ANIM_NUM_BITMAPS = 4, 47 UDH_LARGE_BITMAP_SIZE = 32, 48 UDH_SMALL_BITMAP_SIZE = 8, 49 UDH_OTHER_SIZE = 226, 50 IP_ADDRESS_SIZE = 4, 51}; 52 53enum RadioError : int32_t { 54 NONE = 0, // Success 55 RADIO_NOT_AVAILABLE = 1, // If radio did not start or is resetting 56 GENERIC_FAILURE = 2, 57 PASSWORD_INCORRECT = 3, // for PIN/PIN2 methods only 58 SIM_PIN2 = 4, // Operation requires SIM PIN2 to be entered 59 SIM_PUK2 = 5, // Operation requires SIM PIN2 to be entered 60 REQUEST_NOT_SUPPORTED = 6, 61 CANCELLED = 7, 62 OP_NOT_ALLOWED_DURING_VOICE_CALL = 8, // data ops are not allowed during voice 63 // call on a Class C GPRS device 64 OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 9, // data ops are not allowed before device 65 // registers in network 66 SMS_SEND_FAIL_RETRY = 10, // fail to send sms and need retry 67 SIM_ABSENT = 11, // fail to set the location where CDMA subscription 68 // shall be retrieved because of SIM or RUIM 69 // card absent 70 SUBSCRIPTION_NOT_AVAILABLE = 12, // fail to find CDMA subscription from specified 71 // location 72 MODE_NOT_SUPPORTED = 13, // HW does not support preferred network type 73 FDN_CHECK_FAILURE = 14, // command failed because recipient is not on FDN list 74 ILLEGAL_SIM_OR_ME = 15, // network selection failed due to illegal SIM or ME 75 MISSING_RESOURCE = 16, // no logical channel available 76 NO_SUCH_ELEMENT = 17, // application not found on SIM 77 DIAL_MODIFIED_TO_USSD = 18, // DIAL request modified to USSD 78 DIAL_MODIFIED_TO_SS = 19, // DIAL request modified to SS 79 DIAL_MODIFIED_TO_DIAL = 20, // DIAL request modified to DIAL with different data 80 USSD_MODIFIED_TO_DIAL = 21, // USSD request modified to DIAL 81 USSD_MODIFIED_TO_SS = 22, // USSD request modified to SS 82 USSD_MODIFIED_TO_USSD = 23, // USSD request modified to different USSD request 83 SS_MODIFIED_TO_DIAL = 24, // SS request modified to DIAL 84 SS_MODIFIED_TO_USSD = 25, // SS request modified to USSD 85 SUBSCRIPTION_NOT_SUPPORTED = 26, // Subscription not supported by RIL 86 SS_MODIFIED_TO_SS = 27, // SS request modified to different SS request 87 LCE_NOT_SUPPORTED = 36, // LCE service not supported(36 in RILConstants.java) 88 NO_MEMORY = 37, // Not sufficient memory to process the request 89 INTERNAL_ERR = 38, // Modem hit unexpected error scenario while handling 90 // this request 91 SYSTEM_ERR = 39, // Hit platform or system error 92 MODEM_ERR = 40, // Vendor RIL got unexpected or incorrect response 93 // from modem for this request 94 INVALID_STATE = 41, // Unexpected request for the current state 95 NO_RESOURCES = 42, // Not sufficient resource to process the request 96 SIM_ERR = 43, // Received error from SIM card 97 INVALID_ARGUMENTS = 44, // Received invalid arguments in request 98 INVALID_SIM_STATE = 45, // Cannot process the request in current SIM state 99 INVALID_MODEM_STATE = 46, // Cannot process the request in current Modem state 100 INVALID_CALL_ID = 47, // Received invalid call id in request 101 NO_SMS_TO_ACK = 48, // ACK received when there is no SMS to ack 102 NETWORK_ERR = 49, // Received error from network 103 REQUEST_RATE_LIMITED = 50, // Operation denied due to overly-frequent requests 104 SIM_BUSY = 51, // SIM is busy 105 SIM_FULL = 52, // The target EF is full 106 NETWORK_REJECT = 53, // Request is rejected by network 107 OPERATION_NOT_ALLOWED = 54, // Not allowed the request now 108 EMPTY_RECORD = 55, // The request record is empty 109 INVALID_SMS_FORMAT = 56, // Invalid sms format 110 ENCODING_ERR = 57, // Message not encoded properly 111 INVALID_SMSC_ADDRESS = 58, // SMSC address specified is invalid 112 NO_SUCH_ENTRY = 59, // No such entry present to perform the request 113 NETWORK_NOT_READY = 60, // Network is not ready to perform the request 114 NOT_PROVISIONED = 61, // Device does not have this value provisioned 115 NO_SUBSCRIPTION = 62, // Device does not have subscription 116 NO_NETWORK_FOUND = 63, // Network cannot be found 117 DEVICE_IN_USE = 64, // Operation cannot be performed because the device 118 // is currently in use 119 ABORTED = 65, // Operation aborted 120 INVALID_RESPONSE = 66, // Response from vendor had invalid data 121 122 OEM_ERROR_1 = 501, 123 OEM_ERROR_2 = 502, 124 OEM_ERROR_3 = 503, 125 OEM_ERROR_4 = 504, 126 OEM_ERROR_5 = 505, 127 OEM_ERROR_6 = 506, 128 OEM_ERROR_7 = 507, 129 OEM_ERROR_8 = 508, 130 OEM_ERROR_9 = 509, 131 OEM_ERROR_10 = 510, 132 OEM_ERROR_11 = 511, 133 OEM_ERROR_12 = 512, 134 OEM_ERROR_13 = 513, 135 OEM_ERROR_14 = 514, 136 OEM_ERROR_15 = 515, 137 OEM_ERROR_16 = 516, 138 OEM_ERROR_17 = 517, 139 OEM_ERROR_18 = 518, 140 OEM_ERROR_19 = 519, 141 OEM_ERROR_20 = 520, 142 OEM_ERROR_21 = 521, 143 OEM_ERROR_22 = 522, 144 OEM_ERROR_23 = 523, 145 OEM_ERROR_24 = 524, 146 OEM_ERROR_25 = 525, 147}; 148 149enum RadioResponseType : int32_t { 150 SOLICITED, 151 SOLICITED_ACK, 152 SOLICITED_ACK_EXP, 153}; 154 155enum RadioIndicationType : int32_t { 156 UNSOLICITED, 157 UNSOLICITED_ACK_EXP, 158}; 159 160enum RestrictedState : int32_t { 161 NONE = 0x00, 162 CS_EMERGENCY = 0x01, 163 CS_NORMAL = 0x02, 164 CS_ALL = 0x04, 165 PS_ALL = 0x10, 166}; 167 168enum CardState : int32_t { 169 /* card is physically absent from device. (Some old modems use CardState.ABSENT when the SIM 170 is powered off. This is no longer correct, however the platform will still support this 171 legacy behavior.) */ 172 ABSENT, 173 /* card is inserted in the device */ 174 PRESENT, 175 ERROR, 176 /* card is present but not usable due to carrier restrictions */ 177 RESTRICTED, 178}; 179 180enum PinState : int32_t { 181 UNKNOWN, 182 ENABLED_NOT_VERIFIED, 183 ENABLED_VERIFIED, 184 DISABLED, 185 ENABLED_BLOCKED, 186 ENABLED_PERM_BLOCKED, 187}; 188 189enum AppType : int32_t { 190 UNKNOWN, 191 SIM, 192 USIM, 193 RUIM, 194 CSIM, 195 ISIM, 196}; 197 198enum AppState : int32_t { 199 UNKNOWN, 200 DETECTED, 201 PIN, // If PIN1 or UPin is required 202 PUK, // If PUK1 or Puk for UPin is required 203 SUBSCRIPTION_PERSO, // perso_substate must be look at when app_state is 204 // assigned to this value 205 READY, 206}; 207 208enum PersoSubstate : int32_t { 209 UNKNOWN, // initial state 210 IN_PROGRESS, // in between each lock transition 211 READY, // when either SIM or RUIM Perso is finished since each 212 // app must only have 1 active perso involved 213 SIM_NETWORK, 214 SIM_NETWORK_SUBSET, 215 SIM_CORPORATE, 216 SIM_SERVICE_PROVIDER, 217 SIM_SIM, 218 SIM_NETWORK_PUK, // The corresponding perso lock is blocked 219 SIM_NETWORK_SUBSET_PUK, 220 SIM_CORPORATE_PUK, 221 SIM_SERVICE_PROVIDER_PUK, 222 SIM_SIM_PUK, 223 RUIM_NETWORK1, 224 RUIM_NETWORK2, 225 RUIM_HRPD, 226 RUIM_CORPORATE, 227 RUIM_SERVICE_PROVIDER, 228 RUIM_RUIM, 229 RUIM_NETWORK1_PUK, // The corresponding perso lock is blocked 230 RUIM_NETWORK2_PUK, 231 RUIM_HRPD_PUK, 232 RUIM_CORPORATE_PUK, 233 RUIM_SERVICE_PROVIDER_PUK, 234 RUIM_RUIM_PUK, 235}; 236 237enum RadioState : int32_t { 238 OFF = 0, // Radio explicitly powered off (eg CFUN=0) 239 UNAVAILABLE = 1, // Radio unavailable (eg, resetting or not booted) 240 ON = 10, // Radio is ON 241}; 242 243enum SapConnectRsp : int32_t { 244 SUCCESS, 245 CONNECT_FAILURE, 246 MSG_SIZE_TOO_LARGE, 247 MSG_SIZE_TOO_SMALL, 248 CONNECT_OK_CALL_ONGOING, 249}; 250 251enum SapDisconnectType : int32_t { 252 GRACEFUL, 253 IMMEDIATE, 254}; 255 256enum SapApduType : int32_t { 257 APDU, 258 APDU7816, 259}; 260 261enum SapResultCode : int32_t { 262 SUCCESS, 263 GENERIC_FAILURE, 264 CARD_NOT_ACCESSSIBLE, 265 CARD_ALREADY_POWERED_OFF, 266 CARD_REMOVED, 267 CARD_ALREADY_POWERED_ON, 268 DATA_NOT_AVAILABLE, 269 NOT_SUPPORTED, 270}; 271 272enum SapStatus : int32_t { 273 UNKNOWN_ERROR, 274 CARD_RESET, 275 CARD_NOT_ACCESSIBLE, 276 CARD_REMOVED, 277 CARD_INSERTED, 278 RECOVERED, 279}; 280 281enum SapTransferProtocol : int32_t { 282 T0, 283 T1, 284}; 285 286enum CallState : int32_t { 287 ACTIVE, 288 HOLDING, 289 DIALING, // MO call only 290 ALERTING, // MO call only 291 INCOMING, // MT call only 292 WAITING, // MT call only 293}; 294 295/** 296 * User-to-User signaling Info activation types derived from 3GPP 23.087 v8.0 297 */ 298enum UusType : int32_t { 299 TYPE1_IMPLICIT, 300 TYPE1_REQUIRED, 301 TYPE1_NOT_REQUIRED, 302 TYPE2_REQUIRED, 303 TYPE2_NOT_REQUIRED, 304 TYPE3_REQUIRED, 305 TYPE3_NOT_REQUIRED, 306}; 307 308/** 309 * User-to-User Signaling Information data coding schemes. Possible values for 310 * Octet 3 (Protocol Discriminator field) in the UUIE. The values have been 311 * specified in section 10.5.4.25 of 3GPP TS 24.008 312 */ 313enum UusDcs : int32_t { 314 USP, // User specified protocol 315 OSIHLP, // OSI higher layer protocol 316 X244, // X.244 317 RMCF, // Reserved for system management convergence function 318 IA5C, // IA5 characters 319}; 320 321enum CallPresentation : int32_t { 322 ALLOWED, 323 RESTRICTED, 324 UNKNOWN, 325 PAYPHONE, 326}; 327 328enum Clir : int32_t { 329 DEFAULT, // "use subscription default value" 330 INVOCATION, // restrict CLI presentation 331 SUPPRESSION, // allow CLI presentation 332}; 333 334enum LastCallFailCause : int32_t { 335 UNOBTAINABLE_NUMBER = 1, 336 NO_ROUTE_TO_DESTINATION = 3, 337 CHANNEL_UNACCEPTABLE = 6, 338 OPERATOR_DETERMINED_BARRING = 8, 339 NORMAL = 16, 340 BUSY = 17, 341 NO_USER_RESPONDING = 18, 342 NO_ANSWER_FROM_USER = 19, 343 CALL_REJECTED = 21, 344 NUMBER_CHANGED = 22, 345 PREEMPTION = 25, 346 DESTINATION_OUT_OF_ORDER = 27, 347 INVALID_NUMBER_FORMAT = 28, 348 FACILITY_REJECTED = 29, 349 RESP_TO_STATUS_ENQUIRY = 30, 350 NORMAL_UNSPECIFIED = 31, 351 CONGESTION = 34, 352 NETWORK_OUT_OF_ORDER = 38, 353 TEMPORARY_FAILURE = 41, 354 SWITCHING_EQUIPMENT_CONGESTION = 42, 355 ACCESS_INFORMATION_DISCARDED = 43, 356 REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 44, 357 RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47, 358 QOS_UNAVAILABLE = 49, 359 REQUESTED_FACILITY_NOT_SUBSCRIBED = 50, 360 INCOMING_CALLS_BARRED_WITHIN_CUG = 55, 361 BEARER_CAPABILITY_NOT_AUTHORIZED = 57, 362 BEARER_CAPABILITY_UNAVAILABLE = 58, 363 SERVICE_OPTION_NOT_AVAILABLE = 63, 364 BEARER_SERVICE_NOT_IMPLEMENTED = 65, 365 ACM_LIMIT_EXCEEDED = 68, 366 REQUESTED_FACILITY_NOT_IMPLEMENTED = 69, 367 ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70, 368 SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79, 369 INVALID_TRANSACTION_IDENTIFIER = 81, 370 USER_NOT_MEMBER_OF_CUG = 87, 371 INCOMPATIBLE_DESTINATION = 88, 372 INVALID_TRANSIT_NW_SELECTION = 91, 373 SEMANTICALLY_INCORRECT_MESSAGE = 95, 374 INVALID_MANDATORY_INFORMATION = 96, 375 MESSAGE_TYPE_NON_IMPLEMENTED = 97, 376 MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98, 377 INFORMATION_ELEMENT_NON_EXISTENT = 99, 378 CONDITIONAL_IE_ERROR = 100, 379 MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101, 380 RECOVERY_ON_TIMER_EXPIRED = 102, 381 PROTOCOL_ERROR_UNSPECIFIED = 111, 382 INTERWORKING_UNSPECIFIED = 127, 383 CALL_BARRED = 240, 384 FDN_BLOCKED = 241, 385 IMSI_UNKNOWN_IN_VLR = 242, 386 IMEI_NOT_ACCEPTED = 243, 387 DIAL_MODIFIED_TO_USSD = 244, // STK Call Control 388 DIAL_MODIFIED_TO_SS = 245, 389 DIAL_MODIFIED_TO_DIAL = 246, 390 RADIO_OFF = 247, // Radio is OFF 391 OUT_OF_SERVICE = 248, // No cellular coverage 392 NO_VALID_SIM = 249, // No valid SIM is present 393 RADIO_INTERNAL_ERROR = 250, // Internal error at Modem 394 NETWORK_RESP_TIMEOUT = 251, // No response from network 395 NETWORK_REJECT = 252, // Explicit network reject 396 RADIO_ACCESS_FAILURE = 253, // RRC connection failure. Eg.RACH 397 RADIO_LINK_FAILURE = 254, // Radio Link Failure 398 RADIO_LINK_LOST = 255, // Radio link lost due to poor coverage 399 RADIO_UPLINK_FAILURE = 256, // Radio uplink failure 400 RADIO_SETUP_FAILURE = 257, // RRC connection setup failure 401 RADIO_RELEASE_NORMAL = 258, // RRC connection release, normal 402 RADIO_RELEASE_ABNORMAL = 259, // RRC connection release, abnormal 403 ACCESS_CLASS_BLOCKED = 260, // Access class barring 404 NETWORK_DETACH = 261, // Explicit network detach 405 CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, 406 CDMA_DROP = 1001, 407 CDMA_INTERCEPT = 1002, 408 CDMA_REORDER = 1003, 409 CDMA_SO_REJECT = 1004, 410 CDMA_RETRY_ORDER = 1005, 411 CDMA_ACCESS_FAILURE = 1006, 412 CDMA_PREEMPTED = 1007, 413 CDMA_NOT_EMERGENCY = 1008, // For non-emergency number dialed during emergency 414 // callback mode 415 CDMA_ACCESS_BLOCKED = 1009, 416 417 /** 418 * OEM specific error codes. Used to distinguish error from 419 * CALL_FAIL_ERROR_UNSPECIFIED and help assist debugging */ 420 OEM_CAUSE_1 = 0xf001, 421 OEM_CAUSE_2 = 0xf002, 422 OEM_CAUSE_3 = 0xf003, 423 OEM_CAUSE_4 = 0xf004, 424 OEM_CAUSE_5 = 0xf005, 425 OEM_CAUSE_6 = 0xf006, 426 OEM_CAUSE_7 = 0xf007, 427 OEM_CAUSE_8 = 0xf008, 428 OEM_CAUSE_9 = 0xf009, 429 OEM_CAUSE_10 = 0xf00a, 430 OEM_CAUSE_11 = 0xf00b, 431 OEM_CAUSE_12 = 0xf00c, 432 OEM_CAUSE_13 = 0xf00d, 433 OEM_CAUSE_14 = 0xf00e, 434 OEM_CAUSE_15 = 0xf00f, 435 436 ERROR_UNSPECIFIED = 0xffff, // This error will be deprecated soon, 437 // vendor code must make sure to map error 438 // code to specific error 439}; 440 441enum DataCallFailCause : int32_t { 442 NONE = 0, // an integer cause code defined in TS 24.008 443 // section 6.1.3.1.3 or TS 24.301 Release 8+ Annex B. 444 // If the implementation does not have access to the exact 445 // cause codes, then it must return one of the 446 // following values, as the UI layer needs to distinguish 447 // these cases for error notification and potential 448 // retries. 449 OPERATOR_BARRED = 0x08, // no retry 450 NAS_SIGNALLING = 0x0E, // PDP_FAIL_LLC_SNDCP = 0x19, 451 INSUFFICIENT_RESOURCES = 0x1A, 452 MISSING_UKNOWN_APN = 0x1B, // no retry 453 UNKNOWN_PDP_ADDRESS_TYPE = 0x1C, // no retry 454 USER_AUTHENTICATION = 0x1D, // no retry 455 ACTIVATION_REJECT_GGSN = 0x1E, // no retry 456 ACTIVATION_REJECT_UNSPECIFIED = 0x1F, 457 SERVICE_OPTION_NOT_SUPPORTED = 0x20, // no retry 458 SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, // no retry 459 SERVICE_OPTION_OUT_OF_ORDER = 0x22, 460 NSAPI_IN_USE = 0x23, // no retry 461 REGULAR_DEACTIVATION = 0x24, // possibly restart radio, 462 // based on framework config 463 QOS_NOT_ACCEPTED = 0x25, 464 NETWORK_FAILURE = 0x26, 465 UMTS_REACTIVATION_REQ = 0x27, 466 FEATURE_NOT_SUPP = 0x28, 467 TFT_SEMANTIC_ERROR = 0x29, 468 TFT_SYTAX_ERROR = 0x2A, 469 UNKNOWN_PDP_CONTEXT = 0x2B, 470 FILTER_SEMANTIC_ERROR = 0x2C, 471 FILTER_SYTAX_ERROR = 0x2D, 472 PDP_WITHOUT_ACTIVE_TFT = 0x2E, 473 ONLY_IPV4_ALLOWED = 0x32, // no retry 474 ONLY_IPV6_ALLOWED = 0x33, // no retry 475 ONLY_SINGLE_BEARER_ALLOWED = 0x34, 476 ESM_INFO_NOT_RECEIVED = 0x35, 477 PDN_CONN_DOES_NOT_EXIST = 0x36, 478 MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 0x37, 479 MAX_ACTIVE_PDP_CONTEXT_REACHED = 0x41, 480 UNSUPPORTED_APN_IN_CURRENT_PLMN = 0x42, 481 INVALID_TRANSACTION_ID = 0x51, 482 MESSAGE_INCORRECT_SEMANTIC = 0x5F, 483 INVALID_MANDATORY_INFO = 0x60, 484 MESSAGE_TYPE_UNSUPPORTED = 0x61, 485 MSG_TYPE_NONCOMPATIBLE_STATE = 0x62, 486 UNKNOWN_INFO_ELEMENT = 0x63, 487 CONDITIONAL_IE_ERROR = 0x64, 488 MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 0x65, 489 PROTOCOL_ERRORS = 0x6F, // no retry 490 APN_TYPE_CONFLICT = 0x70, 491 INVALID_PCSCF_ADDR = 0x71, 492 INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 0x72, 493 EMM_ACCESS_BARRED = 0x73, 494 EMERGENCY_IFACE_ONLY = 0x74, 495 IFACE_MISMATCH = 0x75, 496 COMPANION_IFACE_IN_USE = 0x76, 497 IP_ADDRESS_MISMATCH = 0x77, 498 IFACE_AND_POL_FAMILY_MISMATCH = 0x78, 499 EMM_ACCESS_BARRED_INFINITE_RETRY = 0x79, 500 AUTH_FAILURE_ON_EMERGENCY_CALL = 0x7A, 501 OEM_DCFAILCAUSE_1 = 0x1001, 502 503 OEM_DCFAILCAUSE_2 = 0x1002, 504 OEM_DCFAILCAUSE_3 = 0x1003, 505 OEM_DCFAILCAUSE_4 = 0x1004, 506 OEM_DCFAILCAUSE_5 = 0x1005, 507 OEM_DCFAILCAUSE_6 = 0x1006, 508 OEM_DCFAILCAUSE_7 = 0x1007, 509 OEM_DCFAILCAUSE_8 = 0x1008, 510 OEM_DCFAILCAUSE_9 = 0x1009, 511 OEM_DCFAILCAUSE_10 = 0x100A, 512 OEM_DCFAILCAUSE_11 = 0x100B, 513 OEM_DCFAILCAUSE_12 = 0x100C, 514 OEM_DCFAILCAUSE_13 = 0x100D, 515 OEM_DCFAILCAUSE_14 = 0x100E, 516 OEM_DCFAILCAUSE_15 = 0x100F, 517 518 // Not mentioned in the specification 519 VOICE_REGISTRATION_FAIL = -1, 520 DATA_REGISTRATION_FAIL = -2, 521 522 // reasons for data call drop - network/modem disconnect 523 SIGNAL_LOST = -3, 524 PREF_RADIO_TECH_CHANGED = -4, // preferred technology has changed, must retry 525 // with parameters appropriate for new technology 526 RADIO_POWER_OFF = -5, // data call was disconnected because radio was resetting, 527 // powered off - no retry 528 TETHERED_CALL_ACTIVE = -6, // data call was disconnected by modem because tethered 529 // mode was up on same APN/data profile - no retry until 530 // tethered call is off 531 ERROR_UNSPECIFIED = 0xffff, 532}; 533 534/** 535 * Please note that registration state UNKNOWN is 536 * treated as "out of service" in the Android telephony. 537 * Registration state REG_DENIED must be returned if Location Update 538 * Reject (with cause 17 - Network Failure) is received 539 * repeatedly from the network, to facilitate 540 * "managed roaming" 541 */ 542enum RegState : int32_t { 543 NOT_REG_MT_NOT_SEARCHING_OP = 0, // Not registered, MT is not currently searching 544 // a new operator to register 545 REG_HOME = 1, // Registered, home network 546 NOT_REG_MT_SEARCHING_OP = 2, // Not registered, but MT is currently searching 547 // a new operator to register 548 REG_DENIED = 3, // Registration denied 549 UNKNOWN = 4, // Unknown 550 REG_ROAMING = 5, // Registered, roaming 551 NOT_REG_MT_NOT_SEARCHING_OP_EM = 10, // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that 552 // emergency calls are enabled. 553 NOT_REG_MT_SEARCHING_OP_EM = 12, // Same as NOT_REG_MT_SEARCHING_OP but indicates that 554 // emergency calls are enabled. 555 REG_DENIED_EM = 13, // Same as REG_DENIED but indicates that 556 // emergency calls are enabled. 557 UNKNOWN_EM = 14, // Same as UNKNOWN but indicates that 558 // emergency calls are enabled. 559}; 560 561enum RadioTechnology : int32_t { 562 UNKNOWN = 0, 563 GPRS = 1, 564 EDGE = 2, 565 UMTS = 3, 566 IS95A = 4, 567 IS95B = 5, 568 ONE_X_RTT = 6, 569 EVDO_0 = 7, 570 EVDO_A = 8, 571 HSDPA = 9, 572 HSUPA = 10, 573 HSPA = 11, 574 EVDO_B = 12, 575 EHRPD = 13, 576 LTE = 14, 577 HSPAP = 15, // HSPA+ 578 GSM = 16, // Only supports voice 579 TD_SCDMA = 17, 580 IWLAN = 18, 581 LTE_CA = 19, 582}; 583 584enum DataProfileId : int32_t { 585 DEFAULT = 0, 586 TETHERED = 1, 587 IMS = 2, 588 FOTA = 3, 589 CBS = 4, 590 OEM_BASE = 1000, // Start of OEM-specific profiles 591 INVALID = 0xFFFFFFFF, 592}; 593 594enum SmsAcknowledgeFailCause : int32_t { 595 MEMORY_CAPACITY_EXCEEDED = 0xD3, 596 UNSPECIFIED_ERROR = 0XFF, 597}; 598 599enum CallForwardInfoStatus : int32_t { 600 DISABLE, 601 ENABLE, 602 INTERROGATE, 603 REGISTRATION, 604 ERASURE, 605}; 606 607enum ClipStatus : int32_t { 608 CLIP_PROVISIONED, // CLIP provisioned 609 CLIP_UNPROVISIONED, // CLIP not provisioned 610 UNKNOWN, // unknown, e.g. no network etc 611}; 612 613enum SmsWriteArgsStatus : int32_t { 614 REC_UNREAD, 615 REC_READ, 616 STO_UNSENT, 617 STO_SENT, 618}; 619 620enum RadioBandMode : int32_t { 621 BAND_MODE_UNSPECIFIED, // "unspecified" (selected by baseband automatically) 622 BAND_MODE_EURO, // "EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000) 623 BAND_MODE_USA, // "US band" 624 // (GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900) 625 BAND_MODE_JPN, // "JPN band" (WCDMA-800 / WCDMA-IMT-2000) 626 BAND_MODE_AUS, // "AUS band" 627 // (GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000) 628 BAND_MODE_AUS_2, // "AUS band 2" (GSM-900 / DCS-1800 / WCDMA-850) 629 BAND_MODE_CELL_800, // "Cellular" (800-MHz Band) 630 BAND_MODE_PCS, // "PCS" (1900-MHz Band) 631 BAND_MODE_JTACS, // "Band Class 3" (JTACS Band) 632 BAND_MODE_KOREA_PCS, // "Band Class 4" (Korean PCS Band) 633 BAND_MODE_5_450M, // "Band Class 5" (450-MHz Band) 634 BAND_MODE_IMT2000, // "Band Class 6" (2-GMHz IMT2000 Band) 635 BAND_MODE_7_700M_2, // "Band Class 7" (Upper 700-MHz Band) 636 BAND_MODE_8_1800M, // "Band Class 8" (1800-MHz Band) 637 BAND_MODE_9_900M, // "Band Class 9" (900-MHz Band) 638 BAND_MODE_10_800M_2, // "Band Class 10" (Secondary 800-MHz Band) 639 BAND_MODE_EURO_PAMR_400M, // "Band Class 11" (400-MHz European PAMR Band) 640 BAND_MODE_AWS, // "Band Class 15" (AWS Band) 641 BAND_MODE_USA_2500M, // "Band Class 16" (US 2.5-GHz Band) 642}; 643 644enum OperatorStatus : int32_t { 645 UNKNOWN, 646 AVAILABLE, 647 CURRENT, 648 FORBIDDEN, 649}; 650 651enum PreferredNetworkType : int32_t { 652 GSM_WCDMA, // GSM/WCDMA (WCDMA preferred) 653 GSM_ONLY, // GSM only 654 WCDMA, // WCDMA 655 GSM_WCDMA_AUTO, // GSM/WCDMA (auto mode, according to PRL) 656 CDMA_EVDO_AUTO, // CDMA and EvDo (auto mode, according to PRL) 657 CDMA_ONLY, // CDMA only 658 EVDO_ONLY, // EvDo only 659 GSM_WCDMA_CDMA_EVDO_AUTO, // GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) 660 LTE_CDMA_EVDO, // LTE, CDMA and EvDo 661 LTE_GSM_WCDMA, // LTE, GSM/WCDMA 662 LTE_CMDA_EVDO_GSM_WCDMA, // LTE, CDMA, EvDo, GSM/WCDMA 663 LTE_ONLY, // LTE only 664 LTE_WCDMA, // LTE/WCDMA 665 TD_SCDMA_ONLY, // TD-SCDMA only 666 TD_SCDMA_WCDMA, // TD-SCDMA and WCDMA 667 TD_SCDMA_LTE, // TD-SCDMA and LTE 668 TD_SCDMA_GSM, // TD-SCDMA and GSM 669 TD_SCDMA_GSM_LTE, // TD-SCDMA,GSM and LTE 670 TD_SCDMA_GSM_WCDMA, // TD-SCDMA, GSM/WCDMA 671 TD_SCDMA_WCDMA_LTE, // TD-SCDMA, WCDMA and LTE 672 TD_SCDMA_GSM_WCDMA_LTE, // TD-SCDMA, GSM/WCDMA and LTE 673 TD_SCDMA_GSM_WCDMA_CDMA_EVDO_AUTO, // TD-SCDMA, GSM/WCDMA, CDMA and EvDo 674 TD_SCDMA_LTE_CDMA_EVDO_GSM_WCDMA, // TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA 675}; 676 677enum CdmaSubscriptionSource : int32_t { 678 RUIM_SIM, 679 NV, 680}; 681 682enum CdmaRoamingType : int32_t { 683 HOME_NETWORK, 684 AFFILIATED_ROAM, 685 ANY_ROAM, 686}; 687 688enum TtyMode : int32_t { 689 OFF, 690 FULL, 691 HCO, // Hearing carryover 692 VCO, // Voice carryover 693}; 694 695enum NvItem : int32_t { 696 // CDMA radio and account information (items 1-10) 697 CDMA_MEID = 1, // CDMA MEID (hex) 698 CDMA_MIN = 2, // CDMA MIN (MSID) 699 CDMA_MDN = 3, // CDMA MDN 700 CDMA_ACCOLC = 4, // CDMA access overload control 701 702 // Carrier device provisioning (items 11-30) 703 DEVICE_MSL = 11, // device MSL 704 RTN_RECONDITIONED_STATUS = 12, // RTN reconditioned status 705 RTN_ACTIVATION_DATE = 13, // RTN activation date 706 RTN_LIFE_TIMER = 14, // RTN life timer 707 RTN_LIFE_CALLS = 15, // RTN life calls 708 RTN_LIFE_DATA_TX = 16, // RTN life data TX 709 RTN_LIFE_DATA_RX = 17, // RTN life data RX 710 OMADM_HFA_LEVEL = 18, // HFA in progress 711 712 // Mobile IP profile information (items 31-50) 713 MIP_PROFILE_NAI = 31, // NAI realm 714 MIP_PROFILE_HOME_ADDRESS = 32, // MIP home address 715 MIP_PROFILE_AAA_AUTH = 33, // AAA auth 716 MIP_PROFILE_HA_AUTH = 34, // HA auth 717 MIP_PROFILE_PRI_HA_ADDR = 35, // primary HA address 718 MIP_PROFILE_SEC_HA_ADDR = 36, // secondary HA address 719 MIP_PROFILE_REV_TUN_PREF = 37, // reverse TUN preference 720 MIP_PROFILE_HA_SPI = 38, // HA SPI 721 MIP_PROFILE_AAA_SPI = 39, // AAA SPI 722 MIP_PROFILE_MN_HA_SS = 40, // HA shared secret 723 MIP_PROFILE_MN_AAA_SS = 41, // AAA shared secret 724 725 // CDMA network and band config (items 51-70) 726 CDMA_PRL_VERSION = 51, // CDMA PRL version 727 CDMA_BC10 = 52, // CDMA band class 10 728 CDMA_BC14 = 53, // CDMA band class 14 729 CDMA_SO68 = 54, // CDMA SO68 730 CDMA_SO73_COP0 = 55, // CDMA SO73 COP0 731 CDMA_SO73_COP1TO7 = 56, // CDMA SO73 COP1-7 732 CDMA_1X_ADVANCED_ENABLED = 57, // CDMA 1X Advanced enabled 733 CDMA_EHRPD_ENABLED = 58, // CDMA eHRPD enabled 734 CDMA_EHRPD_FORCED = 59, // CDMA eHRPD forced 735 736 // LTE network and band config (items 71-90) 737 LTE_BAND_ENABLE_25 = 71, // LTE band 25 enable 738 LTE_BAND_ENABLE_26 = 72, // LTE band 26 enable 739 LTE_BAND_ENABLE_41 = 73, // LTE band 41 enable 740 741 LTE_SCAN_PRIORITY_25 = 74, // LTE band 25 scan priority 742 LTE_SCAN_PRIORITY_26 = 75, // LTE band 26 scan priority 743 LTE_SCAN_PRIORITY_41 = 76, // LTE band 41 scan priority 744 745 LTE_HIDDEN_BAND_PRIORITY_25 = 77, // LTE hidden band 25 priority 746 LTE_HIDDEN_BAND_PRIORITY_26 = 78, // LTE hidden band 26 priority 747 LTE_HIDDEN_BAND_PRIORITY_41 = 79, // LTE hidden band 41 priority 748}; 749 750enum ResetNvType : int32_t { 751 RELOAD, // reload all NV items 752 ERASE, // erase NV reset (SCRTN) 753 FACTORY_RESET, // factory reset (RTN) 754}; 755 756enum HardwareConfigType : int32_t { 757 MODEM, 758 SIM, 759}; 760 761enum HardwareConfigState : int32_t { 762 ENABLED, 763 STANDBY, 764 DISABLED, 765}; 766 767enum LceStatus : int32_t { 768 NOT_SUPPORTED, 769 STOPPED, 770 ACTIVE 771}; 772 773enum CarrierMatchType : int32_t { 774 ALL = 0, // Apply to all carriers with the same mcc/mnc 775 SPN = 1, // Use SPN and mcc/mnc to identify the carrier 776 IMSI_PREFIX = 2, // Use IMSI prefix and mcc/mnc to identify the carrier 777 GID1 = 3, // Use GID1 and mcc/mnc to identify the carrier 778 GID2 = 4, // Use GID2 and mcc/mnc to identify the carrier 779}; 780 781struct NeighboringCell { 782 string cid; // Combination of LAC and Cell Id in 32 bits in GSM. 783 // Upper 16 bits is LAC and lower 16 bits 784 // is CID (as described in TS 27.005) 785 // Primary Scrambling Code (as described in TS 25.331) 786 // in 9 bits in UMTS 787 // Valid values are hexadecimal 0x0000 - 0xffffffff. 788 int32_t rssi; // Received RSSI in GSM, 789 // Level index of CPICH Received Signal Code Power in UMTS 790}; 791 792enum CdmaSmsDigitMode : int32_t { 793 FOUR_BIT, // DTMF digits 794 EIGHT_BIT, 795}; 796 797enum CdmaSmsNumberMode : int32_t { 798 NOT_DATA_NETWORK, 799 DATA_NETWORK, 800}; 801 802enum CdmaSmsNumberType : int32_t { 803 UNKNOWN, 804 INTERNATIONAL_OR_DATA_IP, // INTERNATIONAL is used when number mode is not data 805 // network 806 // address. DATA_IP is used when the number mode is data 807 // network address 808 NATIONAL_OR_INTERNET_MAIL, // NATIONAL is used when the number mode is not data 809 // network address. INTERNET_MAIL is used when the number 810 // mode is data network address. For INTERNET_MAIL, in 811 // the address data "digits", each byte contains an ASCII 812 // character. 813 // Examples are "x@y.com,a@b.com - ref 814 // TIA/EIA-637A 3.4.3.3 815 NETWORK, 816 SUBSCRIBER, 817 ALPHANUMERIC, // GSM SMS: address value is GSM 7-bit chars 818 ABBREVIATED, 819 RESERVED_7, 820}; 821 822enum CdmaSmsNumberPlan : int32_t { 823 UNKNOWN, 824 TELEPHONY, // CCITT E.164 and E.163, including ISDN plan 825 RESERVED_2, 826 DATA, // CCITT X.121 827 TELEX, // CCITT F.69 828 RESERVED_5, 829 RESERVED_6, 830 RESERVED_7, 831 RESERVED_8, 832 PRIVATE, 833 RESERVED_10, 834 RESERVED_11, 835 RESERVED_12, 836 RESERVED_13, 837 RESERVED_14, 838 RESERVED_15, 839}; 840 841enum CdmaSmsSubaddressType : int32_t { 842 NSAP, // CCITT X.213 or ISO 8348 AD2 843 USER_SPECIFIED, // e.g. X.25 844}; 845 846enum CdmaSmsErrorClass : int32_t { 847 NO_ERROR, 848 ERROR, 849}; 850 851enum CdmaSmsWriteArgsStatus : int32_t { 852 REC_UNREAD, 853 REC_READ, 854 STO_UNSENT, 855 STO_SENT 856}; 857 858enum CellInfoType : int32_t { 859 NONE = 0, 860 GSM = 1, 861 CDMA = 2, 862 LTE = 3, 863 WCDMA = 4, 864 TD_SCDMA = 5 865}; 866 867enum TimeStampType : int32_t { 868 UNKNOWN, 869 ANTENNA, 870 MODEM, 871 OEM_RIL, 872 JAVA_RIL, 873}; 874 875enum ApnAuthType : int32_t { 876 NO_PAP_NO_CHAP, // PAP and CHAP is never performed. 877 PAP_NO_CHAP, // PAP may be performed; CHAP is never performed. 878 NO_PAP_CHAP, // CHAP may be performed; PAP is never performed. 879 PAP_CHAP // PAP / CHAP may be performed - baseband dependent. 880}; 881 882enum RadioTechnologyFamily : int32_t { 883 THREE_GPP, // 3GPP Technologies - GSM, WCDMA 884 THREE_GPP2 // 3GPP2 Technologies - CDMA 885}; 886 887enum RadioCapabilityPhase : int32_t { 888 CONFIGURED = 0, // Logical Modem's (LM) initial value 889 // and value after FINISH completes 890 START = 1, // START is sent before APPLY and indicates that an 891 // APPLY is forthcoming with these same parameters 892 APPLY = 2, // APPLY is sent after all LM's receive START and returned 893 // RadioCapability.status = 0. If any START's fail, hal 894 // implementation must not send APPLY. 895 UNSOL_RSP = 3, // UNSOL_RSP is sent with unsolicited radioCapability() 896 FINISH = 4 // FINISH is sent after all commands have completed. If an 897 // error occurs in any previous command, the 898 // RadioAccessesFamily and logicalModemUuid fields must be 899 // the prior configuration thus restoring the 900 // configuration to the previous value. An error returned 901 // by FINISH will generally be ignored or may cause that 902 // logical modem to be removed from service. 903}; 904 905enum RadioCapabilityStatus : int32_t { 906 NONE = 0, // This parameter has no meaning with 907 // RadioCapabilityPhase:START, RadioCapabilityPhase:APPLY 908 SUCCESS = 1, // Tell modem the action transaction of set radio 909 // capability was success with RadioCapabilityPhase:FINISH 910 FAIL = 2, // Tell modem the action transaction of set radio 911 // capability is fail with RadioCapabilityPhase:FINISH. 912}; 913 914enum RadioAccessFamily : int32_t { 915 UNKNOWN = 1 << RadioTechnology:UNKNOWN, 916 GPRS = 1 << RadioTechnology:GPRS, 917 EDGE = 1 << RadioTechnology:EDGE, 918 UMTS = 1 << RadioTechnology:UMTS, 919 IS95A = 1 << RadioTechnology:IS95A, 920 IS95B = 1 << RadioTechnology:IS95B, 921 ONE_X_RTT = 1 << RadioTechnology:ONE_X_RTT, 922 EVDO_0 = 1 << RadioTechnology:EVDO_0, 923 EVDO_A = 1 << RadioTechnology:EVDO_A, 924 HSDPA = 1 << RadioTechnology:HSDPA, 925 HSUPA = 1 << RadioTechnology:HSUPA, 926 HSPA = 1 << RadioTechnology:HSPA, 927 EVDO_B = 1 << RadioTechnology:EVDO_B, 928 EHRPD = 1 << RadioTechnology:EHRPD, 929 LTE = 1 << RadioTechnology:LTE, 930 HSPAP = 1 << RadioTechnology:HSPAP, 931 GSM = 1 << RadioTechnology:GSM, 932 TD_SCDMA = 1 << RadioTechnology:TD_SCDMA, 933 LTE_CA = 1 << RadioTechnology:LTE_CA 934}; 935 936enum UssdModeType : int32_t { 937 NOTIFY, // USSD-Notify 938 REQUEST, // USSD-Request 939 NW_RELEASE, // Session terminated by network 940 LOCAL_CLIENT, // other local client (eg, SIM Toolkit) has responded 941 NOT_SUPPORTED, // Operation not supported 942 NW_TIMEOUT, // Network timeout 943}; 944 945enum SimRefreshType : int32_t { 946 SIM_FILE_UPDATE = 0, // A file on SIM has been updated. 947 SIM_INIT = 1, // SIM initialized. All files should be re-read. 948 SIM_RESET = 2 // SIM reset. SIM power required, SIM may be locked a 949 // nd all files must be re-read. 950}; 951 952enum SrvccState :int32_t { 953 HANDOVER_STARTED = 0, 954 HANDOVER_COMPLETED = 1, 955 HANDOVER_FAILED = 2, 956 HANDOVER_CANCELED = 3 957}; 958 959enum UiccSubActStatus : int32_t { 960 DEACTIVATE, 961 ACTIVATE 962}; 963 964enum SubscriptionType : int32_t { 965 SUBSCRIPTION_1, 966 SUBSCRIPTION_2, 967 SUBSCRIPTION_3 968}; 969 970enum DataProfileInfoType : int32_t { 971 COMMON, 972 THREE_GPP, 973 THREE_GPP2 974}; 975 976enum PhoneRestrictedState : int32_t { 977 NONE = 0x00, // No restriction at all including voice/SMS/USSD/SS/AV64 978 // and packet data 979 CS_EMERGENCY = 0x01, // Block emergency call due to restriction. But allow all 980 // normal voice/SMS/USSD/SS/AV64. 981 CS_NORMAL = 0x02, // Block all normal voice/SMS/USSD/SS/AV64 due to 982 // restriction. Only Emergency call allowed. 983 CS_ALL = 0x04, // Block all voice/SMS/USSD/SS/AV64 including emergency 984 // call due to restriction. 985 PS_ALL = 0x10 // Block packet data access due to restriction. 986}; 987 988enum CdmaCallWaitingNumberPresentation : int32_t { 989 ALLOWED = 0, 990 RESTRICTED = 1, 991 UNKNOWN = 2, 992}; 993 994enum CdmaCallWaitingNumberType : int32_t { 995 UNKNOWN = 0, 996 INTERNATIONAL = 1, 997 NATIONAL = 2, 998 NETWORK_SPECIFIC = 3, 999 SUBSCRIBER = 4 1000}; 1001 1002enum CdmaCallWaitingNumberPlan : int32_t { 1003 UNKNOWN = 0, 1004 ISDN = 1, 1005 DATA = 3, 1006 TELEX = 4, 1007 NATIONAL = 8, 1008 PRIVATE = 9 1009}; 1010 1011enum CdmaOtaProvisionStatus : int32_t { 1012 SPL_UNLOCKED, 1013 SPC_RETRIES_EXCEEDED, 1014 A_KEY_EXCHANGED, 1015 SSD_UPDATED, 1016 NAM_DOWNLOADED, 1017 MDN_DOWNLOADED, 1018 IMSI_DOWNLOADED, 1019 PRL_DOWNLOADED, 1020 COMMITTED, 1021 OTAPA_STARTED, 1022 OTAPA_STOPPED, 1023 OTAPA_ABORTED 1024}; 1025 1026/** Names of the CDMA info records (C.S0005 section 3.7.5) */ 1027enum CdmaInfoRecName : int32_t { 1028 DISPLAY, 1029 CALLED_PARTY_NUMBER, 1030 CALLING_PARTY_NUMBER, 1031 CONNECTED_NUMBER, 1032 SIGNAL, 1033 REDIRECTING_NUMBER, 1034 LINE_CONTROL, 1035 EXTENDED_DISPLAY, 1036 T53_CLIR, 1037 T53_RELEASE, 1038 T53_AUDIO_CONTROL 1039}; 1040 1041/** Redirecting Number Information Record as defined in C.S0005 section 3.7.5.11 */ 1042enum CdmaRedirectingReason : int32_t { 1043 UNKNOWN = 0, 1044 CALL_FORWARDING_BUSY = 1, 1045 CALL_FORWARDING_NO_REPLY = 2, 1046 CALLED_DTE_OUT_OF_ORDER = 9, 1047 CALL_FORWARDING_BY_THE_CALLED_DTE = 10, 1048 CALL_FORWARDING_UNCONDITIONAL = 15, 1049 RESERVED 1050}; 1051 1052enum SsServiceType : int32_t { 1053 CFU, 1054 CF_BUSY, 1055 CF_NO_REPLY, 1056 CF_NOT_REACHABLE, 1057 CF_ALL, 1058 CF_ALL_CONDITIONAL, 1059 CLIP, 1060 CLIR, 1061 COLP, 1062 COLR, 1063 WAIT, 1064 BAOC, 1065 BAOIC, 1066 BAOIC_EXC_HOME, 1067 BAIC, 1068 BAIC_ROAMING, 1069 ALL_BARRING, 1070 OUTGOING_BARRING, 1071 INCOMING_BARRING 1072}; 1073 1074enum SsRequestType : int32_t { 1075 ACTIVATION, 1076 DEACTIVATION, 1077 INTERROGATION, 1078 REGISTRATION, 1079 ERASURE 1080}; 1081 1082enum SsTeleserviceType : int32_t { 1083 ALL_TELE_AND_BEARER_SERVICES, 1084 ALL_TELESEVICES, 1085 TELEPHONY, 1086 ALL_DATA_TELESERVICES, 1087 SMS_SERVICES, 1088 ALL_TELESERVICES_EXCEPT_SMS 1089}; 1090 1091enum SuppServiceClass : int32_t { 1092 NONE = 0, 1093 VOICE = 1 << 0, 1094 DATA = 1 << 1, 1095 FAX = 1 << 2, 1096 SMS = 1 << 3, 1097 DATA_SYNC = 1 << 4, 1098 DATA_ASYNC = 1 << 5, 1099 PACKET = 1 << 6, 1100 PAD = 1 << 7, 1101 MAX = 1 << 7 1102}; 1103 1104enum ApnTypes : int32_t { 1105 NONE = 0, // None 1106 DEFAULT = 1 << 0, // APN type for default data traffic 1107 MMS = 1 << 1, // APN type for MMS traffic 1108 SUPL = 1 << 2, // APN type for SUPL assisted GPS 1109 DUN = 1 << 3, // APN type for DUN traffic 1110 HIPRI = 1 << 4, // APN type for HiPri traffic 1111 FOTA = 1 << 5, // APN type for FOTA 1112 IMS = 1 << 6, // APN type for IMS 1113 CBS = 1 << 7, // APN type for CBS 1114 IA = 1 << 8, // APN type for IA Initial Attach APN 1115 EMERGENCY = 1 << 9, // APN type for Emergency PDN. This is not an IA apn, 1116 // but is used for access to carrier services in an 1117 // emergency call situation. 1118 ALL = DEFAULT | MMS | SUPL | DUN | HIPRI | FOTA | IMS | CBS | IA | EMERGENCY, 1119}; 1120 1121enum IndicationFilter : int32_t { 1122 NONE = 0, 1123 SIGNAL_STRENGTH = 1 << 0, // When this bit is set, modem should always send the 1124 // signal strength update through 1125 // IRadioIndication.currentSignalStrength(), 1126 // otherwise suppress it. 1127 FULL_NETWORK_STATE = 1 << 1, // When this bit is set, modem should always invoke 1128 // IRadioIndication.networkStateChanged() when any field 1129 // in VoiceRegStateResult or DataRegStateResult changes. 1130 // When this bit is not set, modem should suppress 1131 // IRadioIndication.networkStateChanged() when there are 1132 // only changes from those insignificant fields 1133 // (e.g. cell info). Modem should continue invoking 1134 // IRadioIndication.networkStateChanged() 1135 // when significant fields are updated even when this bit 1136 // is not set. The following fields are considered 1137 // significant, registration state and radio technology. 1138 DATA_CALL_DORMANCY_CHANGED = 1 << 2, // When this bit is set, modem should send the data call 1139 // list changed indication 1140 // IRadioIndication.dataCallListChanged() whenever any 1141 // field in ITypes.SetupDataCallResult changes. Otherwise 1142 // modem should suppress the indication when the only 1143 // changed field is 'active' (for data dormancy). 1144 // For all other fields change, modem should continue 1145 // sending IRadioIndication.dataCallListChanged() 1146 // regardless this bit is set or not. 1147 ALL = SIGNAL_STRENGTH | FULL_NETWORK_STATE | DATA_CALL_DORMANCY_CHANGED, 1148}; 1149 1150enum MvnoType : int32_t { 1151 NONE, // None 1152 IMSI, // The matching data is based on IMSI. 1153 GID, // The matching data is based on group id. 1154 SPN, // The matching data is based service provider name. 1155}; 1156 1157enum DeviceStateType : int32_t { 1158 POWER_SAVE_MODE, // Device power save mode (provided by PowerManager) 1159 // True indicates the device is in power save mode. 1160 CHARGING_STATE, // Device charging state (provided by BatteryManager) 1161 // True indicates the device is charging. 1162 LOW_DATA_EXPECTED // Low data expected mode. True indicates low data traffic 1163 // is expected, for example, when the device is idle 1164 // (e.g. not doing tethering in the background). Note 1165 // this doesn't mean no data is expected. 1166}; 1167 1168enum P2Constant : int32_t { 1169 NO_P2 = -1, // No P2 value is provided 1170}; 1171 1172struct RadioResponseInfo { 1173 RadioResponseType type; // Response type 1174 int32_t serial; // Serial number of the request 1175 RadioError error; // Response error 1176}; 1177 1178struct AppStatus { 1179 AppType appType; 1180 AppState appState; 1181 PersoSubstate persoSubstate; // applicable only if app_state == SUBSCRIPTION_PERSO 1182 string aidPtr; // e.g., from 0xA0, 0x00 -> 0x41, 1183 // 0x30, 0x30, 0x30 1184 string appLabelPtr; 1185 int32_t pin1Replaced; // applicable to USIM, CSIM and ISIM 1186 PinState pin1; 1187 PinState pin2; 1188}; 1189 1190struct CardStatus { 1191 CardState cardState; 1192 PinState universalPinState; // applicable to USIM and CSIM 1193 int32_t gsmUmtsSubscriptionAppIndex; // value < RadioConst:CARD_MAX_APPS, -1 if none 1194 int32_t cdmaSubscriptionAppIndex; // value < RadioConst:CARD_MAX_APPS, -1 if none 1195 int32_t imsSubscriptionAppIndex; // value < RadioConst:CARD_MAX_APPS, -1 if none 1196 vec<AppStatus> applications; // size <= RadioConst:CARD_MAX_APPS 1197}; 1198 1199/** 1200 * User-to-User Signaling Information defined in 3GPP 23.087 v8.0 1201 */ 1202struct UusInfo { 1203 UusType uusType; // UUS Type 1204 UusDcs uusDcs; // UUS Data Coding Scheme 1205 string uusData; // UUS data 1206}; 1207 1208struct Call { 1209 CallState state; 1210 int32_t index; // Connection Index for use with, eg, AT+CHLD 1211 int32_t toa; // type of address, eg 145 = intl 1212 bool isMpty; // true if is mpty call 1213 bool isMT; // true if call is mobile terminated 1214 uint8_t als; // ALS line indicator if available (0 = line 1) 1215 bool isVoice; // true if this is is a voice call 1216 bool isVoicePrivacy; // true if CDMA voice privacy mode is active 1217 string number; // Remote party number 1218 CallPresentation numberPresentation; 1219 string name; // Remote party name 1220 CallPresentation namePresentation; 1221 vec<UusInfo> uusInfo; // Vector of User-User Signaling Information 1222}; 1223 1224struct Dial { 1225 string address; 1226 Clir clir; 1227 vec<UusInfo> uusInfo; // Vector of User-User Signaling Information 1228}; 1229 1230struct LastCallFailCauseInfo { 1231 LastCallFailCause causeCode; 1232 string vendorCause; 1233}; 1234 1235struct GsmSignalStrength { 1236 uint32_t signalStrength; // Valid values are (0-61, 99) as defined in 1237 // TS 27.007 8.69; INT_MAX means invalid/unreported. 1238 uint32_t bitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5; 1239 // INT_MAX means invalid/unreported. 1240 int32_t timingAdvance; // Timing Advance in bit periods. 1 bit period = 48/13 us. 1241 // INT_MAX means invalid/unreported. 1242}; 1243 1244struct WcdmaSignalStrength{ 1245 int32_t signalStrength; // Valid values are (0-31, 99) as defined in 1246 // TS 27.007 8.5; INT_MAX means unreported. 1247 int32_t bitErrorRate; // bit error rate (0-7, 99) as defined in TS 27.007 8.5; 1248 // INT_MAX means invalid/unreported. 1249}; 1250 1251struct CdmaSignalStrength { 1252 uint32_t dbm; // This value is the actual RSSI 1253 // value multiplied by -1. Example: If the 1254 // actual RSSI is -75, then this response value will 1255 // be 75. INT_MAX means invalid/unreported. 1256 uint32_t ecio; // This value is the actual 1257 // Ec/Io multiplied by -10. Example: If the 1258 // actual Ec/Io is -12.5 dB, then this response value 1259 // will be 125. INT_MAX means invalid/unreported. 1260}; 1261 1262struct EvdoSignalStrength { 1263 uint32_t dbm; // This value is the actual 1264 // RSSI value multiplied by -1. 1265 // Example: If the actual RSSI is -75, 1266 // then this response value will be 75; INT_MAX means 1267 // invalid/unreported. 1268 uint32_t ecio; // This value is the actual 1269 // Ec/Io multiplied by -10. Example: If the 1270 // actual Ec/Io is -12.5 dB, then this response value 1271 // will be 125; INT_MAX means invalid/unreported. 1272 uint32_t signalNoiseRatio; // Valid values are 0-8. 8 is the highest signal to 1273 // noise ratio; INT_MAX means invalid/unreported. 1274}; 1275 1276struct LteSignalStrength { 1277 uint32_t signalStrength; // Valid values are (0-31, 99) as defined in 1278 // TS 27.007 8.5; INT_MAX means invalid/unreported. 1279 uint32_t rsrp; // The current Reference Signal Receive Power in dBm 1280 // multipled by -1. 1281 // Range: 44 to 140 dBm; 1282 // INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. 1283 // Reference: 3GPP TS 36.133 9.1.4 1284 uint32_t rsrq; // The current Reference Signal Receive Quality in dB 1285 // multiplied by -1. 1286 // Range: 20 to 3 dB; 1287 // INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. 1288 // Reference: 3GPP TS 36.133 9.1.7 1289 int32_t rssnr; // The current reference signal signal-to-noise ratio in 1290 // 0.1 dB units. 1291 // Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB). 1292 // INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. 1293 // Reference: 3GPP TS 36.101 8.1.1 1294 uint32_t cqi; // The current Channel Quality Indicator. 1295 // Range: 0 to 15. 1296 // INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. 1297 // Reference: 3GPP TS 36.101 9.2, 9.3, A.4 1298 uint32_t timingAdvance; // timing advance in micro seconds for a one way trip 1299 // from cell to device. 1300 // Approximate distance is calculated using 1301 // 300m/us * timingAdvance. 1302 // Range: 0 to 1282 inclusive. 1303 // INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. 1304 // Reference: 3GPP 36.213 section 4.2.3 1305}; 1306 1307struct TdScdmaSignalStrength { 1308 uint32_t rscp; // The Received Signal Code Power in dBm multiplied by -1. 1309 // Range : 25 to 120 1310 // INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. 1311 // Reference: 3GPP TS 25.123, section 9.1.1.1 1312}; 1313 1314struct SignalStrength { 1315 /** 1316 * If GSM measurements are provided, this structure must contain valid measurements; otherwise 1317 * all fields should be set to INT_MAX to mark them as invalid. 1318 */ 1319 GsmSignalStrength gw; 1320 /** 1321 * If CDMA measurements are provided, this structure must contain valid measurements; otherwise 1322 * all fields should be set to INT_MAX to mark them as invalid. 1323 */ 1324 CdmaSignalStrength cdma; 1325 /** 1326 * If EvDO measurements are provided, this structure must contain valid measurements; otherwise 1327 * all fields should be set to INT_MAX to mark them as invalid. 1328 */ 1329 EvdoSignalStrength evdo; 1330 /** 1331 * If LTE measurements are provided, this structure must contain valid measurements; otherwise 1332 * all fields should be set to INT_MAX to mark them as invalid. 1333 */ 1334 LteSignalStrength lte; 1335 /** 1336 * If TD-SCDMA measurements are provided, this structure must contain valid measurements; 1337 * otherwise all fields should be set to INT_MAX to mark them as invalid. 1338 */ 1339 TdScdmaSignalStrength tdScdma; 1340}; 1341 1342struct SendSmsResult { 1343 int32_t messageRef; // TP-Message-Reference for GSM, and BearerData MessageId 1344 // for CDMA (See 3GPP2 C.S0015-B, v2.0, table 4.5-1) 1345 string ackPDU; // or empty string if n/a 1346 int32_t errorCode; // See 3GPP 27.005, 3.2.5 for GSM/UMTS, 1347 // 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 1348 // -1 if unknown or not applicable 1349}; 1350 1351struct SetupDataCallResult { 1352 DataCallFailCause status; // Data call fail cause. DataCallFailCause.NONE if no 1353 // error. 1354 int32_t suggestedRetryTime; // If status != DataCallFailCause.NONE, this field 1355 // indicates the suggested retry back-off timer value RIL 1356 // wants to override the one pre-configured in FW. 1357 // The unit is milliseconds. 1358 // The value < 0 means no value is suggested. 1359 // The value 0 means retry must be done ASAP. 1360 // The value of INT_MAX(0x7fffffff) means no retry. 1361 int32_t cid; // Context ID, uniquely identifies this call 1362 int32_t active; // 0=inactive, 1=active/physical link down, 1363 // 2=active/physical link up */ 1364 string type; // One of the PDP_type values in TS 27.007 section 10.1.1. 1365 // For example, "IP", "IPV6", "IPV4V6", or "PPP". If 1366 // status is 1367 // DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this 1368 // is the type supported such as "IP" or "IPV6". 1369 string ifname; // The network interface name 1370 string addresses; // A space-delimited list of addresses with optional "/" 1371 // prefix length, e.g., "192.0.1.3" or 1372 // "192.0.1.11/16 2001:db8::1/64". 1373 // Typically 1 IPv4 or 1 IPv6 or 1374 // one of each. If the prefix length is absent the 1375 // addresses are assumed to be point to point with IPv4 1376 // having a prefix length of 32 and IPv6 128. 1377 string dnses; // A space-delimited list of DNS server addresses, 1378 // e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 1379 // Empty if no dns server addresses returned. 1380 string gateways; // A space-delimited list of default gateway addresses, 1381 // e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". 1382 // When empty, the addresses represent 1383 // point to point connections. 1384 string pcscf; // the Proxy Call State Control Function address 1385 // via PCO(Protocol Configuration Option) for IMS client. 1386 int32_t mtu; // MTU received from network 1387 // Value <= 0 means network has either not sent a 1388 // value or sent an invalid value 1389}; 1390 1391struct IccIo { 1392 int32_t command; // one of the commands listed for TS 27.007 +CRSM 1393 int32_t fileId; // EF id 1394 string path; // "pathid" from TS 27.007 +CRSM command. 1395 // Path is in hex ascii format eg "7f205f70" 1396 // Path must always be provided. 1397 int32_t p1; // Values of p1, p2 and p3 defined as per 3GPP TS 51.011 1398 int32_t p2; 1399 int32_t p3; 1400 string data; // information to be written to the SIM 1401 string pin2; 1402 string aid; // AID value, See ETSI 102.221 8.1 and 101.220 4, empty 1403 // string if no value. 1404}; 1405 1406struct IccIoResult { 1407 int32_t sw1; 1408 int32_t sw2; 1409 string simResponse; // In hex string format ([a-fA-F0-9]*), except for 1410 // SIM_AUTHENTICATION response for which it is in 1411 // Base64 format, see 3GPP TS 31.102 7.1.2 1412}; 1413 1414// See also com.android.internal.telephony.gsm.CallForwardInfo 1415struct CallForwardInfo { 1416 CallForwardInfoStatus status; // For queryCallForwardStatus() 1417 // status is DISABLE (Not used by vendor code currently) 1418 // For setCallForward(): 1419 // status must be 1420 // DISABLE, ENABLE, INTERROGATE, REGISTRATION, ERASURE 1421 int32_t reason; // from TS 27.007 7.11 "reason" 1422 int32_t serviceClass; // From 27.007 +CCFC/+CLCK "class" 1423 // See table for Android mapping from 1424 // MMI service code 1425 // 0 means user doesn't input class 1426 int32_t toa; // "type" from TS 27.007 7.11 1427 string number; // "number" from TS 27.007 7.11. 1428 int32_t timeSeconds; 1429}; 1430 1431// Response struct used in responseQueryAvailableNetworks 1432struct OperatorInfo { 1433 string alphaLong; // long alpha ONS or EONS 1434 string alphaShort; // short alpha ONS or EONS 1435 string operatorNumeric; // 5 or 6 digit numeric code (MCC + MNC) 1436 OperatorStatus status; 1437}; 1438 1439struct SmsWriteArgs { 1440 SmsWriteArgsStatus status; // Status of message. See TS 27.005 3.1 1441 string pdu; // PDU of message to write, as an ASCII hex string less 1442 // the SMSC address, the TP-layer length is strlen(pdu)/2. 1443 string smsc; // SMSC address in GSM BCD format prefixed by a length 1444 // byte (as expected by TS 27.005) or NULL for default 1445 // SMSC 1446}; 1447 1448struct CdmaSmsAddress { 1449 CdmaSmsDigitMode digitMode; // CdmaSmsDigitMode is of two types : 4 bit and 8 bit. 1450 // For 4-bit type, only "digits" field defined below in 1451 // this struct is used. 1452 CdmaSmsNumberMode numberMode; // Used only when digitMode is 8-bit 1453 CdmaSmsNumberType numberType; // Used only when digitMode is 8-bit. 1454 // To specify an international address, use the following: 1455 // digitMode = CdmaSmsDigitMode:EIGHT_BIT: 1456 // numberMode = CdmaSmsNumberMode:NOT_DATA_NETWORK 1457 // numberType = CdmaSmsNumberType:INTERNATIONAL_OR_DATA_IP 1458 // numberPlan = CdmaSmsNumberPlan:TELEPHONY 1459 // numberOfDigits = number of digits 1460 // digits = ASCII digits, e.g. '1', '2', '3', '4', and '5' 1461 CdmaSmsNumberPlan numberPlan; // Used only when digitMode is 8-bit 1462 vec<uint8_t> digits; // Each byte in this array represents a 4 bit or 8-bit 1463 // digit of address data 1464}; 1465 1466struct CdmaSmsSubaddress { 1467 CdmaSmsSubaddressType subaddressType; 1468 bool odd; // true means the last byte's lower 4 bits must be ignored 1469 vec<uint8_t> digits; // Each byte represents an 8-bit digit of subaddress data 1470}; 1471 1472struct CdmaSmsMessage { 1473 int32_t teleserviceId; 1474 bool isServicePresent; 1475 int32_t serviceCategory; 1476 CdmaSmsAddress address; 1477 CdmaSmsSubaddress subAddress; 1478 vec<uint8_t> bearerData; // 3GPP2 C.S0015-B, v2.0, 1479}; 1480 1481struct CdmaSmsAck { 1482 CdmaSmsErrorClass errorClass; 1483 int32_t smsCauseCode; // As defined in N.S00005, 6.5.2.125. 1484 // Currently, only 35 (resource shortage) and 1485 // 39 (other terminal problem) are reported. 1486}; 1487 1488struct CdmaBroadcastSmsConfigInfo { 1489 int32_t serviceCategory; // serviceCategory defines a Broadcast message identifier 1490 // whose value is 0x0000 - 0xFFFF as defined in 1491 // C.R1001G 9.3.1 and 9.3.2. 1492 int32_t language; // language code of Broadcast Message 1493 // whose value is 0x00 - 0x07 as defined in C.R1001G 9.2. 1494 bool selected; // selected false means message types specified in 1495 // serviceCategory are not accepted, while true means 1496 // accepted. 1497}; 1498 1499struct CdmaSmsWriteArgs { 1500 CdmaSmsWriteArgsStatus status; // Status of message. See TS 27.005 3.1 1501 CdmaSmsMessage message; 1502}; 1503 1504 1505/** 1506 * Which types of Cell Broadcast Message (CBM) are to be received by the ME 1507 * 1508 * fromServiceID - uToServiceID defines a range of CBM message identifiers 1509 * whose value is 0x0000 - 0xFFFF as defined in TS 23.041 9.4.1.2.2 for GMS 1510 * and 9.4.4.2.2 for UMTS. All other values must be treated as empty 1511 * CBM message ID. 1512 * 1513 * fromCodeScheme - uToCodeScheme defines a range of CBM data coding schemes 1514 * whose value is 0x00 - 0xFF as defined in TS 23.041 9.4.1.2.3 for GMS 1515 * and 9.4.4.2.3 for UMTS. 1516 * All other values must be treated as empty CBM data coding scheme. 1517 * 1518 * selected false means message types specified in <fromServiceId, toServiceId> 1519 * and <fromCodeScheme, toCodeScheme>are not accepted, while true means accepted. 1520 */ 1521struct GsmBroadcastSmsConfigInfo { 1522 int32_t fromServiceId; 1523 int32_t toServiceId; 1524 int32_t fromCodeScheme; 1525 int32_t toCodeScheme; 1526 bool selected; 1527}; 1528 1529struct CellIdentityGsm { 1530 string mcc; // 3-digit Mobile Country Code, 0..999, empty string if 1531 // unknown 1532 string mnc; // 2 or 3-digit Mobile Network Code, 0..999, empty string 1533 // if unknown 1534 int32_t lac; // 16-bit Location Area Code, 0..65535, INT_MAX if unknown 1535 int32_t cid; // 16-bit GSM Cell Identity described in 1536 // TS 27.007, 0..65535, INT_MAX if unknown 1537 int32_t arfcn; // 16-bit GSM Absolute RF channel number; this value must 1538 // be valid 1539 uint8_t bsic; // 6-bit Base Station Identity Code, 0xFF if unknown 1540}; 1541 1542struct CellIdentityWcdma { 1543 string mcc; // 3-digit Mobile Country Code, 0..999, empty string if 1544 // unknown 1545 string mnc; // 2 or 3-digit Mobile Network Code, 0..999, empty string 1546 // if unknown 1547 int32_t lac; // 16-bit Location Area Code, 0..65535, INT_MAX if unknown 1548 int32_t cid; // 28-bit UMTS Cell Identity described in 1549 // TS 25.331, 0..268435455, INT_MAX if unknown 1550 int32_t psc; // 9-bit UMTS Primary Scrambling Code described in 1551 // TS 25.331, 0..511; this value must be valid 1552 int32_t uarfcn; // 16-bit UMTS Absolute RF Channel Number; this value must 1553 // be valid 1554}; 1555 1556struct CellIdentityCdma { 1557 int32_t networkId; // Network Id 0..65535, INT_MAX if unknown 1558 int32_t systemId; // CDMA System Id 0..32767, INT_MAX if unknown 1559 int32_t baseStationId; // Base Station Id 0..65535, INT_MAX if unknown 1560 int32_t longitude; // Longitude is a decimal number as specified in 1561 // 3GPP2 C.S0005-A v6.0. It is represented in units of 1562 // 0.25 seconds and ranges from -2592000 to 2592000, 1563 // both values inclusive (corresponding to a range of -180 1564 // to +180 degrees). INT_MAX if unknown 1565 int32_t latitude; // Latitude is a decimal number as specified in 1566 // 3GPP2 C.S0005-A v6.0. It is represented in units of 1567 // 0.25 seconds and ranges from -1296000 to 1296000, 1568 // both values inclusive (corresponding to a range of -90 1569 // to +90 degrees). INT_MAX if unknown 1570}; 1571 1572struct CellIdentityLte { 1573 string mcc; // 3-digit Mobile Country Code, 0..999, empty string if 1574 // unknown 1575 string mnc; // 2 or 3-digit Mobile Network Code, 0..999, empty string 1576 // if unknown 1577 int32_t ci; // 28-bit Cell Identity described in TS TS 27.007, INT_MAX 1578 // if unknown 1579 int32_t pci; // physical cell id 0..503; this value must be valid 1580 int32_t tac; // 16-bit tracking area code, INT_MAX if unknown 1581 int32_t earfcn; // 18-bit LTE Absolute RF Channel Number; this value must 1582 // be valid 1583}; 1584 1585struct CellIdentityTdscdma { 1586 string mcc; // 3-digit Mobile Country Code, 0..999, empty string if 1587 // unknown 1588 string mnc; // 2 or 3-digit Mobile Network Code, 0..999, empty string 1589 // if unknown 1590 int32_t lac; // 16-bit Location Area Code, 0..65535, INT_MAX if 1591 // unknown 1592 int32_t cid; // 28-bit UMTS Cell Identity described in 1593 // TS 25.331, 0..268435455, INT_MAX if unknown 1594 int32_t cpid; // 8-bit Cell Parameters ID described in 1595 // TS 25.331, 0..127, INT_MAX if unknown 1596}; 1597 1598struct CellInfoGsm { 1599 CellIdentityGsm cellIdentityGsm; 1600 GsmSignalStrength signalStrengthGsm; 1601}; 1602 1603struct CellInfoWcdma { 1604 CellIdentityWcdma cellIdentityWcdma; 1605 WcdmaSignalStrength signalStrengthWcdma; 1606}; 1607 1608struct CellInfoCdma { 1609 CellIdentityCdma cellIdentityCdma; 1610 CdmaSignalStrength signalStrengthCdma; 1611 EvdoSignalStrength signalStrengthEvdo; 1612}; 1613 1614struct CellInfoLte { 1615 CellIdentityLte cellIdentityLte; 1616 LteSignalStrength signalStrengthLte; 1617}; 1618 1619struct CellInfoTdscdma { 1620 CellIdentityTdscdma cellIdentityTdscdma; 1621 TdScdmaSignalStrength signalStrengthTdscdma; 1622}; 1623 1624struct CellInfo { 1625 CellInfoType cellInfoType; // cell type for selecting from union CellInfo 1626 bool registered; // true if this cell is registered false if not registered 1627 TimeStampType timeStampType; // type of time stamp represented by timeStamp 1628 uint64_t timeStamp; // Time in nanos as returned by ril_nano_time 1629 // Only one of the below vectors must be of size 1 based on the CellInfoType and others must be 1630 // of size 0 1631 vec<CellInfoGsm> gsm; // Valid only if type = gsm and size = 1 else must be 1632 // empty 1633 vec<CellInfoCdma> cdma; // Valid only if type = cdma and size = 1 else must be 1634 // empty 1635 vec<CellInfoLte> lte; // Valid only if type = lte and size = 1 else must be 1636 // empty 1637 vec<CellInfoWcdma> wcdma; // Valid only if type = wcdma and size = 1 else must be 1638 // empty 1639 vec<CellInfoTdscdma> tdscdma; // Valid only if type = tdscdma and size = 1 else must be 1640 // empty 1641}; 1642 1643struct CellIdentity { 1644 CellInfoType cellInfoType; // cell type for selecting from union CellInfo 1645 // Only one of the below vectors must be of size 1, based on a valid CellInfoType and 1646 // others must be of size 0. If cell info type is NONE, then all the vectors 1647 // must be of size 0. 1648 vec<CellIdentityGsm> cellIdentityGsm; 1649 vec<CellIdentityWcdma> cellIdentityWcdma; 1650 vec<CellIdentityCdma> cellIdentityCdma; 1651 vec<CellIdentityLte> cellIdentityLte; 1652 vec<CellIdentityTdscdma> cellIdentityTdscdma; 1653}; 1654 1655struct VoiceRegStateResult { 1656 RegState regState; // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, 1657 // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, 1658 // UNKNOWN, REG_ROAMING defined in RegState 1659 int32_t rat; // indicates the available voice radio technology, 1660 // valid values as defined by RadioTechnology. 1661 bool cssSupported; // concurrent services support indicator. if 1662 // registered on a CDMA system. 1663 // false - Concurrent services not supported, 1664 // true - Concurrent services supported 1665 int32_t roamingIndicator; // TSB-58 Roaming Indicator if registered 1666 // on a CDMA or EVDO system or -1 if not. 1667 // Valid values are 0-255. 1668 int32_t systemIsInPrl; // indicates whether the current system is in the 1669 // PRL if registered on a CDMA or EVDO system or -1 if 1670 // not. 0=not in the PRL, 1=in the PRL 1671 int32_t defaultRoamingIndicator; // default Roaming Indicator from the PRL, 1672 // if registered on a CDMA or EVDO system or -1 if not. 1673 // Valid values are 0-255. 1674 int32_t reasonForDenial; // reasonForDenial if registration state is 3 1675 // (Registration denied) this is an enumerated reason why 1676 // registration was denied. See 3GPP TS 24.008, 1677 // 10.5.3.6 and Annex G. 1678 // 0 - General 1679 // 1 - Authentication Failure 1680 // 2 - IMSI unknown in HLR 1681 // 3 - Illegal MS 1682 // 4 - Illegal ME 1683 // 5 - PLMN not allowed 1684 // 6 - Location area not allowed 1685 // 7 - Roaming not allowed 1686 // 8 - No Suitable Cells in this Location Area 1687 // 9 - Network failure 1688 // 10 - Persistent location update reject 1689 // 11 - PLMN not allowed 1690 // 12 - Location area not allowed 1691 // 13 - Roaming not allowed in this Location Area 1692 // 15 - No Suitable Cells in this Location Area 1693 // 17 - Network Failure 1694 // 20 - MAC Failure 1695 // 21 - Sync Failure 1696 // 22 - Congestion 1697 // 23 - GSM Authentication unacceptable 1698 // 25 - Not Authorized for this CSG 1699 // 32 - Service option not supported 1700 // 33 - Requested service option not subscribed 1701 // 34 - Service option temporarily out of order 1702 // 38 - Call cannot be identified 1703 // 48-63 - Retry upon entry into a new cell 1704 // 95 - Semantically incorrect message 1705 // 96 - Invalid mandatory information 1706 // 97 - Message type non-existent or not implemented 1707 // 98 - Message type not compatible with protocol state 1708 // 99 - Information element non-existent or not implemented 1709 // 100 - Conditional IE error 1710 // 101 - Message not compatible with protocol state 1711 // 111 - Protocol error, unspecified 1712 CellIdentity cellIdentity; 1713}; 1714 1715struct DataRegStateResult { 1716 RegState regState; // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, 1717 // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, 1718 // UNKNOWN, REG_ROAMING defined in RegState 1719 int32_t rat; // indicates the available data radio technology, 1720 // valid values as defined by RadioTechnology. 1721 int32_t reasonDataDenied; // if registration state is 3 (Registration 1722 // denied) this is an enumerated reason why 1723 // registration was denied. See 3GPP TS 24.008, 1724 // Annex G.6 "Additional cause codes for GMM". 1725 // 7 == GPRS services not allowed 1726 // 8 == GPRS services and non-GPRS services not allowed 1727 // 9 == MS identity cannot be derived by the network 1728 // 10 == Implicitly detached 1729 // 14 == GPRS services not allowed in this PLMN 1730 // 16 == MSC temporarily not reachable 1731 // 40 == No PDP context activated 1732 int32_t maxDataCalls; // The maximum number of simultaneous Data Calls that 1733 // must be established using setupDataCall(). 1734 CellIdentity cellIdentity; 1735}; 1736 1737struct GsmSmsMessage { 1738 string smscPdu; // SMSC address in GSM BCD format prefixed by a length 1739 // byte (as expected by TS 27.005) or empty string for 1740 // default SMSC 1741 string pdu; // SMS in PDU format as an ASCII hex string less the 1742 // SMSC address. TP-Layer-Length is be "strlen(pdu)/2 1743}; 1744 1745struct ImsSmsMessage { 1746 RadioTechnologyFamily tech; 1747 bool retry; // false == not retry, true == retry */ 1748 int32_t messageRef; // Valid field if retry is set to true. 1749 // Contains messageRef from SendSmsResult struct 1750 // corresponding to failed MO SMS. 1751 // Only one of the below vectors must be of size 1 based on the RadioTechnologyFamily and others 1752 // must be of size 0 1753 vec<CdmaSmsMessage> cdmaMessage; // Valid field if tech is 3GPP2 and size = 1 else must be 1754 // empty 1755 vec<GsmSmsMessage> gsmMessage; // Valid field if tech is 3GPP and size = 1 else must be 1756 // empty 1757}; 1758 1759struct SimApdu { 1760 int32_t sessionId; // "sessionid" from TS 27.007 +CGLA command. Must be 1761 // ignored for +CSIM command. 1762 // Following fields are used to derive the APDU ("command" and "length" 1763 // values in TS 27.007 +CSIM and +CGLA commands). 1764 int32_t cla; 1765 int32_t instruction; 1766 int32_t p1; 1767 int32_t p2; 1768 int32_t p3; // A negative P3 implies a 4 byte APDU. 1769 string data; // In hex string format ([a-fA-F0-9]*). 1770}; 1771 1772struct NvWriteItem { 1773 NvItem itemId; 1774 string value; 1775}; 1776 1777struct SelectUiccSub { 1778 int32_t slot; 1779 int32_t appIndex; // array subscriptor from 1780 // applications[RadioConst:CARD_MAX_APPS] in 1781 // getIccCardStatus() 1782 SubscriptionType subType; 1783 UiccSubActStatus actStatus; 1784}; 1785 1786struct HardwareConfigModem { 1787 int32_t rilModel; 1788 uint32_t rat; // bitset - ref. RadioTechnology. 1789 int32_t maxVoice; 1790 int32_t maxData; 1791 int32_t maxStandby; 1792}; 1793 1794struct HardwareConfigSim { 1795 string modemUuid; // RadioConst:MAX_UUID_LENGTH is max length of the string 1796}; 1797 1798struct HardwareConfig { 1799 HardwareConfigType type; 1800 string uuid; // RadioConst:MAX_UUID_LENGTH is max length of the string 1801 HardwareConfigState state; 1802 1803 // Only one of the below vectors must have size = 1 based on the HardwareConfigType and other 1804 // must have size = 0. 1805 vec<HardwareConfigModem> modem; // Valid only if type is Modem and size = 1 else must be 1806 // empty 1807 vec<HardwareConfigSim> sim; // Valid only if type is SIM or else empty and size = 1 1808 // else must be empty 1809}; 1810 1811struct DataProfileInfo { 1812 DataProfileId profileId; // id of the data profile 1813 string apn; // The APN to connect to 1814 string protocol; // One of the PDP_type values in TS 27.007 section 10.1.1. 1815 // For example, "IP", "IPV6", "IPV4V6", or "PPP". 1816 string roamingProtocol; // one of the PDP_type values in TS 27.007 section 10.1.1 1817 // used on roaming network. For example, "IP", "IPV6", 1818 // "IPV4V6", or "PPP". 1819 ApnAuthType authType; // APN authentication type 1820 string user; // The username for APN, or empty string 1821 string password; // The password for APN, or empty string 1822 DataProfileInfoType type; // Data profile technology type 1823 int32_t maxConnsTime; // The period in seconds to limit the maximum connections 1824 int32_t maxConns; // The maximum connections during maxConnsTime 1825 int32_t waitTime; // The required wait time in seconds after a successful UE 1826 // initiated disconnect of a given PDN connection before 1827 // the device can send a new PDN connection request for 1828 // that given PDN 1829 bool enabled; // True to enable the profile, false to disable 1830 bitfield<ApnTypes> supportedApnTypesBitmap; // Supported APN types bitmap. See ApnTypes for the 1831 // value of each bit. 1832 bitfield<RadioAccessFamily> bearerBitmap; // The bearer bitmap. See RadioAccessFamily for the 1833 // value of each bit. 1834 int32_t mtu; // Maximum transmission unit (MTU) size in bytes 1835 MvnoType mvnoType; // The MVNO matching data type 1836 string mvnoMatchData; // MVNO matching data. This is defined by the carrier. 1837 // For example, 1838 // SPN like: "A MOBILE", "BEN NL", etc... 1839 // IMSI like: "302720x94", "2060188", etc... 1840 // GID like: "4E", "33", etc... 1841}; 1842 1843struct RadioCapability { 1844 int32_t session; // Unique session value defined by framework returned in 1845 // all "responses/unsol" 1846 RadioCapabilityPhase phase; 1847 bitfield<RadioAccessFamily> raf; // 32-bit bitmap of RadioAccessFamily 1848 string logicalModemUuid; // A UUID typically "com.xxxx.lmX where X is the logical 1849 // modem. RadioConst:MAX_UUID_LENGTH is the max 1850 // length 1851 RadioCapabilityStatus status; 1852}; 1853 1854struct LceStatusInfo { 1855 LceStatus lceStatus; 1856 uint8_t actualIntervalMs; // actual LCE reporting interval, 1857 // meaningful only if LceStatus = ACTIVE. 1858}; 1859 1860struct LceDataInfo { 1861 uint32_t lastHopCapacityKbps; // last-hop cellular capacity: kilobits/second. 1862 uint8_t confidenceLevel; // capacity estimate confidence: 0-100 1863 bool lceSuspended; // LCE report going to be suspended? (e.g., radio 1864 // moves to inactive state or network type change) 1865 // true = suspended; 1866 // false = not suspended. 1867}; 1868 1869struct ActivityStatsInfo { 1870 uint32_t sleepModeTimeMs; // total time (in ms) when modem is in a low power or 1871 // sleep state 1872 uint32_t idleModeTimeMs; // total time (in ms) when modem is awake but neither 1873 // the transmitter nor receiver are active/awake 1874 uint32_t[RadioConst:NUM_TX_POWER_LEVELS] txmModetimeMs; 1875 // Each index represent total time (in ms) during which 1876 // the transmitter is active/awake for a particular 1877 // power range as shown below. 1878 // index 0 = tx_power < 0dBm 1879 // index 1 = 0dBm < tx_power < 5dBm 1880 // index 2 = 5dBm < tx_power < 15dBm 1881 // index 3 = 15dBm < tx_power < 20dBm 1882 // index 4 = tx_power > 20dBm 1883 uint32_t rxModeTimeMs; // total time (in ms) for which receiver is 1884 // active/awake and the transmitter is inactive 1885}; 1886 1887struct Carrier { 1888 string mcc; 1889 string mnc; 1890 CarrierMatchType matchType; // Specify match type for the carrier. 1891 // If it’s ALL, matchData is empty string; 1892 // otherwise, matchData is the value for the match type. 1893 string matchData; 1894}; 1895 1896struct CarrierRestrictions { 1897 vec<Carrier> allowedCarriers; // Allowed carriers 1898 vec<Carrier> excludedCarriers; // Explicitly excluded carriers 1899 // which match allowed_carriers. Eg. allowedCarriers 1900 // match mcc/mnc, excludedCarriers has same mcc/mnc and 1901 // gid1 is ABCD. It means except the carrier whose gid1 1902 // is ABCD, all carriers with the same mcc/mnc are 1903 // allowed. 1904}; 1905 1906struct SuppSvcNotification { 1907 bool isMT; // notification type 1908 // false = MO intermediate result code 1909 // true = MT unsolicited result code 1910 int32_t code; // result code. See 27.007 7.17. 1911 int32_t index; // CUG index. See 27.007 7.17. 1912 int32_t type; // "type" from 27.007 7.17 (MT only). 1913 string number; // "number" from 27.007 7.17 1914 // (MT only, may be empty string). 1915}; 1916 1917struct SimRefreshResult { 1918 SimRefreshType type; 1919 int32_t efId; // is the EFID of the updated file if the result is 1920 // SIM_FILE_UPDATE or 0 for any other result. 1921 string aid; // is AID(application ID) of the card application 1922 // See ETSI 102.221 8.1 and 101.220 4 1923 // For SIM_FILE_UPDATE result it must be set to AID of 1924 // application in which updated EF resides or it must be 1925 // empty string if EF is outside of an application. 1926 // For SIM_INIT result this field is set to AID of 1927 // application that caused REFRESH 1928 // For SIM_RESET result it is empty string. 1929}; 1930 1931/** CDMA Signal Information Record as defined in C.S0005 section 3.7.5.5 */ 1932struct CdmaSignalInfoRecord { 1933 bool isPresent; // true if signal information record is present 1934 int8_t signalType; // as defined 3.7.5.5-1 1935 int8_t alertPitch; // as defined 3.7.5.5-2 1936 int8_t signal; // as defined 3.7.5.5-3, 3.7.5.5-4 or 3.7.5.5-5 1937}; 1938 1939struct CdmaCallWaiting { 1940 string number; // Remote party number 1941 CdmaCallWaitingNumberPresentation numberPresentation; 1942 string name; // Remote party name 1943 CdmaSignalInfoRecord signalInfoRecord; 1944 // Number type/Number plan required to support International Call Waiting 1945 CdmaCallWaitingNumberType numberType; 1946 CdmaCallWaitingNumberPlan numberPlan; 1947}; 1948 1949/** 1950 * Display Info Rec as defined in C.S0005 section 3.7.5.1 1951 * Extended Display Info Rec as defined in C.S0005 section 3.7.5.16 1952 * Note: the Extended Display info rec contains multiple records of the 1953 * form: display_tag, display_len, and display_len occurrences of the 1954 * char field if the display_tag is not 10000000 or 10000001. 1955 * To save space, the records are stored consecutively in a byte buffer. 1956 * The display_tag, display_len and chari fields are all 1 byte. 1957 */ 1958struct CdmaDisplayInfoRecord { 1959 string alphaBuf; // Max length = RadioConst:CDMA_ALPHA_INFO_BUFFER_LENGTH 1960}; 1961 1962/** 1963 * Called Party Number Info Rec as defined in C.S0005 section 3.7.5.2 1964 * Calling Party Number Info Rec as defined in C.S0005 section 3.7.5.3 1965 * Connected Number Info Rec as defined in C.S0005 section 3.7.5.4 1966 */ 1967struct CdmaNumberInfoRecord { 1968 string number; // Max length = RADIP_CDMA_NUMBER_INFO_BUFFER_LENGTH 1969 uint8_t numberType; 1970 uint8_t numberPlan; 1971 uint8_t pi; 1972 uint8_t si; 1973}; 1974 1975struct CdmaRedirectingNumberInfoRecord{ 1976 CdmaNumberInfoRecord redirectingNumber; 1977 CdmaRedirectingReason redirectingReason; // redirectingReason is set to UNKNOWN if not included 1978}; 1979 1980/** Line Control Information Record as defined in C.S0005 section 3.7.5.15 */ 1981struct CdmaLineControlInfoRecord { 1982 uint8_t lineCtrlPolarityIncluded; 1983 uint8_t lineCtrlToggle; 1984 uint8_t lineCtrlReverse; 1985 uint8_t lineCtrlPowerDenial; 1986}; 1987 1988/** T53 CLIR Information Record */ 1989struct CdmaT53ClirInfoRecord { 1990 uint8_t cause; 1991}; 1992 1993/** T53 Audio Control Information Record */ 1994struct CdmaT53AudioControlInfoRecord { 1995 uint8_t upLink; 1996 uint8_t downLink; 1997}; 1998 1999struct CdmaInformationRecord { 2000 CdmaInfoRecName name; 2001 // Only one of the below vectors must have size = 1 based on the 2002 // CdmaInfoRecName. All other vectors must have size 0. 2003 vec<CdmaDisplayInfoRecord> display; // Display and Extended Display Info Rec 2004 vec<CdmaNumberInfoRecord> number; // Called Party Number, Calling Party Number, Connected 2005 // number Info Rec 2006 vec<CdmaSignalInfoRecord> signal; // Signal Info Rec 2007 vec<CdmaRedirectingNumberInfoRecord> redir; // Redirecting Number Info Rec 2008 vec<CdmaLineControlInfoRecord> lineCtrl; // Line Control Info Rec 2009 vec<CdmaT53ClirInfoRecord> clir; // T53 CLIR Info Rec 2010 vec<CdmaT53AudioControlInfoRecord> audioCtrl; // T53 Audio Control Info Rec 2011}; 2012 2013struct CdmaInformationRecords { 2014 vec<CdmaInformationRecord> infoRec; // Max length = RadioConst:CDMA_MAX_NUMBER_OF_INFO_RECS 2015}; 2016 2017struct CfData { 2018 vec<CallForwardInfo> cfInfo; // This is the response data 2019 // for SS request to query call 2020 // forward status. see getCallForwardStatus() 2021 // Max size = RadioConst:NUM_SERVICE_CLASSES 2022}; 2023 2024struct SsInfoData { 2025 vec<int32_t> ssInfo; // This is the response data for all of the SS GET/SET 2026 // Radio requests. E.g. IRadio.getClir() returns 2027 // two ints, so first two values of ssInfo[] will be 2028 // used for response if serviceType is SS_CLIR and 2029 // requestType is SS_INTERROGATION 2030 // Max size = RadioConst:SS_INFO_MAX 2031}; 2032 2033struct StkCcUnsolSsResult { 2034 SsServiceType serviceType; 2035 SsRequestType requestType; 2036 SsTeleserviceType teleserviceType; 2037 bitfield<SuppServiceClass> serviceClass; 2038 RadioError result; 2039 // Only one of the below vectors may contain values and other must be empty 2040 vec<SsInfoData> ssInfo; // Valid only for all SsServiceType except 2041 // SsServiceType:CF_* else empty. 2042 vec<CfData> cfData; // Valid for SsServiceType:CF_* else empty 2043}; 2044 2045struct PcoDataInfo { 2046 int32_t cid; // Context ID, uniquely identifies this call 2047 string bearerProto; // One of the PDP_type values in TS 27.007 section 10.1.1. 2048 // For example, "IP", "IPV6", "IPV4V6" 2049 int32_t pcoId; // The protocol ID for this box. Note that only IDs from 2050 // FF00H - FFFFH are accepted. If more than one is 2051 // included from the network, multiple calls must be made 2052 // to send all of them. 2053 vec<uint8_t> contents; // Carrier-defined content. It is binary, opaque and 2054 // loosely defined in LTE Layer 3 spec 24.008 2055}; 2056