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.server.wifi"; 22option java_outer_classname = "WifiMetricsProto"; 23 24// The information about the Wifi events. 25message WifiLog { 26 27 // Session information that gets logged for every Wifi connection. 28 repeated ConnectionEvent connection_event = 1; 29 30 // Number of saved networks in the user profile. 31 optional int32 num_saved_networks = 2; 32 33 // Number of open networks in the saved networks. 34 optional int32 num_open_networks = 3; 35 36 // Number of legacy personal networks. 37 optional int32 num_legacy_personal_networks = 4; 38 39 // Number of legacy enterprise networks. 40 optional int32 num_legacy_enterprise_networks = 5; 41 42 // Does the user have location setting enabled. 43 optional bool is_location_enabled = 6; 44 45 // Does the user have scanning enabled. 46 optional bool is_scanning_always_enabled = 7; 47 48 // Number of times user toggled wifi using the settings menu. 49 optional int32 num_wifi_toggled_via_settings = 8; 50 51 // Number of times user toggled wifi using the airplane menu. 52 optional int32 num_wifi_toggled_via_airplane = 9; 53 54 // Number of networks added by the user. 55 optional int32 num_networks_added_by_user = 10; 56 57 // Number of networks added by applications. 58 optional int32 num_networks_added_by_apps = 11; 59 60 // Number scans that returned empty results. 61 optional int32 num_empty_scan_results = 12; 62 63 // Number scans that returned at least one result. 64 optional int32 num_non_empty_scan_results = 13; 65 66 // Number of single scans requests. 67 optional int32 num_oneshot_scans = 14; 68 69 // Number of repeated background scans that were scheduled to the chip. 70 optional int32 num_background_scans = 15; 71 72 // Error codes that a scan can result in. 73 enum ScanReturnCode { 74 75 // Return Code is unknown. 76 SCAN_UNKNOWN = 0; 77 78 // Scan was successful. 79 SCAN_SUCCESS = 1; 80 81 // Scan was successfully started, but was interrupted. 82 SCAN_FAILURE_INTERRUPTED = 2; 83 84 // Scan failed to start because of invalid configuration 85 // (bad channel, etc). 86 SCAN_FAILURE_INVALID_CONFIGURATION = 3; 87 88 // Could not start a scan because wifi is disabled. 89 FAILURE_WIFI_DISABLED = 4; 90 91 } 92 93 // Mapping of error codes to the number of times that scans resulted 94 // in that error. 95 repeated ScanReturnEntry scan_return_entries = 16; 96 97 message ScanReturnEntry { 98 99 // Return code of the scan. 100 optional ScanReturnCode scan_return_code = 1; 101 102 // Number of entries that were found in the scan. 103 optional int32 scan_results_count = 2; 104 } 105 106 // State of the Wifi. 107 enum WifiState { 108 109 // State is unknown. 110 WIFI_UNKNOWN = 0; 111 112 // Wifi is disabled. 113 WIFI_DISABLED = 1; 114 115 // Wifi is enabled. 116 WIFI_DISCONNECTED = 2; 117 118 // Wifi is enabled and associated with an AP. 119 WIFI_ASSOCIATED = 3; 120 } 121 122 // Mapping of system state to the number of times that scans were requested in 123 // that state 124 repeated WifiSystemStateEntry wifi_system_state_entries = 17; 125 126 message WifiSystemStateEntry { 127 128 // Current WiFi state. 129 optional WifiState wifi_state = 1; 130 131 // Count of scans in state. 132 optional int32 wifi_state_count = 2; 133 134 // Is screen on. 135 optional bool is_screen_on = 3; 136 } 137 138 // Mapping of Error/Success codes to the number of background scans that resulted in it 139 repeated ScanReturnEntry background_scan_return_entries = 18; 140 141 // Mapping of system state to the number of times that Background scans were requested in that 142 // state 143 repeated WifiSystemStateEntry background_scan_request_state = 19; 144 145 // Total number of times the Watchdog of Last Resort triggered, resetting the wifi stack 146 optional int32 num_last_resort_watchdog_triggers = 20; 147 148 // Total number of networks over bad association threshold when watchdog triggered 149 optional int32 num_last_resort_watchdog_bad_association_networks_total = 21; 150 151 // Total number of networks over bad authentication threshold when watchdog triggered 152 optional int32 num_last_resort_watchdog_bad_authentication_networks_total = 22; 153 154 // Total number of networks over bad dhcp threshold when watchdog triggered 155 optional int32 num_last_resort_watchdog_bad_dhcp_networks_total = 23; 156 157 // Total number of networks over bad other threshold when watchdog triggered 158 optional int32 num_last_resort_watchdog_bad_other_networks_total = 24; 159 160 // Total count of networks seen when watchdog triggered 161 optional int32 num_last_resort_watchdog_available_networks_total = 25; 162 163 // Total count of triggers with atleast one bad association network 164 optional int32 num_last_resort_watchdog_triggers_with_bad_association = 26; 165 166 // Total count of triggers with atleast one bad authentication network 167 optional int32 num_last_resort_watchdog_triggers_with_bad_authentication = 27; 168 169 // Total count of triggers with atleast one bad dhcp network 170 optional int32 num_last_resort_watchdog_triggers_with_bad_dhcp = 28; 171 172 // Total count of triggers with atleast one bad other network 173 optional int32 num_last_resort_watchdog_triggers_with_bad_other = 29; 174 175 // Count of times connectivity watchdog confirmed pno is working 176 optional int32 num_connectivity_watchdog_pno_good = 30; 177 178 // Count of times connectivity watchdog found pno not working 179 optional int32 num_connectivity_watchdog_pno_bad = 31; 180 181 // Count of times connectivity watchdog confirmed background scan is working 182 optional int32 num_connectivity_watchdog_background_good = 32; 183 184 // Count of times connectivity watchdog found background scan not working 185 optional int32 num_connectivity_watchdog_background_bad = 33; 186 187 // The time duration represented by this wifi log, from start to end of capture 188 optional int32 record_duration_sec = 34; 189 190 // Counts the occurrences of each individual RSSI poll level 191 repeated RssiPollCount rssi_poll_rssi_count = 35; 192 193 // Total number of times WiFi connected immediately after a Last Resort Watchdog trigger, 194 // without new networks becoming available. 195 optional int32 num_last_resort_watchdog_successes = 36; 196 197 // Total number of saved hidden networks 198 optional int32 num_hidden_networks = 37; 199 200 // Total number of saved passpoint / hotspot 2.0 networks 201 optional int32 num_passpoint_networks = 38; 202 203 // Total number of scan results 204 optional int32 num_total_scan_results = 39; 205 206 // Total number of scan results for open networks 207 optional int32 num_open_network_scan_results = 40; 208 209 // Total number of scan results for legacy personal networks 210 optional int32 num_legacy_personal_network_scan_results = 41; 211 212 // Total number of scan results for legacy enterprise networks 213 optional int32 num_legacy_enterprise_network_scan_results = 42; 214 215 // Total number of scan results for hidden networks 216 optional int32 num_hidden_network_scan_results = 43; 217 218 // Total number of scan results for hotspot 2.0 r1 networks 219 optional int32 num_hotspot2_r1_network_scan_results = 44; 220 221 // Total number of scan results for hotspot 2.0 r2 networks 222 optional int32 num_hotspot2_r2_network_scan_results = 45; 223 224 // Total number of scans handled by framework (oneshot or otherwise) 225 optional int32 num_scans = 46; 226 227 // Counts the occurrences of each alert reason. 228 repeated AlertReasonCount alert_reason_count = 47; 229 230 // Counts the occurrences of each Wifi score 231 repeated WifiScoreCount wifi_score_count = 48; 232 233 // Histogram of Soft AP Durations 234 repeated SoftApDurationBucket soft_ap_duration = 49; 235 236 // Histogram of Soft AP ReturnCode 237 repeated SoftApReturnCodeCount soft_ap_return_code = 50; 238 239 // Histogram of the delta between scan result RSSI and RSSI polls 240 repeated RssiPollCount rssi_poll_delta_count = 51; 241 242 // List of events 243 repeated StaEvent sta_event_list = 52; 244 245 // Total number of times WiFi HAL crashed. 246 optional int32 num_hal_crashes = 53; 247 248 // Total number of times WiFicond crashed. 249 optional int32 num_wificond_crashes = 54; 250 251 // Indicates the number of times an error was encountered in 252 // Wifi HAL on |WifiNative.setupInterfaceForClientMode|. 253 optional int32 num_setup_client_interface_failure_due_to_hal = 55; 254 255 // Indicates the number of times an error was encountered in 256 // Wificond on |WifiNative.setupInterfaceForClientMode|. 257 optional int32 num_setup_client_interface_failure_due_to_wificond = 56; 258 259 // Wi-Fi Aware metrics 260 optional WifiAwareLog wifi_aware_log = 57; 261 262 // Number of saved Passpoint providers in user profile. 263 optional int32 num_passpoint_providers = 58; 264 265 // Count of times Passpoint provider being installed. 266 optional int32 num_passpoint_provider_installation = 59; 267 268 // Count of times Passpoint provivider is installed successfully. 269 optional int32 num_passpoint_provider_install_success = 60; 270 271 // Count of times Passpoint provider is being uninstalled. 272 optional int32 num_passpoint_provider_uninstallation = 61; 273 274 // Count of times Passpoint provider is uninstalled successfully. 275 optional int32 num_passpoint_provider_uninstall_success = 62; 276 277 // Count of saved Passpoint providers device has ever connected to. 278 optional int32 num_passpoint_providers_successfully_connected = 63; 279 280 // Histogram counting instances of scans with N many ScanResults with unique ssids 281 repeated NumConnectableNetworksBucket total_ssids_in_scan_histogram = 64; 282 283 // Histogram counting instances of scans with N many ScanResults/bssids 284 repeated NumConnectableNetworksBucket total_bssids_in_scan_histogram = 65; 285 286 // Histogram counting instances of scans with N many unique open ssids 287 repeated NumConnectableNetworksBucket available_open_ssids_in_scan_histogram = 66; 288 289 // Histogram counting instances of scans with N many bssids for open networks 290 repeated NumConnectableNetworksBucket available_open_bssids_in_scan_histogram = 67; 291 292 // Histogram counting instances of scans with N many unique ssids for saved networks 293 repeated NumConnectableNetworksBucket available_saved_ssids_in_scan_histogram = 68; 294 295 // Histogram counting instances of scans with N many bssids for saved networks 296 repeated NumConnectableNetworksBucket available_saved_bssids_in_scan_histogram = 69; 297 298 // Histogram counting instances of scans with N many unique SSIDs for open or saved networks 299 repeated NumConnectableNetworksBucket available_open_or_saved_ssids_in_scan_histogram = 70; 300 301 // Histogram counting instances of scans with N many BSSIDs for open or saved networks 302 repeated NumConnectableNetworksBucket available_open_or_saved_bssids_in_scan_histogram = 71; 303 304 // Histogram counting instances of scans with N many ScanResults matching unique saved passpoint providers 305 repeated NumConnectableNetworksBucket available_saved_passpoint_provider_profiles_in_scan_histogram = 72; 306 307 // Histogram counting instances of scans with N many ScanResults BSSIDs matching a saved passpoint provider 308 repeated NumConnectableNetworksBucket available_saved_passpoint_provider_bssids_in_scan_histogram = 73; 309 310 // Counts the number of AllSingleScanLister.onResult calls with a full band scan result 311 optional int32 full_band_all_single_scan_listener_results = 74; 312 313 // Counts the number of AllSingleScanLister.onResult calls with a partial (channels) scan result 314 optional int32 partial_all_single_scan_listener_results = 75; 315 316 // Pno scan metrics 317 optional PnoScanMetrics pno_scan_metrics = 76; 318 319 // Histogram of "Connect to Network" notifications. 320 // The notification Action should be unset. 321 repeated ConnectToNetworkNotificationAndActionCount connect_to_network_notification_count = 77; 322 323 // Histogram of "Connect to Network" notification user actions. 324 repeated ConnectToNetworkNotificationAndActionCount connect_to_network_notification_action_count = 78; 325 326 // The number of SSIDs blacklisted from recommendation by the open network 327 // notification recommender 328 optional int32 open_network_recommender_blacklist_size = 79; 329 330 // Is the available network notification feature turned on 331 optional bool is_wifi_networks_available_notification_on = 80; 332 333 // Count of recommendation updates made by the open network notification 334 // recommender 335 optional int32 num_open_network_recommendation_updates = 81; 336 337 // Count of connection attempts that were initiated unsuccessfully 338 optional int32 num_open_network_connect_message_failed_to_send = 82; 339 340 // Histogram counting instances of scans with N many HotSpot 2.0 R1 APs 341 repeated NumConnectableNetworksBucket observed_hotspot_r1_aps_in_scan_histogram = 83; 342 343 // Histogram counting instances of scans with N many HotSpot 2.0 R2 APs 344 repeated NumConnectableNetworksBucket observed_hotspot_r2_aps_in_scan_histogram = 84; 345 346 // Histogram counting instances of scans with N many unique HotSpot 2.0 R1 ESS. 347 // Where ESS is defined as the (HESSID, ANQP Domain ID), (SSID, ANQP Domain ID) or 348 // (SSID, BSSID) tuple depending on AP configuration (in the above priority 349 // order). 350 repeated NumConnectableNetworksBucket observed_hotspot_r1_ess_in_scan_histogram = 85; 351 352 // Histogram counting instances of scans with N many unique HotSpot 2.0 R2 ESS. 353 // Where ESS is defined as the (HESSID, ANQP Domain ID), (SSID, ANQP Domain ID) or 354 // (SSID, BSSID) tuple depending on AP configuration (in the above priority 355 // order). 356 repeated NumConnectableNetworksBucket observed_hotspot_r2_ess_in_scan_histogram = 86; 357 358 // Histogram counting number of HotSpot 2.0 R1 APs per observed ESS in a scan 359 // (one value added per unique ESS - potentially multiple counts per single 360 // scan!) 361 repeated NumConnectableNetworksBucket observed_hotspot_r1_aps_per_ess_in_scan_histogram = 87; 362 363 // Histogram counting number of HotSpot 2.0 R2 APs per observed ESS in a scan 364 // (one value added per unique ESS - potentially multiple counts per single 365 // scan!) 366 repeated NumConnectableNetworksBucket observed_hotspot_r2_aps_per_ess_in_scan_histogram = 88; 367 368 // SoftAP event list tracking sessions and client counts in tethered mode 369 repeated SoftApConnectedClientsEvent soft_ap_connected_clients_events_tethered = 89; 370 371 // SoftAP event list tracking sessions and client counts in local only mode 372 repeated SoftApConnectedClientsEvent soft_ap_connected_clients_events_local_only = 90; 373 374 // Wps connection metrics 375 optional WpsMetrics wps_metrics = 91; 376 377 // Wifi power statistics 378 optional WifiPowerStats wifi_power_stats = 92; 379 380 // Number of connectivity single scan requests. 381 optional int32 num_connectivity_oneshot_scans = 93; 382 383 // WifiWake statistics 384 optional WifiWakeStats wifi_wake_stats = 94; 385 386 // Histogram counting instances of scans with N many 802.11mc (RTT) supporting APs 387 repeated NumConnectableNetworksBucket observed_80211mc_supporting_aps_in_scan_histogram = 95; 388 389 // Total number of times supplicant crashed. 390 optional int32 num_supplicant_crashes = 96; 391 392 // Total number of times hostapd crashed. 393 optional int32 num_hostapd_crashes = 97; 394 395 // Indicates the number of times an error was encountered in 396 // supplicant on |WifiNative.setupInterfaceForClientMode|. 397 optional int32 num_setup_client_interface_failure_due_to_supplicant = 98; 398 399 // Indicates the number of times an error was encountered in 400 // Wifi HAL on |WifiNative.setupInterfaceForSoftApMode|. 401 optional int32 num_setup_soft_ap_interface_failure_due_to_hal = 99; 402 403 // Indicates the number of times an error was encountered in 404 // Wifi HAL on |WifiNative.setupInterfaceForSoftApMode|. 405 optional int32 num_setup_soft_ap_interface_failure_due_to_wificond = 100; 406 407 // Indicates the number of times an error was encountered in 408 // Wifi HAL on |WifiNative.setupInterfaceForSoftApMode|. 409 optional int32 num_setup_soft_ap_interface_failure_due_to_hostapd = 101; 410 411 // Indicates the number of times we got an interface down in client mode. 412 optional int32 num_client_interface_down = 102; 413 414 // Indicates the number of times we got an interface down in softap mode. 415 optional int32 num_soft_ap_interface_down = 103; 416 417 // Indicates the number of scan requests from external apps. 418 optional int32 num_external_app_oneshot_scan_requests = 104; 419 420 // Indicates the number of times a scan request from an external foreground app was throttled. 421 optional int32 num_external_foreground_app_oneshot_scan_requests_throttled = 105; 422 423 // Indicates the number of times a scan request from an external background app was throttled. 424 optional int32 num_external_background_app_oneshot_scan_requests_throttled = 106; 425 426 // WifiLastResortWatchdog time milliseconds delta between trigger and first connection success 427 optional int64 watchdog_trigger_to_connection_success_duration_ms = 107 [default = -1]; 428 429 // The number of times wifi experienced failures after watchdog has already been triggered and is 430 // waiting for a connection success 431 optional int64 watchdog_total_connection_failure_count_after_trigger = 108; 432 433 // Number of times DFS channel scans are requested in single scan requests. 434 optional int32 num_oneshot_has_dfs_channel_scans = 109; 435 436 // Wi-Fi RTT metrics 437 optional WifiRttLog wifi_rtt_log = 110; 438 439 // Flag which indicates if Connected MAC Randomization is enabled 440 optional bool is_mac_randomization_on = 111 [default = false]; 441 442 // Number of radio mode changes to MCC (Multi channel concurrency). 443 optional int32 num_radio_mode_change_to_mcc = 112; 444 445 // Number of radio mode changes to SCC (Single channel concurrency). 446 optional int32 num_radio_mode_change_to_scc = 113; 447 448 // Number of radio mode changes to SBS (Single band simultaneous). 449 optional int32 num_radio_mode_change_to_sbs = 114; 450 451 // Number of radio mode changes to DBS (Dual band simultaneous). 452 optional int32 num_radio_mode_change_to_dbs = 115; 453 454 // Number of times the firmware picked a SoftAp channel not satisfying user band preference. 455 optional int32 num_soft_ap_user_band_preference_unsatisfied = 116; 456 457 // Identifier for experimental scoring parameter settings. 458 optional string score_experiment_id = 117; 459 460 // Data on wifi radio usage 461 optional WifiRadioUsage wifi_radio_usage = 118; 462 463 // Stores settings values used for metrics testing. 464 optional ExperimentValues experiment_values = 119; 465 466 // List of WifiIsUnusableEvents which get logged when we notice that WiFi is unusable. 467 // Collected only when WIFI_IS_UNUSABLE_EVENT_METRICS_ENABLED Settings is enabled. 468 repeated WifiIsUnusableEvent wifi_is_unusable_event_list = 120; 469 470 // Counts the occurrences of each link speed (Mbps) level 471 // with rssi (dBm) and rssi^2 sums (dBm^2) 472 repeated LinkSpeedCount link_speed_counts = 121; 473 474 // Number of times the SarManager failed to register SAR sensor listener 475 optional int32 num_sar_sensor_registration_failures = 122; 476 477 // Hardware revision (EVT, DVT, PVT etc.) 478 optional string hardware_revision = 124; 479 480 // Total wifi link layer usage data over the logging duration in ms. 481 optional WifiLinkLayerUsageStats wifi_link_layer_usage_stats = 125; 482 483 // Multiple lists of timestamped link layer stats with labels to represent whether wifi is usable 484 repeated WifiUsabilityStats wifi_usability_stats_list = 126; 485 486 // Counts the occurrences of each Wifi usability score provided by external app 487 repeated WifiUsabilityScoreCount wifi_usability_score_count = 127; 488 489 // List of PNO scan stats, one element for each mobility state 490 repeated DeviceMobilityStatePnoScanStats mobility_state_pno_stats_list = 128; 491 492 // Wifi p2p statistics 493 optional WifiP2pStats wifi_p2p_stats = 129; 494 495 // Easy Connect (DPP) metrics 496 optional WifiDppLog wifi_dpp_log = 130; 497 498 // Number of Enhanced Open (OWE) networks in the saved networks. 499 optional int32 num_enhanced_open_networks = 131; 500 501 // Number of WPA3-Personal networks. 502 optional int32 num_wpa3_personal_networks = 132; 503 504 // Number of WPA3-Enterprise networks. 505 optional int32 num_wpa3_enterprise_networks = 133; 506 507 // Total number of scan results for Enhanced open networks 508 optional int32 num_enhanced_open_network_scan_results = 134; 509 510 // Total number of scan results for WPA3-Personal networks 511 optional int32 num_wpa3_personal_network_scan_results = 135; 512 513 // Total number of scan results for WPA3-Enterprise networks 514 optional int32 num_wpa3_enterprise_network_scan_results = 136; 515 516 // WifiConfigStore read/write metrics. 517 optional WifiConfigStoreIO wifi_config_store_io = 137; 518 519 // Total number of saved networks with mac randomization enabled. 520 optional int32 num_saved_networks_with_mac_randomization = 138; 521 522 // Link Probe metrics 523 optional LinkProbeStats link_probe_stats = 139; 524 525 // List of NetworkSelectionExperimentDecisions stats for each experiment 526 repeated NetworkSelectionExperimentDecisions network_selection_experiment_decisions_list = 140; 527 528 // Network Request API surface metrics. 529 optional WifiNetworkRequestApiLog wifi_network_request_api_log = 141; 530 531 // Network Suggestion API surface metrics. 532 optional WifiNetworkSuggestionApiLog wifi_network_suggestion_api_log = 142; 533 534 // WifiLock statistics 535 optional WifiLockStats wifi_lock_stats = 143; 536 537 // Stats on number of times Wi-Fi is turned on/off though the WifiManager#setWifiEnabled API 538 optional WifiToggleStats wifi_toggle_stats = 144; 539 540 // Number of times WifiManager#addOrUpdateNetwork is called. 541 optional int32 num_add_or_update_network_calls = 145; 542 543 // Number of times WifiManager#enableNetwork is called. 544 optional int32 num_enable_network_calls = 146; 545 546 // Passpoint provison metrics 547 optional PasspointProvisionStats passpoint_provision_stats = 147; 548 549 // Histogram of the EAP method type of all installed Passpoint profiles for R1 550 repeated PasspointProfileTypeCount installed_passpoint_profile_type_for_r1 = 123; 551 552 // Histogram of the EAP method type of all installed Passpoint profiles for R2 553 repeated PasspointProfileTypeCount installed_passpoint_profile_type_for_r2 = 148; 554 555 // Histogram of Tx link speed at 2G 556 repeated Int32Count tx_link_speed_count_2g = 149; 557 558 // Histogram of Tx link speed at 5G low band 559 repeated Int32Count tx_link_speed_count_5g_low = 150; 560 561 // Histogram of Tx link speed at 5G middle band 562 repeated Int32Count tx_link_speed_count_5g_mid = 151; 563 564 // Histogram of Tx link speed at 5G high band 565 repeated Int32Count tx_link_speed_count_5g_high = 152; 566 567 // Histogram of Rx link speed at 2G 568 repeated Int32Count rx_link_speed_count_2g = 153; 569 570 // Histogram of Rx link speed at 5G low band 571 repeated Int32Count rx_link_speed_count_5g_low = 154; 572 573 // Histogram of Rx link speed at 5G middle band 574 repeated Int32Count rx_link_speed_count_5g_mid = 155; 575 576 // Histogram of Rx link speed at 5G high band 577 repeated Int32Count rx_link_speed_count_5g_high = 156; 578} 579 580// Information that gets logged for every WiFi connection. 581message RouterFingerPrint { 582 583 enum RoamType { 584 585 // Type is unknown. 586 ROAM_TYPE_UNKNOWN = 0; 587 588 // No roaming - usually happens on a single band (2.4 GHz) router. 589 ROAM_TYPE_NONE = 1; 590 591 // Enterprise router. 592 ROAM_TYPE_ENTERPRISE = 2; 593 594 // DBDC => Dual Band Dual Concurrent essentially a router that 595 // supports both 2.4 GHz and 5 GHz bands. 596 ROAM_TYPE_DBDC = 3; 597 } 598 599 enum Auth { 600 601 // Auth is unknown. 602 AUTH_UNKNOWN = 0; 603 604 // No authentication. 605 AUTH_OPEN = 1; 606 607 // If the router uses a personal authentication. 608 AUTH_PERSONAL = 2; 609 610 // If the router is setup for enterprise authentication. 611 AUTH_ENTERPRISE = 3; 612 } 613 614 enum RouterTechnology { 615 616 // Router is unknown. 617 ROUTER_TECH_UNKNOWN = 0; 618 619 // Router Channel A. 620 ROUTER_TECH_A = 1; 621 622 // Router Channel B. 623 ROUTER_TECH_B = 2; 624 625 // Router Channel G. 626 ROUTER_TECH_G = 3; 627 628 // Router Channel N. 629 ROUTER_TECH_N = 4; 630 631 // Router Channel AC. 632 ROUTER_TECH_AC = 5; 633 634 // When the channel is not one of the above. 635 ROUTER_TECH_OTHER = 6; 636 } 637 638 enum EapMethod { 639 640 // No EAP method used 641 TYPE_EAP_UNKNOWN = 0; 642 643 // EAP with Transport Layer Security 644 TYPE_EAP_TLS = 1; 645 646 // EAP with Tunneled Transport Layer Security 647 TYPE_EAP_TTLS = 2; 648 649 // EAP with Subscriber Identity Module [RFC-4186] 650 TYPE_EAP_SIM = 3; 651 652 // EAP with Authentication and Key Agreement [RFC-4187] 653 TYPE_EAP_AKA = 4; 654 655 // EAP with Authentication and Key Agreement Prime [RFC-5448] 656 TYPE_EAP_AKA_PRIME = 5; 657 658 // Protected EAP 659 TYPE_EAP_PEAP = 6; 660 661 // EAP for Hotspot 2.0 r2 OSEN 662 TYPE_EAP_UNAUTH_TLS = 7; 663 664 // EAP with Password 665 TYPE_EAP_PWD = 8; 666 667 // EAP with WAPI certifcate 668 TYPE_EAP_WAPI_CERT = 9; 669 } 670 671 enum AuthPhase2Method { 672 673 // No phase2 method 674 TYPE_PHASE2_NONE = 0; 675 676 // Password Authentication Protocol 677 TYPE_PHASE2_PAP = 1; 678 679 // Microsoft Challenge Handshake Authentication Protocol 680 TYPE_PHASE2_MSCHAP = 2; 681 682 // Microsoft Challenge Handshake Authentication Protocol v2 683 TYPE_PHASE2_MSCHAPV2 = 3; 684 685 // Generic Token Card 686 TYPE_PHASE2_GTC = 4; 687 688 // EAP-Subscriber Identity Module [RFC-4186] 689 TYPE_PHASE2_SIM = 5; 690 691 // EAP-Authentication and Key Agreement [RFC-4187] 692 TYPE_PHASE2_AKA = 6; 693 694 // EAP-Authentication and Key Agreement Prime [RFC-5448] 695 TYPE_PHASE2_AKA_PRIME = 7; 696 } 697 698 optional RoamType roam_type = 1; 699 700 // Channel on which the connection takes place. 701 optional int32 channel_info = 2; 702 703 // DTIM setting of the router. 704 optional int32 dtim = 3; 705 706 // Authentication scheme of the router. 707 optional Auth authentication = 4; 708 709 // If the router is hidden. 710 optional bool hidden = 5; 711 712 // Channel information. 713 optional RouterTechnology router_technology = 6; 714 715 // whether ipv6 is supported. 716 optional bool supports_ipv6 = 7; 717 718 // If the router is a passpoint / hotspot 2.0 network 719 optional bool passpoint = 8; 720 721 // EAP method used by the enterprise network 722 optional EapMethod eap_method = 9; 723 724 // Phase 2 authentication method after setting up a secure channel 725 optional AuthPhase2Method auth_phase2_method = 10; 726} 727 728message ConnectionEvent { 729 730 // Roam Type. 731 enum RoamType { 732 733 // Type is unknown. 734 ROAM_UNKNOWN = 0; 735 736 // No roaming. 737 ROAM_NONE = 1; 738 739 // DBDC roaming. 740 ROAM_DBDC = 2; 741 742 // Enterprise roaming. 743 ROAM_ENTERPRISE = 3; 744 745 // User selected roaming. 746 ROAM_USER_SELECTED = 4; 747 748 // Unrelated. 749 ROAM_UNRELATED = 5; 750 } 751 752 // Connectivity Level Failure. 753 enum ConnectivityLevelFailure { 754 755 // Failure is unknown. 756 HLF_UNKNOWN = 0; 757 758 // No failure. 759 HLF_NONE = 1; 760 761 // DHCP failure. 762 HLF_DHCP = 2; 763 764 // No internet connection. 765 HLF_NO_INTERNET = 3; 766 767 // No internet connection. 768 HLF_UNWANTED = 4; 769 } 770 771 // Level 2 failure reason. 772 enum Level2FailureReason { 773 774 // Unknown default 775 FAILURE_REASON_UNKNOWN = 0; 776 777 // The reason code if there is no error during authentication. It could 778 // also imply that there no authentication in progress. 779 AUTH_FAILURE_NONE = 1; 780 781 // The reason code if there was a timeout authenticating. 782 AUTH_FAILURE_TIMEOUT = 2; 783 784 // The reason code if there was a wrong password while authenticating. 785 AUTH_FAILURE_WRONG_PSWD = 3; 786 787 // The reason code if there was EAP failure while authenticating. 788 AUTH_FAILURE_EAP_FAILURE = 4; 789 } 790 791 // Entity that recommended connecting to this network. 792 enum ConnectionNominator { 793 // Unknown nominator 794 NOMINATOR_UNKNOWN = 0; 795 796 // User selected network manually 797 NOMINATOR_MANUAL = 1; 798 799 // Saved network 800 NOMINATOR_SAVED = 2; 801 802 // Suggestion API 803 NOMINATOR_SUGGESTION = 3; 804 805 // Passpoint 806 NOMINATOR_PASSPOINT = 4; 807 808 // Carrier suggestion 809 NOMINATOR_CARRIER = 5; 810 811 // External scorer 812 NOMINATOR_EXTERNAL_SCORED = 6; 813 814 // Network Specifier 815 NOMINATOR_SPECIFIER = 7; 816 817 // User connected choice override 818 NOMINATOR_SAVED_USER_CONNECT_CHOICE = 8; 819 820 // Open Network Available Pop-up 821 NOMINATOR_OPEN_NETWORK_AVAILABLE = 9; 822 } 823 824 // Start time of the connection. 825 optional int64 start_time_millis = 1;// [(datapol.semantic_type) = ST_TIMESTAMP]; 826 827 // Duration to connect. 828 optional int32 duration_taken_to_connect_millis = 2; 829 830 // Router information. 831 optional RouterFingerPrint router_fingerprint = 3; 832 833 // RSSI at the start of the connection. 834 optional int32 signal_strength = 4; 835 836 // Roam Type. 837 optional RoamType roam_type = 5; 838 839 // Result of the connection. 840 optional int32 connection_result = 6; 841 842 // Reasons for level 2 failure (needs to be coordinated with wpa-supplicant). 843 optional int32 level_2_failure_code = 7; 844 845 // Failures that happen at the connectivity layer. 846 optional ConnectivityLevelFailure connectivity_level_failure_code = 8; 847 848 // Has bug report been taken. 849 optional bool automatic_bug_report_taken = 9; 850 851 // Connection is using locally generated random MAC address. 852 optional bool use_randomized_mac = 10 [default = false]; 853 854 // Who chose to connect. 855 optional ConnectionNominator connection_nominator = 11; 856 857 // The currently running network selector when this connection event occurred. 858 optional int32 network_selector_experiment_id = 12; 859 860 // Breakdown of level_2_failure_code with more detailed reason. 861 optional Level2FailureReason level_2_failure_reason = 13 862 [default = FAILURE_REASON_UNKNOWN]; 863} 864 865// Number of occurrences of a specific RSSI poll rssi value 866message RssiPollCount { 867 // RSSI 868 optional int32 rssi = 1; 869 870 // Number of RSSI polls with 'rssi' 871 optional int32 count = 2; 872 873 // Beacon frequency of the channel in MHz 874 optional int32 frequency = 3; 875} 876 877// Number of occurrences of a specific alert reason value 878message AlertReasonCount { 879 // Alert reason 880 optional int32 reason = 1; 881 882 // Number of alerts with |reason|. 883 optional int32 count = 2; 884} 885 886// Counts the number of instances of a specific Wifi Score calculated by WifiScoreReport 887message WifiScoreCount { 888 // Wifi Score 889 optional int32 score = 1; 890 891 // Number of Wifi score reports with this score 892 optional int32 count = 2; 893} 894 895// Counts the number of instances of a specific Wifi Usability Score 896message WifiUsabilityScoreCount { 897 // Wifi Usability Score 898 optional int32 score = 1; 899 900 // Number of Wifi score reports with this score 901 optional int32 count = 2; 902} 903 904// Number of occurrences of a specific link speed (Mbps) 905// and sum of rssi (dBm) and rssi^2 (dBm^2) 906message LinkSpeedCount { 907 // Link speed (Mbps) 908 optional int32 link_speed_mbps = 1; 909 910 // Number of RSSI polls with link_speed 911 optional int32 count = 2; 912 913 // Sum of absolute values of rssi values (dBm) 914 optional int32 rssi_sum_dbm = 3; 915 916 // Sum of squares of rssi values (dBm^2) 917 optional int64 rssi_sum_of_squares_dbm_sq = 4; 918} 919 920 921// Number of occurrences of Soft AP session durations 922message SoftApDurationBucket { 923 // Bucket covers duration : [duration_sec, duration_sec + bucket_size_sec) 924 // The (inclusive) lower bound of Soft AP session duration represented by this bucket 925 optional int32 duration_sec = 1; 926 927 // The size of this bucket 928 optional int32 bucket_size_sec = 2; 929 930 // Number of soft AP session durations that fit into this bucket 931 optional int32 count = 3; 932} 933 934// Number of occurrences of a soft AP session return code 935message SoftApReturnCodeCount { 936 937 enum SoftApStartResult { 938 939 // SoftApManager return code unknown 940 SOFT_AP_RETURN_CODE_UNKNOWN = 0; 941 942 // SoftAp started successfully 943 SOFT_AP_STARTED_SUCCESSFULLY = 1; 944 945 // Catch all for failures with no specific failure reason 946 SOFT_AP_FAILED_GENERAL_ERROR = 2; 947 948 // SoftAp failed to start due to NO_CHANNEL error 949 SOFT_AP_FAILED_NO_CHANNEL = 3; 950 } 951 952 // Historical, no longer used for writing as of 01/2017. 953 optional int32 return_code = 1 [deprecated = true]; 954 955 // Occurrences of this soft AP return code 956 optional int32 count = 2; 957 958 // Result of attempt to start SoftAp 959 optional SoftApStartResult start_result = 3; 960} 961 962message StaEvent { 963 message ConfigInfo { 964 // The set of key management protocols supported by this configuration. 965 optional uint32 allowed_key_management = 1 [default = 0]; 966 967 // The set of security protocols supported by this configuration. 968 optional uint32 allowed_protocols = 2 [default = 0]; 969 970 // The set of authentication protocols supported by this configuration. 971 optional uint32 allowed_auth_algorithms = 3 [default = 0]; 972 973 // The set of pairwise ciphers for WPA supported by this configuration. 974 optional uint32 allowed_pairwise_ciphers = 4 [default = 0]; 975 976 // The set of group ciphers supported by this configuration. 977 optional uint32 allowed_group_ciphers = 5; 978 979 // Is this a 'hidden network' 980 optional bool hidden_ssid = 6; 981 982 // Is this a Hotspot 2.0 / passpoint network 983 optional bool is_passpoint = 7; 984 985 // Is this an 'ephemeral' network (Not in saved network list, recommended externally) 986 optional bool is_ephemeral = 8; 987 988 // Has a successful connection ever been established using this WifiConfiguration 989 optional bool has_ever_connected = 9; 990 991 // RSSI of the scan result candidate associated with this WifiConfiguration 992 optional int32 scan_rssi = 10 [default = -127]; 993 994 // Frequency of the scan result candidate associated with this WifiConfiguration 995 optional int32 scan_freq = 11 [default = -1]; 996 } 997 998 enum EventType { 999 // Default/Invalid event 1000 TYPE_UNKNOWN = 0; 1001 1002 // Supplicant Association Rejection event. Code contains the 802.11 1003 TYPE_ASSOCIATION_REJECTION_EVENT = 1; 1004 1005 // Supplicant L2 event, 1006 TYPE_AUTHENTICATION_FAILURE_EVENT = 2; 1007 1008 // Supplicant L2 event 1009 TYPE_NETWORK_CONNECTION_EVENT = 3; 1010 1011 // Supplicant L2 event 1012 TYPE_NETWORK_DISCONNECTION_EVENT = 4; 1013 1014 // Supplicant L2 event 1015 TYPE_SUPPLICANT_STATE_CHANGE_EVENT = 5; 1016 1017 // Supplicant L2 event 1018 TYPE_CMD_ASSOCIATED_BSSID = 6; 1019 1020 // IP Manager successfully completed IP Provisioning 1021 TYPE_CMD_IP_CONFIGURATION_SUCCESSFUL = 7; 1022 1023 // IP Manager failed to complete IP Provisioning 1024 TYPE_CMD_IP_CONFIGURATION_LOST = 8; 1025 1026 // IP Manager lost reachability to network neighbors 1027 TYPE_CMD_IP_REACHABILITY_LOST = 9; 1028 1029 // Indicator that Supplicant is targeting a BSSID for roam/connection 1030 TYPE_CMD_TARGET_BSSID = 10; 1031 1032 // Wifi framework is initiating a connection attempt 1033 TYPE_CMD_START_CONNECT = 11; 1034 1035 // Wifi framework is initiating a roaming connection attempt 1036 TYPE_CMD_START_ROAM = 12; 1037 1038 // SystemAPI connect() command, Settings App 1039 TYPE_CONNECT_NETWORK = 13; 1040 1041 // Network Agent has validated the internet connection (Captive Portal Check success, or user 1042 // validation) 1043 TYPE_NETWORK_AGENT_VALID_NETWORK = 14; 1044 1045 // Framework initiated disconnect. Sometimes generated to give an extra reason for a disconnect 1046 // Should typically be followed by a NETWORK_DISCONNECTION_EVENT with a local_gen = true 1047 TYPE_FRAMEWORK_DISCONNECT = 15; 1048 1049 // The NetworkAgent score for wifi has changed in a way that may impact 1050 // connectivity 1051 TYPE_SCORE_BREACH = 16; 1052 1053 // Framework changed Sta interface MAC address 1054 TYPE_MAC_CHANGE = 17; 1055 1056 // Wifi is turned on 1057 TYPE_WIFI_ENABLED = 18; 1058 1059 // Wifi is turned off 1060 TYPE_WIFI_DISABLED = 19; 1061 1062 // The NetworkAgent Wifi usability score has changed in a way that may 1063 // impact connectivity 1064 TYPE_WIFI_USABILITY_SCORE_BREACH = 20; 1065 1066 // Link probe was performed 1067 TYPE_LINK_PROBE = 21; 1068 } 1069 1070 enum FrameworkDisconnectReason { 1071 // default/none/unknown value 1072 DISCONNECT_UNKNOWN = 0; 1073 1074 // API DISCONNECT 1075 DISCONNECT_API = 1; 1076 1077 // Some framework internal reason (generic) 1078 DISCONNECT_GENERIC = 2; 1079 1080 // Network Agent network validation failed, user signaled network unwanted 1081 DISCONNECT_UNWANTED = 3; 1082 1083 // Roaming timed out 1084 DISCONNECT_ROAM_WATCHDOG_TIMER = 4; 1085 1086 // P2P service requested wifi disconnect 1087 DISCONNECT_P2P_DISCONNECT_WIFI_REQUEST = 5; 1088 1089 // SIM was removed while using a SIM config 1090 DISCONNECT_RESET_SIM_NETWORKS = 6; 1091 } 1092 1093 // Authentication Failure reasons as reported through the API. 1094 enum AuthFailureReason { 1095 // Unknown default 1096 AUTH_FAILURE_UNKNOWN = 0; 1097 1098 // The reason code if there is no error during authentication. It could also imply that there no 1099 // authentication in progress, 1100 AUTH_FAILURE_NONE = 1; 1101 1102 // The reason code if there was a timeout authenticating. 1103 AUTH_FAILURE_TIMEOUT = 2; 1104 1105 // The reason code if there was a wrong password while authenticating. 1106 AUTH_FAILURE_WRONG_PSWD = 3; 1107 1108 // The reason code if there was EAP failure while authenticating. 1109 AUTH_FAILURE_EAP_FAILURE = 4; 1110 } 1111 1112 // What event was this 1113 optional EventType type = 1; 1114 1115 // 80211 death reason code, relevant to NETWORK_DISCONNECTION_EVENTs 1116 optional int32 reason = 2 [default = -1]; 1117 1118 // 80211 Association Status code, relevant to ASSOCIATION_REJECTION_EVENTs 1119 optional int32 status = 3 [default = -1]; 1120 1121 // Designates whether a NETWORK_DISCONNECT_EVENT was by the STA or AP 1122 optional bool local_gen = 4 [default = false]; 1123 1124 // Network information from the WifiConfiguration of a framework initiated connection attempt 1125 optional ConfigInfo config_info = 5; 1126 1127 // RSSI from the last rssi poll (Only valid for active connections) 1128 optional int32 last_rssi = 6 [default = -127]; 1129 1130 // Link speed from the last rssi poll (Only valid for active connections) 1131 optional int32 last_link_speed = 7 [default = -1]; 1132 1133 // Frequency from the last rssi poll (Only valid for active connections) 1134 optional int32 last_freq = 8 [default = -1]; 1135 1136 // Enum used to define bit positions in the supplicant_state_change_bitmask 1137 // See {@code frameworks/base/wifi/java/android/net/wifi/SupplicantState.java} for documentation 1138 enum SupplicantState { 1139 STATE_DISCONNECTED = 0; 1140 1141 STATE_INTERFACE_DISABLED = 1; 1142 1143 STATE_INACTIVE = 2; 1144 1145 STATE_SCANNING = 3; 1146 1147 STATE_AUTHENTICATING = 4; 1148 1149 STATE_ASSOCIATING = 5; 1150 1151 STATE_ASSOCIATED = 6; 1152 1153 STATE_FOUR_WAY_HANDSHAKE = 7; 1154 1155 STATE_GROUP_HANDSHAKE = 8; 1156 1157 STATE_COMPLETED = 9; 1158 1159 STATE_DORMANT = 10; 1160 1161 STATE_UNINITIALIZED = 11; 1162 1163 STATE_INVALID = 12; 1164 } 1165 1166 // Bit mask of all supplicant state changes that occurred since the last event 1167 optional uint32 supplicant_state_changes_bitmask = 9 [default = 0]; 1168 1169 // The number of milliseconds that have elapsed since the device booted 1170 optional int64 start_time_millis = 10 [default = 0]; 1171 1172 optional FrameworkDisconnectReason framework_disconnect_reason = 11 [default = DISCONNECT_UNKNOWN]; 1173 1174 // Flag which indicates if an association rejection event occurred due to a timeout 1175 optional bool association_timed_out = 12 [default = false]; 1176 1177 // Authentication failure reason, as reported by WifiManager (calculated from state & deauth code) 1178 optional AuthFailureReason auth_failure_reason = 13 [default = AUTH_FAILURE_UNKNOWN]; 1179 1180 // NetworkAgent score of connected wifi 1181 optional int32 last_score = 14 [default = -1]; 1182 1183 // NetworkAgent Wifi usability score of connected wifi 1184 optional int32 last_wifi_usability_score = 15 [default = -1]; 1185 1186 // Prediction horizon (in second) of Wifi usability score provided by external 1187 // system app 1188 optional int32 last_prediction_horizon_sec = 16 [default = -1]; 1189 1190 // Only valid if event type == TYPE_LINK_PROBE. 1191 // true if link probe succeeded, false otherwise. 1192 optional bool link_probe_was_success = 17; 1193 1194 // Only valid if event type == TYPE_LINK_PROBE and link_probe_was_success == true. 1195 // Elapsed time, in milliseconds, of a successful link probe. 1196 optional int32 link_probe_success_elapsed_time_ms = 18; 1197 1198 // Only valid if event type == TYPE_LINK_PROBE and link_probe_was_success == false. 1199 // Failure reason for an unsuccessful link probe. 1200 optional LinkProbeStats.LinkProbeFailureReason link_probe_failure_reason = 19; 1201} 1202 1203// Wi-Fi Aware metrics 1204message WifiAwareLog { 1205 // total number of unique apps that used Aware (measured on attach) 1206 optional int32 num_apps = 1; 1207 1208 // total number of unique apps that used an identity callback when attaching 1209 optional int32 num_apps_using_identity_callback = 2; 1210 1211 // maximum number of attaches for an app 1212 optional int32 max_concurrent_attach_sessions_in_app = 3; 1213 1214 // histogram of attach request results 1215 repeated NanStatusHistogramBucket histogram_attach_session_status = 4; 1216 1217 // maximum number of concurrent publish sessions in a single app 1218 optional int32 max_concurrent_publish_in_app = 5; 1219 1220 // maximum number of concurrent subscribe sessions in a single app 1221 optional int32 max_concurrent_subscribe_in_app = 6; 1222 1223 // maximum number of concurrent discovery (publish+subscribe) sessions in a single app 1224 optional int32 max_concurrent_discovery_sessions_in_app = 7; 1225 1226 // maximum number of concurrent publish sessions in the system 1227 optional int32 max_concurrent_publish_in_system = 8; 1228 1229 // maximum number of concurrent subscribe sessions in the system 1230 optional int32 max_concurrent_subscribe_in_system = 9; 1231 1232 // maximum number of concurrent discovery (publish+subscribe) sessions in the system 1233 optional int32 max_concurrent_discovery_sessions_in_system = 10; 1234 1235 // histogram of publish request results 1236 repeated NanStatusHistogramBucket histogram_publish_status = 11; 1237 1238 // histogram of subscribe request results 1239 repeated NanStatusHistogramBucket histogram_subscribe_status = 12; 1240 1241 // number of unique apps which experienced a discovery session creation failure due to lack of 1242 // resources 1243 optional int32 num_apps_with_discovery_session_failure_out_of_resources = 13; 1244 1245 // histogram of create ndp request results 1246 repeated NanStatusHistogramBucket histogram_request_ndp_status = 14; 1247 1248 // histogram of create ndp out-of-band (OOB) request results 1249 repeated NanStatusHistogramBucket histogram_request_ndp_oob_status = 15; 1250 1251 // maximum number of concurrent active data-interfaces (NDI) in a single app 1252 optional int32 max_concurrent_ndi_in_app = 19; 1253 1254 // maximum number of concurrent active data-interfaces (NDI) in the system 1255 optional int32 max_concurrent_ndi_in_system = 20; 1256 1257 // maximum number of concurrent data-paths (NDP) in a single app 1258 optional int32 max_concurrent_ndp_in_app = 21; 1259 1260 // maximum number of concurrent data-paths (NDP) in the system 1261 optional int32 max_concurrent_ndp_in_system = 22; 1262 1263 // maximum number of concurrent secure data-paths (NDP) in a single app 1264 optional int32 max_concurrent_secure_ndp_in_app = 23; 1265 1266 // maximum number of concurrent secure data-paths (NDP) in the system 1267 optional int32 max_concurrent_secure_ndp_in_system = 24; 1268 1269 // maximum number of concurrent data-paths (NDP) per data-interface (NDI) 1270 optional int32 max_concurrent_ndp_per_ndi = 25; 1271 1272 // histogram of durations of Aware being available 1273 repeated HistogramBucket histogram_aware_available_duration_ms = 26; 1274 1275 // histogram of durations of Aware being enabled 1276 repeated HistogramBucket histogram_aware_enabled_duration_ms = 27; 1277 1278 // histogram of duration (in ms) of attach sessions 1279 repeated HistogramBucket histogram_attach_duration_ms = 28; 1280 1281 // histogram of duration (in ms) of publish sessions 1282 repeated HistogramBucket histogram_publish_session_duration_ms = 29; 1283 1284 // histogram of duration (in ms) of subscribe sessions 1285 repeated HistogramBucket histogram_subscribe_session_duration_ms = 30; 1286 1287 // histogram of duration (in ms) of data-paths (NDP) 1288 repeated HistogramBucket histogram_ndp_session_duration_ms = 31; 1289 1290 // histogram of usage (in MB) of data-paths (NDP) 1291 repeated HistogramBucket histogram_ndp_session_data_usage_mb = 32; 1292 1293 // histogram of usage (in MB) of data-path creation time (in ms) measured as request -> confirm 1294 repeated HistogramBucket histogram_ndp_creation_time_ms = 33; 1295 1296 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: minimum 1297 optional int64 ndp_creation_time_ms_min = 34; 1298 1299 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: maximum 1300 optional int64 ndp_creation_time_ms_max = 35; 1301 1302 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: sum 1303 optional int64 ndp_creation_time_ms_sum = 36; 1304 1305 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: sum of sq 1306 optional int64 ndp_creation_time_ms_sum_of_sq = 37; 1307 1308 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: number of 1309 // samples 1310 optional int64 ndp_creation_time_ms_num_samples = 38; 1311 1312 // total time within the logging window that aware was available 1313 optional int64 available_time_ms = 39; 1314 1315 // total time within the logging window that aware was enabled 1316 optional int64 enabled_time_ms = 40; 1317 1318 // maximum number of concurrent publish sessions enabling ranging in a single app 1319 optional int32 max_concurrent_publish_with_ranging_in_app = 41; 1320 1321 // maximum number of concurrent subscribe sessions specifying a geofence in a single app 1322 optional int32 max_concurrent_subscribe_with_ranging_in_app = 42; 1323 1324 // maximum number of concurrent publish sessions enabling ranging in the system 1325 optional int32 max_concurrent_publish_with_ranging_in_system = 43; 1326 1327 // maximum number of concurrent subscribe sessions specifying a geofence in the system 1328 optional int32 max_concurrent_subscribe_with_ranging_in_system = 44; 1329 1330 // histogram of subscribe session geofence minimum (only when specified) 1331 repeated HistogramBucket histogram_subscribe_geofence_min = 45; 1332 1333 // histogram of subscribe session geofence maximum (only when specified) 1334 repeated HistogramBucket histogram_subscribe_geofence_max = 46; 1335 1336 // total number of subscribe sessions which enabled ranging 1337 optional int32 num_subscribes_with_ranging = 47; 1338 1339 // total number of matches (service discovery indication) with ranging provided 1340 optional int32 num_matches_with_ranging = 48; 1341 1342 // total number of matches (service discovery indication) for service discovery with ranging 1343 // enabled which did not trigger ranging 1344 optional int32 num_matches_without_ranging_for_ranging_enabled_subscribes = 49; 1345 1346 // Histogram bucket for Wi-Fi Aware logs. Range is [start, end) 1347 message HistogramBucket { 1348 // lower range of the bucket (inclusive) 1349 optional int64 start = 1; 1350 1351 // upper range of the bucket (exclusive) 1352 optional int64 end = 2; 1353 1354 // number of samples in the bucket 1355 optional int32 count = 3; 1356 } 1357 1358 // Status of various NAN operations 1359 enum NanStatusTypeEnum { 1360 // constant to be used by proto 1361 UNKNOWN = 0; 1362 1363 // NAN operation succeeded 1364 SUCCESS = 1; 1365 1366 // NAN Discovery Engine/Host driver failures 1367 INTERNAL_FAILURE = 2; 1368 1369 // NAN OTA failures 1370 PROTOCOL_FAILURE = 3; 1371 1372 // The publish/subscribe discovery session id is invalid 1373 INVALID_SESSION_ID = 4; 1374 1375 // Out of resources to fufill request 1376 NO_RESOURCES_AVAILABLE = 5; 1377 1378 // Invalid arguments passed 1379 INVALID_ARGS = 6; 1380 1381 // Invalid peer id 1382 INVALID_PEER_ID = 7; 1383 1384 // Invalid NAN data-path (ndp) id 1385 INVALID_NDP_ID = 8; 1386 1387 // Attempting to enable NAN when not available, e.g. wifi is disabled 1388 NAN_NOT_ALLOWED = 9; 1389 1390 // Over the air ACK not received 1391 NO_OTA_ACK = 10; 1392 1393 // Attempting to enable NAN when already enabled 1394 ALREADY_ENABLED = 11; 1395 1396 // Can't queue tx followup message foor transmission 1397 FOLLOWUP_TX_QUEUE_FULL = 12; 1398 1399 // Unsupported concurrency of NAN and another feature - NAN disabled 1400 UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 13; 1401 1402 // Unknown NanStatusType 1403 UNKNOWN_HAL_STATUS = 14; 1404 } 1405 1406 // Histogram bucket for Wi-Fi Aware (NAN) status. 1407 message NanStatusHistogramBucket { 1408 // status type defining the bucket 1409 optional NanStatusTypeEnum nan_status_type = 1; 1410 1411 // number of samples in the bucket 1412 optional int32 count = 2; 1413 } 1414} 1415 1416// Data point used to build 'Number of Connectable Network' histograms 1417message NumConnectableNetworksBucket { 1418 // Number of connectable networks seen in a scan result 1419 optional int32 num_connectable_networks = 1 [default = 0]; 1420 1421 // Number of scan results with num_connectable_networks 1422 optional int32 count = 2 [default = 0]; 1423} 1424 1425// Pno scan metrics 1426// Here "Pno Scan" refers to the session of offloaded scans, these metrics count the result of a 1427// single session, and not the individual scans within that session. 1428message PnoScanMetrics { 1429 // Total number of attempts to offload pno scans 1430 optional int32 num_pno_scan_attempts = 1; 1431 1432 // Total number of pno scans failed 1433 optional int32 num_pno_scan_failed = 2; 1434 1435 // Number of pno scans started successfully over offload 1436 optional int32 num_pno_scan_started_over_offload = 3; 1437 1438 // Number of pno scans failed over offload 1439 optional int32 num_pno_scan_failed_over_offload = 4; 1440 1441 // Total number of pno scans that found any network 1442 optional int32 num_pno_found_network_events = 5; 1443} 1444 1445// Number of occurrences for a particular "Connect to Network" Notification or 1446// notification Action. 1447message ConnectToNetworkNotificationAndActionCount { 1448 1449 // "Connect to Network" notifications 1450 enum Notification { 1451 1452 // Default 1453 NOTIFICATION_UNKNOWN = 0; 1454 1455 // Initial notification with a recommended network. 1456 NOTIFICATION_RECOMMEND_NETWORK = 1; 1457 1458 // Notification when connecting to the recommended network. 1459 NOTIFICATION_CONNECTING_TO_NETWORK = 2; 1460 1461 // Notification when successfully connected to the network. 1462 NOTIFICATION_CONNECTED_TO_NETWORK = 3; 1463 1464 // Notification when failed to connect to network. 1465 NOTIFICATION_FAILED_TO_CONNECT = 4; 1466 } 1467 1468 // "Connect to Network" notification actions 1469 enum Action { 1470 1471 // Default 1472 ACTION_UNKNOWN = 0; 1473 1474 // User dismissed the "Connect to Network" notification. 1475 ACTION_USER_DISMISSED_NOTIFICATION = 1; 1476 1477 // User tapped action button to connect to recommended network. 1478 ACTION_CONNECT_TO_NETWORK = 2; 1479 1480 // User tapped action button to open Wi-Fi Settings. 1481 ACTION_PICK_WIFI_NETWORK = 3; 1482 1483 // User tapped "Failed to connect" notification to open Wi-Fi Settings. 1484 ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE = 4; 1485 } 1486 1487 // Recommenders of the "Connect to Network" notification 1488 enum Recommender { 1489 1490 // Default. 1491 RECOMMENDER_UNKNOWN = 0; 1492 1493 // Open Network Available recommender. 1494 RECOMMENDER_OPEN = 1; 1495 } 1496 1497 // Notification Type. 1498 optional Notification notification = 1; 1499 1500 // Action Type. 1501 optional Action action = 2; 1502 1503 // Recommender Type. 1504 optional Recommender recommender = 3; 1505 1506 // Occurrences of this action. 1507 optional int32 count = 4; 1508} 1509 1510// SoftAP event tracking sessions and client counts 1511message SoftApConnectedClientsEvent { 1512 1513 // Soft AP event Types 1514 enum SoftApEventType { 1515 1516 // Soft AP is Up and ready for use 1517 SOFT_AP_UP = 0; 1518 1519 // Soft AP is Down 1520 SOFT_AP_DOWN = 1; 1521 1522 // Number of connected soft AP clients has changed 1523 NUM_CLIENTS_CHANGED = 2; 1524 } 1525 1526 // Soft AP channel bandwidth types 1527 enum ChannelBandwidth { 1528 1529 BANDWIDTH_INVALID = 0; 1530 1531 BANDWIDTH_20_NOHT = 1; 1532 1533 BANDWIDTH_20 = 2; 1534 1535 BANDWIDTH_40 = 3; 1536 1537 BANDWIDTH_80 = 4; 1538 1539 BANDWIDTH_80P80 = 5; 1540 1541 BANDWIDTH_160 = 6; 1542 } 1543 1544 // Type of event being recorded 1545 optional SoftApEventType event_type = 1; 1546 1547 // Time passed since last boot in milliseconds 1548 optional int64 time_stamp_millis = 2; 1549 1550 // Number of connected clients if event_type is NUM_CLIENTS_CHANGED, otherwise zero. 1551 optional int32 num_connected_clients = 3; 1552 1553 // Channel frequency used for Soft AP 1554 optional int32 channel_frequency = 4; 1555 1556 // Channel bandwidth used for Soft AP 1557 optional ChannelBandwidth channel_bandwidth = 5; 1558} 1559 1560// Wps connection metrics 1561// Keeps track of Wi-Fi Protected Setup usage 1562message WpsMetrics { 1563 // Total number of wps connection attempts 1564 optional int32 num_wps_attempts = 1; 1565 1566 // Total number of wps connection successes 1567 optional int32 num_wps_success = 2; 1568 1569 // Total number of wps failures on start 1570 optional int32 num_wps_start_failure = 3; 1571 1572 // Total number of wps overlap failure 1573 optional int32 num_wps_overlap_failure = 4; 1574 1575 // Total number of wps timeout failure 1576 optional int32 num_wps_timeout_failure = 5; 1577 1578 // Total number of other wps failure during connection 1579 optional int32 num_wps_other_connection_failure = 6; 1580 1581 // Total number of supplicant failure after wps 1582 optional int32 num_wps_supplicant_failure = 7; 1583 1584 // Total number of wps cancellation 1585 optional int32 num_wps_cancellation = 8; 1586} 1587 1588// Power stats for Wifi 1589message WifiPowerStats { 1590 1591 // Duration of log (ms) 1592 optional int64 logging_duration_ms = 1; 1593 1594 // Energy consumed by wifi (mAh) 1595 optional double energy_consumed_mah = 2; 1596 1597 // Amount of time wifi is in idle (ms) 1598 optional int64 idle_time_ms = 3; 1599 1600 // Amount of time wifi is in rx (ms) 1601 optional int64 rx_time_ms = 4; 1602 1603 // Amount of time wifi is in tx (ms) 1604 optional int64 tx_time_ms = 5; 1605 1606 // Amount of time kernel is active because of wifi data (ms) 1607 optional int64 wifi_kernel_active_time_ms = 6; 1608 1609 // Number of packets sent (tx) 1610 optional int64 num_packets_tx = 7; 1611 1612 // Number of bytes sent (tx) 1613 optional int64 num_bytes_tx = 8; 1614 1615 // Number of packets received (rx) 1616 optional int64 num_packets_rx = 9; 1617 1618 // Number of bytes sent (rx) 1619 optional int64 num_bytes_rx = 10; 1620 1621 // Amount of time wifi is in sleep (ms) 1622 optional int64 sleep_time_ms = 11; 1623 1624 // Amount of time wifi is scanning (ms) 1625 optional int64 scan_time_ms = 12; 1626 1627 // Actual monitored rail energy consumed by wifi (mAh) 1628 optional double monitored_rail_energy_consumed_mah = 13; 1629} 1630 1631// Metrics for Wifi Wake 1632message WifiWakeStats { 1633 // An individual session for Wifi Wake 1634 message Session { 1635 // A Wifi Wake lifecycle event 1636 message Event { 1637 // Elapsed time in milliseconds since start of session. 1638 optional int64 elapsed_time_millis = 1; 1639 1640 // Number of scans that have occurred since start of session. 1641 optional int32 elapsed_scans = 2; 1642 } 1643 1644 // Start time of session in milliseconds. 1645 optional int64 start_time_millis = 1; 1646 1647 // The number of networks the lock was provided with at start. 1648 optional int32 locked_networks_at_start = 2; 1649 1650 // The number of networks in the lock at the time of the initialize event. Only valid if 1651 // initialize_event is recorded. 1652 optional int32 locked_networks_at_initialize = 6; 1653 1654 // Event for fully initializing the WakeupLock (i.e. WakeupLock is "locked"). 1655 optional Event initialize_event = 7; 1656 1657 // Event for unlocking the WakeupLock. Does not occur if lock was initialized with 0 networks. 1658 optional Event unlock_event = 3; 1659 1660 // Event for triggering wakeup. 1661 optional Event wakeup_event = 4; 1662 1663 // Event for WifiWake reset event. This event marks the end of a session. 1664 optional Event reset_event = 5; 1665 } 1666 1667 // Total number of sessions for Wifi Wake. 1668 optional int32 num_sessions = 1; 1669 1670 // Session information for every Wifi Wake session (up to a maximum of 10). 1671 repeated Session sessions = 2; 1672 1673 // Number of ignored calls to start (due to WakeupController already being active). 1674 optional int32 num_ignored_starts = 3; 1675 1676 // Number of Wifi Wake sessions that have recorded wakeup events. 1677 optional int32 num_wakeups = 4; 1678} 1679 1680// Metrics for Wi-Fi RTT 1681message WifiRttLog { 1682 // Number of RTT request API calls 1683 optional int32 num_requests = 1; 1684 1685 // Histogram of RTT operation overall status 1686 repeated RttOverallStatusHistogramBucket histogram_overall_status = 2; 1687 1688 // RTT to Access Points metrics 1689 optional RttToPeerLog rtt_to_ap = 3; 1690 1691 // RTT to Wi-Fi Aware peers metrics 1692 optional RttToPeerLog rtt_to_aware = 4; 1693 1694 // Metrics for a RTT to Peer (peer = AP or Wi-Fi Aware) 1695 message RttToPeerLog { 1696 // Total number of API calls 1697 optional int32 num_requests = 1; 1698 1699 // Total number of individual requests 1700 optional int32 num_individual_requests = 2; 1701 1702 // Total number of apps which requested RTT 1703 optional int32 num_apps = 3; 1704 1705 // Histogram of total number of RTT requests by an app (WifiRttManager#startRanging) 1706 repeated HistogramBucket histogram_num_requests_per_app = 4; 1707 1708 // Histogram of number of peers in a single RTT request (RangingRequest entries) 1709 repeated HistogramBucket histogram_num_peers_per_request = 5; 1710 1711 // Histogram of status of individual RTT operations (RangingResult entries) 1712 repeated RttIndividualStatusHistogramBucket histogram_individual_status = 6; 1713 1714 // Histogram of measured distances (RangingResult entries) 1715 repeated HistogramBucket histogram_distance = 7; 1716 1717 // Histogram of interval of RTT requests by an app (WifiRttManager#startRanging) 1718 repeated HistogramBucket histogram_request_interval_ms = 8; 1719 } 1720 1721 // Histogram bucket for Wi-Fi RTT logs. Range is [start, end) 1722 message HistogramBucket { 1723 // lower range of the bucket (inclusive) 1724 optional int64 start = 1; 1725 1726 // upper range of the bucket (exclusive) 1727 optional int64 end = 2; 1728 1729 // number of samples in the bucket 1730 optional int32 count = 3; 1731 } 1732 1733 // Status codes for overall RTT operation 1734 enum RttOverallStatusTypeEnum { 1735 // constant to be used by proto 1736 OVERALL_UNKNOWN = 0; 1737 1738 // RTT operation succeeded (individual results may still fail) 1739 OVERALL_SUCCESS = 1; 1740 1741 // RTT operation failed (unspecified reason) 1742 OVERALL_FAIL = 2; 1743 1744 // RTT operation failed since RTT was not available (e.g. Airplane mode) 1745 OVERALL_RTT_NOT_AVAILABLE = 3; 1746 1747 // RTT operation timed-out: didn't receive response from HAL in expected time 1748 OVERALL_TIMEOUT = 4; 1749 1750 // RTT operation aborted since the app is spamming the service 1751 OVERALL_THROTTLE = 5; 1752 1753 // RTT request to HAL received immediate failure 1754 OVERALL_HAL_FAILURE = 6; 1755 1756 // RTT to Wi-Fi Aware peer using PeerHandle failed to get a MAC address translation 1757 OVERALL_AWARE_TRANSLATION_FAILURE = 7; 1758 1759 // RTT operation failed due to missing Location permission (post execution) 1760 OVERALL_LOCATION_PERMISSION_MISSING = 8; 1761 } 1762 1763 // Status codes for individual RTT operation 1764 enum RttIndividualStatusTypeEnum { 1765 // constant to be used by proto 1766 UNKNOWN = 0; 1767 1768 // RTT operation succeeded 1769 SUCCESS = 1; 1770 1771 // RTT failure: generic reason (no further information) 1772 FAILURE = 2; 1773 1774 // Target STA does not respond to request 1775 FAIL_NO_RSP = 3; 1776 1777 // Request rejected. Applies to 2-sided RTT only 1778 FAIL_REJECTED = 4; 1779 1780 // Operation not scheduled 1781 FAIL_NOT_SCHEDULED_YET = 5; 1782 1783 // Timing measurement times out 1784 FAIL_TM_TIMEOUT = 6; 1785 1786 // Target on different channel, cannot range 1787 FAIL_AP_ON_DIFF_CHANNEL = 7; 1788 1789 // Ranging not supported 1790 FAIL_NO_CAPABILITY = 8; 1791 1792 // Request aborted for unknown reason 1793 ABORTED = 9; 1794 1795 // Invalid T1-T4 timestamp 1796 FAIL_INVALID_TS = 10; 1797 1798 // 11mc protocol failed 1799 FAIL_PROTOCOL = 11; 1800 1801 // Request could not be scheduled 1802 FAIL_SCHEDULE = 12; 1803 1804 // Responder cannot collaborate at time of request 1805 FAIL_BUSY_TRY_LATER = 13; 1806 1807 // Bad request args 1808 INVALID_REQ = 14; 1809 1810 // WiFi not enabled 1811 NO_WIFI = 15; 1812 1813 // Responder overrides param info, cannot range with new params 1814 FAIL_FTM_PARAM_OVERRIDE = 16; 1815 1816 // HAL did not provide a result to a framework request 1817 MISSING_RESULT = 17; 1818 } 1819 1820 // Histogram bucket for Wi-Fi RTT overall operation status 1821 message RttOverallStatusHistogramBucket { 1822 // status type defining the bucket 1823 optional RttOverallStatusTypeEnum status_type = 1; 1824 1825 // number of samples in the bucket 1826 optional int32 count = 2; 1827 } 1828 1829 // Histogram bucket for Wi-Fi RTT individual operation status 1830 message RttIndividualStatusHistogramBucket { 1831 // status type defining the bucket 1832 optional RttIndividualStatusTypeEnum status_type = 1; 1833 1834 // number of samples in the bucket 1835 optional int32 count = 2; 1836 } 1837} 1838 1839// Usage data for the wifi radio while device is running on battery. 1840message WifiRadioUsage { 1841 // Duration of log (ms) 1842 optional int64 logging_duration_ms = 1; 1843 1844 // Total time for which the radio is awake due to scan. 1845 optional int64 scan_time_ms = 2; 1846} 1847 1848message ExperimentValues { 1849 // Indicates if we are logging WifiIsUnusableEvent in metrics 1850 optional bool wifi_is_unusable_logging_enabled = 1; 1851 1852 // Minimum number of txBad to trigger a data stall 1853 optional int32 wifi_data_stall_min_tx_bad = 2; 1854 1855 // Minimum number of txSuccess to trigger a data stall 1856 // when rxSuccess is 0 1857 optional int32 wifi_data_stall_min_tx_success_without_rx = 3; 1858 1859 // Indicates if we are logging LinkSpeedCount in metrics 1860 optional bool link_speed_counts_logging_enabled = 4; 1861 1862 // Duration for evaluating Wifi condition to trigger a data stall 1863 // measured in milliseconds 1864 optional int32 data_stall_duration_ms = 5; 1865 1866 // Threshold of Tx throughput below which to trigger a data stall 1867 // measured in Mbps 1868 optional int32 data_stall_tx_tput_thr_mbps = 6; 1869 1870 // Threshold of Rx throughput below which to trigger a data stall 1871 // measured in Mbps 1872 optional int32 data_stall_rx_tput_thr_mbps = 7; 1873 1874 // Threshold of Tx packet error rate above which to trigger a data stall 1875 // in percentage 1876 optional int32 data_stall_tx_per_thr = 8; 1877 1878 // Threshold of CCA level above which to trigger a data stall in percentage 1879 optional int32 data_stall_cca_level_thr = 9; 1880} 1881 1882message WifiIsUnusableEvent { 1883 enum TriggerType { 1884 // Default/Invalid event 1885 TYPE_UNKNOWN = 0; 1886 1887 // There is a data stall from tx failures 1888 TYPE_DATA_STALL_BAD_TX = 1; 1889 1890 // There is a data stall from rx failures 1891 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 1892 1893 // There is a data stall from both tx and rx failures 1894 TYPE_DATA_STALL_BOTH = 3; 1895 1896 // Firmware generated an alert 1897 TYPE_FIRMWARE_ALERT = 4; 1898 1899 // IP Manager lost reachability to network neighbors 1900 TYPE_IP_REACHABILITY_LOST = 5; 1901 } 1902 1903 // What event triggered WifiIsUnusableEvent. 1904 optional TriggerType type = 1; 1905 1906 // The timestamp at which this event occurred. 1907 // Measured in milliseconds that have elapsed since the device booted. 1908 optional int64 start_time_millis = 2; 1909 1910 // NetworkAgent score of connected wifi. 1911 // Defaults to -1 if the score was never set. 1912 optional int32 last_score = 3 [default = -1]; 1913 1914 // Delta of successfully transmitted (ACKed) unicast data packets 1915 // between the last two WifiLinkLayerStats. 1916 optional int64 tx_success_delta = 4; 1917 1918 // Delta of transmitted unicast data retry packets 1919 // between the last two WifiLinkLayerStats. 1920 optional int64 tx_retries_delta = 5; 1921 1922 // Delta of lost (not ACKed) transmitted unicast data packets 1923 // between the last two WifiLinkLayerStats. 1924 optional int64 tx_bad_delta = 6; 1925 1926 // Delta of received unicast data packets 1927 // between the last two WifiLinkLayerStats. 1928 optional int64 rx_success_delta = 7; 1929 1930 // Time in millisecond between the last two WifiLinkLayerStats. 1931 optional int64 packet_update_time_delta = 8; 1932 1933 // The timestamp at which the last WifiLinkLayerStats was updated. 1934 // Measured in milliseconds that have elapsed since the device booted. 1935 optional int64 last_link_layer_stats_update_time = 9; 1936 1937 // Firmware alert code. Only valid when the event was triggered by a firmware alert, otherwise -1. 1938 optional int32 firmware_alert_code = 10 [default = -1]; 1939 1940 // NetworkAgent wifi usability score of connected wifi. 1941 // Defaults to -1 if the score was never set. 1942 optional int32 last_wifi_usability_score = 11 [default = -1]; 1943 1944 // Prediction horizon (in second) of Wifi usability score provided by external 1945 // system app 1946 optional int32 last_prediction_horizon_sec = 12 [default = -1]; 1947 1948 // Whether screen status is on when WifiIsUnusableEvent happens. 1949 optional bool screen_on = 13 [default = false]; 1950} 1951 1952message PasspointProfileTypeCount { 1953 enum EapMethod { 1954 // Unknown Type 1955 TYPE_UNKNOWN = 0; 1956 1957 // EAP_TLS (13) 1958 TYPE_EAP_TLS = 1; 1959 1960 // EAP_TTLS (21) 1961 TYPE_EAP_TTLS = 2; 1962 1963 // EAP_SIM (18) 1964 TYPE_EAP_SIM = 3; 1965 1966 // EAP_AKA (23) 1967 TYPE_EAP_AKA = 4; 1968 1969 // EAP_AKA_PRIME (50) 1970 TYPE_EAP_AKA_PRIME = 5; 1971 } 1972 1973 // Eap method type set in Passpoint profile 1974 optional EapMethod eap_method_type = 1; 1975 1976 // Num of installed Passpoint profile with same eap method 1977 optional int32 count = 2; 1978} 1979 1980message WifiLinkLayerUsageStats { 1981 // Total logging duration in ms. 1982 optional int64 logging_duration_ms = 1; 1983 1984 // Total time the wifi radio is on in ms over the logging duration. 1985 optional int64 radio_on_time_ms = 2; 1986 1987 // Total time the wifi radio is doing tx in ms over the logging duration. 1988 optional int64 radio_tx_time_ms = 3; 1989 1990 // Total time the wifi radio is doing rx in ms over the logging duration. 1991 optional int64 radio_rx_time_ms = 4; 1992 1993 // Total time the wifi radio is scanning in ms over the logging duration. 1994 optional int64 radio_scan_time_ms = 5; 1995 1996 // Total time the wifi radio spent doing nan scans in ms over the logging duration. 1997 optional int64 radio_nan_scan_time_ms = 6; 1998 1999 // Total time the wifi radio spent doing background scans in ms over the logging duration. 2000 optional int64 radio_background_scan_time_ms = 7; 2001 2002 // Total time the wifi radio spent doing roam scans in ms over the logging duration. 2003 optional int64 radio_roam_scan_time_ms = 8; 2004 2005 // Total time the wifi radio spent doing pno scans in ms over the logging duration. 2006 optional int64 radio_pno_scan_time_ms = 9; 2007 2008 // Total time the wifi radio spent doing hotspot 2.0 scans and GAS exchange 2009 // in ms over the logging duration. 2010 optional int64 radio_hs20_scan_time_ms = 10; 2011} 2012 2013message WifiUsabilityStatsEntry { 2014 // Status codes for link probe status 2015 enum LinkProbeStatus { 2016 // Link probe status is unknown 2017 PROBE_STATUS_UNKNOWN = 0; 2018 2019 // Link probe is not triggered 2020 PROBE_STATUS_NO_PROBE = 1; 2021 2022 // Link probe is triggered and the result is success 2023 PROBE_STATUS_SUCCESS = 2; 2024 2025 // Link probe is triggered and the result is failure 2026 PROBE_STATUS_FAILURE = 3; 2027 } 2028 2029 // Codes for cellular data network type 2030 enum CellularDataNetworkType { 2031 // Unknown network 2032 NETWORK_TYPE_UNKNOWN = 0; 2033 2034 // GSM network 2035 NETWORK_TYPE_GSM = 1; 2036 2037 // CDMA network 2038 NETWORK_TYPE_CDMA = 2; 2039 2040 // CDMA EVDO network 2041 NETWORK_TYPE_EVDO_0 = 3; 2042 2043 // WCDMA network 2044 NETWORK_TYPE_UMTS = 4; 2045 2046 // TDSCDMA network 2047 NETWORK_TYPE_TD_SCDMA = 5; 2048 2049 // LTE network 2050 NETWORK_TYPE_LTE = 6; 2051 2052 // NR network 2053 NETWORK_TYPE_NR = 7; 2054 } 2055 2056 // Absolute milliseconds from device boot when these stats were sampled 2057 optional int64 time_stamp_ms = 1; 2058 2059 // The RSSI at the sample time 2060 optional int32 rssi = 2; 2061 2062 // Link speed at the sample time in Mbps 2063 optional int32 link_speed_mbps = 3; 2064 2065 // The total number of tx success counted from the last radio chip reset 2066 optional int64 total_tx_success = 4; 2067 2068 // The total number of MPDU data packet retries counted from the last radio chip reset 2069 optional int64 total_tx_retries = 5; 2070 2071 // The total number of tx bad counted from the last radio chip reset 2072 optional int64 total_tx_bad = 6; 2073 2074 // The total number of rx success counted from the last radio chip reset 2075 optional int64 total_rx_success = 7; 2076 2077 // The total time the wifi radio is on in ms counted from the last radio chip reset 2078 optional int64 total_radio_on_time_ms = 8; 2079 2080 // The total time the wifi radio is doing tx in ms counted from the last radio chip reset 2081 optional int64 total_radio_tx_time_ms = 9; 2082 2083 // The total time the wifi radio is doing rx in ms counted from the last radio chip reset 2084 optional int64 total_radio_rx_time_ms = 10; 2085 2086 // The total time spent on all types of scans in ms counted from the last radio chip reset 2087 optional int64 total_scan_time_ms = 11; 2088 2089 // The total time spent on nan scans in ms counted from the last radio chip reset 2090 optional int64 total_nan_scan_time_ms = 12; 2091 2092 // The total time spent on background scans in ms counted from the last radio chip reset 2093 optional int64 total_background_scan_time_ms = 13; 2094 2095 // The total time spent on roam scans in ms counted from the last radio chip reset 2096 optional int64 total_roam_scan_time_ms = 14; 2097 2098 // The total time spent on pno scans in ms counted from the last radio chip reset 2099 optional int64 total_pno_scan_time_ms = 15; 2100 2101 // The total time spent on hotspot2.0 scans and GAS exchange in ms counted from the last radio 2102 // chip reset 2103 optional int64 total_hotspot_2_scan_time_ms = 16; 2104 2105 // Internal framework Wifi score 2106 optional int32 wifi_score = 17; 2107 2108 // Wifi usability score provided by external system app 2109 optional int32 wifi_usability_score = 18; 2110 2111 // Sequence number from external system app to framework 2112 optional int32 seq_num_to_framework = 19; 2113 2114 // The total time CCA is on busy status on the current frequency in ms 2115 // counted from the last radio chip reset 2116 optional int64 total_cca_busy_freq_time_ms = 20; 2117 2118 // The total radio on time of the current frequency from the last radio 2119 // chip reset 2120 optional int64 total_radio_on_freq_time_ms = 21; 2121 2122 // The total number of beacons received from the last radio chip reset 2123 optional int64 total_beacon_rx = 22; 2124 2125 // Prediction horizon (in second) of Wifi usability score provided by external 2126 // system app 2127 optional int32 prediction_horizon_sec = 23; 2128 2129 // The link probe status since last stats update 2130 optional LinkProbeStatus probe_status_since_last_update = 24; 2131 2132 // The elapsed time of the most recent link probe since last stats update; 2133 optional int32 probe_elapsed_time_since_last_update_ms = 25; 2134 2135 // The MCS rate of the most recent link probe since last stats update 2136 optional int32 probe_mcs_rate_since_last_update = 26; 2137 2138 // Rx link speed at the sample time in Mbps 2139 optional int32 rx_link_speed_mbps = 27; 2140 2141 // Sequence number generated by framework 2142 optional int32 seq_num_inside_framework = 28; 2143 2144 // Whether current entry is for the same BSSID on the same frequency compared 2145 // to last entry 2146 optional bool is_same_bssid_and_freq = 29; 2147 2148 // Cellular data network type currently in use on the device for data transmission 2149 optional CellularDataNetworkType cellular_data_network_type = 30; 2150 2151 // Cellular signal strength in dBm, NR: CsiRsrp, LTE: Rsrp, WCDMA/TDSCDMA: Rscp, 2152 // CDMA: Rssi, EVDO: Rssi, GSM: Rssi 2153 optional int32 cellular_signal_strength_dbm = 31; 2154 2155 // Cellular signal strength in dB, NR: CsiSinr, LTE: Rsrq, WCDMA: EcNo, TDSCDMA: invalid, 2156 // CDMA: Ecio, EVDO: SNR, GSM: invalid */ 2157 optional int32 cellular_signal_strength_db = 32; 2158 2159 // Whether the primary registered cell of current entry is same as that of previous entry 2160 optional bool is_same_registered_cell = 33; 2161 2162 // The device mobility state 2163 optional DeviceMobilityStatePnoScanStats.DeviceMobilityState 2164 device_mobility_state = 34; 2165} 2166 2167message WifiUsabilityStats { 2168 enum Label { 2169 // Default label 2170 LABEL_UNKNOWN = 0; 2171 2172 // Wifi is usable 2173 LABEL_GOOD = 1; 2174 2175 // Wifi is unusable 2176 LABEL_BAD = 2; 2177 } 2178 2179 enum UsabilityStatsTriggerType { 2180 // Default/Invalid event 2181 TYPE_UNKNOWN = 0; 2182 2183 // There is a data stall from tx failures 2184 TYPE_DATA_STALL_BAD_TX = 1; 2185 2186 // There is a data stall from rx failures 2187 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 2188 2189 // There is a data stall from both tx and rx failures 2190 TYPE_DATA_STALL_BOTH = 3; 2191 2192 // Firmware generated an alert 2193 TYPE_FIRMWARE_ALERT = 4; 2194 2195 // IP Manager lost reachability to network neighbors 2196 TYPE_IP_REACHABILITY_LOST = 5; 2197 } 2198 2199 // The current wifi usability state 2200 optional Label label = 1; 2201 2202 // The list of timestamped wifi usability stats 2203 repeated WifiUsabilityStatsEntry stats = 2; 2204 2205 // What event triggered WifiUsabilityStats. 2206 optional UsabilityStatsTriggerType trigger_type = 3; 2207 2208 // Firmware alert code. Only valid when the stats was triggered by a firmware 2209 // alert, otherwise -1. 2210 optional int32 firmware_alert_code = 4 [default = -1]; 2211 2212 // Absolute milliseconds from device boot when these stats were sampled 2213 optional int64 time_stamp_ms = 5; 2214} 2215 2216message DeviceMobilityStatePnoScanStats { 2217 // see WifiManager.DEVICE_MOBILITY_STATE_* constants 2218 enum DeviceMobilityState { 2219 // Unknown mobility 2220 UNKNOWN = 0; 2221 2222 // High movement 2223 HIGH_MVMT = 1; 2224 2225 // Low movement 2226 LOW_MVMT = 2; 2227 2228 // Stationary 2229 STATIONARY = 3; 2230 } 2231 2232 // The device mobility state 2233 optional DeviceMobilityState device_mobility_state = 1; 2234 2235 // The number of times that this state was entered 2236 optional int32 num_times_entered_state = 2; 2237 2238 // The total duration elapsed while in this mobility state, in ms 2239 optional int64 total_duration_ms = 3; 2240 2241 // the total duration elapsed while in this mobility state with PNO scans running, in ms 2242 optional int64 pno_duration_ms = 4; 2243} 2244 2245// The information about the Wifi P2p events. 2246message WifiP2pStats { 2247 2248 // Group event list tracking sessions and client counts in tethered mode. 2249 repeated GroupEvent group_event = 1; 2250 2251 // Session information that gets logged for every Wifi P2p connection. 2252 repeated P2pConnectionEvent connection_event = 2; 2253 2254 // Number of persistent group in the user profile. 2255 optional int32 num_persistent_group = 3; 2256 2257 // Number of peer scan. 2258 optional int32 num_total_peer_scans = 4; 2259 2260 // Number of service scan. 2261 optional int32 num_total_service_scans = 5; 2262} 2263 2264message P2pConnectionEvent { 2265 2266 enum ConnectionType { 2267 2268 // fresh new connection. 2269 CONNECTION_FRESH = 0; 2270 2271 // reinvoke a group. 2272 CONNECTION_REINVOKE = 1; 2273 2274 // create a group with the current device as the group owner locally. 2275 CONNECTION_LOCAL = 2; 2276 2277 // create a group or join a group with config. 2278 CONNECTION_FAST = 3; 2279 } 2280 2281 enum ConnectivityLevelFailure { 2282 2283 // Failure is unknown. 2284 CLF_UNKNOWN = 0; 2285 2286 // No failure. 2287 CLF_NONE = 1; 2288 2289 // Timeout for current connecting request. 2290 CLF_TIMEOUT = 2; 2291 2292 // The connecting request is canceled by the user. 2293 CLF_CANCEL = 3; 2294 2295 // Provision discovery failure, e.g. no pin code, timeout, rejected by the peer. 2296 CLF_PROV_DISC_FAIL = 4; 2297 2298 // Invitation failure, e.g. rejected by the peer. 2299 CLF_INVITATION_FAIL = 5; 2300 2301 // Incoming request is rejected by the user. 2302 CLF_USER_REJECT = 6; 2303 2304 // New connection request is issued before ending previous connecting request. 2305 CLF_NEW_CONNECTION_ATTEMPT = 7; 2306 } 2307 2308 // WPS method. 2309 enum WpsMethod { 2310 // WPS is skipped for Group Reinvoke. 2311 WPS_NA = -1; 2312 2313 // Push button configuration. 2314 WPS_PBC = 0; 2315 2316 // Display pin method configuration - pin is generated and displayed on device. 2317 WPS_DISPLAY = 1; 2318 2319 // Keypad pin method configuration - pin is entered on device. 2320 WPS_KEYPAD = 2; 2321 2322 // Label pin method configuration - pin is labelled on device. 2323 WPS_LABEL = 3; 2324 } 2325 2326 // Start time of the connection. 2327 optional int64 start_time_millis = 1; 2328 2329 // Type of the connection. 2330 optional ConnectionType connection_type = 2; 2331 2332 // WPS method. 2333 optional WpsMethod wps_method = 3 [default = WPS_NA]; 2334 2335 // Duration to connect. 2336 optional int32 duration_taken_to_connect_millis = 4; 2337 2338 // Failures that happen at the connectivity layer. 2339 optional ConnectivityLevelFailure connectivity_level_failure_code = 5; 2340} 2341 2342// GroupEvent tracking group information from GroupStarted to GroupRemoved. 2343message GroupEvent { 2344 2345 enum GroupRole { 2346 2347 GROUP_OWNER = 0; 2348 2349 GROUP_CLIENT = 1; 2350 } 2351 2352 // The ID of network in supplicant for this group. 2353 optional int32 net_id = 1; 2354 2355 // Start time of the group. 2356 optional int64 start_time_millis = 2; 2357 2358 // Channel frequency used for Group. 2359 optional int32 channel_frequency = 3; 2360 2361 // Is group owner or group client. 2362 optional GroupRole group_role = 5; 2363 2364 // Number of connected clients. 2365 optional int32 num_connected_clients = 6; 2366 2367 // Cumulative number of connected clients. 2368 optional int32 num_cumulative_clients = 7; 2369 2370 // The session duration. 2371 optional int32 session_duration_millis = 8; 2372 2373 // The idle duration. A group without any client is in idle. 2374 optional int32 idle_duration_millis = 9; 2375} 2376 2377// Easy Connect (DPP) 2378message WifiDppLog { 2379 reserved 6; 2380 2381 // Number of Configurator-Initiator requests 2382 optional int32 num_dpp_configurator_initiator_requests = 1; 2383 2384 // Number of Enrollee-Initiator requests 2385 optional int32 num_dpp_enrollee_initiator_requests = 2; 2386 2387 // Easy Connect (DPP) Enrollee success 2388 optional int32 num_dpp_enrollee_success = 3; 2389 2390 // Easy Connect (DPP) Configurator success code bucket 2391 repeated DppConfiguratorSuccessStatusHistogramBucket dpp_configurator_success_code = 4; 2392 2393 // Easy Connect (DPP) failure code bucket 2394 repeated DppFailureStatusHistogramBucket dpp_failure_code = 5; 2395 2396 // Easy Connect (DPP) operation time bucket 2397 repeated HistogramBucketInt32 dpp_operation_time = 7; 2398 2399 // Histogram bucket for Wi-Fi DPP configurator success 2400 message DppConfiguratorSuccessStatusHistogramBucket { 2401 // status type defining the bucket 2402 optional DppConfiguratorSuccessCode dpp_status_type = 1; 2403 2404 // number of samples in the bucket 2405 optional int32 count = 2; 2406 } 2407 2408 // Histogram bucket for Wi-Fi DPP failures 2409 message DppFailureStatusHistogramBucket { 2410 // status type defining the bucket 2411 optional DppFailureCode dpp_status_type = 1; 2412 2413 // number of samples in the bucket 2414 optional int32 count = 2; 2415 } 2416 2417 enum DppConfiguratorSuccessCode { 2418 // Unknown success code 2419 EASY_CONNECT_EVENT_SUCCESS_UNKNOWN = 0; 2420 2421 // Easy Connect Configurator success event: Configuration sent to enrollee 2422 EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT = 1; 2423 } 2424 2425 enum DppFailureCode { 2426 // Unknown failure 2427 EASY_CONNECT_EVENT_FAILURE_UNKNOWN = 0; 2428 2429 // Easy Connect Failure event: Scanned QR code is either not a Easy Connect URI, or the Easy 2430 // Connect URI has errors. 2431 EASY_CONNECT_EVENT_FAILURE_INVALID_URI = 1; 2432 2433 // Easy Connect Failure event: Bootstrapping/Authentication initialization process failure. 2434 EASY_CONNECT_EVENT_FAILURE_AUTHENTICATION = 2; 2435 2436 // Easy Connect Failure event: Both devices are implementing the same role and are 2437 // incompatible. 2438 EASY_CONNECT_EVENT_FAILURE_NOT_COMPATIBLE = 3; 2439 2440 // Easy Connect Failure event: Configuration process has failed due to malformed message. 2441 EASY_CONNECT_EVENT_FAILURE_CONFIGURATION = 4; 2442 2443 // Easy Connect Failure event: Easy Connect request while in another Easy Connect exchange. 2444 EASY_CONNECT_EVENT_FAILURE_BUSY = 5; 2445 2446 // Easy Connect Failure event: No response from the peer. 2447 EASY_CONNECT_EVENT_FAILURE_TIMEOUT = 6; 2448 2449 // Easy Connect Failure event: General protocol failure. 2450 EASY_CONNECT_EVENT_FAILURE_GENERIC = 7; 2451 2452 // Easy Connect Failure event: Feature or option is not supported. 2453 EASY_CONNECT_EVENT_FAILURE_NOT_SUPPORTED = 8; 2454 2455 // Easy Connect Failure event: Invalid network provided to Easy Connect configurator. 2456 // Network must either be WPA3-Personal (SAE) or WPA2-Personal (PSK). 2457 EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK = 9; 2458 } 2459} 2460 2461// WifiConfigStore read/write metrics. 2462message WifiConfigStoreIO { 2463 // Histogram of config store read durations. 2464 repeated DurationBucket read_durations = 1; 2465 2466 // Histogram of config store write durations. 2467 repeated DurationBucket write_durations = 2; 2468 2469 // Total Number of instances of write/read duration in this duration bucket. 2470 message DurationBucket { 2471 // Bucket covers duration : [range_start_ms, range_end_ms) 2472 // The (inclusive) lower bound of read/write duration represented by this bucket 2473 optional int32 range_start_ms = 1; 2474 2475 // The (exclusive) upper bound of read/write duration represented by this bucket 2476 optional int32 range_end_ms = 2; 2477 2478 // Number of read/write durations that fit into this bucket 2479 optional int32 count = 3; 2480 } 2481} 2482 2483// Histogram bucket counting with int32. Range is [start, end) 2484message HistogramBucketInt32 { 2485 // lower range of the bucket (inclusive) 2486 optional int32 start = 1; 2487 2488 // upper range of the bucket (exclusive) 2489 optional int32 end = 2; 2490 2491 // number of samples in the bucket 2492 optional int32 count = 3; 2493} 2494 2495// Counts occurrences of a int32 key 2496message Int32Count { 2497 // the key 2498 optional int32 key = 1; 2499 2500 // the count 2501 optional int32 count = 2; 2502} 2503 2504message LinkProbeStats { 2505 enum LinkProbeFailureReason { 2506 // unknown reason 2507 LINK_PROBE_FAILURE_REASON_UNKNOWN = 0; 2508 2509 // Specified MCS rate when it is unsupported by the driver. 2510 LINK_PROBE_FAILURE_REASON_MCS_UNSUPPORTED = 1; 2511 2512 // Driver reported that no ACK was received for the transmitted probe. 2513 LINK_PROBE_FAILURE_REASON_NO_ACK = 2; 2514 2515 // Driver failed to report on the status of the transmitted probe within the timeout. 2516 LINK_PROBE_FAILURE_REASON_TIMEOUT = 3; 2517 2518 // An existing link probe is in progress. 2519 LINK_PROBE_FAILURE_REASON_ALREADY_STARTED = 4; 2520 } 2521 2522 // Counts the number of failures for each failure reason. 2523 message LinkProbeFailureReasonCount { 2524 // The failure reason. 2525 optional LinkProbeFailureReason failure_reason = 1; 2526 2527 // The number of occurrences for this failure reason. 2528 optional int32 count = 2; 2529 } 2530 2531 // Counts the number of link probes for each experiment. 2532 message ExperimentProbeCounts { 2533 // The experiment ID. 2534 optional string experiment_id = 1; 2535 2536 // The number of link probes triggered for this experiment. 2537 optional int32 probe_count = 2; 2538 } 2539 2540 // Counts the occurrences of RSSI values when a link probe succeeds. 2541 repeated Int32Count success_rssi_counts = 1; 2542 2543 // Counts the occurrences of RSSI values when a link probe fails. 2544 repeated Int32Count failure_rssi_counts = 2; 2545 2546 // Counts the occurrences of Link Speed values when a link probe succeeds. 2547 repeated Int32Count success_link_speed_counts = 3; 2548 2549 // Counts the occurrences of Link Speed values when a link probe fails. 2550 repeated Int32Count failure_link_speed_counts = 4; 2551 2552 // Histogram for the number of seconds since the last TX success when a link probe succeeds. 2553 repeated HistogramBucketInt32 success_seconds_since_last_tx_success_histogram = 5; 2554 2555 // Histogram for the number of seconds since the last TX success when a link probe fails. 2556 repeated HistogramBucketInt32 failure_seconds_since_last_tx_success_histogram = 6; 2557 2558 // Histogram for the elapsed time of successful link probes, in ms. 2559 repeated HistogramBucketInt32 success_elapsed_time_ms_histogram = 7; 2560 2561 // Counts the occurrences of error codes for failed link probes. 2562 repeated LinkProbeFailureReasonCount failure_reason_counts = 8; 2563 2564 // Counts the number of link probes for each experiment. 2565 repeated ExperimentProbeCounts experiment_probe_counts = 9; 2566} 2567 2568// Stores the decisions that were made by a experiment when compared against another experiment 2569message NetworkSelectionExperimentDecisions { 2570 // the id of one experiment 2571 optional int32 experiment1_id = 1; 2572 2573 // the id of the other experiment 2574 optional int32 experiment2_id = 2; 2575 2576 // Counts occurrences of the number of network choices there were when experiment1 makes the 2577 // same network selection as experiment2. 2578 // The keys are the number of network choices, and the values are the number of occurrences of 2579 // this number of network choices when exp1 and exp2 make the same network selection. 2580 repeated Int32Count same_selection_num_choices_counter = 3; 2581 2582 // Counts occurrences of the number of network choices there were when experiment1 makes the 2583 // same network selection as experiment2. 2584 // The keys are the number of network choices, and the values are the number of occurrences of 2585 // this number of network choices when exp1 and exp2 make different network selections. 2586 // Note that it is possible for the network selection to be different even when there only exists 2587 // a single network choice, since choosing not to connect to that network is a valid choice. 2588 repeated Int32Count different_selection_num_choices_counter = 4; 2589} 2590 2591// NetworkRequest API metrics. 2592message WifiNetworkRequestApiLog { 2593 // Number of requests via this API surface. 2594 optional int32 num_request = 1; 2595 2596 // Histogram of requests via this API surface to number of networks matched in scan results. 2597 repeated HistogramBucketInt32 network_match_size_histogram = 2; 2598 2599 // Number of successful network connection from this API. 2600 optional int32 num_connect_success = 3; 2601 2602 // Number of requests via this API surface that bypassed user approval. 2603 optional int32 num_user_approval_bypass = 4; 2604 2605 // Number of requests via this API surface that was rejected by the user. 2606 optional int32 num_user_reject = 5; 2607 2608 // Number of unique apps using this API surface. 2609 optional int32 num_apps = 6; 2610} 2611 2612// NetworkSuggestion API metrics. 2613message WifiNetworkSuggestionApiLog { 2614 // Number of modifications to their suggestions by apps. 2615 optional int32 num_modification = 1; 2616 2617 // Number of successful network connection from app suggestions. 2618 optional int32 num_connect_success = 2; 2619 2620 // Number of network connection failures from app suggestions. 2621 optional int32 num_connect_failure = 3; 2622 2623 // Histogram for size of the network lists provided by various apps on the device. 2624 repeated HistogramBucketInt32 network_list_size_histogram = 4; 2625} 2626 2627// WifiLock metrics 2628message WifiLockStats { 2629 // Amount of time wifi is actively in HIGH_PERF mode (ms) 2630 // This means the lock takes effect and the device takes the actions required for this mode 2631 optional int64 high_perf_active_time_ms = 1; 2632 2633 // Amount of time wifi is actively in LOW_LATENCY mode (ms) 2634 // This means the lock takes effect and the device takes the actions required for this mode 2635 optional int64 low_latency_active_time_ms = 2; 2636 2637 // Histogram of HIGH_PERF lock acquisition duration (seconds) 2638 // Note that acquiring the lock does not necessarily mean that device is actively in that mode 2639 repeated HistogramBucketInt32 high_perf_lock_acq_duration_sec_histogram = 3; 2640 2641 // Histogram of LOW_LATENCY lock acquisition duration (seconds) 2642 // Note that acquiring the lock does not necessarily mean that device is actively in that mode 2643 repeated HistogramBucketInt32 low_latency_lock_acq_duration_sec_histogram = 4; 2644 2645 // Histogram of HIGH_PERF active session duration (seconds) 2646 // This means the lock takes effect and the device takes the actions required for this mode 2647 repeated HistogramBucketInt32 high_perf_active_session_duration_sec_histogram = 5; 2648 2649 // Histogram of LOW_LATENCY active session duration (seconds) 2650 // This means the lock takes effect and the device takes the actions required for this mode 2651 repeated HistogramBucketInt32 low_latency_active_session_duration_sec_histogram = 6; 2652} 2653 2654// Stats on number of times Wi-Fi is turned on/off though the WifiManager#setWifiEnabled API 2655message WifiToggleStats { 2656 // Number of time Wi-Fi is turned on by privileged apps 2657 optional int32 num_toggle_on_privileged = 1; 2658 2659 // Number of time Wi-Fi is turned off by privileged apps 2660 optional int32 num_toggle_off_privileged = 2; 2661 2662 // Number of time Wi-Fi is turned on by normal apps 2663 optional int32 num_toggle_on_normal = 3; 2664 2665 // Number of time Wi-Fi is turned off by normal apps 2666 optional int32 num_toggle_off_normal = 4; 2667} 2668 2669// Information about the Passpoint provision metrics. 2670message PasspointProvisionStats { 2671 enum ProvisionFailureCode { 2672 // provisioning failure for unknown reason. 2673 OSU_FAILURE_UNKNOWN = 0; 2674 2675 // The reason code for Provisioning Failure due to connection failure to OSU AP. 2676 OSU_FAILURE_AP_CONNECTION = 1; 2677 2678 // The reason code for invalid server URL address. 2679 OSU_FAILURE_SERVER_URL_INVALID = 2; 2680 2681 // The reason code for provisioning failure due to connection failure to the server. 2682 OSU_FAILURE_SERVER_CONNECTION = 3; 2683 2684 // The reason code for provisioning failure due to invalid server certificate. 2685 OSU_FAILURE_SERVER_VALIDATION = 4; 2686 2687 // The reason code for provisioning failure due to invalid service provider. 2688 OSU_FAILURE_SERVICE_PROVIDER_VERIFICATION = 5; 2689 2690 // The reason code for provisioning failure when a provisioning flow is aborted. 2691 OSU_FAILURE_PROVISIONING_ABORTED = 6; 2692 2693 // The reason code for provisioning failure when a provisioning flow is not possible. 2694 OSU_FAILURE_PROVISIONING_NOT_AVAILABLE = 7; 2695 2696 // The reason code for provisioning failure due to invalid web url format for an OSU web page. 2697 OSU_FAILURE_INVALID_URL_FORMAT_FOR_OSU = 8; 2698 2699 // The reason code for provisioning failure when a command received is not the expected command 2700 // type. 2701 OSU_FAILURE_UNEXPECTED_COMMAND_TYPE = 9; 2702 2703 // The reason code for provisioning failure when a SOAP message is not the expected message 2704 // type. 2705 OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_TYPE = 10; 2706 2707 // The reason code for provisioning failure when a SOAP message exchange fails. 2708 OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11; 2709 2710 // The reason code for provisioning failure when a redirect listener fails to start. 2711 OSU_FAILURE_START_REDIRECT_LISTENER = 12; 2712 2713 // The reason code for provisioning failure when a redirect listener timed out to receive a HTTP 2714 // redirect response. 2715 OSU_FAILURE_TIMED_OUT_REDIRECT_LISTENER = 13; 2716 2717 // The reason code for provisioning failure when there is no OSU activity to listen to intent. 2718 OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 14; 2719 2720 // The reason code for provisioning failure when the status of a SOAP message is not the 2721 // expected message status. 2722 OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_STATUS = 15; 2723 2724 // The reason code for provisioning failure when there is no PPS MO. 2725 OSU_FAILURE_NO_PPS_MO = 16; 2726 2727 // The reason code for provisioning failure when there is no AAAServerTrustRoot node in a PPS 2728 // MO. 2729 OSU_FAILURE_NO_AAA_SERVER_TRUST_ROOT_NODE = 17; 2730 2731 // The reason code for provisioning failure when there is no TrustRoot node for remediation 2732 // server in a PPS MO. 2733 OSU_FAILURE_NO_REMEDIATION_SERVER_TRUST_ROOT_NODE = 18; 2734 2735 // The reason code for provisioning failure when there is no TrustRoot node for policy server in 2736 // a PPS MO. 2737 OSU_FAILURE_NO_POLICY_SERVER_TRUST_ROOT_NODE = 19; 2738 2739 // The reason code for provisioning failure when failing to retrieve trust root certificates 2740 // used for validating server certificate for AAA, Remediation and Policy server. 2741 OSU_FAILURE_RETRIEVE_TRUST_ROOT_CERTIFICATES = 20; 2742 2743 // The reason code for provisioning failure when there is no trust root certificate for AAA 2744 // server. 2745 OSU_FAILURE_NO_AAA_TRUST_ROOT_CERTIFICATE = 21; 2746 2747 // The reason code for provisioning failure when a {@link PasspointConfiguration} is failed to 2748 // install. 2749 OSU_FAILURE_ADD_PASSPOINT_CONFIGURATION = 22; 2750 2751 // The reason code for provisioning failure when an {@link OsuProvider} is not found for 2752 // provisioning. 2753 OSU_FAILURE_OSU_PROVIDER_NOT_FOUND = 23; 2754 } 2755 2756 // Number of passpoint provisioning success 2757 optional int32 num_provision_success = 1; 2758 2759 // Count for passpoint provisioning failure 2760 repeated ProvisionFailureCount provision_failure_count = 2; 2761 2762 // Number of occurrences of a specific passpoint provision failure code 2763 message ProvisionFailureCount { 2764 // Failure code 2765 optional ProvisionFailureCode failure_code = 1; 2766 2767 // Number of failure for the failure_code. 2768 optional int32 count = 2; 2769 } 2770} 2771