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 17syntax = "proto2"; 18 19package clearcut.connectivity; 20 21option java_package = "com.android.internal.telephony"; 22option java_outer_classname = "TelephonyProto"; 23 24// The information about Telephony events. 25message TelephonyLog { 26 27 // Events logged by telephony services 28 repeated TelephonyEvent events = 1; 29 30 // Voice/Video call sessions 31 repeated TelephonyCallSession call_sessions = 2; 32 33 // Send/Receive SMS sessions 34 repeated SmsSession sms_sessions = 3; 35 36 // Telephony Histograms 37 repeated TelephonyHistogram histograms = 4; 38 39 // Indicating some telephony events are dropped 40 optional bool events_dropped = 5; 41 42 // The start time of this log 43 optional Time start_time = 6; 44 45 // The end time of this log 46 optional Time end_time = 7; 47 48 // Modem power stats 49 optional ModemPowerStats modem_power_stats = 8; 50} 51 52// The time information 53message Time { 54 // The system time in milli seconds. This represents the actual 55 // time of the events. 56 optional int64 system_timestamp_millis = 1; 57 58 // The time since boot in milli seconds. 59 // This is used for calculating the time interval between events. Different 60 // from the system time, this won't be affected by time changed by the network or users. 61 optional int64 elapsed_timestamp_millis = 2; 62} 63 64// Telephony Histogram 65message TelephonyHistogram { 66 67 // Type of histogram 68 optional int32 category = 1; 69 70 // Unique Id identifying a sample within 71 // particular category of the histogram. 72 optional int32 id = 2; 73 74 // Min time taken in millis. 75 optional int32 min_time_millis = 3; 76 77 // Max time taken in millis. 78 optional int32 max_time_millis = 4; 79 80 // Average time taken in millis. 81 optional int32 avg_time_millis = 5; 82 83 // Total count of histogram samples. 84 optional int32 count = 6; 85 86 // Total number of time ranges expected 87 // (must be greater than 1). 88 optional int32 bucket_count = 7; 89 90 // Array storing endpoints of range buckets. 91 repeated int32 bucket_end_points = 8; 92 93 // Array storing counts for each time range 94 // starting from smallest value range. 95 repeated int32 bucket_counters = 9; 96} 97 98// Telephony related user settings 99message TelephonySettings { 100 101 // NETWORK_MODE_* See ril.h PREF_NET_TYPE_XXXX 102 enum RilNetworkMode { 103 104 // Mode is unknown. 105 NETWORK_MODE_UNKNOWN = 0; 106 107 // GSM/WCDMA (WCDMA preferred). Note the following values are all off by 1. 108 NETWORK_MODE_WCDMA_PREF = 1; 109 110 // GSM only 111 NETWORK_MODE_GSM_ONLY = 2; 112 113 // WCDMA only 114 NETWORK_MODE_WCDMA_ONLY = 3; 115 116 // GSM/WCDMA (auto mode, according to PRL) 117 NETWORK_MODE_GSM_UMTS = 4; 118 119 // CDMA and EvDo (auto mode, according to PRL) 120 NETWORK_MODE_CDMA = 5; 121 122 // CDMA only 123 NETWORK_MODE_CDMA_NO_EVDO = 6; 124 125 // EvDo only 126 NETWORK_MODE_EVDO_NO_CDMA = 7; 127 128 // GSM/WCDMA, CDMA, and EvDo (auto mode, according to PRL) 129 NETWORK_MODE_GLOBAL = 8; 130 131 // LTE, CDMA and EvDo 132 NETWORK_MODE_LTE_CDMA_EVDO = 9; 133 134 // LTE, GSM/WCDMA 135 NETWORK_MODE_LTE_GSM_WCDMA = 10; 136 137 // LTE, CDMA, EvDo, GSM/WCDMA 138 NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA = 11; 139 140 // LTE Only mode 141 NETWORK_MODE_LTE_ONLY = 12; 142 143 // LTE/WCDMA 144 NETWORK_MODE_LTE_WCDMA = 13; 145 146 // TD-SCDMA only 147 NETWORK_MODE_TDSCDMA_ONLY = 14; 148 149 // TD-SCDMA and WCDMA 150 NETWORK_MODE_TDSCDMA_WCDMA = 15; 151 152 // TD-SCDMA and LTE 153 NETWORK_MODE_LTE_TDSCDMA = 16; 154 155 // TD-SCDMA and GSM 156 NETWORK_MODE_TDSCDMA_GSM = 17; 157 158 // TD-SCDMA,GSM and LTE 159 NETWORK_MODE_LTE_TDSCDMA_GSM = 18; 160 161 // TD-SCDMA, GSM/WCDMA 162 NETWORK_MODE_TDSCDMA_GSM_WCDMA = 19; 163 164 // TD-SCDMA, WCDMA and LTE 165 NETWORK_MODE_LTE_TDSCDMA_WCDMA = 20; 166 167 // TD-SCDMA, GSM/WCDMA and LTE 168 NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = 21; 169 170 // TD-SCDMA,EvDo,CDMA,GSM/WCDMA 171 NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22; 172 173 // TD-SCDMA/LTE/GSM/WCDMA, CDMA, and EvDo 174 NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 23; 175 } 176 177 // Constants for WiFi Calling mode 178 enum WiFiCallingMode { 179 180 // Calling mode is unknown. 181 WFC_MODE_UNKNOWN = 0; 182 183 WFC_MODE_WIFI_ONLY = 1; 184 185 WFC_MODE_CELLULAR_PREFERRED = 2; 186 187 WFC_MODE_WIFI_PREFERRED = 3; 188 } 189 190 // If the device is in airplane mode. 191 optional bool is_airplane_mode = 1; 192 193 // If cell-data has been enabled. 194 optional bool is_cellular_data_enabled = 2; 195 196 // If cell-roaming has been enabled. 197 optional bool is_data_roaming_enabled = 3; 198 199 // Preferred network mode. 200 optional RilNetworkMode preferred_network_mode = 4; 201 202 // If enhanced mode enabled. 203 optional bool is_enhanced_4g_lte_mode_enabled = 5; 204 205 // If wifi has been enabled. 206 optional bool is_wifi_enabled = 6; 207 208 // If wifi-calling has been enabled. 209 optional bool is_wifi_calling_enabled = 7; 210 211 // Wifi-calling Mode. 212 optional WiFiCallingMode wifi_calling_mode = 8; 213 214 // If video over LTE enabled. 215 optional bool is_vt_over_lte_enabled = 9; 216 217 // If video over wifi enabled. 218 optional bool is_vt_over_wifi_enabled = 10; 219} 220 221// Contains phone state and service related information. 222message TelephonyServiceState { 223 224 // The information about cellular network operator 225 message TelephonyOperator { 226 227 // Name in long alphanumeric format 228 optional string alpha_long = 1; 229 230 // Name in short alphanumeric format 231 optional string alpha_short = 2; 232 233 // Numeric id. 234 // In GSM/UMTS, numeric format is 3 digit country code plus 2 or 3 digit 235 // network code. Same as MCC/MNC. 236 optional string numeric = 3; 237 } 238 239 // Roaming type 240 enum RoamingType { 241 242 // Unknown. The default value. Different from ROAMING_TYPE_UNKNOWN. 243 UNKNOWN = -1; 244 245 // In home network 246 ROAMING_TYPE_NOT_ROAMING = 0; 247 248 // In a roaming network, but we can not tell 249 // if it's domestic or international 250 ROAMING_TYPE_UNKNOWN = 1; 251 252 // In domestic roaming network 253 ROAMING_TYPE_DOMESTIC = 2; 254 255 // In international roaming network 256 ROAMING_TYPE_INTERNATIONAL = 3; 257 } 258 259 // Current registered operator 260 optional TelephonyOperator voice_operator = 1; 261 262 // Current registered data network operator 263 optional TelephonyOperator data_operator = 2; 264 265 // Current voice network roaming type 266 optional RoamingType voice_roaming_type = 3 [default = UNKNOWN]; 267 268 // Current data network roaming type 269 optional RoamingType data_roaming_type = 4 [default = UNKNOWN]; 270 271 // Current voice radio technology 272 optional RadioAccessTechnology voice_rat = 5 [default = UNKNOWN]; 273 274 // Current data radio technology 275 optional RadioAccessTechnology data_rat = 6 [default = UNKNOWN]; 276} 277 278// Radio access families 279enum RadioAccessTechnology { 280 281 // This is the default value. Different from RAT_UNKNOWN. 282 UNKNOWN = -1; 283 284 // Airplane mode, out of service, or when the modem cannot determine 285 // the RAT. 286 RAT_UNKNOWN = 0; 287 288 RAT_GPRS = 1; 289 290 RAT_EDGE = 2; 291 292 RAT_UMTS = 3; 293 294 RAT_IS95A = 4; 295 296 RAT_IS95B = 5; 297 298 RAT_1XRTT = 6; 299 300 RAT_EVDO_0 = 7; 301 302 RAT_EVDO_A = 8; 303 304 RAT_HSDPA = 9; 305 306 RAT_HSUPA = 10; 307 308 RAT_HSPA = 11; 309 310 RAT_EVDO_B = 12; 311 312 RAT_EHRPD = 13; 313 314 RAT_LTE = 14; 315 316 RAT_HSPAP = 15; 317 318 RAT_GSM = 16; 319 320 RAT_TD_SCDMA = 17; 321 322 RAT_IWLAN = 18; 323 324 RAT_LTE_CA = 19; 325} 326 327// The information about IMS errors 328// https://cs.corp.google.com/#android/frameworks/base/telephony/java/com/android/ims/ImsReasonInfo.java 329message ImsReasonInfo { 330 331 // Main reason code. 332 optional int32 reason_code = 1; 333 334 // Extra code value; it depends on the code value. 335 optional int32 extra_code = 2; 336 337 // Additional message of the reason info. We get this from the modem. 338 optional string extra_message = 3; 339} 340 341// The information about state connection between IMS service and IMS server 342message ImsConnectionState { 343 344 // Current state 345 optional State state = 1; 346 347 // If DISCONNECTED then this field may have additional information about 348 // connection problem. 349 optional ImsReasonInfo reason_info = 2; 350 351 // Posible states 352 enum State { 353 354 // State is unknown. 355 STATE_UNKNOWN = 0; 356 357 CONNECTED = 1; 358 359 PROGRESSING = 2; 360 361 DISCONNECTED = 3; 362 363 RESUMED = 4; 364 365 SUSPENDED = 5; 366 } 367} 368 369// The information about current capabilities of IMS service 370message ImsCapabilities { 371 372 optional bool voice_over_lte = 1; 373 374 optional bool voice_over_wifi = 2; 375 376 optional bool video_over_lte = 3; 377 378 optional bool video_over_wifi = 4; 379 380 optional bool ut_over_lte = 5; 381 382 optional bool ut_over_wifi = 6; 383} 384 385// Errors returned by RIL 386enum RilErrno { 387 388 // type is unknown. 389 RIL_E_UNKNOWN = 0; 390 391 // Note the following values are all off by 1. 392 RIL_E_SUCCESS = 1; 393 394 // If radio did not start or is resetting 395 RIL_E_RADIO_NOT_AVAILABLE = 2; 396 397 RIL_E_GENERIC_FAILURE = 3; 398 399 // for PIN/PIN2 methods only! 400 RIL_E_PASSWORD_INCORRECT = 4; 401 402 // Operation requires SIM PIN2 to be entered 403 RIL_E_SIM_PIN2 = 5; 404 405 // Operation requires SIM PIN2 to be entered 406 RIL_E_SIM_PUK2 = 6; 407 408 RIL_E_REQUEST_NOT_SUPPORTED = 7; 409 410 RIL_E_CANCELLED = 8; 411 412 // data ops are not allowed during voice call on a Class C GPRS device 413 RIL_E_OP_NOT_ALLOWED_DURING_VOICE_CALL = 9; 414 415 // data ops are not allowed before device registers in network 416 RIL_E_OP_NOT_ALLOWED_BEFORE_REG_TO_NW = 10; 417 418 // fail to send sms and need retry 419 RIL_E_SMS_SEND_FAIL_RETRY = 11; 420 421 // fail to set the location where CDMA subscription shall be retrieved 422 // because of SIM or RUIM card absent 423 RIL_E_SIM_ABSENT = 12; 424 425 // fail to find CDMA subscription from specified location 426 RIL_E_SUBSCRIPTION_NOT_AVAILABLE = 13; 427 428 // HW does not support preferred network type 429 RIL_E_MODE_NOT_SUPPORTED = 14; 430 431 // command failed because recipient is not on FDN list 432 RIL_E_FDN_CHECK_FAILURE = 15; 433 434 // network selection failed due to illegal SIM or ME 435 RIL_E_ILLEGAL_SIM_OR_ME = 16; 436 437 // no logical channel available 438 RIL_E_MISSING_RESOURCE = 17; 439 440 // application not found on SIM 441 RIL_E_NO_SUCH_ELEMENT = 18; 442 443 // DIAL request modified to USSD 444 RIL_E_DIAL_MODIFIED_TO_USSD = 19; 445 446 // DIAL request modified to SS 447 RIL_E_DIAL_MODIFIED_TO_SS = 20; 448 449 // DIAL request modified to DIAL with different data 450 RIL_E_DIAL_MODIFIED_TO_DIAL = 21; 451 452 // USSD request modified to DIAL 453 RIL_E_USSD_MODIFIED_TO_DIAL = 22; 454 455 // USSD request modified to SS 456 RIL_E_USSD_MODIFIED_TO_SS = 23; 457 458 // USSD request modified to different USSD request 459 RIL_E_USSD_MODIFIED_TO_USSD = 24; 460 461 // SS request modified to DIAL 462 RIL_E_SS_MODIFIED_TO_DIAL = 25; 463 464 // SS request modified to USSD 465 RIL_E_SS_MODIFIED_TO_USSD = 26; 466 467 // Subscription not supported by RIL 468 RIL_E_SUBSCRIPTION_NOT_SUPPORTED = 27; 469 470 // SS request modified to different SS request 471 RIL_E_SS_MODIFIED_TO_SS = 28; 472 473 // LCE service not supported(36 in RILConstants.java. This is a mistake. 474 // The value should be off by 1 ideally.) 475 RIL_E_LCE_NOT_SUPPORTED = 36 [deprecated=true]; 476 477 // LCE service not supported 478 RIL_E_LCE_NOT_SUPPORTED_NEW = 37; 479 480 // Not sufficient memory to process the request 481 RIL_E_NO_MEMORY = 38; 482 483 // Modem hit unexpected error scenario while handling this request 484 RIL_E_INTERNAL_ERR = 39; 485 486 // Hit platform or system error 487 RIL_E_SYSTEM_ERR = 40; 488 489 // Vendor RIL got unexpected or incorrect response from modem for this request 490 RIL_E_MODEM_ERR = 41; 491 492 // Unexpected request for the current state 493 RIL_E_INVALID_STATE = 42; 494 495 // Not sufficient resource to process the request 496 RIL_E_NO_RESOURCES = 43; 497 498 // Received error from SIM card 499 RIL_E_SIM_ERR = 44; 500 501 // Received invalid arguments in request 502 RIL_E_INVALID_ARGUMENTS = 45; 503 504 // Cannot process the request in current SIM state 505 RIL_E_INVALID_SIM_STATE = 46; 506 507 // Cannot process the request in current Modem state 508 RIL_E_INVALID_MODEM_STATE = 47; 509 510 // Received invalid call id in request 511 RIL_E_INVALID_CALL_ID = 48; 512 513 // ACK received when there is no SMS to ack 514 RIL_E_NO_SMS_TO_ACK = 49; 515 516 // Received error from network 517 RIL_E_NETWORK_ERR = 50; 518 519 // Operation denied due to overly-frequent requests 520 RIL_E_REQUEST_RATE_LIMITED = 51; 521 522 // SIM is busy 523 RIL_E_SIM_BUSY = 52; 524 525 // The target EF is full 526 RIL_E_SIM_FULL = 53; 527 528 // Request is rejected by network 529 RIL_E_NETWORK_REJECT = 54; 530 531 // Not allowed the request now 532 RIL_E_OPERATION_NOT_ALLOWED = 55; 533 534 // The request record is empty 535 RIL_E_EMPTY_RECORD = 56; 536 537 // Invalid sms format 538 RIL_E_INVALID_SMS_FORMAT = 57; 539 540 // Message not encoded properly 541 RIL_E_ENCODING_ERR = 58; 542 543 // SMSC address specified is invalid 544 RIL_E_INVALID_SMSC_ADDRESS = 59; 545 546 // No such entry present to perform the request 547 RIL_E_NO_SUCH_ENTRY = 60; 548 549 // Network is not ready to perform the request 550 RIL_E_NETWORK_NOT_READY = 61; 551 552 // Device does not have this value provisioned 553 RIL_E_NOT_PROVISIONED = 62; 554 555 // Device does not have subscription 556 RIL_E_NO_SUBSCRIPTION = 63; 557 558 // Network cannot be found 559 RIL_E_NO_NETWORK_FOUND = 64; 560 561 // Operation cannot be performed because the device is currently in use 562 RIL_E_DEVICE_IN_USE = 65; 563 564 // Operation aborted 565 RIL_E_ABORTED = 66; 566 567 // Invalid response sent by vendor code 568 RIL_E_INVALID_RESPONSE = 67; 569} 570 571// PDP_type values in TS 27.007 section 10.1.1. 572enum PdpType { 573 574 // type is unknown. 575 PDP_UNKNOWN = 0; 576 577 PDP_TYPE_IP = 1; 578 579 PDP_TYPE_IPV6 = 2; 580 581 PDP_TYPE_IPV4V6 = 3; 582 583 PDP_TYPE_PPP = 4; 584} 585 586// The information about packet data connection 587message RilDataCall { 588 589 // Context ID, uniquely identifies this call 590 optional int32 cid = 1; 591 592 // One of the PDP_type values in TS 27.007 section 10.1.1 593 optional PdpType type = 2; 594 595 // The network interface name e.g. wlan0, rmnet_data0. 596 optional string iframe = 3; 597} 598 599message TelephonyEvent { 600 601 enum Type { 602 603 // Unknown event 604 UNKNOWN = 0; 605 606 // Telephony related user settings changed 607 SETTINGS_CHANGED = 1; 608 609 // Phone state changed 610 RIL_SERVICE_STATE_CHANGED = 2; 611 612 // IMS connected/disconnected 613 IMS_CONNECTION_STATE_CHANGED = 3; 614 615 // IMS Voice, Video and Ut capabilities changed 616 IMS_CAPABILITIES_CHANGED = 4; 617 618 // Setup a packet data connection 619 DATA_CALL_SETUP = 5; 620 621 // RIL request result 622 DATA_CALL_SETUP_RESPONSE = 6; 623 624 // Notification that new data call has appeared in the list 625 // or old data call has removed. 626 DATA_CALL_LIST_CHANGED = 7; 627 628 // Deactivate packet data connection 629 DATA_CALL_DEACTIVATE = 8; 630 631 // RIL request result 632 DATA_CALL_DEACTIVATE_RESPONSE = 9; 633 634 // Logging a data stall + its action 635 DATA_STALL_ACTION = 10; 636 637 // Modem Restarted. Logging a baseband version and reason for restart 638 // along with the event if it is available 639 MODEM_RESTART = 11; 640 641 // System time overwritten by NITZ (Network time) 642 NITZ_TIME = 12; 643 644 // Carrier Identification Matching Event 645 CARRIER_ID_MATCHING = 13; 646 647 // Carrier Key Change event. 648 CARRIER_KEY_CHANGED = 14; 649 } 650 651 // Setup a packet data connection 652 message RilSetupDataCall { 653 654 // See ril.h RIL_REQUEST_SETUP_DATA_CALL 655 enum RilDataProfile { 656 657 // type is unknown. 658 RIL_DATA_UNKNOWN = 0; 659 660 RIL_DATA_PROFILE_DEFAULT = 1; 661 662 RIL_DATA_PROFILE_TETHERED = 2; 663 664 RIL_DATA_PROFILE_IMS = 3; 665 666 RIL_DATA_PROFILE_FOTA = 4; 667 668 RIL_DATA_PROFILE_CBS = 5; 669 670 RIL_DATA_PROFILE_OEM_BASE = 6; 671 672 RIL_DATA_PROFILE_INVALID = 7; 673 } 674 675 // Radio technology to use 676 optional RadioAccessTechnology rat = 1 [default = UNKNOWN]; 677 678 // optional RIL_DataProfile 679 optional RilDataProfile data_profile = 2; 680 681 // APN to connect to if radio technology is GSM/UMTS 682 optional string apn = 3; 683 684 // the connection type to request 685 optional PdpType type = 4; 686 } 687 688 // RIL response to RilSetupDataCall 689 message RilSetupDataCallResponse { 690 691 // Copy of enum RIL_DataCallFailCause defined at ril.h 692 enum RilDataCallFailCause { 693 694 // Failure reason is unknown. 695 PDP_FAIL_UNKNOWN = 0; 696 697 // No error, connection ok 698 PDP_FAIL_NONE = 1; 699 700 PDP_FAIL_OPERATOR_BARRED = 8; 701 702 PDP_FAIL_NAS_SIGNALLING = 14; 703 704 PDP_FAIL_LLC_SNDCP = 25; 705 706 PDP_FAIL_INSUFFICIENT_RESOURCES = 26; 707 708 PDP_FAIL_MISSING_UKNOWN_APN = 27; 709 710 PDP_FAIL_UNKNOWN_PDP_ADDRESS_TYPE = 28; 711 712 PDP_FAIL_USER_AUTHENTICATION = 29; 713 714 PDP_FAIL_ACTIVATION_REJECT_GGSN = 30; 715 716 PDP_FAIL_ACTIVATION_REJECT_UNSPECIFIED = 31; 717 718 PDP_FAIL_SERVICE_OPTION_NOT_SUPPORTED = 32; 719 720 PDP_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED = 33; 721 722 PDP_FAIL_SERVICE_OPTION_OUT_OF_ORDER = 34; 723 724 PDP_FAIL_NSAPI_IN_USE = 35; 725 726 // Possibly restart radio, based on framework config 727 PDP_FAIL_REGULAR_DEACTIVATION = 36; 728 729 PDP_FAIL_QOS_NOT_ACCEPTED = 37; 730 731 PDP_FAIL_NETWORK_FAILURE = 38; 732 733 PDP_FAIL_UMTS_REACTIVATION_REQ = 39; 734 735 PDP_FAIL_FEATURE_NOT_SUPP = 40; 736 737 PDP_FAIL_TFT_SEMANTIC_ERROR = 41; 738 739 PDP_FAIL_TFT_SYTAX_ERROR = 42; 740 741 PDP_FAIL_UNKNOWN_PDP_CONTEXT = 43; 742 743 PDP_FAIL_FILTER_SEMANTIC_ERROR = 44; 744 745 PDP_FAIL_FILTER_SYTAX_ERROR = 45; 746 747 PDP_FAIL_PDP_WITHOUT_ACTIVE_TFT = 46; 748 749 PDP_FAIL_ONLY_IPV4_ALLOWED = 50; 750 751 PDP_FAIL_ONLY_IPV6_ALLOWED = 51; 752 753 PDP_FAIL_ONLY_SINGLE_BEARER_ALLOWED = 52; 754 755 PDP_FAIL_ESM_INFO_NOT_RECEIVED = 53; 756 757 PDP_FAIL_PDN_CONN_DOES_NOT_EXIST = 54; 758 759 PDP_FAIL_MULTI_CONN_TO_SAME_PDN_NOT_ALLOWED = 55; 760 761 PDP_FAIL_MAX_ACTIVE_PDP_CONTEXT_REACHED = 65; 762 763 PDP_FAIL_UNSUPPORTED_APN_IN_CURRENT_PLMN = 66; 764 765 PDP_FAIL_INVALID_TRANSACTION_ID = 81; 766 767 PDP_FAIL_MESSAGE_INCORRECT_SEMANTIC = 95; 768 769 PDP_FAIL_INVALID_MANDATORY_INFO = 96; 770 771 PDP_FAIL_MESSAGE_TYPE_UNSUPPORTED = 97; 772 773 PDP_FAIL_MSG_TYPE_NONCOMPATIBLE_STATE = 98; 774 775 PDP_FAIL_UNKNOWN_INFO_ELEMENT = 99; 776 777 PDP_FAIL_CONDITIONAL_IE_ERROR = 100; 778 779 PDP_FAIL_MSG_AND_PROTOCOL_STATE_UNCOMPATIBLE = 101; 780 781 PDP_FAIL_PROTOCOL_ERRORS = 111; 782 783 PDP_FAIL_APN_TYPE_CONFLICT = 112; 784 785 PDP_FAIL_INVALID_PCSCF_ADDR = 113; 786 787 PDP_FAIL_INTERNAL_CALL_PREEMPT_BY_HIGH_PRIO_APN = 114; 788 789 PDP_FAIL_EMM_ACCESS_BARRED = 115; 790 791 PDP_FAIL_EMERGENCY_IFACE_ONLY = 116; 792 793 PDP_FAIL_IFACE_MISMATCH = 117; 794 795 PDP_FAIL_COMPANION_IFACE_IN_USE = 118; 796 797 PDP_FAIL_IP_ADDRESS_MISMATCH = 119; 798 799 PDP_FAIL_IFACE_AND_POL_FAMILY_MISMATCH = 120; 800 801 PDP_FAIL_EMM_ACCESS_BARRED_INFINITE_RETRY = 121; 802 803 PDP_FAIL_AUTH_FAILURE_ON_EMERGENCY_CALL = 122; 804 805 // Not mentioned in the specification 806 PDP_FAIL_VOICE_REGISTRATION_FAIL = -1; 807 808 PDP_FAIL_DATA_REGISTRATION_FAIL = -2; 809 810 // Reasons for data call drop - network/modem disconnect 811 PDP_FAIL_SIGNAL_LOST = -3; 812 813 // Preferred technology has changed, should retry with parameters 814 // appropriate for new technology 815 PDP_FAIL_PREF_RADIO_TECH_CHANGED = -4; 816 817 // Data call was disconnected because radio was resetting, 818 // powered off - no retry 819 PDP_FAIL_RADIO_POWER_OFF = -5; 820 821 // Data call was disconnected by modem because tethered mode was up 822 // on same APN/data profile - no retry until tethered call is off 823 PDP_FAIL_TETHERED_CALL_ACTIVE = -6; 824 825 // retry silently 826 PDP_FAIL_ERROR_UNSPECIFIED = 65535; 827 } 828 829 // A RIL_DataCallFailCause, 0 which is PDP_FAIL_NONE if no error 830 optional RilDataCallFailCause status = 1; 831 832 // If status != 0, this fields indicates the suggested retry back-off timer 833 // value RIL wants to override the one pre-configured in FW 834 optional int32 suggested_retry_time_millis = 2; 835 836 optional RilDataCall call = 3; 837 } 838 839 // Carrier Key Change Event. 840 message CarrierKeyChange { 841 842 enum KeyType { 843 844 // Key Type Unknown. 845 UNKNOWN = 0; 846 // Key Type for WLAN. 847 WLAN = 1; 848 // Key Type for EPDG. 849 EPDG = 2; 850 } 851 852 // Key type of the Encryption key. 853 optional KeyType key_type = 1; 854 855 // Whether the download was successful or not. 856 optional bool isDownloadSuccessful = 2; 857 } 858 859 // Deactivate packet data connection 860 message RilDeactivateDataCall { 861 862 // Context ID 863 optional int32 cid = 1; 864 865 // Reason for deactivating data call 866 optional DeactivateReason reason = 2; 867 868 // Deactivate data call reasons 869 enum DeactivateReason { 870 871 // Reason is unknown. 872 DEACTIVATE_REASON_UNKNOWN = 0; 873 874 DEACTIVATE_REASON_NONE = 1; 875 876 DEACTIVATE_REASON_RADIO_OFF = 2; 877 878 DEACTIVATE_REASON_PDP_RESET = 3; 879 880 DEACTIVATE_REASON_HANDOVER = 4; 881 } 882 } 883 884 message ModemRestart { 885 // The baseband_version is used to identify the particular software version 886 // where the modem restarts happened 887 optional string baseband_version = 1; 888 889 // Indicates the modem restart reason. The restart reason can be used to 890 // categorize any modem crashes and group similar crashes together. This 891 // information will be useful to identify the cause of modem crashes, 892 // reproduce the issue and confirm that the fix works. 893 optional string reason = 2; 894 } 895 896 message CarrierIdMatching { 897 898 // Carrier id table version number 899 optional int32 cid_table_version = 1; 900 901 // Carrier id matching result object 902 optional CarrierIdMatchingResult result = 2; 903 } 904 905 message CarrierIdMatchingResult { 906 907 // A unique carrier id 908 optional int32 carrier_id = 1; 909 910 // Group id level 1. Logged only if gid1 is configured from subscription 911 // but its matching rule is unknown 912 optional string gid1 = 2; 913 914 // MCC and MNC that map to this carrier. Logged only if mccmnc is configured 915 // from subscription but its matching rule is unknown 916 optional string mccmnc = 3; 917 } 918 919 // Time when event happened on device, in milliseconds since epoch 920 optional int64 timestamp_millis = 1; 921 922 // In Multi-SIM devices this indicates SIM slot 923 optional int32 phone_id = 2; 924 925 // Event type 926 optional Type type = 3; 927 928 // User settings 929 optional TelephonySettings settings = 4; 930 931 // RIL Service State 932 optional TelephonyServiceState service_state = 5; 933 934 // IMS state 935 optional ImsConnectionState ims_connection_state = 6; 936 937 // IMS capabilities 938 optional ImsCapabilities ims_capabilities = 7; 939 940 // List of data calls when changed 941 repeated RilDataCall data_calls = 8; 942 943 // RIL error code 944 optional RilErrno error = 9; 945 946 // Setup data call request 947 optional RilSetupDataCall setup_data_call = 10; 948 949 // Setup data call response 950 optional RilSetupDataCallResponse setup_data_call_response = 11; 951 952 // Deactivate data call request 953 optional RilDeactivateDataCall deactivate_data_call = 12; 954 955 // Data call stall recovery action 956 optional int32 data_stall_action = 13; 957 958 // Modem restart event 959 optional ModemRestart modem_restart = 14; 960 961 // NITZ time in milliseconds 962 optional int64 nitz_timestamp_millis = 15; 963 964 // Carrier id matching event 965 optional CarrierIdMatching carrier_id_matching = 16; 966 967 // Carrier key change 968 optional CarrierKeyChange carrier_key_change = 17; 969} 970 971enum TimeInterval { 972 TI_UNKNOWN = 0; 973 TI_10_MILLIS = 1; 974 TI_20_MILLIS = 2; 975 TI_50_MILLIS = 3; 976 TI_100_MILLIS = 4; 977 TI_200_MILLIS = 5; 978 TI_500_MILLIS = 6; 979 TI_1_SEC = 7; 980 TI_2_SEC = 8; 981 TI_5_SEC = 9; 982 TI_10_SEC = 10; 983 TI_30_SEC = 11; 984 TI_1_MINUTE = 12; 985 TI_3_MINUTES = 13; 986 TI_10_MINUTES = 14; 987 TI_30_MINUTES = 15; 988 TI_1_HOUR = 16; 989 TI_2_HOURS = 17; 990 TI_4_HOURS = 18; 991 TI_MANY_HOURS = 19; 992} 993 994// Information about CS and/or PS call session. 995// Session starts when call is placed or accepted and 996// ends when there are no more active calls. 997message TelephonyCallSession { 998 999 message Event { 1000 1001 enum Type { 1002 1003 // Unknown event 1004 EVENT_UNKNOWN = 0; 1005 1006 // Telephony related user settings changed 1007 SETTINGS_CHANGED = 1; 1008 1009 // Phone state changed 1010 RIL_SERVICE_STATE_CHANGED = 2; 1011 1012 // IMS connected/disconnected 1013 IMS_CONNECTION_STATE_CHANGED = 3; 1014 1015 // IMS Voice, Video and Ut capabilities changed 1016 IMS_CAPABILITIES_CHANGED = 4; 1017 1018 // Notification that new data call has appeared in the list 1019 // or old data call has removed. 1020 DATA_CALL_LIST_CHANGED = 5; 1021 1022 // Send request to RIL 1023 RIL_REQUEST = 6; 1024 1025 // Result of the RIL request 1026 RIL_RESPONSE = 7; 1027 1028 // Ring indication for an incoming call 1029 RIL_CALL_RING = 8; 1030 1031 // Notification that Single Radio Voice Call Continuity(SRVCC) 1032 // progress state has changed. 1033 RIL_CALL_SRVCC = 9; 1034 1035 // Notification that list of calls has changed. 1036 RIL_CALL_LIST_CHANGED = 10; 1037 1038 // Command sent to IMS Service. See ImsCommand. 1039 IMS_COMMAND = 11; 1040 1041 // Command sent to IMS Service. See ImsCommand. 1042 IMS_COMMAND_RECEIVED = 12; 1043 1044 // Command sent to IMS Service. See ImsCommand. 1045 IMS_COMMAND_FAILED = 13; 1046 1047 // Command sent to IMS Service. See ImsCommand. 1048 IMS_COMMAND_COMPLETE = 14; 1049 1050 // Notification about incoming voice call 1051 IMS_CALL_RECEIVE = 15; 1052 1053 // Notification that state of the call has changed 1054 IMS_CALL_STATE_CHANGED = 16; 1055 1056 // Notification about IMS call termination 1057 IMS_CALL_TERMINATED = 17; 1058 1059 // Notification that session access technology has changed 1060 IMS_CALL_HANDOVER = 18; 1061 1062 // Notification that session access technology has changed 1063 IMS_CALL_HANDOVER_FAILED = 19; 1064 1065 // Notification about phone state changed. 1066 PHONE_STATE_CHANGED = 20; 1067 1068 // System time overwritten by NITZ (Network time) 1069 NITZ_TIME = 21; 1070 } 1071 1072 enum RilRequest { 1073 1074 RIL_REQUEST_UNKNOWN = 0; 1075 1076 // Initiate voice call 1077 RIL_REQUEST_DIAL = 1; 1078 1079 // Answer incoming call 1080 RIL_REQUEST_ANSWER = 2; 1081 1082 // Hang up a specific line 1083 RIL_REQUEST_HANGUP = 3; 1084 1085 // Configure current call waiting state 1086 RIL_REQUEST_SET_CALL_WAITING = 4; 1087 1088 RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE = 5; 1089 1090 // Send FLASH 1091 RIL_REQUEST_CDMA_FLASH = 6; 1092 1093 // Conference holding and active 1094 RIL_REQUEST_CONFERENCE = 7; 1095 } 1096 1097 enum ImsCommand { 1098 1099 // Command is unknown. 1100 IMS_CMD_UNKNOWN = 0; 1101 1102 IMS_CMD_START = 1; 1103 1104 IMS_CMD_ACCEPT = 2; 1105 1106 IMS_CMD_REJECT = 3; 1107 1108 IMS_CMD_TERMINATE = 4; 1109 1110 IMS_CMD_HOLD = 5; 1111 1112 IMS_CMD_RESUME = 6; 1113 1114 IMS_CMD_MERGE = 7; 1115 1116 IMS_CMD_UPDATE = 8; 1117 1118 IMS_CMD_CONFERENCE_EXTEND = 9; 1119 1120 IMS_CMD_INVITE_PARTICIPANT = 10; 1121 1122 IMS_CMD_REMOVE_PARTICIPANT = 11; 1123 } 1124 1125 enum PhoneState { 1126 1127 // State is unknown. 1128 STATE_UNKNOWN = 0; 1129 1130 STATE_IDLE = 1; 1131 1132 STATE_RINGING = 2; 1133 1134 STATE_OFFHOOK = 3; 1135 } 1136 1137 // Telephony call states 1138 enum CallState { 1139 1140 // State is unknown. 1141 CALL_UNKNOWN = 0; 1142 1143 CALL_IDLE = 1; 1144 1145 CALL_ACTIVE = 2; 1146 1147 CALL_HOLDING = 3; 1148 1149 CALL_DIALING = 4; 1150 1151 CALL_ALERTING = 5; 1152 1153 CALL_INCOMING = 6; 1154 1155 CALL_WAITING = 7; 1156 1157 CALL_DISCONNECTED = 8; 1158 1159 CALL_DISCONNECTING = 9; 1160 } 1161 1162 // The information about a voice call 1163 message RilCall { 1164 1165 enum Type { 1166 1167 // Scan Type is unknown. 1168 UNKNOWN = 0; 1169 1170 // Mobile originated 1171 MO = 1; 1172 1173 // Mobile terminated 1174 MT = 2; 1175 } 1176 1177 // Connection Index 1178 optional int32 index = 1; 1179 1180 optional CallState state = 2; 1181 1182 optional Type type = 3; 1183 1184 // For possible values for a call end reason check 1185 // frameworks/base/telephony/java/android/telephony/DisconnectCause.java 1186 optional int32 call_end_reason = 4; 1187 1188 // This field is true for Conference Calls 1189 optional bool is_multiparty = 5; 1190 } 1191 1192 // Single Radio Voice Call Continuity(SRVCC) progress state 1193 enum RilSrvccState { 1194 1195 // State is unknown. 1196 HANDOVER_UNKNOWN = 0; 1197 1198 HANDOVER_STARTED = 1; 1199 1200 HANDOVER_COMPLETED = 2; 1201 1202 HANDOVER_FAILED = 3; 1203 1204 HANDOVER_CANCELED = 4; 1205 } 1206 1207 // Event type 1208 optional Type type = 1; 1209 1210 // Time since previous event 1211 optional TimeInterval delay = 2; 1212 1213 // Settings at the beginning of the session or when changed 1214 optional TelephonySettings settings = 3; 1215 1216 // State at the beginning of the session or when changed 1217 optional TelephonyServiceState service_state = 4; 1218 1219 // State at the beginning of the session or when changed 1220 optional ImsConnectionState ims_connection_state = 5; 1221 1222 // Capabilities at the beginning of the session or when changed 1223 optional ImsCapabilities ims_capabilities = 6; 1224 1225 // List of data calls at the beginning of the session or when changed 1226 repeated RilDataCall data_calls = 7; 1227 1228 // New state 1229 optional PhoneState phone_state = 8; 1230 1231 // New state 1232 optional CallState call_state = 9; 1233 1234 // CS or IMS Voice call index 1235 optional int32 call_index = 10; 1236 1237 // New merged call 1238 optional int32 merged_call_index = 11; 1239 1240 // Active CS Voice calls 1241 repeated RilCall calls = 12; 1242 1243 // RIL error code 1244 optional RilErrno error = 13; 1245 1246 // RIL request 1247 optional RilRequest ril_request = 14; 1248 1249 // Numeric ID 1250 optional int32 ril_request_id = 15; 1251 1252 // New SRVCC state 1253 optional RilSrvccState srvcc_state = 16; 1254 1255 // IMS command 1256 optional ImsCommand ims_command = 17; 1257 1258 // IMS Failure reason 1259 optional ImsReasonInfo reason_info = 18; 1260 1261 // Original access technology 1262 optional RadioAccessTechnology src_access_tech = 19 [default = UNKNOWN]; 1263 1264 // New access technology 1265 optional RadioAccessTechnology target_access_tech = 20 [default = UNKNOWN]; 1266 1267 // NITZ time in milliseconds 1268 optional int64 nitz_timestamp_millis = 21; 1269 } 1270 1271 // Time when call has started, in minutes since epoch, 1272 // with 5 minutes precision 1273 optional int32 start_time_minutes = 1; 1274 1275 // In Multi-SIM devices this indicates SIM slot 1276 optional int32 phone_id = 2; 1277 1278 // List of events happened during the call 1279 repeated Event events = 3; 1280 1281 // Indicating some call events are dropped 1282 optional bool events_dropped = 4; 1283} 1284 1285message SmsSession { 1286 1287 message Event { 1288 1289 enum Type { 1290 1291 // Unknown event 1292 EVENT_UNKNOWN = 0; 1293 1294 // Telephony related user settings changed 1295 SETTINGS_CHANGED = 1; 1296 1297 // Phone state changed 1298 RIL_SERVICE_STATE_CHANGED = 2; 1299 1300 // IMS connected/disconnected 1301 IMS_CONNECTION_STATE_CHANGED = 3; 1302 1303 // IMS Voice, Video and Ut capabilities changed 1304 IMS_CAPABILITIES_CHANGED = 4; 1305 1306 // Notification that new data call has appeared in the list 1307 // or old data call has removed. 1308 DATA_CALL_LIST_CHANGED = 5; 1309 1310 // Send a SMS message 1311 SMS_SEND = 6; 1312 1313 // Message has been sent to network 1314 SMS_SEND_RESULT = 7; 1315 1316 // Notification about received SMS 1317 SMS_RECEIVED = 8; 1318 1319 // CB message received 1320 CB_SMS_RECEIVED = 9; 1321 } 1322 1323 // Formats used to encode SMS messages 1324 enum Format { 1325 1326 // State is unknown. 1327 SMS_FORMAT_UNKNOWN = 0; 1328 1329 // GSM, WCDMA 1330 SMS_FORMAT_3GPP = 1; 1331 1332 // CDMA 1333 SMS_FORMAT_3GPP2 = 2; 1334 } 1335 1336 enum Tech { 1337 SMS_UNKNOWN = 0; 1338 1339 SMS_GSM = 1; 1340 1341 SMS_CDMA = 2; 1342 1343 SMS_IMS = 3; 1344 } 1345 1346 message CBMessage { 1347 // CB message format 1348 optional Format msg_format = 1; 1349 1350 // CB message priority 1351 optional CBPriority msg_priority = 2; 1352 1353 // Type of CB msg 1354 optional CBMessageType msg_type = 3; 1355 1356 // Service category of CB message 1357 optional int32 service_category = 4; 1358 } 1359 1360 enum CBMessageType { 1361 // Unknown type 1362 TYPE_UNKNOWN = 0; 1363 1364 // ETWS CB msg 1365 ETWS = 1; 1366 1367 // CMAS CB msg 1368 CMAS = 2; 1369 1370 // CB msg other than ETWS and CMAS 1371 OTHER = 3; 1372 } 1373 1374 enum CBPriority { 1375 // Unknown priority 1376 PRIORITY_UNKNOWN = 0; 1377 1378 // NORMAL priority 1379 NORMAL = 1; 1380 1381 // Interactive priority 1382 INTERACTIVE = 2; 1383 1384 // Urgent priority 1385 URGENT = 3; 1386 1387 // Emergency priority 1388 EMERGENCY = 4; 1389 } 1390 1391 // Event type 1392 optional Type type = 1; 1393 1394 // Time since previous event 1395 optional TimeInterval delay = 2; 1396 1397 // Settings at the beginning of the session or when changed 1398 optional TelephonySettings settings = 3; 1399 1400 // State at the beginning of the session or when changed 1401 optional TelephonyServiceState service_state = 4; 1402 1403 // State at the beginning of the session or when changed 1404 optional ImsConnectionState ims_connection_state = 5; 1405 1406 // Capabilities at the beginning of the session or when changed 1407 optional ImsCapabilities ims_capabilities = 6; 1408 1409 // List of data calls at the beginning of the session or when changed 1410 repeated RilDataCall data_calls = 7; 1411 1412 // Format of the message 1413 optional Format format = 8; 1414 1415 // Technology used to send/receive SMS 1416 optional Tech tech = 9; 1417 1418 // See 3GPP 27.005, 3.2.5 for GSM/UMTS, 1419 // 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, 1420 // -1 if unknown or not applicable 1421 optional int32 error_code = 10; 1422 1423 // RIL error code 1424 optional RilErrno error = 11; 1425 1426 // Numeric ID 1427 optional int32 ril_request_id = 12; 1428 1429 // Cellbroadcast message content 1430 optional CBMessage cell_broadcast_message = 13; 1431 } 1432 1433 // Time when session has started, in minutes since epoch, 1434 // with 5 minutes precision 1435 optional int32 start_time_minutes = 1; 1436 1437 // In Multi-SIM devices this indicates SIM slot 1438 optional int32 phone_id = 2; 1439 1440 // List of events happened during the call 1441 repeated Event events = 3; 1442 1443 // Indicating some sms session events are dropped 1444 optional bool events_dropped = 4; 1445} 1446 1447// Power stats for modem 1448message ModemPowerStats { 1449 1450 // Duration of log (ms). This is the duration of time device is 1451 // on battery and modem power stats are collected. 1452 optional int64 logging_duration_ms = 1; 1453 1454 // Energy consumed by modem (mAh) 1455 optional double energy_consumed_mah = 2; 1456 1457 // Number of packets sent (tx) 1458 optional int64 num_packets_tx = 3; 1459 1460 // Amount of time kernel is active because of cellular data (ms) 1461 optional int64 cellular_kernel_active_time_ms = 4; 1462 1463 // Amount of time spent in very poor rx signal level (ms) 1464 optional int64 time_in_very_poor_rx_signal_level_ms = 5; 1465 1466 // Amount of time modem is in sleep (ms) 1467 optional int64 sleep_time_ms = 6; 1468 1469 // Amount of time modem is in idle (ms) 1470 optional int64 idle_time_ms = 7; 1471 1472 // Amount of time modem is in rx (ms) 1473 optional int64 rx_time_ms = 8; 1474 1475 // Amount of time modem is in tx (ms) 1476 repeated int64 tx_time_ms = 9; 1477} 1478