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