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 com_android_server_wifi; 20 21option java_package = "com.android.server.wifi.proto"; 22option java_outer_classname = "WifiMetricsProto"; 23 24// The information about the Wifi events. 25message WifiLog { 26 reserved 122; 27 28 // Session information that gets logged for every Wifi connection. 29 repeated ConnectionEvent connection_event = 1; 30 31 // Number of saved networks in the user profile. 32 optional int32 num_saved_networks = 2; 33 34 // Number of open networks in the saved networks. 35 optional int32 num_open_networks = 3; 36 37 // Number of legacy personal networks. 38 optional int32 num_legacy_personal_networks = 4; 39 40 // Number of legacy enterprise networks. 41 optional int32 num_legacy_enterprise_networks = 5; 42 43 // Does the user have location setting enabled. 44 optional bool is_location_enabled = 6; 45 46 // Does the user have scanning enabled. 47 optional bool is_scanning_always_enabled = 7; 48 49 // Number of times user toggled wifi using the settings menu. 50 optional int32 num_wifi_toggled_via_settings = 8; 51 52 // Number of times user toggled wifi using the airplane menu. 53 optional int32 num_wifi_toggled_via_airplane = 9; 54 55 // Number of networks added by the user. 56 optional int32 num_networks_added_by_user = 10; 57 58 // Number of networks added by applications. 59 optional int32 num_networks_added_by_apps = 11; 60 61 // Number scans that returned empty results. 62 optional int32 num_empty_scan_results = 12; 63 64 // Number scans that returned at least one result. 65 optional int32 num_non_empty_scan_results = 13; 66 67 // Number of single scans requests. 68 optional int32 num_oneshot_scans = 14; 69 70 // Number of repeated background scans that were scheduled to the chip. 71 optional int32 num_background_scans = 15; 72 73 // Error codes that a scan can result in. 74 enum ScanReturnCode { 75 76 // Return Code is unknown. 77 SCAN_UNKNOWN = 0; 78 79 // Scan was successful. 80 SCAN_SUCCESS = 1; 81 82 // Scan was successfully started, but was interrupted. 83 SCAN_FAILURE_INTERRUPTED = 2; 84 85 // Scan failed to start because of invalid configuration 86 // (bad channel, etc). 87 SCAN_FAILURE_INVALID_CONFIGURATION = 3; 88 89 // Could not start a scan because wifi is disabled. 90 FAILURE_WIFI_DISABLED = 4; 91 92 } 93 94 // Mapping of error codes to the number of times that scans resulted 95 // in that error. 96 repeated ScanReturnEntry scan_return_entries = 16; 97 98 message ScanReturnEntry { 99 100 // Return code of the scan. 101 optional ScanReturnCode scan_return_code = 1; 102 103 // Number of entries that were found in the scan. 104 optional int32 scan_results_count = 2; 105 } 106 107 // State of the Wifi. 108 enum WifiState { 109 110 // State is unknown. 111 WIFI_UNKNOWN = 0; 112 113 // Wifi is disabled. 114 WIFI_DISABLED = 1; 115 116 // Wifi is enabled. 117 WIFI_DISCONNECTED = 2; 118 119 // Wifi is enabled and associated with an AP. 120 WIFI_ASSOCIATED = 3; 121 } 122 123 // Mapping of system state to the number of times that scans were requested in 124 // that state 125 repeated WifiSystemStateEntry wifi_system_state_entries = 17; 126 127 message WifiSystemStateEntry { 128 129 // Current WiFi state. 130 optional WifiState wifi_state = 1; 131 132 // Count of scans in state. 133 optional int32 wifi_state_count = 2; 134 135 // Is screen on. 136 optional bool is_screen_on = 3; 137 } 138 139 // Mapping of Error/Success codes to the number of background scans that resulted in it 140 repeated ScanReturnEntry background_scan_return_entries = 18; 141 142 // Mapping of system state to the number of times that Background scans were requested in that 143 // state 144 repeated WifiSystemStateEntry background_scan_request_state = 19; 145 146 // Total number of times the Watchdog of Last Resort triggered, resetting the wifi stack 147 optional int32 num_last_resort_watchdog_triggers = 20; 148 149 // Total number of networks over bad association threshold when watchdog triggered 150 optional int32 num_last_resort_watchdog_bad_association_networks_total = 21; 151 152 // Total number of networks over bad authentication threshold when watchdog triggered 153 optional int32 num_last_resort_watchdog_bad_authentication_networks_total = 22; 154 155 // Total number of networks over bad dhcp threshold when watchdog triggered 156 optional int32 num_last_resort_watchdog_bad_dhcp_networks_total = 23; 157 158 // Total number of networks over bad other threshold when watchdog triggered 159 optional int32 num_last_resort_watchdog_bad_other_networks_total = 24; 160 161 // Total count of networks seen when watchdog triggered 162 optional int32 num_last_resort_watchdog_available_networks_total = 25; 163 164 // Total count of triggers with atleast one bad association network 165 optional int32 num_last_resort_watchdog_triggers_with_bad_association = 26; 166 167 // Total count of triggers with atleast one bad authentication network 168 optional int32 num_last_resort_watchdog_triggers_with_bad_authentication = 27; 169 170 // Total count of triggers with atleast one bad dhcp network 171 optional int32 num_last_resort_watchdog_triggers_with_bad_dhcp = 28; 172 173 // Total count of triggers with atleast one bad other network 174 optional int32 num_last_resort_watchdog_triggers_with_bad_other = 29; 175 176 // Count of times connectivity watchdog confirmed pno is working 177 optional int32 num_connectivity_watchdog_pno_good = 30; 178 179 // Count of times connectivity watchdog found pno not working 180 optional int32 num_connectivity_watchdog_pno_bad = 31; 181 182 // Count of times connectivity watchdog confirmed background scan is working 183 optional int32 num_connectivity_watchdog_background_good = 32; 184 185 // Count of times connectivity watchdog found background scan not working 186 optional int32 num_connectivity_watchdog_background_bad = 33; 187 188 // The time duration represented by this wifi log, from start to end of capture 189 optional int32 record_duration_sec = 34; 190 191 // Counts the occurrences of each individual RSSI poll level 192 repeated RssiPollCount rssi_poll_rssi_count = 35; 193 194 // Total number of times WiFi connected immediately after a Last Resort Watchdog trigger, 195 // without new networks becoming available. 196 optional int32 num_last_resort_watchdog_successes = 36; 197 198 // Total number of saved hidden networks 199 optional int32 num_hidden_networks = 37; 200 201 // Total number of saved passpoint / hotspot 2.0 networks 202 optional int32 num_passpoint_networks = 38; 203 204 // Total number of scan results 205 optional int32 num_total_scan_results = 39; 206 207 // Total number of scan results for open networks 208 optional int32 num_open_network_scan_results = 40; 209 210 // Total number of scan results for legacy personal networks 211 optional int32 num_legacy_personal_network_scan_results = 41; 212 213 // Total number of scan results for legacy enterprise networks 214 optional int32 num_legacy_enterprise_network_scan_results = 42; 215 216 // Total number of scan results for hidden networks 217 optional int32 num_hidden_network_scan_results = 43; 218 219 // Total number of scan results for hotspot 2.0 r1 networks 220 optional int32 num_hotspot2_r1_network_scan_results = 44; 221 222 // Total number of scan results for hotspot 2.0 r2 networks 223 optional int32 num_hotspot2_r2_network_scan_results = 45; 224 225 // Total number of scans handled by framework (oneshot or otherwise) 226 optional int32 num_scans = 46; 227 228 // Counts the occurrences of each alert reason. 229 repeated AlertReasonCount alert_reason_count = 47; 230 231 // Counts the occurrences of each Wifi score 232 repeated WifiScoreCount wifi_score_count = 48; 233 234 // Histogram of Soft AP Durations 235 repeated SoftApDurationBucket soft_ap_duration = 49; 236 237 // Histogram of Soft AP ReturnCode 238 repeated SoftApReturnCodeCount soft_ap_return_code = 50; 239 240 // Histogram of the delta between scan result RSSI and RSSI polls 241 repeated RssiPollCount rssi_poll_delta_count = 51; 242 243 // List of events 244 repeated StaEvent sta_event_list = 52; 245 246 // Total number of times WiFi HAL crashed. 247 optional int32 num_hal_crashes = 53; 248 249 // Total number of times WiFicond crashed. 250 optional int32 num_wificond_crashes = 54; 251 252 // Indicates the number of times an error was encountered in 253 // Wifi HAL on |WifiNative.setupInterfaceForClientMode|. 254 optional int32 num_setup_client_interface_failure_due_to_hal = 55; 255 256 // Indicates the number of times an error was encountered in 257 // Wificond on |WifiNative.setupInterfaceForClientMode|. 258 optional int32 num_setup_client_interface_failure_due_to_wificond = 56; 259 260 // Wi-Fi Aware metrics 261 optional WifiAwareLog wifi_aware_log = 57; 262 263 // Number of saved Passpoint providers in user profile. 264 optional int32 num_passpoint_providers = 58; 265 266 // Count of times Passpoint provider being installed. 267 optional int32 num_passpoint_provider_installation = 59; 268 269 // Count of times Passpoint provivider is installed successfully. 270 optional int32 num_passpoint_provider_install_success = 60; 271 272 // Count of times Passpoint provider is being uninstalled. 273 optional int32 num_passpoint_provider_uninstallation = 61; 274 275 // Count of times Passpoint provider is uninstalled successfully. 276 optional int32 num_passpoint_provider_uninstall_success = 62; 277 278 // Count of saved Passpoint providers device has ever connected to. 279 optional int32 num_passpoint_providers_successfully_connected = 63; 280 281 // Histogram counting instances of scans with N many ScanResults with unique ssids 282 repeated NumConnectableNetworksBucket total_ssids_in_scan_histogram = 64; 283 284 // Histogram counting instances of scans with N many ScanResults/bssids 285 repeated NumConnectableNetworksBucket total_bssids_in_scan_histogram = 65; 286 287 // Histogram counting instances of scans with N many unique open ssids 288 repeated NumConnectableNetworksBucket available_open_ssids_in_scan_histogram = 66; 289 290 // Histogram counting instances of scans with N many bssids for open networks 291 repeated NumConnectableNetworksBucket available_open_bssids_in_scan_histogram = 67; 292 293 // Histogram counting instances of scans with N many unique ssids for saved networks 294 repeated NumConnectableNetworksBucket available_saved_ssids_in_scan_histogram = 68; 295 296 // Histogram counting instances of scans with N many bssids for saved networks 297 repeated NumConnectableNetworksBucket available_saved_bssids_in_scan_histogram = 69; 298 299 // Histogram counting instances of scans with N many unique SSIDs for open or saved networks 300 repeated NumConnectableNetworksBucket available_open_or_saved_ssids_in_scan_histogram = 70; 301 302 // Histogram counting instances of scans with N many BSSIDs for open or saved networks 303 repeated NumConnectableNetworksBucket available_open_or_saved_bssids_in_scan_histogram = 71; 304 305 // Histogram counting instances of scans with N many ScanResults matching unique saved passpoint providers 306 repeated NumConnectableNetworksBucket available_saved_passpoint_provider_profiles_in_scan_histogram = 72; 307 308 // Histogram counting instances of scans with N many ScanResults BSSIDs matching a saved passpoint provider 309 repeated NumConnectableNetworksBucket available_saved_passpoint_provider_bssids_in_scan_histogram = 73; 310 311 // Counts the number of AllSingleScanLister.onResult calls with a full band scan result 312 optional int32 full_band_all_single_scan_listener_results = 74; 313 314 // Counts the number of AllSingleScanLister.onResult calls with a partial (channels) scan result 315 optional int32 partial_all_single_scan_listener_results = 75; 316 317 // Pno scan metrics 318 optional PnoScanMetrics pno_scan_metrics = 76; 319 320 // Histogram of "Connect to Network" notifications. 321 // The notification Action should be unset. 322 repeated ConnectToNetworkNotificationAndActionCount connect_to_network_notification_count = 77; 323 324 // Histogram of "Connect to Network" notification user actions. 325 repeated ConnectToNetworkNotificationAndActionCount connect_to_network_notification_action_count = 78; 326 327 // The number of SSIDs blocked from recommendation by the open network 328 // notification recommender 329 optional int32 open_network_recommender_blocklist_size = 79; 330 331 // Is the available network notification feature turned on 332 optional bool is_wifi_networks_available_notification_on = 80; 333 334 // Count of recommendation updates made by the open network notification 335 // recommender 336 optional int32 num_open_network_recommendation_updates = 81; 337 338 // Count of connection attempts that were initiated unsuccessfully 339 optional int32 num_open_network_connect_message_failed_to_send = 82; 340 341 // Histogram counting instances of scans with N many HotSpot 2.0 R1 APs 342 repeated NumConnectableNetworksBucket observed_hotspot_r1_aps_in_scan_histogram = 83; 343 344 // Histogram counting instances of scans with N many HotSpot 2.0 R2 APs 345 repeated NumConnectableNetworksBucket observed_hotspot_r2_aps_in_scan_histogram = 84; 346 347 // Histogram counting instances of scans with N many unique HotSpot 2.0 R1 ESS. 348 // Where ESS is defined as the (HESSID, ANQP Domain ID), (SSID, ANQP Domain ID) or 349 // (SSID, BSSID) tuple depending on AP configuration (in the above priority 350 // order). 351 repeated NumConnectableNetworksBucket observed_hotspot_r1_ess_in_scan_histogram = 85; 352 353 // Histogram counting instances of scans with N many unique HotSpot 2.0 R2 ESS. 354 // Where ESS is defined as the (HESSID, ANQP Domain ID), (SSID, ANQP Domain ID) or 355 // (SSID, BSSID) tuple depending on AP configuration (in the above priority 356 // order). 357 repeated NumConnectableNetworksBucket observed_hotspot_r2_ess_in_scan_histogram = 86; 358 359 // Histogram counting number of HotSpot 2.0 R1 APs per observed ESS in a scan 360 // (one value added per unique ESS - potentially multiple counts per single 361 // scan!) 362 repeated NumConnectableNetworksBucket observed_hotspot_r1_aps_per_ess_in_scan_histogram = 87; 363 364 // Histogram counting number of HotSpot 2.0 R2 APs per observed ESS in a scan 365 // (one value added per unique ESS - potentially multiple counts per single 366 // scan!) 367 repeated NumConnectableNetworksBucket observed_hotspot_r2_aps_per_ess_in_scan_histogram = 88; 368 369 // SoftAP event list tracking sessions and client counts in tethered mode 370 repeated SoftApConnectedClientsEvent soft_ap_connected_clients_events_tethered = 89; 371 372 // SoftAP event list tracking sessions and client counts in local only mode 373 repeated SoftApConnectedClientsEvent soft_ap_connected_clients_events_local_only = 90; 374 375 // WPS connection metrics - removed 376 reserved 91; 377 reserved "wps_metrics"; 378 379 // Wifi power statistics 380 optional WifiPowerStats wifi_power_stats = 92; 381 382 // Number of connectivity single scan requests. 383 optional int32 num_connectivity_oneshot_scans = 93; 384 385 // WifiWake statistics 386 optional WifiWakeStats wifi_wake_stats = 94; 387 388 // Histogram counting instances of scans with N many 802.11mc (RTT) supporting APs 389 repeated NumConnectableNetworksBucket observed_80211mc_supporting_aps_in_scan_histogram = 95; 390 391 // Total number of times supplicant crashed. 392 optional int32 num_supplicant_crashes = 96; 393 394 // Total number of times hostapd crashed. 395 optional int32 num_hostapd_crashes = 97; 396 397 // Indicates the number of times an error was encountered in 398 // supplicant on |WifiNative.setupInterfaceForClientMode|. 399 optional int32 num_setup_client_interface_failure_due_to_supplicant = 98; 400 401 // Indicates the number of times an error was encountered in 402 // Wifi HAL on |WifiNative.setupInterfaceForSoftApMode|. 403 optional int32 num_setup_soft_ap_interface_failure_due_to_hal = 99; 404 405 // Indicates the number of times an error was encountered in 406 // Wifi HAL on |WifiNative.setupInterfaceForSoftApMode|. 407 optional int32 num_setup_soft_ap_interface_failure_due_to_wificond = 100; 408 409 // Indicates the number of times an error was encountered in 410 // Wifi HAL on |WifiNative.setupInterfaceForSoftApMode|. 411 optional int32 num_setup_soft_ap_interface_failure_due_to_hostapd = 101; 412 413 // Indicates the number of times we got an interface down in client mode. 414 optional int32 num_client_interface_down = 102; 415 416 // Indicates the number of times we got an interface down in softap mode. 417 optional int32 num_soft_ap_interface_down = 103; 418 419 // Indicates the number of scan requests from external apps. 420 optional int32 num_external_app_oneshot_scan_requests = 104; 421 422 // Indicates the number of times a scan request from an external foreground app was throttled. 423 optional int32 num_external_foreground_app_oneshot_scan_requests_throttled = 105; 424 425 // Indicates the number of times a scan request from an external background app was throttled. 426 optional int32 num_external_background_app_oneshot_scan_requests_throttled = 106; 427 428 // WifiLastResortWatchdog time milliseconds delta between trigger and first connection success 429 optional int64 watchdog_trigger_to_connection_success_duration_ms = 107 [default = -1]; 430 431 // The number of times wifi experienced failures after watchdog has already been triggered and is 432 // waiting for a connection success 433 optional int64 watchdog_total_connection_failure_count_after_trigger = 108; 434 435 // Number of times DFS channel scans are requested in single scan requests. 436 optional int32 num_oneshot_has_dfs_channel_scans = 109; 437 438 // Wi-Fi RTT metrics 439 optional WifiRttLog wifi_rtt_log = 110; 440 441 // Flag which indicates if Connected MAC Randomization is enabled 442 optional bool is_mac_randomization_on = 111 [default = false]; 443 444 // Number of radio mode changes to MCC (Multi channel concurrency). 445 optional int32 num_radio_mode_change_to_mcc = 112; 446 447 // Number of radio mode changes to SCC (Single channel concurrency). 448 optional int32 num_radio_mode_change_to_scc = 113; 449 450 // Number of radio mode changes to SBS (Single band simultaneous). 451 optional int32 num_radio_mode_change_to_sbs = 114; 452 453 // Number of radio mode changes to DBS (Dual band simultaneous). 454 optional int32 num_radio_mode_change_to_dbs = 115; 455 456 // Number of times the firmware picked a SoftAp channel not satisfying user band preference. 457 optional int32 num_soft_ap_user_band_preference_unsatisfied = 116; 458 459 // Identifier for experimental scoring parameter settings. 460 optional string score_experiment_id = 117; 461 462 // Data on wifi radio usage 463 optional WifiRadioUsage wifi_radio_usage = 118; 464 465 // Stores settings values used for metrics testing. 466 optional ExperimentValues experiment_values = 119; 467 468 // List of WifiIsUnusableEvents which get logged when we notice that WiFi is unusable. 469 // Collected only when WIFI_IS_UNUSABLE_EVENT_METRICS_ENABLED Settings is enabled. 470 repeated WifiIsUnusableEvent wifi_is_unusable_event_list = 120; 471 472 // Counts the occurrences of each link speed (Mbps) level 473 // with rssi (dBm) and rssi^2 sums (dBm^2) 474 repeated LinkSpeedCount link_speed_counts = 121; 475 476 // Hardware revision (EVT, DVT, PVT etc.) 477 optional string hardware_revision = 124; 478 479 // Total wifi link layer usage data over the logging duration in ms. 480 optional WifiLinkLayerUsageStats wifi_link_layer_usage_stats = 125; 481 482 // Multiple lists of timestamped link layer stats with labels to represent whether wifi is usable 483 repeated WifiUsabilityStats wifi_usability_stats_list = 126; 484 485 // Counts the occurrences of each Wifi usability score provided by external app 486 repeated WifiUsabilityScoreCount wifi_usability_score_count = 127; 487 488 // List of PNO scan stats, one element for each mobility state 489 repeated DeviceMobilityStatePnoScanStats mobility_state_pno_stats_list = 128; 490 491 // Wifi p2p statistics 492 optional WifiP2pStats wifi_p2p_stats = 129; 493 494 // Easy Connect (DPP) metrics 495 optional WifiDppLog wifi_dpp_log = 130; 496 497 // Number of Enhanced Open (OWE) networks in the saved networks. 498 optional int32 num_enhanced_open_networks = 131; 499 500 // Number of WPA3-Personal networks. 501 optional int32 num_wpa3_personal_networks = 132; 502 503 // Number of WPA3-Enterprise networks. 504 optional int32 num_wpa3_enterprise_networks = 133; 505 506 // Total number of scan results for Enhanced open networks 507 optional int32 num_enhanced_open_network_scan_results = 134; 508 509 // Total number of scan results for WPA3-Personal networks 510 optional int32 num_wpa3_personal_network_scan_results = 135; 511 512 // Total number of scan results for WPA3-Enterprise networks 513 optional int32 num_wpa3_enterprise_network_scan_results = 136; 514 515 // WifiConfigStore read/write metrics. 516 optional WifiConfigStoreIO wifi_config_store_io = 137; 517 518 // Total number of saved networks with mac randomization enabled. 519 optional int32 num_saved_networks_with_mac_randomization = 138; 520 521 // Link Probe metrics 522 optional LinkProbeStats link_probe_stats = 139; 523 524 // List of NetworkSelectionExperimentDecisions stats for each experiment 525 repeated NetworkSelectionExperimentDecisions network_selection_experiment_decisions_list = 140; 526 527 // Network Request API surface metrics. 528 optional WifiNetworkRequestApiLog wifi_network_request_api_log = 141; 529 530 // Network Suggestion API surface metrics. 531 optional WifiNetworkSuggestionApiLog wifi_network_suggestion_api_log = 142; 532 533 // WifiLock statistics 534 optional WifiLockStats wifi_lock_stats = 143; 535 536 // Stats on number of times Wi-Fi is turned on/off though the WifiManager#setWifiEnabled API 537 optional WifiToggleStats wifi_toggle_stats = 144; 538 539 // Number of times WifiManager#addOrUpdateNetwork is called. 540 optional int32 num_add_or_update_network_calls = 145; 541 542 // Number of times WifiManager#enableNetwork is called. 543 optional int32 num_enable_network_calls = 146; 544 545 // Passpoint provison metrics 546 optional PasspointProvisionStats passpoint_provision_stats = 147; 547 548 // Histogram of the EAP method type of all installed Passpoint profiles for R1 549 repeated PasspointProfileTypeCount installed_passpoint_profile_type_for_r1 = 123; 550 551 // Histogram of the EAP method type of all installed Passpoint profiles for R2 552 repeated PasspointProfileTypeCount installed_passpoint_profile_type_for_r2 = 148; 553 554 // Histogram of Tx link speed at 2G 555 repeated Int32Count tx_link_speed_count_2g = 149; 556 557 // Histogram of Tx link speed at 5G low band 558 repeated Int32Count tx_link_speed_count_5g_low = 150; 559 560 // Histogram of Tx link speed at 5G middle band 561 repeated Int32Count tx_link_speed_count_5g_mid = 151; 562 563 // Histogram of Tx link speed at 5G high band 564 repeated Int32Count tx_link_speed_count_5g_high = 152; 565 566 // Histogram of Rx link speed at 2G 567 repeated Int32Count rx_link_speed_count_2g = 153; 568 569 // Histogram of Rx link speed at 5G low band 570 repeated Int32Count rx_link_speed_count_5g_low = 154; 571 572 // Histogram of Rx link speed at 5G middle band 573 repeated Int32Count rx_link_speed_count_5g_mid = 155; 574 575 // Histogram of Rx link speed at 5G high band 576 repeated Int32Count rx_link_speed_count_5g_high = 156; 577 578 // Count of IP renewal failures. 579 optional int32 num_ip_renewal_failure = 157; 580 581 // Metrics collected by health monitor 582 optional HealthMonitorMetrics health_monitor_metrics = 158; 583 584 // Metrics related to the WifiBlocklistMonitor 585 optional BssidBlocklistStats bssid_blocklist_stats = 159; 586 587 // Connection duration under various health conditions 588 optional ConnectionDurationStats connection_duration_stats = 160; 589 590 // Number of WAPI-Personal saved networks. 591 optional int32 num_wapi_personal_networks = 161; 592 593 // Number of WAPI-Enterprise saved networks. 594 optional int32 num_wapi_enterprise_networks = 162; 595 596 // Total number of scan results for WAPI-Personal networks 597 optional int32 num_wapi_personal_network_scan_results = 163; 598 599 // Total number of scan results for WAPI-Enterprise networks 600 optional int32 num_wapi_enterprise_network_scan_results = 164; 601 602 // Is the external WiFi connected network scorer from OEM extension module turned on 603 optional bool is_external_wifi_scorer_on = 165 [default = false]; 604 605 // Metrics related to Wi-Fi off 606 optional WifiOffMetrics wifi_off_metrics = 166; 607 608 // Total number of scan results for MBO supported networks 609 optional int32 num_mbo_supported_network_scan_results = 167; 610 611 // Total number of scan results for MBO cellular data aware networks 612 optional int32 num_mbo_cellular_data_aware_network_scan_results = 168; 613 614 // Total number of scan results for OCE supported networks 615 optional int32 num_oce_supported_network_scan_results = 169; 616 617 // Total number of scan results for FILS supported networks 618 optional int32 num_fils_supported_network_scan_results = 170; 619 620 // Total number of bssids filtered from network selection due to mbo association 621 // disallowed indication 622 optional int32 num_bssid_filtered_due_to_mbo_assoc_disallow_ind = 171; 623 624 // Total number of connection to network supporting MBO 625 optional int32 num_connect_to_network_supporting_mbo = 172; 626 627 // Total number of connection to network supporting OCE 628 optional int32 num_connect_to_network_supporting_oce = 173; 629 630 // Total number of scans triggered due to steering request from AP 631 optional int32 num_force_scan_due_to_steering_request = 174; 632 633 // Total number of cellular switch requests from MBO supported AP 634 optional int32 num_mbo_cellular_switch_request = 175; 635 636 // Total number of connect request to AP adding FILS AKM 637 optional int32 num_connect_request_with_fils_akm = 176; 638 639 // Total number of successful L2 connection through FILS authentication 640 optional int32 num_l2_connection_through_fils_authentication = 177; 641 642 // Metrics related to limitation in soft ap config 643 optional SoftApConfigLimitationMetrics soft_ap_config_limitation_metrics = 178; 644 645 // WiFi channel utilization histogram of various RF bands 646 optional ChannelUtilizationHistogram channel_utilization_histogram = 179; 647 648 // WiFi Tx and Rx throughput histogram at various RF bands 649 optional ThroughputMbpsHistogram throughput_mbps_histogram = 180; 650 651 // Total number of steering requests which include MBO assoc retry delay 652 optional int32 num_steering_request_including_mbo_assoc_retry_delay = 181; 653 654 // Total number of scan results from 11ax network 655 optional int32 num_11ax_network_scan_results = 182; 656 657 // Total number of scan results from 6GHz band 658 optional int32 num_6g_network_scan_results = 183; 659 660 // Initial partial scan stats 661 optional InitPartialScanStats init_partial_scan_stats = 184; 662 663 // Total number of scan results for hotspot 2.0 r3 networks 664 optional int32 num_hotspot2_r3_network_scan_results = 185; 665 666 // Histogram counting instances of scans with N many HotSpot 2.0 R3 APs 667 repeated NumConnectableNetworksBucket observed_hotspot_r3_aps_in_scan_histogram = 186; 668 669 // Histogram counting number of HotSpot 2.0 R3 APs per observed ESS in a scan 670 // (one value added per unique ESS - potentially multiple counts per single 671 // scan!) 672 repeated NumConnectableNetworksBucket observed_hotspot_r3_aps_per_ess_in_scan_histogram = 187; 673 674 // Histogram counting instances of scans with N many unique HotSpot 2.0 R3 ESS. 675 // Where ESS is defined as the (HESSID, ANQP Domain ID), (SSID, ANQP Domain ID) or 676 // (SSID, BSSID) tuple depending on AP configuration (in the above priority 677 // order). 678 repeated NumConnectableNetworksBucket observed_hotspot_r3_ess_in_scan_histogram = 188; 679 680 // Total number of Passpoint providers with no Root CA in their profile. 681 optional int32 num_passpoint_provider_with_no_root_ca = 189; 682 683 // Total number of Passpoint providers with self-signed root CA in their profile. 684 optional int32 num_passpoint_provider_with_self_signed_root_ca = 190; 685 686 // Total number of Passpoint providers with subscription expiration date in their profile. 687 optional int32 num_passpoint_provider_with_subscription_expiration = 191; 688 689 // List of user initiated actions 690 repeated UserActionEvent user_action_events = 192; 691 692 // Does the user have wifi verbose logging enabled. 693 optional bool is_verbose_logging_enabled = 193; 694 695 // Does the user have enhanced MAC randomization forced to on. 696 optional bool is_enhanced_mac_randomization_force_enabled = 194; 697 698 // Metered stats for saved networks. 699 optional MeteredNetworkStats metered_network_stats_saved = 195; 700 701 // Metered stats for suggestion networks. 702 optional MeteredNetworkStats metered_network_stats_suggestion = 196; 703 704 // Does the user have wifi wake enabled. 705 optional bool is_wifi_wake_enabled = 197; 706 707 // User reaction to the carrier or suggestion app approval UI. 708 optional UserReactionToApprovalUiEvent user_reaction_to_approval_ui_event = 198; 709 710 // Number of connection with different BSSID between framework and firmware selection. 711 optional int32 num_bssid_different_selection_between_framework_and_firmware = 199; 712 713 // Metrics about carrier wifi network. 714 optional CarrierWifiMetrics carrier_wifi_metrics = 200; 715 716 // Long version code of wifi mainline module, 0 means not available. 717 optional int64 mainline_module_version = 201; 718 719 // Histogram of Tx link speed at 6G low band 720 repeated Int32Count tx_link_speed_count_6g_low = 202; 721 722 // Histogram of Tx link speed at 6G middle band 723 repeated Int32Count tx_link_speed_count_6g_mid = 203; 724 725 // Histogram of Tx link speed at 6G high band 726 repeated Int32Count tx_link_speed_count_6g_high = 204; 727 728 // Histogram of Rx link speed at 6G low band 729 repeated Int32Count rx_link_speed_count_6g_low = 205; 730 731 // Histogram of Rx link speed at 6G middle band 732 repeated Int32Count rx_link_speed_count_6g_mid = 206; 733 734 // Histogram of Rx link speed at 6G high band 735 repeated Int32Count rx_link_speed_count_6g_high = 207; 736 737 // Metrics about the first connection after boot. 738 optional FirstConnectAfterBootStats first_connect_after_boot_stats = 208; 739 740 // Metrics for Wifi to Wifi switches. 741 optional WifiToWifiSwitchStats wifi_to_wifi_switch_stats = 209; 742 743 // Bandwidth estimator stats. 744 optional BandwidthEstimatorStats bandwidth_estimator_stats = 210; 745 746 // Total number of scan results from 6GHz PSC band 747 optional int32 num_6g_psc_network_scan_results = 211; 748 749 // Total number of Passpoint connections with a venue URL 750 optional int32 total_number_of_passpoint_connections_with_venue_url = 212; 751 752 // Total number of Passpoint connections with a T&C URL 753 optional int32 total_number_of_passpoint_connections_with_terms_and_conditions_url = 213; 754 755 // Total number of user accepted and T&C process completed successfully 756 optional int32 total_number_of_passpoint_acceptance_of_terms_and_conditions = 214; 757 758 // Total number of Passpoint profiles with decorated identity prefix 759 optional int32 total_number_of_passpoint_profiles_with_decorated_identity = 215; 760 761 // Scope of Passpoint deauth-imminent notification: ESS or BSS 762 repeated Int32Count passpoint_deauth_imminent_scope = 216; 763 764 // Total number of steering requests from AP 765 optional int32 num_steering_request = 217; 766 767 // Histogram corresponding to the number of times recent connection failure status are reported 768 // per WifiConfiguration.RecentFailureReason 769 repeated Int32Count recent_failure_association_status = 218; 770 771 // Histogram of country codes observed from scan results. 772 // Bucket WifiMetrics.COUNTRY_CODE_CONFLICT_WIFI_SCAN for the code conflict within scan results. 773 // Bucket WifiMetrics.COUNTRY_CODE_CONFLICT_WIFI_SCAN_TELEPHONY for the code conflict between wifi 774 // and telephony. 775 // Bucket value is capped to WifiMetrics.MAX_COUNTRY_CODE_COUNT. 776 repeated Int32Count country_code_scan_histogram = 219; 777} 778 779// Information that gets logged for every WiFi connection. 780message RouterFingerPrint { 781 782 enum RoamType { 783 784 // Type is unknown. 785 ROAM_TYPE_UNKNOWN = 0; 786 787 // No roaming - usually happens on a single band (2.4 GHz) router. 788 ROAM_TYPE_NONE = 1; 789 790 // Enterprise router. 791 ROAM_TYPE_ENTERPRISE = 2; 792 793 // DBDC => Dual Band Dual Concurrent essentially a router that 794 // supports both 2.4 GHz and 5 GHz bands. 795 ROAM_TYPE_DBDC = 3; 796 } 797 798 enum Auth { 799 800 // Auth is unknown. 801 AUTH_UNKNOWN = 0; 802 803 // No authentication. 804 AUTH_OPEN = 1; 805 806 // If the router uses a personal authentication. 807 AUTH_PERSONAL = 2; 808 809 // If the router is setup for enterprise authentication. 810 AUTH_ENTERPRISE = 3; 811 } 812 813 enum RouterTechnology { 814 815 // Router is unknown. 816 ROUTER_TECH_UNKNOWN = 0; 817 818 // Router Channel A. 819 ROUTER_TECH_A = 1; 820 821 // Router Channel B. 822 ROUTER_TECH_B = 2; 823 824 // Router Channel G. 825 ROUTER_TECH_G = 3; 826 827 // Router Channel N. 828 ROUTER_TECH_N = 4; 829 830 // Router Channel AC. 831 ROUTER_TECH_AC = 5; 832 833 // When the channel is not one of the above. 834 ROUTER_TECH_OTHER = 6; 835 836 // Router Channel AX. 837 ROUTER_TECH_AX = 7; 838 } 839 840 enum EapMethod { 841 842 // No EAP method used 843 TYPE_EAP_UNKNOWN = 0; 844 845 // EAP with Transport Layer Security 846 TYPE_EAP_TLS = 1; 847 848 // EAP with Tunneled Transport Layer Security 849 TYPE_EAP_TTLS = 2; 850 851 // EAP with Subscriber Identity Module [RFC-4186] 852 TYPE_EAP_SIM = 3; 853 854 // EAP with Authentication and Key Agreement [RFC-4187] 855 TYPE_EAP_AKA = 4; 856 857 // EAP with Authentication and Key Agreement Prime [RFC-5448] 858 TYPE_EAP_AKA_PRIME = 5; 859 860 // Protected EAP 861 TYPE_EAP_PEAP = 6; 862 863 // EAP for Hotspot 2.0 r2 OSEN 864 TYPE_EAP_UNAUTH_TLS = 7; 865 866 // EAP with Password 867 TYPE_EAP_PWD = 8; 868 869 // EAP with WAPI certifcate 870 TYPE_EAP_WAPI_CERT = 9; 871 } 872 873 enum AuthPhase2Method { 874 875 // No phase2 method 876 TYPE_PHASE2_NONE = 0; 877 878 // Password Authentication Protocol 879 TYPE_PHASE2_PAP = 1; 880 881 // Microsoft Challenge Handshake Authentication Protocol 882 TYPE_PHASE2_MSCHAP = 2; 883 884 // Microsoft Challenge Handshake Authentication Protocol v2 885 TYPE_PHASE2_MSCHAPV2 = 3; 886 887 // Generic Token Card 888 TYPE_PHASE2_GTC = 4; 889 890 // EAP-Subscriber Identity Module [RFC-4186] 891 TYPE_PHASE2_SIM = 5; 892 893 // EAP-Authentication and Key Agreement [RFC-4187] 894 TYPE_PHASE2_AKA = 6; 895 896 // EAP-Authentication and Key Agreement Prime [RFC-5448] 897 TYPE_PHASE2_AKA_PRIME = 7; 898 } 899 900 enum OcspType { 901 // Do not use OCSP stapling 902 TYPE_OCSP_NONE = 0; 903 904 // Try to use OCSP stapling, but not require response 905 TYPE_OCSP_REQUEST_CERT_STATUS = 1; 906 907 // Require valid OCSP stapling response 908 TYPE_OCSP_REQUIRE_CERT_STATUS = 2; 909 910 // Require valid OCSP stapling response for all not-trusted certificates 911 // in the server certificate chain 912 TYPE_OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3; 913 } 914 915 optional RoamType roam_type = 1; 916 917 // Channel on which the connection takes place. 918 optional int32 channel_info = 2; 919 920 // DTIM setting of the router. 921 optional int32 dtim = 3; 922 923 // Authentication scheme of the router. 924 optional Auth authentication = 4; 925 926 // If the router is hidden. 927 optional bool hidden = 5; 928 929 // Channel information. 930 optional RouterTechnology router_technology = 6; 931 932 // whether ipv6 is supported. 933 optional bool supports_ipv6 = 7; 934 935 // If the router is a Passpoint / Hotspot 2.0 network 936 optional bool passpoint = 8; 937 938 // EAP method used by the enterprise network 939 optional EapMethod eap_method = 9; 940 941 // Phase 2 authentication method after setting up a secure channel 942 optional AuthPhase2Method auth_phase2_method = 10; 943 944 // Online certificate status protocol stapling type 945 optional OcspType ocsp_type = 11; 946 947 // PMK caching enablement 948 optional bool pmk_cache_enabled = 12; 949 950 // Max Tx link speed (in Mbps) supported by current network (STA and AP) 951 optional int32 max_supported_tx_link_speed_mbps = 13; 952 953 // Max Rx link speed (in Mbps) supported by current network (STA and AP) 954 optional int32 max_supported_rx_link_speed_mbps = 14; 955 956 // If the Passpoint connection is provided by the Home provider or Roaming/visited network 957 optional bool is_passpoint_home_provider = 15; 958} 959 960enum ClientRole { 961 // default/Invalid role 962 ROLE_UNKNOWN = 0; 963 964 // STA created for scans only. 965 ROLE_CLIENT_SCAN_ONLY = 1; 966 967 // secondary STA used for make before break. 968 ROLE_CLIENT_SECONDARY_TRANSIENT = 2; 969 970 // secondary STA created for local connection (no internet connectivity). 971 ROLE_CLIENT_LOCAL_ONLY = 3; 972 973 // primary STA. 974 ROLE_CLIENT_PRIMARY = 4; 975 976 // Long lived secondary STA used for restricted use cases 977 ROLE_CLIENT_SECONDARY_LONG_LIVED = 5; 978} 979 980message ConnectionEvent { 981 982 // Roam Type. 983 enum RoamType { 984 985 // Type is unknown. 986 ROAM_UNKNOWN = 0; 987 988 // No roaming. 989 ROAM_NONE = 1; 990 991 // DBDC roaming. 992 ROAM_DBDC = 2; 993 994 // Enterprise roaming. 995 ROAM_ENTERPRISE = 3; 996 997 // User selected roaming. 998 ROAM_USER_SELECTED = 4; 999 1000 // Unrelated. 1001 ROAM_UNRELATED = 5; 1002 } 1003 1004 // Connectivity Level Failure. 1005 enum ConnectivityLevelFailure { 1006 1007 // Failure is unknown. 1008 HLF_UNKNOWN = 0; 1009 1010 // No failure. 1011 HLF_NONE = 1; 1012 1013 // DHCP failure. 1014 HLF_DHCP = 2; 1015 1016 // No internet connection. 1017 HLF_NO_INTERNET = 3; 1018 1019 // No internet connection. 1020 HLF_UNWANTED = 4; 1021 } 1022 1023 // Level 2 failure reason. 1024 enum Level2FailureReason { 1025 1026 // Unknown default 1027 FAILURE_REASON_UNKNOWN = 0; 1028 1029 // The reason code if there is no error during authentication. It could 1030 // also imply that there no authentication in progress. 1031 AUTH_FAILURE_NONE = 1; 1032 1033 // The reason code if there was a timeout authenticating. 1034 AUTH_FAILURE_TIMEOUT = 2; 1035 1036 // The reason code if there was a wrong password while authenticating. 1037 AUTH_FAILURE_WRONG_PSWD = 3; 1038 1039 // The reason code if there was EAP failure while authenticating. 1040 AUTH_FAILURE_EAP_FAILURE = 4; 1041 1042 // The reason code if the AP can no longer accept new clients. 1043 ASSOCIATION_REJECTION_AP_UNABLE_TO_HANDLE_NEW_STA = 5; 1044 1045 // The reason code if AP disconnects STA during the connecting state. 1046 DISCONNECTION_NON_LOCAL = 6; 1047 1048 // The reason code if a user rejects this connection. 1049 AUTH_FAILURE_REJECTED_BY_USER = 7; 1050 1051 // The reason code if an insecure Enterprise connection requires user's approval 1052 DISCONNECTED_USER_APPROVAL_NEEDED = 8; 1053 } 1054 1055 // Entity that recommended connecting to this network. 1056 enum ConnectionNominator { 1057 // Unknown nominator 1058 NOMINATOR_UNKNOWN = 0; 1059 1060 // User selected network manually 1061 NOMINATOR_MANUAL = 1; 1062 1063 // Saved network 1064 NOMINATOR_SAVED = 2; 1065 1066 // Suggestion API 1067 NOMINATOR_SUGGESTION = 3; 1068 1069 // Passpoint 1070 NOMINATOR_PASSPOINT = 4; 1071 1072 // Carrier suggestion 1073 NOMINATOR_CARRIER = 5; 1074 1075 // External scorer 1076 NOMINATOR_EXTERNAL_SCORED = 6; 1077 1078 // Network Specifier 1079 NOMINATOR_SPECIFIER = 7; 1080 1081 // User connected choice override 1082 NOMINATOR_SAVED_USER_CONNECT_CHOICE = 8; 1083 1084 // Open Network Available Pop-up 1085 NOMINATOR_OPEN_NETWORK_AVAILABLE = 9; 1086 } 1087 1088 enum NetworkType { 1089 // Unknown network type 1090 TYPE_UNKNOWN = 0; 1091 1092 // WPA2 network 1093 TYPE_WPA2 = 1; 1094 1095 // WPA3 network 1096 TYPE_WPA3 = 2; 1097 1098 // Passpoint network 1099 TYPE_PASSPOINT = 3; 1100 1101 // EAP network, excluding passpoint 1102 TYPE_EAP = 4; 1103 1104 // OWE network 1105 TYPE_OWE = 5; 1106 1107 // Open network 1108 TYPE_OPEN = 6; 1109 1110 // WAPI network 1111 TYPE_WAPI = 7; 1112 } 1113 1114 enum NetworkCreator { 1115 // This network is created by an unknown app. 1116 CREATOR_UNKNOWN = 0; 1117 1118 // This network is created by the user. 1119 CREATOR_USER = 1; 1120 1121 // This network is created by a carrier app. 1122 CREATOR_CARRIER = 2; 1123 } 1124 1125 // Start time of the connection, in milliseconds since Unix epoch (1970-01-01). 1126 optional int64 start_time_millis = 1 [deprecated=true]; // [(datapol.semantic_type) = ST_TIMESTAMP]; 1127 1128 // Start time of the connection, in milliseconds since device boot 1129 optional int64 start_time_since_boot_millis = 28 [default = 0]; 1130 1131 // Duration to connect. 1132 optional int32 duration_taken_to_connect_millis = 2; 1133 1134 // Router information. 1135 optional RouterFingerPrint router_fingerprint = 3; 1136 1137 // RSSI at the start of the connection. 1138 optional int32 signal_strength = 4; 1139 1140 // Roam Type. 1141 optional RoamType roam_type = 5; 1142 1143 // Result of the connection. 1144 optional int32 connection_result = 6; 1145 1146 // Reasons for level 2 failure (needs to be coordinated with wpa-supplicant). 1147 optional int32 level_2_failure_code = 7; 1148 1149 // Failures that happen at the connectivity layer. 1150 optional ConnectivityLevelFailure connectivity_level_failure_code = 8; 1151 1152 // Has bug report been taken. 1153 optional bool automatic_bug_report_taken = 9; 1154 1155 // Connection is using locally generated random MAC address. 1156 optional bool use_randomized_mac = 10 [default = false]; 1157 1158 // Who chose to connect. 1159 optional ConnectionNominator connection_nominator = 11; 1160 1161 // The currently running network selector when this connection event occurred. 1162 optional int32 network_selector_experiment_id = 12; 1163 1164 // Breakdown of level_2_failure_code with more detailed reason. 1165 optional Level2FailureReason level_2_failure_reason = 13 1166 [default = FAILURE_REASON_UNKNOWN]; 1167 1168 // Connection is using an aggressively generated random MAC address. 1169 optional bool use_aggressive_mac = 14; 1170 1171 // Number of BSSIDs for this network that were excluded from network selection. 1172 optional int32 num_bssid_in_blocklist = 15; 1173 1174 // The type of network for this connection. 1175 optional NetworkType network_type = 16; 1176 1177 // UID of the app that created this network. 1178 optional NetworkCreator network_creator = 17; 1179 1180 // Whether the screen is on when the connection event starts 1181 optional bool screen_on = 18; 1182 1183 // Number of consecutive connection failures with the same SSID at high RSSI 1184 // before current connection event. Any connection failure at low RSSI in the 1185 // middle won't break the streak count. The count is cleared after 1186 // a network disconnection event. 1187 optional int32 num_consecutive_connection_failure = 19 [default = -1]; 1188 1189 // Indicates if the profile used for the connection was provisioned by Passpoint OSU server 1190 optional bool is_osu_provisioned = 20; 1191 1192 // The wireless interface name e.g. "wlan0", "wlan1". Used to distinguish which event stream this 1193 // ConnectionEvent belongs to when multiple interfaces are active concurrently. 1194 optional string interface_name = 27; 1195 1196 // The role of the wireless interface at the start of the connection. 1197 // Gives more information on what purpose this interface is used for. 1198 optional ClientRole interface_role = 29; 1199 1200 // Indicates if the profile used for the connection is carrier merged. 1201 optional bool is_carrier_merged = 30; 1202 1203 // Indicates if this was the first connection event after boot 1204 optional bool is_first_connection_after_boot = 31; 1205} 1206 1207// Number of occurrences of a specific RSSI poll rssi value 1208message RssiPollCount { 1209 // RSSI 1210 optional int32 rssi = 1; 1211 1212 // Number of RSSI polls with 'rssi' 1213 optional int32 count = 2; 1214 1215 // Beacon frequency of the channel in MHz 1216 optional int32 frequency = 3; 1217} 1218 1219// Number of occurrences of a specific alert reason value 1220message AlertReasonCount { 1221 // Alert reason 1222 optional int32 reason = 1; 1223 1224 // Number of alerts with |reason|. 1225 optional int32 count = 2; 1226} 1227 1228// Counts the number of instances of a specific Wifi Score calculated by WifiScoreReport 1229message WifiScoreCount { 1230 // Wifi Score 1231 optional int32 score = 1; 1232 1233 // Number of Wifi score reports with this score 1234 optional int32 count = 2; 1235} 1236 1237// Counts the number of instances of a specific Wifi Usability Score 1238message WifiUsabilityScoreCount { 1239 // Wifi Usability Score 1240 optional int32 score = 1; 1241 1242 // Number of Wifi score reports with this score 1243 optional int32 count = 2; 1244} 1245 1246// Number of occurrences of a specific link speed (Mbps) 1247// and sum of rssi (dBm) and rssi^2 (dBm^2) 1248message LinkSpeedCount { 1249 // Link speed (Mbps) 1250 optional int32 link_speed_mbps = 1; 1251 1252 // Number of RSSI polls with link_speed 1253 optional int32 count = 2; 1254 1255 // Sum of absolute values of rssi values (dBm) 1256 optional int32 rssi_sum_dbm = 3; 1257 1258 // Sum of squares of rssi values (dBm^2) 1259 optional int64 rssi_sum_of_squares_dbm_sq = 4; 1260} 1261 1262 1263// Number of occurrences of Soft AP session durations 1264message SoftApDurationBucket { 1265 // Bucket covers duration : [duration_sec, duration_sec + bucket_size_sec) 1266 // The (inclusive) lower bound of Soft AP session duration represented by this bucket 1267 optional int32 duration_sec = 1; 1268 1269 // The size of this bucket 1270 optional int32 bucket_size_sec = 2; 1271 1272 // Number of soft AP session durations that fit into this bucket 1273 optional int32 count = 3; 1274} 1275 1276// Number of occurrences of a soft AP session return code 1277message SoftApReturnCodeCount { 1278 1279 enum SoftApStartResult { 1280 1281 // SoftApManager return code unknown 1282 SOFT_AP_RETURN_CODE_UNKNOWN = 0; 1283 1284 // SoftAp started successfully 1285 SOFT_AP_STARTED_SUCCESSFULLY = 1; 1286 1287 // Catch all for failures with no specific failure reason 1288 SOFT_AP_FAILED_GENERAL_ERROR = 2; 1289 1290 // SoftAp failed to start due to NO_CHANNEL error 1291 SOFT_AP_FAILED_NO_CHANNEL = 3; 1292 1293 // SoftAp failed to start due to unsupported configuration error 1294 SOFT_AP_FAILED_UNSUPPORTED_CONFIGURATION = 4; 1295 } 1296 1297 // Historical, no longer used for writing as of 01/2017. 1298 optional int32 return_code = 1 [deprecated = true]; 1299 1300 // Occurrences of this soft AP return code 1301 optional int32 count = 2; 1302 1303 // Result of attempt to start SoftAp 1304 optional SoftApStartResult start_result = 3; 1305} 1306 1307message StaEvent { 1308 message ConfigInfo { 1309 // The set of key management protocols supported by this configuration. 1310 optional uint32 allowed_key_management = 1 [default = 0]; 1311 1312 // The set of security protocols supported by this configuration. 1313 optional uint32 allowed_protocols = 2 [default = 0]; 1314 1315 // The set of authentication protocols supported by this configuration. 1316 optional uint32 allowed_auth_algorithms = 3 [default = 0]; 1317 1318 // The set of pairwise ciphers for WPA supported by this configuration. 1319 optional uint32 allowed_pairwise_ciphers = 4 [default = 0]; 1320 1321 // The set of group ciphers supported by this configuration. 1322 optional uint32 allowed_group_ciphers = 5; 1323 1324 // Is this a 'hidden network' 1325 optional bool hidden_ssid = 6; 1326 1327 // Is this a Hotspot 2.0 / passpoint network 1328 optional bool is_passpoint = 7; 1329 1330 // Is this an 'ephemeral' network (Not in saved network list, recommended externally) 1331 optional bool is_ephemeral = 8; 1332 1333 // Has a successful connection ever been established using this WifiConfiguration 1334 optional bool has_ever_connected = 9; 1335 1336 // RSSI of the scan result candidate associated with this WifiConfiguration 1337 optional int32 scan_rssi = 10 [default = -127]; 1338 1339 // Frequency of the scan result candidate associated with this WifiConfiguration 1340 optional int32 scan_freq = 11 [default = -1]; 1341 } 1342 1343 enum EventType { 1344 // Default/Invalid event 1345 TYPE_UNKNOWN = 0; 1346 1347 // Supplicant Association Rejection event. Code contains the 802.11 1348 TYPE_ASSOCIATION_REJECTION_EVENT = 1; 1349 1350 // Supplicant L2 event, 1351 TYPE_AUTHENTICATION_FAILURE_EVENT = 2; 1352 1353 // Supplicant L2 event 1354 TYPE_NETWORK_CONNECTION_EVENT = 3; 1355 1356 // Supplicant L2 event 1357 TYPE_NETWORK_DISCONNECTION_EVENT = 4; 1358 1359 // Supplicant L2 event 1360 TYPE_SUPPLICANT_STATE_CHANGE_EVENT = 5; 1361 1362 // Supplicant L2 event 1363 TYPE_CMD_ASSOCIATED_BSSID = 6; 1364 1365 // IP Manager successfully completed IP Provisioning 1366 TYPE_CMD_IP_CONFIGURATION_SUCCESSFUL = 7; 1367 1368 // IP Manager failed to complete IP Provisioning 1369 TYPE_CMD_IP_CONFIGURATION_LOST = 8; 1370 1371 // IP Manager lost reachability to network neighbors 1372 TYPE_CMD_IP_REACHABILITY_LOST = 9; 1373 1374 // Indicator that Supplicant is targeting a BSSID for roam/connection 1375 TYPE_CMD_TARGET_BSSID = 10; 1376 1377 // Wifi framework is initiating a connection attempt 1378 TYPE_CMD_START_CONNECT = 11; 1379 1380 // Wifi framework is initiating a roaming connection attempt 1381 TYPE_CMD_START_ROAM = 12; 1382 1383 // SystemAPI connect() command, Settings App 1384 TYPE_CONNECT_NETWORK = 13; 1385 1386 // Network Agent has validated the internet connection (Captive Portal Check success, or user 1387 // validation) 1388 TYPE_NETWORK_AGENT_VALID_NETWORK = 14; 1389 1390 // Framework initiated disconnect. Sometimes generated to give an extra reason for a disconnect 1391 // Should typically be followed by a NETWORK_DISCONNECTION_EVENT with a local_gen = true 1392 TYPE_FRAMEWORK_DISCONNECT = 15; 1393 1394 // The NetworkAgent score for wifi has changed in a way that may impact 1395 // connectivity 1396 TYPE_SCORE_BREACH = 16; 1397 1398 // Framework changed Sta interface MAC address 1399 TYPE_MAC_CHANGE = 17; 1400 1401 // Wifi is turned on 1402 TYPE_WIFI_ENABLED = 18; 1403 1404 // Wifi is turned off 1405 TYPE_WIFI_DISABLED = 19; 1406 1407 // The NetworkAgent Wifi usability score has changed in a way that may 1408 // impact connectivity 1409 TYPE_WIFI_USABILITY_SCORE_BREACH = 20; 1410 1411 // Link probe was performed 1412 TYPE_LINK_PROBE = 21; 1413 } 1414 1415 enum FrameworkDisconnectReason { 1416 // default/none/unknown value 1417 DISCONNECT_UNKNOWN = 0; 1418 1419 // API DISCONNECT 1420 DISCONNECT_API = 1; 1421 1422 // Some framework internal reason (generic) 1423 DISCONNECT_GENERIC = 2; 1424 1425 // Network Agent network validation failed, user signaled network unwanted 1426 DISCONNECT_UNWANTED = 3; 1427 1428 // Roaming timed out 1429 DISCONNECT_ROAM_WATCHDOG_TIMER = 4; 1430 1431 // P2P service requested wifi disconnect 1432 DISCONNECT_P2P_DISCONNECT_WIFI_REQUEST = 5; 1433 1434 // SIM was removed while using a SIM config 1435 DISCONNECT_RESET_SIM_NETWORKS = 6; 1436 1437 // The network being evaluated in Make-Before-Break was disconnected due to no internet. 1438 DISCONNECT_MBB_NO_INTERNET = 7; 1439 1440 // The network has been removed from the database. 1441 DISCONNECT_NETWORK_REMOVED = 8; 1442 1443 // The network has been marked as metered. 1444 DISCONNECT_NETWORK_METERED = 9; 1445 1446 // The network has been disabled temporarily. 1447 DISCONNECT_NETWORK_TEMPORARY_DISABLED = 10; 1448 1449 // The network has been disabled permanently. 1450 DISCONNECT_NETWORK_PERMANENT_DISABLED = 11; 1451 1452 // Carrier offload for this network has been disabled. 1453 DISCONNECT_CARRIER_OFFLOAD_DISABLED = 12; 1454 1455 // Disconnected due to an issue with passpoint terms and conditions URL. 1456 DISCONNECT_PASSPOINT_TAC = 13; 1457 1458 // VCN policy is requesting to tear down the network. 1459 DISCONNECT_VCN_REQUEST = 14; 1460 1461 // Connected to a network that's not found in the database. 1462 DISCONNECT_UNKNOWN_NETWORK = 15; 1463 1464 // The network has been marked as untrusted. 1465 DISCONNECT_NETWORK_UNTRUSTED = 16; 1466 } 1467 1468 // Authentication Failure reasons as reported through the API. 1469 enum AuthFailureReason { 1470 // Unknown default 1471 AUTH_FAILURE_UNKNOWN = 0; 1472 1473 // The reason code if there is no error during authentication. It could also imply that there no 1474 // authentication in progress, 1475 AUTH_FAILURE_NONE = 1; 1476 1477 // The reason code if there was a timeout authenticating. 1478 AUTH_FAILURE_TIMEOUT = 2; 1479 1480 // The reason code if there was a wrong password while authenticating. 1481 AUTH_FAILURE_WRONG_PSWD = 3; 1482 1483 // The reason code if there was EAP failure while authenticating. 1484 AUTH_FAILURE_EAP_FAILURE = 4; 1485 } 1486 1487 // What event was this 1488 optional EventType type = 1; 1489 1490 // 80211 death reason code, relevant to NETWORK_DISCONNECTION_EVENTs 1491 optional int32 reason = 2 [default = -1]; 1492 1493 // 80211 Association Status code, relevant to ASSOCIATION_REJECTION_EVENTs 1494 optional int32 status = 3 [default = -1]; 1495 1496 // Designates whether a NETWORK_DISCONNECT_EVENT was by the STA or AP 1497 optional bool local_gen = 4 [default = false]; 1498 1499 // Network information from the WifiConfiguration of a framework initiated connection attempt 1500 optional ConfigInfo config_info = 5; 1501 1502 // RSSI from the last rssi poll (Only valid for active connections) 1503 optional int32 last_rssi = 6 [default = -127]; 1504 1505 // Link speed from the last rssi poll (Only valid for active connections) 1506 optional int32 last_link_speed = 7 [default = -1]; 1507 1508 // Frequency from the last rssi poll (Only valid for active connections) 1509 optional int32 last_freq = 8 [default = -1]; 1510 1511 // Enum used to define bit positions in the supplicant_state_change_bitmask 1512 // See {@code frameworks/base/wifi/java/android/net/wifi/SupplicantState.java} for documentation 1513 enum SupplicantState { 1514 STATE_DISCONNECTED = 0; 1515 1516 STATE_INTERFACE_DISABLED = 1; 1517 1518 STATE_INACTIVE = 2; 1519 1520 STATE_SCANNING = 3; 1521 1522 STATE_AUTHENTICATING = 4; 1523 1524 STATE_ASSOCIATING = 5; 1525 1526 STATE_ASSOCIATED = 6; 1527 1528 STATE_FOUR_WAY_HANDSHAKE = 7; 1529 1530 STATE_GROUP_HANDSHAKE = 8; 1531 1532 STATE_COMPLETED = 9; 1533 1534 STATE_DORMANT = 10; 1535 1536 STATE_UNINITIALIZED = 11; 1537 1538 STATE_INVALID = 12; 1539 } 1540 1541 // Bit mask of all supplicant state changes that occurred since the last event 1542 optional uint32 supplicant_state_changes_bitmask = 9 [default = 0]; 1543 1544 // The number of milliseconds that have elapsed since the device booted 1545 optional int64 start_time_millis = 10 [default = 0]; 1546 1547 optional FrameworkDisconnectReason framework_disconnect_reason = 11 [default = DISCONNECT_UNKNOWN]; 1548 1549 // Flag which indicates if an association rejection event occurred due to a timeout 1550 optional bool association_timed_out = 12 [default = false]; 1551 1552 // Authentication failure reason, as reported by WifiManager (calculated from state & deauth code) 1553 optional AuthFailureReason auth_failure_reason = 13 [default = AUTH_FAILURE_UNKNOWN]; 1554 1555 // NetworkAgent score of connected wifi 1556 optional int32 last_score = 14 [default = -1]; 1557 1558 // NetworkAgent Wifi usability score of connected wifi 1559 optional int32 last_wifi_usability_score = 15 [default = -1]; 1560 1561 // Prediction horizon (in second) of Wifi usability score provided by external 1562 // system app 1563 optional int32 last_prediction_horizon_sec = 16 [default = -1]; 1564 1565 // Only valid if event type == TYPE_LINK_PROBE. 1566 // true if link probe succeeded, false otherwise. 1567 optional bool link_probe_was_success = 17; 1568 1569 // Only valid if event type == TYPE_LINK_PROBE and link_probe_was_success == true. 1570 // Elapsed time, in milliseconds, of a successful link probe. 1571 optional int32 link_probe_success_elapsed_time_ms = 18; 1572 1573 // Only valid if event type == TYPE_LINK_PROBE and link_probe_was_success == false. 1574 // Failure reason for an unsuccessful link probe. 1575 optional LinkProbeStats.LinkProbeFailureReason link_probe_failure_reason = 19; 1576 1577 // Number of bytes transmitted across mobile networks since device boot. 1578 optional int64 mobile_tx_bytes = 20 [default = -1]; 1579 1580 // // Number of bytes received across mobile networks since device boot. 1581 optional int64 mobile_rx_bytes = 21 [default = -1]; 1582 1583 // Number of bytes transmitted since device boot. 1584 optional int64 total_tx_bytes = 22 [default = -1]; 1585 1586 // Number of bytes received since device boot. 1587 optional int64 total_rx_bytes = 23 [default = -1]; 1588 1589 // Whether screen is on when the event happens 1590 optional bool screen_on = 24; 1591 1592 // Whether cellular data network is available 1593 optional bool is_cellular_data_available = 25; 1594 1595 // Whether Adaptive Connectivity is enabled 1596 optional bool is_adaptive_connectivity_enabled = 26; 1597 1598 // The wireless interface name e.g. "wlan0", "wlan1". Used to distinguish which event stream this 1599 // StaEvent belongs to when multiple interfaces are active concurrently. 1600 optional string interface_name = 27; 1601 1602 // The role of the wireless interface 1603 // Gives more information on what purpose this interface is used for. 1604 optional ClientRole interface_role = 28; 1605} 1606 1607// Wi-Fi Aware metrics 1608message WifiAwareLog { 1609 // total number of unique apps that used Aware (measured on attach) 1610 optional int32 num_apps = 1; 1611 1612 // total number of unique apps that used an identity callback when attaching 1613 optional int32 num_apps_using_identity_callback = 2; 1614 1615 // maximum number of attaches for an app 1616 optional int32 max_concurrent_attach_sessions_in_app = 3; 1617 1618 // histogram of attach request results 1619 repeated NanStatusHistogramBucket histogram_attach_session_status = 4; 1620 1621 // maximum number of concurrent publish sessions in a single app 1622 optional int32 max_concurrent_publish_in_app = 5; 1623 1624 // maximum number of concurrent subscribe sessions in a single app 1625 optional int32 max_concurrent_subscribe_in_app = 6; 1626 1627 // maximum number of concurrent discovery (publish+subscribe) sessions in a single app 1628 optional int32 max_concurrent_discovery_sessions_in_app = 7; 1629 1630 // maximum number of concurrent publish sessions in the system 1631 optional int32 max_concurrent_publish_in_system = 8; 1632 1633 // maximum number of concurrent subscribe sessions in the system 1634 optional int32 max_concurrent_subscribe_in_system = 9; 1635 1636 // maximum number of concurrent discovery (publish+subscribe) sessions in the system 1637 optional int32 max_concurrent_discovery_sessions_in_system = 10; 1638 1639 // histogram of publish request results 1640 repeated NanStatusHistogramBucket histogram_publish_status = 11; 1641 1642 // histogram of subscribe request results 1643 repeated NanStatusHistogramBucket histogram_subscribe_status = 12; 1644 1645 // number of unique apps which experienced a discovery session creation failure due to lack of 1646 // resources 1647 optional int32 num_apps_with_discovery_session_failure_out_of_resources = 13; 1648 1649 // histogram of create ndp request results 1650 repeated NanStatusHistogramBucket histogram_request_ndp_status = 14; 1651 1652 // histogram of create ndp out-of-band (OOB) request results 1653 repeated NanStatusHistogramBucket histogram_request_ndp_oob_status = 15; 1654 1655 // maximum number of concurrent active data-interfaces (NDI) in a single app 1656 optional int32 max_concurrent_ndi_in_app = 19; 1657 1658 // maximum number of concurrent active data-interfaces (NDI) in the system 1659 optional int32 max_concurrent_ndi_in_system = 20; 1660 1661 // maximum number of concurrent data-paths (NDP) in a single app 1662 optional int32 max_concurrent_ndp_in_app = 21; 1663 1664 // maximum number of concurrent data-paths (NDP) in the system 1665 optional int32 max_concurrent_ndp_in_system = 22; 1666 1667 // maximum number of concurrent secure data-paths (NDP) in a single app 1668 optional int32 max_concurrent_secure_ndp_in_app = 23; 1669 1670 // maximum number of concurrent secure data-paths (NDP) in the system 1671 optional int32 max_concurrent_secure_ndp_in_system = 24; 1672 1673 // maximum number of concurrent data-paths (NDP) per data-interface (NDI) 1674 optional int32 max_concurrent_ndp_per_ndi = 25; 1675 1676 // histogram of durations of Aware being available 1677 repeated HistogramBucket histogram_aware_available_duration_ms = 26; 1678 1679 // histogram of durations of Aware being enabled 1680 repeated HistogramBucket histogram_aware_enabled_duration_ms = 27; 1681 1682 // histogram of duration (in ms) of attach sessions 1683 repeated HistogramBucket histogram_attach_duration_ms = 28; 1684 1685 // histogram of duration (in ms) of publish sessions 1686 repeated HistogramBucket histogram_publish_session_duration_ms = 29; 1687 1688 // histogram of duration (in ms) of subscribe sessions 1689 repeated HistogramBucket histogram_subscribe_session_duration_ms = 30; 1690 1691 // histogram of duration (in ms) of data-paths (NDP) 1692 repeated HistogramBucket histogram_ndp_session_duration_ms = 31; 1693 1694 // histogram of usage (in MB) of data-paths (NDP) 1695 repeated HistogramBucket histogram_ndp_session_data_usage_mb = 32; 1696 1697 // histogram of usage (in MB) of data-path creation time (in ms) measured as request -> confirm 1698 repeated HistogramBucket histogram_ndp_creation_time_ms = 33; 1699 1700 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: minimum 1701 optional int64 ndp_creation_time_ms_min = 34; 1702 1703 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: maximum 1704 optional int64 ndp_creation_time_ms_max = 35; 1705 1706 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: sum 1707 optional int64 ndp_creation_time_ms_sum = 36; 1708 1709 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: sum of sq 1710 optional int64 ndp_creation_time_ms_sum_of_sq = 37; 1711 1712 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: number of 1713 // samples 1714 optional int64 ndp_creation_time_ms_num_samples = 38; 1715 1716 // total time within the logging window that aware was available 1717 optional int64 available_time_ms = 39; 1718 1719 // total time within the logging window that aware was enabled 1720 optional int64 enabled_time_ms = 40; 1721 1722 // maximum number of concurrent publish sessions enabling ranging in a single app 1723 optional int32 max_concurrent_publish_with_ranging_in_app = 41; 1724 1725 // maximum number of concurrent subscribe sessions specifying a geofence in a single app 1726 optional int32 max_concurrent_subscribe_with_ranging_in_app = 42; 1727 1728 // maximum number of concurrent publish sessions enabling ranging in the system 1729 optional int32 max_concurrent_publish_with_ranging_in_system = 43; 1730 1731 // maximum number of concurrent subscribe sessions specifying a geofence in the system 1732 optional int32 max_concurrent_subscribe_with_ranging_in_system = 44; 1733 1734 // histogram of subscribe session geofence minimum (only when specified) 1735 repeated HistogramBucket histogram_subscribe_geofence_min = 45; 1736 1737 // histogram of subscribe session geofence maximum (only when specified) 1738 repeated HistogramBucket histogram_subscribe_geofence_max = 46; 1739 1740 // total number of subscribe sessions which enabled ranging 1741 optional int32 num_subscribes_with_ranging = 47; 1742 1743 // total number of matches (service discovery indication) with ranging provided 1744 optional int32 num_matches_with_ranging = 48; 1745 1746 // total number of matches (service discovery indication) for service discovery with ranging 1747 // enabled which did not trigger ranging 1748 optional int32 num_matches_without_ranging_for_ranging_enabled_subscribes = 49; 1749 1750 // Total number of different types of NDP requests 1751 repeated NdpRequestTypeHistogramBucket histogram_ndp_request_type = 50; 1752 1753 // Histogram bucket for Wi-Fi Aware logs. Range is [start, end) 1754 message HistogramBucket { 1755 // lower range of the bucket (inclusive) 1756 optional int64 start = 1; 1757 1758 // upper range of the bucket (exclusive) 1759 optional int64 end = 2; 1760 1761 // number of samples in the bucket 1762 optional int32 count = 3; 1763 } 1764 1765 // Status of various NAN operations 1766 enum NanStatusTypeEnum { 1767 // constant to be used by proto 1768 UNKNOWN = 0; 1769 1770 // NAN operation succeeded 1771 SUCCESS = 1; 1772 1773 // NAN Discovery Engine/Host driver failures 1774 INTERNAL_FAILURE = 2; 1775 1776 // NAN OTA failures 1777 PROTOCOL_FAILURE = 3; 1778 1779 // The publish/subscribe discovery session id is invalid 1780 INVALID_SESSION_ID = 4; 1781 1782 // Out of resources to fufill request 1783 NO_RESOURCES_AVAILABLE = 5; 1784 1785 // Invalid arguments passed 1786 INVALID_ARGS = 6; 1787 1788 // Invalid peer id 1789 INVALID_PEER_ID = 7; 1790 1791 // Invalid NAN data-path (ndp) id 1792 INVALID_NDP_ID = 8; 1793 1794 // Attempting to enable NAN when not available, e.g. wifi is disabled 1795 NAN_NOT_ALLOWED = 9; 1796 1797 // Over the air ACK not received 1798 NO_OTA_ACK = 10; 1799 1800 // Attempting to enable NAN when already enabled 1801 ALREADY_ENABLED = 11; 1802 1803 // Can't queue tx followup message foor transmission 1804 FOLLOWUP_TX_QUEUE_FULL = 12; 1805 1806 // Unsupported concurrency of NAN and another feature - NAN disabled 1807 UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 13; 1808 1809 // Unknown NanStatusType 1810 UNKNOWN_HAL_STATUS = 14; 1811 } 1812 1813 // Histogram bucket for Wi-Fi Aware (NAN) status. 1814 message NanStatusHistogramBucket { 1815 // status type defining the bucket 1816 optional NanStatusTypeEnum nan_status_type = 1; 1817 1818 // number of samples in the bucket 1819 optional int32 count = 2; 1820 } 1821 1822 enum NdpRequestTypeEnum { 1823 // Unknown Type 1824 NETWORK_SPECIFIER_TYPE_UNKNOWN = 0; 1825 1826 // TYPE: in band, specific peer: role, client_id, session_id, peer_id, pmk/passphrase optional 1827 NETWORK_SPECIFIER_TYPE_IB = 1; 1828 1829 // TYPE: in band, any peer: role, client_id, session_id, pmk/passphrase optional 1830 NETWORK_SPECIFIER_TYPE_IB_ANY_PEER = 2; 1831 1832 //TYPE: out-of-band: role, client_id, peer_mac, pmk/passphrase optional 1833 NETWORK_SPECIFIER_TYPE_OOB = 3; 1834 1835 //TYPE: out-of-band, any peer: role, client_id, pmk/passphrase optional 1836 NETWORK_SPECIFIER_TYPE_OOB_ANY_PEER = 4; 1837 1838 } 1839 1840 message NdpRequestTypeHistogramBucket { 1841 // request type defining the bucket 1842 optional NdpRequestTypeEnum ndp_request_type = 1; 1843 // number of samples in the bucket 1844 optional int32 count = 2; 1845 1846 } 1847} 1848 1849// Data point used to build 'Number of Connectable Network' histograms 1850message NumConnectableNetworksBucket { 1851 // Number of connectable networks seen in a scan result 1852 optional int32 num_connectable_networks = 1 [default = 0]; 1853 1854 // Number of scan results with num_connectable_networks 1855 optional int32 count = 2 [default = 0]; 1856} 1857 1858// Pno scan metrics 1859// Here "Pno Scan" refers to the session of offloaded scans, these metrics count the result of a 1860// single session, and not the individual scans within that session. 1861message PnoScanMetrics { 1862 // Total number of attempts to offload pno scans 1863 optional int32 num_pno_scan_attempts = 1; 1864 1865 // Total number of pno scans failed 1866 optional int32 num_pno_scan_failed = 2; 1867 1868 // Number of pno scans started successfully over offload 1869 optional int32 num_pno_scan_started_over_offload = 3; 1870 1871 // Number of pno scans failed over offload 1872 optional int32 num_pno_scan_failed_over_offload = 4; 1873 1874 // Total number of pno scans that found any network 1875 optional int32 num_pno_found_network_events = 5; 1876} 1877 1878// Number of occurrences for a particular "Connect to Network" Notification or 1879// notification Action. 1880message ConnectToNetworkNotificationAndActionCount { 1881 1882 // "Connect to Network" notifications 1883 enum Notification { 1884 1885 // Default 1886 NOTIFICATION_UNKNOWN = 0; 1887 1888 // Initial notification with a recommended network. 1889 NOTIFICATION_RECOMMEND_NETWORK = 1; 1890 1891 // Notification when connecting to the recommended network. 1892 NOTIFICATION_CONNECTING_TO_NETWORK = 2; 1893 1894 // Notification when successfully connected to the network. 1895 NOTIFICATION_CONNECTED_TO_NETWORK = 3; 1896 1897 // Notification when failed to connect to network. 1898 NOTIFICATION_FAILED_TO_CONNECT = 4; 1899 } 1900 1901 // "Connect to Network" notification actions 1902 enum Action { 1903 1904 // Default 1905 ACTION_UNKNOWN = 0; 1906 1907 // User dismissed the "Connect to Network" notification. 1908 ACTION_USER_DISMISSED_NOTIFICATION = 1; 1909 1910 // User tapped action button to connect to recommended network. 1911 ACTION_CONNECT_TO_NETWORK = 2; 1912 1913 // User tapped action button to open Wi-Fi Settings. 1914 ACTION_PICK_WIFI_NETWORK = 3; 1915 1916 // User tapped "Failed to connect" notification to open Wi-Fi Settings. 1917 ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE = 4; 1918 } 1919 1920 // Recommenders of the "Connect to Network" notification 1921 enum Recommender { 1922 1923 // Default. 1924 RECOMMENDER_UNKNOWN = 0; 1925 1926 // Open Network Available recommender. 1927 RECOMMENDER_OPEN = 1; 1928 } 1929 1930 // Notification Type. 1931 optional Notification notification = 1; 1932 1933 // Action Type. 1934 optional Action action = 2; 1935 1936 // Recommender Type. 1937 optional Recommender recommender = 3; 1938 1939 // Occurrences of this action. 1940 optional int32 count = 4; 1941} 1942 1943// SoftAP event tracking sessions and client counts 1944message SoftApConnectedClientsEvent { 1945 1946 // Soft AP event Types 1947 enum SoftApEventType { 1948 1949 // Soft AP in single AP mode is Up and ready for use. 1950 // The sequence of the events in single AP mode: 1951 // SOFT_AP_UP -> ... (ex:NUM_CLIENTS_CHANGED) -> SOFT_AP_DOWN 1952 SOFT_AP_UP = 0; 1953 1954 // Soft AP in single/dual AP mode is Down. 1955 SOFT_AP_DOWN = 1; 1956 1957 // Number of connected soft AP clients has changed. 1958 NUM_CLIENTS_CHANGED = 2; 1959 1960 // Soft AP in dual AP mode is Up and ready for use. 1961 // There are two DUAL_AP_BOTH_INSTANCES_UP events in dual AP mode for 1962 // storing each instance information. 1963 // The sequence of the events in dual AP mode: 1964 // DUAL_AP_BOTH_INSTANCES_UP -> DUAL_AP_BOTH_INSTANCES_UP 1965 // ... (ex: DUAL_AP_ONE_INSTANCE_DOWN or NUM_CLIENTS_CHANGED) -> SOFT_AP_DOWN 1966 DUAL_AP_BOTH_INSTANCES_UP = 3; 1967 1968 // One of the dual AP instance is Down. 1969 DUAL_AP_ONE_INSTANCE_DOWN = 4; 1970 } 1971 1972 // Soft AP channel bandwidth types 1973 enum ChannelBandwidth { 1974 1975 BANDWIDTH_INVALID = 0; 1976 1977 BANDWIDTH_20_NOHT = 1; 1978 1979 BANDWIDTH_20 = 2; 1980 1981 BANDWIDTH_40 = 3; 1982 1983 BANDWIDTH_80 = 4; 1984 1985 BANDWIDTH_80P80 = 5; 1986 1987 BANDWIDTH_160 = 6; 1988 } 1989 1990 // The operational mode of the Soft AP. 1991 enum Generation { 1992 1993 WIFI_STANDARD_UNKNOWN = 0; 1994 1995 WIFI_STANDARD_LEGACY = 1; 1996 1997 WIFI_STANDARD_11N = 4; 1998 1999 WIFI_STANDARD_11AC = 5; 2000 2001 WIFI_STANDARD_11AX = 6; 2002 } 2003 2004 // Type of event being recorded 2005 optional SoftApEventType event_type = 1; 2006 2007 // Time passed since last boot in milliseconds 2008 optional int64 time_stamp_millis = 2; 2009 2010 // Number of connected clients if event_type is NUM_CLIENTS_CHANGED, otherwise zero. 2011 optional int32 num_connected_clients = 3; 2012 2013 // Channel frequency used for Soft AP 2014 optional int32 channel_frequency = 4; 2015 2016 // Channel bandwidth used for Soft AP 2017 optional ChannelBandwidth channel_bandwidth = 5; 2018 2019 // Maximum number of client setting in SoftApConfiguration 2020 optional int32 max_num_clients_setting_in_softap_configuration = 6; 2021 2022 // Maximum number of client setting in SoftApCapability 2023 optional int32 max_num_clients_setting_in_softap_capability = 7; 2024 2025 // Auto shutdown timeout setting in SoftApConfiguration 2026 optional int64 shutdown_timeout_setting_in_softap_configuration = 8; 2027 2028 // Framework default auto shutdown timeout setting 2029 optional int64 default_shutdown_timeout_setting = 9; 2030 2031 // Indicates if user enabled the client_control 2032 optional bool client_control_is_enabled = 10; 2033 2034 // The operational mode of the AP 2035 optional Generation generation = 11; 2036 2037 // Number of connected clients on current frequency if event_type is NUM_CLIENTS_CHANGED, 2038 // otherwise zero. On dual AP, it may be different from num_connected_clients 2039 // because there are two instances and num_connected_clients is used to record 2040 // total number of the clients. But num_connected_clients_on_current_frequency 2041 // is used to record the number of the clients on specific instance. (depends 2042 // on channel_frequency) 2043 optional int32 num_connected_clients_on_current_frequency = 12; 2044} 2045 2046// Power stats for Wifi 2047message WifiPowerStats { 2048 2049 // Duration of log (ms) 2050 optional int64 logging_duration_ms = 1; 2051 2052 // Energy consumed by wifi (mAh) 2053 optional double energy_consumed_mah = 2; 2054 2055 // Amount of time wifi is in idle (ms) 2056 optional int64 idle_time_ms = 3; 2057 2058 // Amount of time wifi is in rx (ms) 2059 optional int64 rx_time_ms = 4; 2060 2061 // Amount of time wifi is in tx (ms) 2062 optional int64 tx_time_ms = 5; 2063 2064 // Amount of time kernel is active because of wifi data (ms) 2065 optional int64 wifi_kernel_active_time_ms = 6; 2066 2067 // Number of packets sent (tx) 2068 optional int64 num_packets_tx = 7; 2069 2070 // Number of bytes sent (tx) 2071 optional int64 num_bytes_tx = 8; 2072 2073 // Number of packets received (rx) 2074 optional int64 num_packets_rx = 9; 2075 2076 // Number of bytes sent (rx) 2077 optional int64 num_bytes_rx = 10; 2078 2079 // Amount of time wifi is in sleep (ms) 2080 optional int64 sleep_time_ms = 11; 2081 2082 // Amount of time wifi is scanning (ms) 2083 optional int64 scan_time_ms = 12; 2084 2085 // Actual monitored rail energy consumed by wifi (mAh) 2086 optional double monitored_rail_energy_consumed_mah = 13; 2087} 2088 2089// Metrics for Wifi Wake 2090message WifiWakeStats { 2091 // An individual session for Wifi Wake 2092 message Session { 2093 // A Wifi Wake lifecycle event 2094 message Event { 2095 // Elapsed time in milliseconds since start of session. 2096 optional int64 elapsed_time_millis = 1; 2097 2098 // Number of scans that have occurred since start of session. 2099 optional int32 elapsed_scans = 2; 2100 } 2101 2102 // Start time of session in milliseconds. 2103 optional int64 start_time_millis = 1; 2104 2105 // The number of networks the lock was provided with at start. 2106 optional int32 locked_networks_at_start = 2; 2107 2108 // The number of networks in the lock at the time of the initialize event. Only valid if 2109 // initialize_event is recorded. 2110 optional int32 locked_networks_at_initialize = 6; 2111 2112 // Event for fully initializing the WakeupLock (i.e. WakeupLock is "locked"). 2113 optional Event initialize_event = 7; 2114 2115 // Event for unlocking the WakeupLock. Does not occur if lock was initialized with 0 networks. 2116 optional Event unlock_event = 3; 2117 2118 // Event for triggering wakeup. 2119 optional Event wakeup_event = 4; 2120 2121 // Event for WifiWake reset event. This event marks the end of a session. 2122 optional Event reset_event = 5; 2123 } 2124 2125 // Total number of sessions for Wifi Wake. 2126 optional int32 num_sessions = 1; 2127 2128 // Session information for every Wifi Wake session (up to a maximum of 10). 2129 repeated Session sessions = 2; 2130 2131 // Number of ignored calls to start (due to WakeupController already being active). 2132 optional int32 num_ignored_starts = 3; 2133 2134 // Number of Wifi Wake sessions that have recorded wakeup events. 2135 optional int32 num_wakeups = 4; 2136} 2137 2138// Metrics for Wi-Fi RTT 2139message WifiRttLog { 2140 // Number of RTT request API calls 2141 optional int32 num_requests = 1; 2142 2143 // Histogram of RTT operation overall status 2144 repeated RttOverallStatusHistogramBucket histogram_overall_status = 2; 2145 2146 // RTT to Access Points metrics 2147 optional RttToPeerLog rtt_to_ap = 3; 2148 2149 // RTT to Wi-Fi Aware peers metrics 2150 optional RttToPeerLog rtt_to_aware = 4; 2151 2152 // Histogram of how long a measurement with only AP take. 2153 repeated HistogramBucket histogram_measurement_duration_ap_only = 5; 2154 2155 // Histogram of how long a measurement with aware peer included take. 2156 repeated HistogramBucket histogram_measurement_duration_with_aware = 6; 2157 2158 // Metrics for a RTT to Peer (peer = AP or Wi-Fi Aware) 2159 message RttToPeerLog { 2160 // Total number of API calls 2161 optional int32 num_requests = 1; 2162 2163 // Total number of individual requests 2164 optional int32 num_individual_requests = 2; 2165 2166 // Total number of apps which requested RTT 2167 optional int32 num_apps = 3; 2168 2169 // Histogram of total number of RTT requests by an app (WifiRttManager#startRanging) 2170 repeated HistogramBucket histogram_num_requests_per_app = 4; 2171 2172 // Histogram of number of peers in a single RTT request (RangingRequest entries) 2173 repeated HistogramBucket histogram_num_peers_per_request = 5; 2174 2175 // Histogram of status of individual RTT operations (RangingResult entries) 2176 repeated RttIndividualStatusHistogramBucket histogram_individual_status = 6; 2177 2178 // Histogram of measured distances (RangingResult entries) 2179 repeated HistogramBucket histogram_distance = 7; 2180 2181 // Histogram of interval of RTT requests by an app (WifiRttManager#startRanging) 2182 repeated HistogramBucket histogram_request_interval_ms = 8; 2183 } 2184 2185 // Histogram bucket for Wi-Fi RTT logs. Range is [start, end) 2186 message HistogramBucket { 2187 // lower range of the bucket (inclusive) 2188 optional int64 start = 1; 2189 2190 // upper range of the bucket (exclusive) 2191 optional int64 end = 2; 2192 2193 // number of samples in the bucket 2194 optional int32 count = 3; 2195 } 2196 2197 // Status codes for overall RTT operation 2198 enum RttOverallStatusTypeEnum { 2199 // constant to be used by proto 2200 OVERALL_UNKNOWN = 0; 2201 2202 // RTT operation succeeded (individual results may still fail) 2203 OVERALL_SUCCESS = 1; 2204 2205 // RTT operation failed (unspecified reason) 2206 OVERALL_FAIL = 2; 2207 2208 // RTT operation failed since RTT was not available (e.g. Airplane mode) 2209 OVERALL_RTT_NOT_AVAILABLE = 3; 2210 2211 // RTT operation timed-out: didn't receive response from HAL in expected time 2212 OVERALL_TIMEOUT = 4; 2213 2214 // RTT operation aborted since the app is spamming the service 2215 OVERALL_THROTTLE = 5; 2216 2217 // RTT request to HAL received immediate failure 2218 OVERALL_HAL_FAILURE = 6; 2219 2220 // RTT to Wi-Fi Aware peer using PeerHandle failed to get a MAC address translation 2221 OVERALL_AWARE_TRANSLATION_FAILURE = 7; 2222 2223 // RTT operation failed due to missing Location permission (post execution) 2224 OVERALL_LOCATION_PERMISSION_MISSING = 8; 2225 } 2226 2227 // Status codes for individual RTT operation 2228 enum RttIndividualStatusTypeEnum { 2229 // constant to be used by proto 2230 UNKNOWN = 0; 2231 2232 // RTT operation succeeded 2233 SUCCESS = 1; 2234 2235 // RTT failure: generic reason (no further information) 2236 FAILURE = 2; 2237 2238 // Target STA does not respond to request 2239 FAIL_NO_RSP = 3; 2240 2241 // Request rejected. Applies to 2-sided RTT only 2242 FAIL_REJECTED = 4; 2243 2244 // Operation not scheduled 2245 FAIL_NOT_SCHEDULED_YET = 5; 2246 2247 // Timing measurement times out 2248 FAIL_TM_TIMEOUT = 6; 2249 2250 // Target on different channel, cannot range 2251 FAIL_AP_ON_DIFF_CHANNEL = 7; 2252 2253 // Ranging not supported 2254 FAIL_NO_CAPABILITY = 8; 2255 2256 // Request aborted for unknown reason 2257 ABORTED = 9; 2258 2259 // Invalid T1-T4 timestamp 2260 FAIL_INVALID_TS = 10; 2261 2262 // 11mc protocol failed 2263 FAIL_PROTOCOL = 11; 2264 2265 // Request could not be scheduled 2266 FAIL_SCHEDULE = 12; 2267 2268 // Responder cannot collaborate at time of request 2269 FAIL_BUSY_TRY_LATER = 13; 2270 2271 // Bad request args 2272 INVALID_REQ = 14; 2273 2274 // WiFi not enabled 2275 NO_WIFI = 15; 2276 2277 // Responder overrides param info, cannot range with new params 2278 FAIL_FTM_PARAM_OVERRIDE = 16; 2279 2280 // HAL did not provide a result to a framework request 2281 MISSING_RESULT = 17; 2282 } 2283 2284 // Histogram bucket for Wi-Fi RTT overall operation status 2285 message RttOverallStatusHistogramBucket { 2286 // status type defining the bucket 2287 optional RttOverallStatusTypeEnum status_type = 1; 2288 2289 // number of samples in the bucket 2290 optional int32 count = 2; 2291 } 2292 2293 // Histogram bucket for Wi-Fi RTT individual operation status 2294 message RttIndividualStatusHistogramBucket { 2295 // status type defining the bucket 2296 optional RttIndividualStatusTypeEnum status_type = 1; 2297 2298 // number of samples in the bucket 2299 optional int32 count = 2; 2300 } 2301} 2302 2303// Usage data for the wifi radio while device is running on battery. 2304message WifiRadioUsage { 2305 // Duration of log (ms) 2306 optional int64 logging_duration_ms = 1; 2307 2308 // Total time for which the radio is awake due to scan. 2309 optional int64 scan_time_ms = 2; 2310} 2311 2312message ExperimentValues { 2313 // Indicates if we are logging WifiIsUnusableEvent in metrics 2314 optional bool wifi_is_unusable_logging_enabled = 1; 2315 2316 // Minimum number of txBad to trigger a data stall 2317 optional int32 wifi_data_stall_min_tx_bad = 2; 2318 2319 // Minimum number of txSuccess to trigger a data stall 2320 // when rxSuccess is 0 2321 optional int32 wifi_data_stall_min_tx_success_without_rx = 3; 2322 2323 // Indicates if we are logging LinkSpeedCount in metrics 2324 optional bool link_speed_counts_logging_enabled = 4; 2325 2326 // Duration for evaluating Wifi condition to trigger a data stall 2327 // measured in milliseconds 2328 optional int32 data_stall_duration_ms = 5; 2329 2330 // Threshold of Tx throughput below which to trigger a data stall 2331 // measured in Kbps 2332 optional int32 data_stall_tx_tput_thr_kbps = 6; 2333 2334 // Threshold of Rx throughput below which to trigger a data stall 2335 // measured in Kbps 2336 optional int32 data_stall_rx_tput_thr_kbps = 7; 2337 2338 // Threshold of Tx packet error rate above which to trigger a data stall 2339 // in percentage 2340 optional int32 data_stall_tx_per_thr = 8; 2341 2342 // Threshold of CCA level above which to trigger a data stall in percentage 2343 optional int32 data_stall_cca_level_thr = 9; 2344 2345 // Health monitor RSSI poll valid time in ms 2346 optional int32 health_monitor_rssi_poll_valid_time_ms = 10; 2347} 2348 2349message BssidBlocklistStats { 2350 // Distributions of number of blocked BSSIDs filtered out from network selection. 2351 repeated Int32Count network_selection_filtered_bssid_count = 1; 2352 2353 // If this is enabled, then network connections in high movement state will be skipped unless 2354 // we find a candidate BSSID with similar RSSI in 2 scans sufficiently far apart. 2355 optional bool high_movement_multiple_scans_feature_enabled = 2; 2356 2357 // Number of times connection is skipped in the high movement state 2358 // only relevant if high_movement_multiple_scans_feature_enabled=true 2359 optional int32 num_high_movement_connection_skipped = 3; 2360 2361 // Number of times connection is initiated in the high movement state 2362 // only relevant if high_movement_multiple_scans_feature_enabled=true 2363 optional int32 num_high_movement_connection_started = 4; 2364 2365 // Histogram corresponding to the number of times BSSIDs are blocked per 2366 // WifiBlocklistMonitor.FailureReason. 2367 repeated Int32Count bssid_blocklist_per_reason_count = 5; 2368 2369 // Histogram corresponding to the number of times WifiConfigurations are blocked per 2370 // WifiConfiguration.NetworkSelectionStatus.NetworkSelectionDisableReason. 2371 repeated Int32Count wifi_config_blocklist_per_reason_count = 6; 2372} 2373 2374message WifiIsUnusableEvent { 2375 enum TriggerType { 2376 // Default/Invalid event 2377 TYPE_UNKNOWN = 0; 2378 2379 // There is a data stall from tx failures 2380 TYPE_DATA_STALL_BAD_TX = 1; 2381 2382 // There is a data stall from rx failures 2383 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 2384 2385 // There is a data stall from both tx and rx failures 2386 TYPE_DATA_STALL_BOTH = 3; 2387 2388 // Firmware generated an alert 2389 TYPE_FIRMWARE_ALERT = 4; 2390 2391 // IP Manager lost reachability to network neighbors 2392 TYPE_IP_REACHABILITY_LOST = 5; 2393 } 2394 2395 // What event triggered WifiIsUnusableEvent. 2396 optional TriggerType type = 1; 2397 2398 // The timestamp at which this event occurred. 2399 // Measured in milliseconds that have elapsed since the device booted. 2400 optional int64 start_time_millis = 2; 2401 2402 // NetworkAgent score of connected wifi. 2403 // Defaults to -1 if the score was never set. 2404 optional int32 last_score = 3 [default = -1]; 2405 2406 // Delta of successfully transmitted (ACKed) unicast data packets 2407 // between the last two WifiLinkLayerStats. 2408 optional int64 tx_success_delta = 4; 2409 2410 // Delta of transmitted unicast data retry packets 2411 // between the last two WifiLinkLayerStats. 2412 optional int64 tx_retries_delta = 5; 2413 2414 // Delta of lost (not ACKed) transmitted unicast data packets 2415 // between the last two WifiLinkLayerStats. 2416 optional int64 tx_bad_delta = 6; 2417 2418 // Delta of received unicast data packets 2419 // between the last two WifiLinkLayerStats. 2420 optional int64 rx_success_delta = 7; 2421 2422 // Time in millisecond between the last two WifiLinkLayerStats. 2423 optional int64 packet_update_time_delta = 8; 2424 2425 // The timestamp at which the last WifiLinkLayerStats was updated. 2426 // Measured in milliseconds that have elapsed since the device booted. 2427 optional int64 last_link_layer_stats_update_time = 9; 2428 2429 // Firmware alert code. Only valid when the event was triggered by a firmware alert, otherwise -1. 2430 optional int32 firmware_alert_code = 10 [default = -1]; 2431 2432 // NetworkAgent wifi usability score of connected wifi. 2433 // Defaults to -1 if the score was never set. 2434 optional int32 last_wifi_usability_score = 11 [default = -1]; 2435 2436 // Prediction horizon (in second) of Wifi usability score provided by external 2437 // system app 2438 optional int32 last_prediction_horizon_sec = 12 [default = -1]; 2439 2440 // Whether screen status is on when WifiIsUnusableEvent happens. 2441 optional bool screen_on = 13 [default = false]; 2442 2443 // Number of bytes transmitted across mobile networks since device boot. 2444 optional int64 mobile_tx_bytes = 14 [default = -1]; 2445 2446 // // Number of bytes received across mobile networks since device boot. 2447 optional int64 mobile_rx_bytes = 15 [default = -1]; 2448 2449 // Number of bytes transmitted since device boot. 2450 optional int64 total_tx_bytes = 16 [default = -1]; 2451 2452 // Number of bytes received since device boot. 2453 optional int64 total_rx_bytes = 17 [default = -1]; 2454} 2455 2456message PasspointProfileTypeCount { 2457 enum EapMethod { 2458 // Unknown Type 2459 TYPE_UNKNOWN = 0; 2460 2461 // EAP_TLS (13) 2462 TYPE_EAP_TLS = 1; 2463 2464 // EAP_TTLS (21) 2465 TYPE_EAP_TTLS = 2; 2466 2467 // EAP_SIM (18) 2468 TYPE_EAP_SIM = 3; 2469 2470 // EAP_AKA (23) 2471 TYPE_EAP_AKA = 4; 2472 2473 // EAP_AKA_PRIME (50) 2474 TYPE_EAP_AKA_PRIME = 5; 2475 } 2476 2477 // Eap method type set in Passpoint profile 2478 optional EapMethod eap_method_type = 1; 2479 2480 // Num of installed Passpoint profile with same eap method 2481 optional int32 count = 2; 2482} 2483 2484message WifiLinkLayerUsageStats { 2485 // Total logging duration in ms. 2486 optional int64 logging_duration_ms = 1; 2487 2488 // Total time the wifi radio is on in ms over the logging duration. 2489 optional int64 radio_on_time_ms = 2; 2490 2491 // Total time the wifi radio is doing tx in ms over the logging duration. 2492 optional int64 radio_tx_time_ms = 3; 2493 2494 // Total time the wifi radio is doing rx in ms over the logging duration. 2495 optional int64 radio_rx_time_ms = 4; 2496 2497 // Total time the wifi radio is scanning in ms over the logging duration. 2498 optional int64 radio_scan_time_ms = 5; 2499 2500 // Total time the wifi radio spent doing nan scans in ms over the logging duration. 2501 optional int64 radio_nan_scan_time_ms = 6; 2502 2503 // Total time the wifi radio spent doing background scans in ms over the logging duration. 2504 optional int64 radio_background_scan_time_ms = 7; 2505 2506 // Total time the wifi radio spent doing roam scans in ms over the logging duration. 2507 optional int64 radio_roam_scan_time_ms = 8; 2508 2509 // Total time the wifi radio spent doing pno scans in ms over the logging duration. 2510 optional int64 radio_pno_scan_time_ms = 9; 2511 2512 // Total time the wifi radio spent doing hotspot 2.0 scans and GAS exchange 2513 // in ms over the logging duration. 2514 optional int64 radio_hs20_scan_time_ms = 10; 2515 2516 // Radio stats from all the radios 2517 repeated RadioStats radio_stats = 11; 2518} 2519 2520message WifiUsabilityStatsEntry { 2521 // Status codes for link probe status 2522 enum LinkProbeStatus { 2523 // Link probe status is unknown 2524 PROBE_STATUS_UNKNOWN = 0; 2525 2526 // Link probe is not triggered 2527 PROBE_STATUS_NO_PROBE = 1; 2528 2529 // Link probe is triggered and the result is success 2530 PROBE_STATUS_SUCCESS = 2; 2531 2532 // Link probe is triggered and the result is failure 2533 PROBE_STATUS_FAILURE = 3; 2534 } 2535 2536 // Codes for cellular data network type 2537 enum CellularDataNetworkType { 2538 // Unknown network 2539 NETWORK_TYPE_UNKNOWN = 0; 2540 2541 // GSM network 2542 NETWORK_TYPE_GSM = 1; 2543 2544 // CDMA network 2545 NETWORK_TYPE_CDMA = 2; 2546 2547 // CDMA EVDO network 2548 NETWORK_TYPE_EVDO_0 = 3; 2549 2550 // WCDMA network 2551 NETWORK_TYPE_UMTS = 4; 2552 2553 // TDSCDMA network 2554 NETWORK_TYPE_TD_SCDMA = 5; 2555 2556 // LTE network 2557 NETWORK_TYPE_LTE = 6; 2558 2559 // NR network 2560 NETWORK_TYPE_NR = 7; 2561 } 2562 2563 // Absolute milliseconds from device boot when these stats were sampled 2564 optional int64 time_stamp_ms = 1; 2565 2566 // The RSSI at the sample time 2567 optional int32 rssi = 2; 2568 2569 // Link speed at the sample time in Mbps 2570 optional int32 link_speed_mbps = 3; 2571 2572 // The total number of tx success counted from the last radio chip reset 2573 optional int64 total_tx_success = 4; 2574 2575 // The total number of MPDU data packet retries counted from the last radio chip reset 2576 optional int64 total_tx_retries = 5; 2577 2578 // The total number of tx bad counted from the last radio chip reset 2579 optional int64 total_tx_bad = 6; 2580 2581 // The total number of rx success counted from the last radio chip reset 2582 optional int64 total_rx_success = 7; 2583 2584 // The total time the wifi radio is on in ms counted from the last radio chip reset 2585 optional int64 total_radio_on_time_ms = 8; 2586 2587 // The total time the wifi radio is doing tx in ms counted from the last radio chip reset 2588 optional int64 total_radio_tx_time_ms = 9; 2589 2590 // The total time the wifi radio is doing rx in ms counted from the last radio chip reset 2591 optional int64 total_radio_rx_time_ms = 10; 2592 2593 // The total time spent on all types of scans in ms counted from the last radio chip reset 2594 optional int64 total_scan_time_ms = 11; 2595 2596 // The total time spent on nan scans in ms counted from the last radio chip reset 2597 optional int64 total_nan_scan_time_ms = 12; 2598 2599 // The total time spent on background scans in ms counted from the last radio chip reset 2600 optional int64 total_background_scan_time_ms = 13; 2601 2602 // The total time spent on roam scans in ms counted from the last radio chip reset 2603 optional int64 total_roam_scan_time_ms = 14; 2604 2605 // The total time spent on pno scans in ms counted from the last radio chip reset 2606 optional int64 total_pno_scan_time_ms = 15; 2607 2608 // The total time spent on hotspot2.0 scans and GAS exchange in ms counted from the last radio 2609 // chip reset 2610 optional int64 total_hotspot_2_scan_time_ms = 16; 2611 2612 // Internal framework Wifi score 2613 optional int32 wifi_score = 17; 2614 2615 // Wifi usability score provided by external system app 2616 optional int32 wifi_usability_score = 18; 2617 2618 // Sequence number from external system app to framework 2619 optional int32 seq_num_to_framework = 19; 2620 2621 // The total time CCA is on busy status on the current frequency in ms 2622 // counted from the last radio chip reset 2623 optional int64 total_cca_busy_freq_time_ms = 20; 2624 2625 // The total radio on time of the current frequency from the last radio 2626 // chip reset 2627 optional int64 total_radio_on_freq_time_ms = 21; 2628 2629 // The total number of beacons received from the last radio chip reset 2630 optional int64 total_beacon_rx = 22; 2631 2632 // Prediction horizon (in second) of Wifi usability score provided by external 2633 // system app 2634 optional int32 prediction_horizon_sec = 23; 2635 2636 // The link probe status since last stats update 2637 optional LinkProbeStatus probe_status_since_last_update = 24; 2638 2639 // The elapsed time of the most recent link probe since last stats update; 2640 optional int32 probe_elapsed_time_since_last_update_ms = 25; 2641 2642 // The MCS rate of the most recent link probe since last stats update 2643 optional int32 probe_mcs_rate_since_last_update = 26; 2644 2645 // Rx link speed at the sample time in Mbps 2646 optional int32 rx_link_speed_mbps = 27; 2647 2648 // Sequence number generated by framework 2649 optional int32 seq_num_inside_framework = 28; 2650 2651 // Whether current entry is for the same BSSID on the same frequency compared 2652 // to last entry 2653 optional bool is_same_bssid_and_freq = 29; 2654 2655 // Cellular data network type currently in use on the device for data transmission 2656 optional CellularDataNetworkType cellular_data_network_type = 30; 2657 2658 // Cellular signal strength in dBm, NR: CsiRsrp, LTE: Rsrp, WCDMA/TDSCDMA: Rscp, 2659 // CDMA: Rssi, EVDO: Rssi, GSM: Rssi 2660 optional int32 cellular_signal_strength_dbm = 31; 2661 2662 // Cellular signal strength in dB, NR: CsiSinr, LTE: Rsrq, WCDMA: EcNo, TDSCDMA: invalid, 2663 // CDMA: Ecio, EVDO: SNR, GSM: invalid */ 2664 optional int32 cellular_signal_strength_db = 32; 2665 2666 // Whether the primary registered cell of current entry is same as that of previous entry 2667 optional bool is_same_registered_cell = 33; 2668 2669 // The device mobility state 2670 optional DeviceMobilityStatePnoScanStats.DeviceMobilityState 2671 device_mobility_state = 34; 2672 2673 // Duty cycle of the connection. 2674 // if this connection is being served using time slicing on a radio with one or more interfaces 2675 // (i.e MCC), then this field contains the duty cycle assigned to this interface in percent. 2676 // If no concurrency or not using time slicing during concurrency (i.e SCC or DBS), set to 100. 2677 optional int32 time_slice_duty_cycle_in_percent = 35; 2678 2679 // WME data packet contention time statistics for all four categories: BE, BK, VI, VO 2680 repeated ContentionTimeStats contention_time_stats = 36; 2681 2682 // The channel utilization ratio (value) in the range of 2683 // [BssLoad.MIN_CHANNEL_UTILIZATION, BssLoad.MAX_CHANNEL_UTILIZATION], where MIN_CHANNEL_UTILIZATION 2684 // corresponds to ratio 0%, MAX_CHANNEL_UTILIZATION corresponds to ratio 100%, 2685 // see {@link com.android.server.wifi.util.InformationElementUtil} 2686 optional int32 channel_utilization_ratio = 37; 2687 2688 // Indicate whether current link layer throughput is sufficient, see {@link WifiDataStall#isThroughputSufficient()}. 2689 optional bool is_throughput_sufficient = 38; 2690 2691 // Indicate whether Wi-Fi scoring is enabled by the user, see {@link WifiManager#setWifiScoringEnabled(boolean)}. 2692 optional bool is_wifi_scoring_enabled = 39; 2693 2694 // Indicate whether Cellular data is available, see {@link WifiDataStall#isCellularDataAvailable()}. 2695 optional bool is_cellular_data_available = 40; 2696 2697 // Rate statistics, including number of successful packets, retries, etc., 2698 // indexed by preamble, bandwidth, number of spatial streams, MCS. 2699 repeated RateStats rate_stats = 41; 2700 2701 // Number of stations associated with current AP. 2702 optional int32 sta_count = 42; 2703 2704 // Channel utilization at current AP in the range of [0, 255]. 2705 optional int32 channel_utilization = 43; 2706 2707 // Link layer radio stats for all the radios 2708 repeated RadioStats radio_stats = 44; 2709} 2710 2711message ContentionTimeStats { 2712 enum AccessCategory { 2713 // WME Best Effort Access Category 2714 WME_ACCESS_CATEGORY_BE = 0; 2715 2716 // WME Background Access Category 2717 WME_ACCESS_CATEGORY_BK = 1; 2718 2719 // WME Video Access Category 2720 WME_ACCESS_CATEGORY_VI = 2; 2721 2722 // WME Voice Access Category 2723 WME_ACCESS_CATEGORY_VO = 3; 2724 } 2725 2726 // WME access category 2727 optional AccessCategory access_category = 1; 2728 2729 // Data packet min contention time in microseconds 2730 optional int64 contention_time_min_micros = 2; 2731 2732 // Data packet max contention time in microseconds 2733 optional int64 contention_time_max_micros = 3; 2734 2735 // Data packet average contention time in microseconds 2736 optional int64 contention_time_avg_micros = 4; 2737 2738 // Number of data packets used for contention statistics 2739 optional int64 contention_num_samples = 5; 2740} 2741 2742message RateStats { 2743 enum WifiPreambleType { 2744 // Preamble type for IEEE 802.11a/g, IEEE Std 802.11-2020, Section 17 2745 WIFI_PREAMBLE_OFDM = 0; 2746 // Preamble type for IEEE 802.11b, IEEE Std 802.11-2020, Section 16 2747 WIFI_PREAMBLE_CCK = 1; 2748 // Preamble type for IEEE 802.11n, IEEE Std 802.11-2020, Section 19 2749 WIFI_PREAMBLE_HT = 2; 2750 // Preamble type for IEEE 802.11ac, IEEE Std 802.11-2020, Section 21 2751 WIFI_PREAMBLE_VHT = 3; 2752 // Preamble type for IEEE 802.11ax, IEEE Std 802.11-2020, Section 27 2753 WIFI_PREAMBLE_HE = 5; 2754 // Invalid 2755 WIFI_PREAMBLE_INVALID = -1; 2756 } 2757 2758 enum WifiSpatialStreams { 2759 // Single stream, 1x1 2760 WIFI_SPATIAL_STREAMS_ONE = 0; 2761 // Dual streams, 2x2 2762 WIFI_SPATIAL_STREAMS_TWO = 1; 2763 // Three streams, 3x3 2764 WIFI_SPATIAL_STREAMS_THREE = 2; 2765 // Four streams, 4x4 2766 WIFI_SPATIAL_STREAMS_FOUR = 3; 2767 // Invalid 2768 WIFI_SPATIAL_STREAMS_INVALID = -1; 2769 } 2770 2771 enum WifiChannelBandwidth { 2772 // Channel bandwidth: 20MHz 2773 WIFI_BANDWIDTH_20_MHZ = 0; 2774 // Channel bandwidth: 40MHz 2775 WIFI_BANDWIDTH_40_MHZ = 1; 2776 // Channel bandwidth: 80MHz 2777 WIFI_BANDWIDTH_80_MHZ = 2; 2778 // Channel bandwidth: 160MHz 2779 WIFI_BANDWIDTH_160_MHZ = 3; 2780 // Channel bandwidth: 80MHz + 80MHz 2781 WIFI_BANDWIDTH_80P80_MHZ = 4; 2782 // Channel bandwidth: 5MHz 2783 WIFI_BANDWIDTH_5_MHZ = 5; 2784 // Channel bandwidth: 10MHz 2785 WIFI_BANDWIDTH_10_MHZ = 6; 2786 // Invalid channel bandwidth 2787 WIFI_BANDWIDTH_INVALID = -1; 2788 } 2789 2790 // Preamble information. 2791 optional WifiPreambleType preamble = 1; 2792 2793 // Number of spatial streams. 2794 optional WifiSpatialStreams nss = 2; 2795 2796 // Bandwidth information. 2797 optional WifiChannelBandwidth bw = 3; 2798 2799 // MCS index. OFDM/CCK rate code would be as per IEEE std in the units of 0.5Mbps. 2800 // HT/VHT/HE: it would be MCS index. 2801 optional int32 rate_mcs_idx = 4; 2802 2803 // Bitrate in units of 100 Kbps. 2804 optional int32 bit_rate_in_kbps = 5; 2805 2806 // Number of successfully transmitted data packets (ACK received). 2807 optional int32 tx_mpdu = 6; 2808 2809 // Number of received data packets. 2810 optional int32 rx_mpdu = 7; 2811 2812 // Number of data packet losses (no ACK). 2813 optional int32 mpdu_lost = 8; 2814 2815 // Number of data packet retries. 2816 optional int32 retries = 9; 2817} 2818 2819message RadioStats { 2820 // The Radio ID 2821 optional int32 radio_id = 1; 2822 // The total time the wifi radio is on in ms counted from the last radio chip reset 2823 optional int64 total_radio_on_time_ms = 2; 2824 2825 // The total time the wifi radio is doing tx in ms counted from the last radio chip reset 2826 optional int64 total_radio_tx_time_ms = 3; 2827 2828 // The total time the wifi radio is doing rx in ms counted from the last radio chip reset 2829 optional int64 total_radio_rx_time_ms = 4; 2830 2831 // The total time spent on all types of scans in ms counted from the last radio chip reset 2832 optional int64 total_scan_time_ms = 5; 2833 2834 // The total time spent on nan scans in ms counted from the last radio chip reset 2835 optional int64 total_nan_scan_time_ms = 6; 2836 2837 // The total time spent on background scans in ms counted from the last radio chip reset 2838 optional int64 total_background_scan_time_ms = 7; 2839 2840 // The total time spent on roam scans in ms counted from the last radio chip reset 2841 optional int64 total_roam_scan_time_ms = 8; 2842 2843 // The total time spent on pno scans in ms counted from the last radio chip reset 2844 optional int64 total_pno_scan_time_ms = 9; 2845 2846 // The total time spent on hotspot2.0 scans and GAS exchange in ms counted from the last radio 2847 // chip reset 2848 optional int64 total_hotspot_2_scan_time_ms = 10; 2849} 2850 2851message WifiUsabilityStats { 2852 enum Label { 2853 // Default label 2854 LABEL_UNKNOWN = 0; 2855 2856 // Wifi is usable 2857 LABEL_GOOD = 1; 2858 2859 // Wifi is unusable 2860 LABEL_BAD = 2; 2861 } 2862 2863 enum UsabilityStatsTriggerType { 2864 // Default/Invalid event 2865 TYPE_UNKNOWN = 0; 2866 2867 // There is a data stall from tx failures 2868 TYPE_DATA_STALL_BAD_TX = 1; 2869 2870 // There is a data stall from rx failures 2871 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 2872 2873 // There is a data stall from both tx and rx failures 2874 TYPE_DATA_STALL_BOTH = 3; 2875 2876 // Firmware generated an alert 2877 TYPE_FIRMWARE_ALERT = 4; 2878 2879 // IP Manager lost reachability to network neighbors 2880 TYPE_IP_REACHABILITY_LOST = 5; 2881 } 2882 2883 // The current wifi usability state 2884 optional Label label = 1; 2885 2886 // The list of timestamped wifi usability stats 2887 repeated WifiUsabilityStatsEntry stats = 2; 2888 2889 // What event triggered WifiUsabilityStats. 2890 optional UsabilityStatsTriggerType trigger_type = 3; 2891 2892 // Firmware alert code. Only valid when the stats was triggered by a firmware 2893 // alert, otherwise -1. 2894 optional int32 firmware_alert_code = 4 [default = -1]; 2895 2896 // Absolute milliseconds from device boot when these stats were sampled 2897 optional int64 time_stamp_ms = 5; 2898} 2899 2900message DeviceMobilityStatePnoScanStats { 2901 // see WifiManager.DEVICE_MOBILITY_STATE_* constants 2902 enum DeviceMobilityState { 2903 // Unknown mobility 2904 UNKNOWN = 0; 2905 2906 // High movement 2907 HIGH_MVMT = 1; 2908 2909 // Low movement 2910 LOW_MVMT = 2; 2911 2912 // Stationary 2913 STATIONARY = 3; 2914 } 2915 2916 // The device mobility state 2917 optional DeviceMobilityState device_mobility_state = 1; 2918 2919 // The number of times that this state was entered 2920 optional int32 num_times_entered_state = 2; 2921 2922 // The total duration elapsed while in this mobility state, in ms 2923 optional int64 total_duration_ms = 3; 2924 2925 // the total duration elapsed while in this mobility state with PNO scans running, in ms 2926 optional int64 pno_duration_ms = 4; 2927} 2928 2929// The information about the Wifi P2p events. 2930message WifiP2pStats { 2931 2932 // Group event list tracking sessions and client counts in tethered mode. 2933 repeated GroupEvent group_event = 1; 2934 2935 // Session information that gets logged for every Wifi P2p connection. 2936 repeated P2pConnectionEvent connection_event = 2; 2937 2938 // Number of persistent group in the user profile. 2939 optional int32 num_persistent_group = 3; 2940 2941 // Number of peer scan. 2942 optional int32 num_total_peer_scans = 4; 2943 2944 // Number of service scan. 2945 optional int32 num_total_service_scans = 5; 2946} 2947 2948message P2pConnectionEvent { 2949 2950 enum ConnectionType { 2951 2952 // fresh new connection. 2953 CONNECTION_FRESH = 0; 2954 2955 // reinvoke a group. 2956 CONNECTION_REINVOKE = 1; 2957 2958 // create a group with the current device as the group owner locally. 2959 CONNECTION_LOCAL = 2; 2960 2961 // create a group or join a group with config. 2962 CONNECTION_FAST = 3; 2963 } 2964 2965 enum ConnectivityLevelFailure { 2966 2967 // Failure is unknown. 2968 CLF_UNKNOWN = 0; 2969 2970 // No failure. 2971 CLF_NONE = 1; 2972 2973 // Timeout for current connecting request. 2974 CLF_TIMEOUT = 2; 2975 2976 // The connecting request is canceled by the user. 2977 CLF_CANCEL = 3; 2978 2979 // Provision discovery failure, e.g. no pin code, timeout, rejected by the peer. 2980 CLF_PROV_DISC_FAIL = 4; 2981 2982 // Invitation failure, e.g. rejected by the peer. 2983 CLF_INVITATION_FAIL = 5; 2984 2985 // Incoming request is rejected by the user. 2986 CLF_USER_REJECT = 6; 2987 2988 // New connection request is issued before ending previous connecting request. 2989 CLF_NEW_CONNECTION_ATTEMPT = 7; 2990 } 2991 2992 // WPS method. 2993 enum WpsMethod { 2994 // WPS is skipped for Group Reinvoke. 2995 WPS_NA = -1; 2996 2997 // Push button configuration. 2998 WPS_PBC = 0; 2999 3000 // Display pin method configuration - pin is generated and displayed on device. 3001 WPS_DISPLAY = 1; 3002 3003 // Keypad pin method configuration - pin is entered on device. 3004 WPS_KEYPAD = 2; 3005 3006 // Label pin method configuration - pin is labelled on device. 3007 WPS_LABEL = 3; 3008 } 3009 3010 // Start time of the connection. 3011 optional int64 start_time_millis = 1; 3012 3013 // Type of the connection. 3014 optional ConnectionType connection_type = 2; 3015 3016 // WPS method. 3017 optional WpsMethod wps_method = 3 [default = WPS_NA]; 3018 3019 // Duration to connect. 3020 optional int32 duration_taken_to_connect_millis = 4; 3021 3022 // Failures that happen at the connectivity layer. 3023 optional ConnectivityLevelFailure connectivity_level_failure_code = 5; 3024 3025 // Group role. This could be unknown with connect() call when the WifiConfig doesn't have the 3026 // credential. 3027 optional GroupEvent.GroupRole group_role = 6; 3028} 3029 3030// GroupEvent tracking group information from GroupStarted to GroupRemoved. 3031message GroupEvent { 3032 3033 enum GroupRole { 3034 3035 GROUP_OWNER = 0; 3036 3037 GROUP_CLIENT = 1; 3038 3039 GROUP_UNKNOWN = 2; 3040 } 3041 3042 // The ID of network in supplicant for this group. 3043 optional int32 net_id = 1; 3044 3045 // Start time of the group. 3046 optional int64 start_time_millis = 2; 3047 3048 // Channel frequency used for Group. 3049 optional int32 channel_frequency = 3; 3050 3051 // Is group owner or group client. 3052 optional GroupRole group_role = 5; 3053 3054 // Number of connected clients. 3055 optional int32 num_connected_clients = 6; 3056 3057 // Cumulative number of connected clients. 3058 optional int32 num_cumulative_clients = 7; 3059 3060 // The session duration. 3061 optional int32 session_duration_millis = 8; 3062 3063 // The idle duration. A group without any client is in idle. 3064 optional int32 idle_duration_millis = 9; 3065} 3066 3067// Easy Connect (DPP) 3068message WifiDppLog { 3069 reserved 6; 3070 3071 // Number of Configurator-Initiator requests 3072 optional int32 num_dpp_configurator_initiator_requests = 1; 3073 3074 // Number of Enrollee-Initiator requests 3075 optional int32 num_dpp_enrollee_initiator_requests = 2; 3076 3077 // Easy Connect (DPP) Enrollee success 3078 optional int32 num_dpp_enrollee_success = 3; 3079 3080 // Easy Connect (DPP) Configurator success code bucket 3081 repeated DppConfiguratorSuccessStatusHistogramBucket dpp_configurator_success_code = 4; 3082 3083 // Easy Connect (DPP) failure code bucket 3084 repeated DppFailureStatusHistogramBucket dpp_failure_code = 5; 3085 3086 // Easy Connect (DPP) operation time bucket 3087 repeated HistogramBucketInt32 dpp_operation_time = 7; 3088 3089 // Number of Enrollee-Responder peer devices supporting DPP protocol version 1 3090 optional int32 num_dpp_r1_capable_enrollee_responder_devices = 8; 3091 3092 // Number of Enrollee-Responder peer devices supporting DPP protocol version 2 3093 optional int32 num_dpp_r2_capable_enrollee_responder_devices = 9; 3094 3095 // Number of Enrollee-Responder incompatible configurations found in DPP R2 compatibility check. 3096 optional int32 num_dpp_r2_enrollee_responder_incompatible_configuration = 10; 3097 3098 // Number of Enrollee-Responder requests 3099 optional int32 num_dpp_enrollee_responder_requests = 11; 3100 3101 // Number of Enrollee-Responder success 3102 optional int32 num_dpp_enrollee_responder_success = 12; 3103 3104 // Histogram bucket for Wi-Fi DPP configurator success 3105 message DppConfiguratorSuccessStatusHistogramBucket { 3106 // status type defining the bucket 3107 optional DppConfiguratorSuccessCode dpp_status_type = 1; 3108 3109 // number of samples in the bucket 3110 optional int32 count = 2; 3111 } 3112 3113 // Histogram bucket for Wi-Fi DPP failures 3114 message DppFailureStatusHistogramBucket { 3115 // status type defining the bucket 3116 optional DppFailureCode dpp_status_type = 1; 3117 3118 // number of samples in the bucket 3119 optional int32 count = 2; 3120 } 3121 3122 enum DppConfiguratorSuccessCode { 3123 // Unknown success code 3124 EASY_CONNECT_EVENT_SUCCESS_UNKNOWN = 0; 3125 3126 // Easy Connect Configurator success event: Configuration sent to enrollee 3127 EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT = 1; 3128 3129 // Easy Connect Configurator success event: Configuration applied by enrollee 3130 EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED = 2; 3131 } 3132 3133 enum DppFailureCode { 3134 // Unknown failure 3135 EASY_CONNECT_EVENT_FAILURE_UNKNOWN = 0; 3136 3137 // Easy Connect Failure event: Scanned QR code is either not a Easy Connect URI, or the Easy 3138 // Connect URI has errors. 3139 EASY_CONNECT_EVENT_FAILURE_INVALID_URI = 1; 3140 3141 // Easy Connect Failure event: Bootstrapping/Authentication initialization process failure. 3142 EASY_CONNECT_EVENT_FAILURE_AUTHENTICATION = 2; 3143 3144 // Easy Connect Failure event: Both devices are implementing the same role and are 3145 // incompatible. 3146 EASY_CONNECT_EVENT_FAILURE_NOT_COMPATIBLE = 3; 3147 3148 // Easy Connect Failure event: Configuration process has failed due to malformed message. 3149 EASY_CONNECT_EVENT_FAILURE_CONFIGURATION = 4; 3150 3151 // Easy Connect Failure event: Easy Connect request while in another Easy Connect exchange. 3152 EASY_CONNECT_EVENT_FAILURE_BUSY = 5; 3153 3154 // Easy Connect Failure event: No response from the peer. 3155 EASY_CONNECT_EVENT_FAILURE_TIMEOUT = 6; 3156 3157 // Easy Connect Failure event: General protocol failure. 3158 EASY_CONNECT_EVENT_FAILURE_GENERIC = 7; 3159 3160 // Easy Connect Failure event: Feature or option is not supported. 3161 EASY_CONNECT_EVENT_FAILURE_NOT_SUPPORTED = 8; 3162 3163 // Easy Connect Failure event: Invalid network provided to Easy Connect configurator. 3164 // Network must either be WPA3-Personal (SAE) or WPA2-Personal (PSK). 3165 EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK = 9; 3166 3167 // Easy Connect R2 Failure event: Enrollee cannot find the network. 3168 EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK = 10; 3169 3170 // Easy Connect R2 Failure event: Enrollee failed to authenticate with the network. 3171 EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION = 11; 3172 3173 // Easy Connect R2 Failure event: Enrollee rejected the configuration. 3174 EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION = 12; 3175 3176 // Easy Connect Failure event: System failed to generate DPP URI. 3177 EASY_CONNECT_EVENT_FAILURE_URI_GENERATION = 13; 3178 3179 // Easy Connect Failure event: Enrollee didn't scan the network's operating channel. 3180 EASY_CONNECT_EVENT_FAILURE_ENROLLEE_FAILED_TO_SCAN_NETWORK_CHANNEL = 14; 3181 } 3182} 3183 3184// WifiConfigStore read/write metrics. 3185message WifiConfigStoreIO { 3186 // Histogram of config store read durations. 3187 repeated DurationBucket read_durations = 1; 3188 3189 // Histogram of config store write durations. 3190 repeated DurationBucket write_durations = 2; 3191 3192 // Total Number of instances of write/read duration in this duration bucket. 3193 message DurationBucket { 3194 // Bucket covers duration : [range_start_ms, range_end_ms) 3195 // The (inclusive) lower bound of read/write duration represented by this bucket 3196 optional int32 range_start_ms = 1; 3197 3198 // The (exclusive) upper bound of read/write duration represented by this bucket 3199 optional int32 range_end_ms = 2; 3200 3201 // Number of read/write durations that fit into this bucket 3202 optional int32 count = 3; 3203 } 3204} 3205 3206// Histogram bucket counting with int32. Range is [start, end) 3207message HistogramBucketInt32 { 3208 // lower range of the bucket (inclusive) 3209 optional int32 start = 1; 3210 3211 // upper range of the bucket (exclusive) 3212 optional int32 end = 2; 3213 3214 // number of samples in the bucket 3215 optional int32 count = 3; 3216} 3217 3218// Counts occurrences of a int32 key 3219message Int32Count { 3220 // the key 3221 optional int32 key = 1; 3222 3223 // the count 3224 optional int32 count = 2; 3225} 3226 3227message LinkProbeStats { 3228 enum LinkProbeFailureReason { 3229 // unknown reason 3230 LINK_PROBE_FAILURE_REASON_UNKNOWN = 0; 3231 3232 // Specified MCS rate when it is unsupported by the driver. 3233 LINK_PROBE_FAILURE_REASON_MCS_UNSUPPORTED = 1; 3234 3235 // Driver reported that no ACK was received for the transmitted probe. 3236 LINK_PROBE_FAILURE_REASON_NO_ACK = 2; 3237 3238 // Driver failed to report on the status of the transmitted probe within the timeout. 3239 LINK_PROBE_FAILURE_REASON_TIMEOUT = 3; 3240 3241 // An existing link probe is in progress. 3242 LINK_PROBE_FAILURE_REASON_ALREADY_STARTED = 4; 3243 } 3244 3245 // Counts the number of failures for each failure reason. 3246 message LinkProbeFailureReasonCount { 3247 // The failure reason. 3248 optional LinkProbeFailureReason failure_reason = 1; 3249 3250 // The number of occurrences for this failure reason. 3251 optional int32 count = 2; 3252 } 3253 3254 // Counts the number of link probes for each experiment. 3255 message ExperimentProbeCounts { 3256 // The experiment ID. 3257 optional string experiment_id = 1; 3258 3259 // The number of link probes triggered for this experiment. 3260 optional int32 probe_count = 2; 3261 } 3262 3263 // Counts the occurrences of RSSI values when a link probe succeeds. 3264 repeated Int32Count success_rssi_counts = 1; 3265 3266 // Counts the occurrences of RSSI values when a link probe fails. 3267 repeated Int32Count failure_rssi_counts = 2; 3268 3269 // Counts the occurrences of Link Speed values when a link probe succeeds. 3270 repeated Int32Count success_link_speed_counts = 3; 3271 3272 // Counts the occurrences of Link Speed values when a link probe fails. 3273 repeated Int32Count failure_link_speed_counts = 4; 3274 3275 // Histogram for the number of seconds since the last TX success when a link probe succeeds. 3276 repeated HistogramBucketInt32 success_seconds_since_last_tx_success_histogram = 5; 3277 3278 // Histogram for the number of seconds since the last TX success when a link probe fails. 3279 repeated HistogramBucketInt32 failure_seconds_since_last_tx_success_histogram = 6; 3280 3281 // Histogram for the elapsed time of successful link probes, in ms. 3282 repeated HistogramBucketInt32 success_elapsed_time_ms_histogram = 7; 3283 3284 // Counts the occurrences of error codes for failed link probes. 3285 repeated LinkProbeFailureReasonCount failure_reason_counts = 8; 3286 3287 // Counts the number of link probes for each experiment. 3288 repeated ExperimentProbeCounts experiment_probe_counts = 9; 3289} 3290 3291// Stores the decisions that were made by a experiment when compared against another experiment 3292message NetworkSelectionExperimentDecisions { 3293 // the id of one experiment 3294 optional int32 experiment1_id = 1; 3295 3296 // the id of the other experiment 3297 optional int32 experiment2_id = 2; 3298 3299 // Counts occurrences of the number of network choices there were when experiment1 makes the 3300 // same network selection as experiment2. 3301 // The keys are the number of network choices, and the values are the number of occurrences of 3302 // this number of network choices when exp1 and exp2 make the same network selection. 3303 repeated Int32Count same_selection_num_choices_counter = 3; 3304 3305 // Counts occurrences of the number of network choices there were when experiment1 makes the 3306 // same network selection as experiment2. 3307 // The keys are the number of network choices, and the values are the number of occurrences of 3308 // this number of network choices when exp1 and exp2 make different network selections. 3309 // Note that it is possible for the network selection to be different even when there only exists 3310 // a single network choice, since choosing not to connect to that network is a valid choice. 3311 repeated Int32Count different_selection_num_choices_counter = 4; 3312} 3313 3314// NetworkRequest API metrics. 3315message WifiNetworkRequestApiLog { 3316 // Number of requests via this API surface. 3317 optional int32 num_request = 1; 3318 3319 // Histogram of requests via this API surface to number of networks matched in scan results. 3320 repeated HistogramBucketInt32 network_match_size_histogram = 2; 3321 3322 // Number of requests via this API surface that bypassed user approval. 3323 optional int32 num_user_approval_bypass = 4; 3324 3325 // Number of requests via this API surface that was rejected by the user. 3326 optional int32 num_user_reject = 5; 3327 3328 // Number of unique apps using this API surface. 3329 optional int32 num_apps = 6; 3330 3331 // Number of connections on primary iface. 3332 optional int32 num_connect_on_primary_iface = 7; 3333 3334 // Number of successful network connection from this API. 3335 optional int32 num_connect_success_on_primary_iface = 3; 3336 3337 // Histogram of connection durations in seconds using this API surface. 3338 repeated HistogramBucketInt32 connection_duration_sec_on_primary_iface_histogram = 8; 3339 3340 // Number of connections on secondary iface (STA + STA) 3341 optional int32 num_connect_on_secondary_iface = 9; 3342 3343 // Number of connection success on secondary iface (STA + STA) 3344 optional int32 num_connect_success_on_secondary_iface = 10; 3345 3346 // Histogram of connection durations in seconds on secondary iface using this API surface. 3347 repeated HistogramBucketInt32 connection_duration_sec_on_secondary_iface_histogram = 11; 3348 3349 // Number of times there were concurrent connections (STA + STA): 3350 // - on a primary iface (internet) and 3351 // - on a secondary iface (using this API surface) 3352 optional int32 num_concurrent_connection = 12; 3353 3354 // Histogram of concurrent connection durations in seconds using this API surface (STA + STA). 3355 repeated HistogramBucketInt32 concurrent_connection_duration_sec_histogram = 13; 3356} 3357 3358// NetworkSuggestion API metrics. 3359message WifiNetworkSuggestionApiLog { 3360 enum SuggestionAppTypeCode { 3361 // UNKNOWN type suggestion app. 3362 TYPE_UNKNOWN = 0; 3363 // Suggestion app with carrier privilege. 3364 TYPE_CARRIER_PRIVILEGED = 1; 3365 // Suggestion app with network provisioning permission(NETWORK_CARRIER_PROVISIONING). 3366 TYPE_NETWORK_PROVISIONING = 2; 3367 // Suggestion app without special privilege. 3368 TYPE_NON_PRIVILEGED = 3; 3369 } 3370 3371 message SuggestionAppCount { 3372 // Suggestion app type. 3373 optional SuggestionAppTypeCode app_type = 1; 3374 // Num of app in this type. 3375 optional int32 count = 2; 3376 } 3377 3378 // Number of modifications to their suggestions by apps. 3379 optional int32 num_modification = 1; 3380 3381 // Number of successful network connection from app suggestions. 3382 optional int32 num_connect_success = 2; 3383 3384 // Number of network connection failures from app suggestions. 3385 optional int32 num_connect_failure = 3; 3386 3387 // Histogram for size of the network lists provided by various apps on the device. 3388 repeated HistogramBucketInt32 network_list_size_histogram = 4; 3389 3390 // Count of app using suggestion API with different privilege. 3391 repeated SuggestionAppCount app_count_per_type = 5; 3392 3393 // Number of user revoke app's permission from settings or disallowed from UI. 3394 optional int32 user_revoke_app_suggestion_permission = 6; 3395 3396 // Number of priority groups configured on the device, excluding the default priority group. 3397 optional int32 num_priority_groups = 7; 3398 3399 // Number of times when a ScanResult matched more than one suggestions. 3400 optional int32 num_multiple_suggestions = 8; 3401 3402 // Number of saved profiles which also have at least one suggestion (for the same network) 3403 // provisioned on the device. 3404 optional int32 num_saved_networks_with_configured_suggestion = 9; 3405} 3406 3407// WifiLock metrics 3408message WifiLockStats { 3409 // Amount of time wifi is actively in HIGH_PERF mode (ms) 3410 // This means the lock takes effect and the device takes the actions required for this mode 3411 optional int64 high_perf_active_time_ms = 1; 3412 3413 // Amount of time wifi is actively in LOW_LATENCY mode (ms) 3414 // This means the lock takes effect and the device takes the actions required for this mode 3415 optional int64 low_latency_active_time_ms = 2; 3416 3417 // Histogram of HIGH_PERF lock acquisition duration (seconds) 3418 // Note that acquiring the lock does not necessarily mean that device is actively in that mode 3419 repeated HistogramBucketInt32 high_perf_lock_acq_duration_sec_histogram = 3; 3420 3421 // Histogram of LOW_LATENCY lock acquisition duration (seconds) 3422 // Note that acquiring the lock does not necessarily mean that device is actively in that mode 3423 repeated HistogramBucketInt32 low_latency_lock_acq_duration_sec_histogram = 4; 3424 3425 // Histogram of HIGH_PERF active session duration (seconds) 3426 // This means the lock takes effect and the device takes the actions required for this mode 3427 repeated HistogramBucketInt32 high_perf_active_session_duration_sec_histogram = 5; 3428 3429 // Histogram of LOW_LATENCY active session duration (seconds) 3430 // This means the lock takes effect and the device takes the actions required for this mode 3431 repeated HistogramBucketInt32 low_latency_active_session_duration_sec_histogram = 6; 3432} 3433 3434// Stats on number of times Wi-Fi is turned on/off though the WifiManager#setWifiEnabled API 3435message WifiToggleStats { 3436 // Number of time Wi-Fi is turned on by privileged apps 3437 optional int32 num_toggle_on_privileged = 1; 3438 3439 // Number of time Wi-Fi is turned off by privileged apps 3440 optional int32 num_toggle_off_privileged = 2; 3441 3442 // Number of time Wi-Fi is turned on by normal apps 3443 optional int32 num_toggle_on_normal = 3; 3444 3445 // Number of time Wi-Fi is turned off by normal apps 3446 optional int32 num_toggle_off_normal = 4; 3447} 3448 3449// Information about the Passpoint provision metrics. 3450message PasspointProvisionStats { 3451 enum ProvisionFailureCode { 3452 // provisioning failure for unknown reason. 3453 OSU_FAILURE_UNKNOWN = 0; 3454 3455 // The reason code for Provisioning Failure due to connection failure to OSU AP. 3456 OSU_FAILURE_AP_CONNECTION = 1; 3457 3458 // The reason code for invalid server URL address. 3459 OSU_FAILURE_SERVER_URL_INVALID = 2; 3460 3461 // The reason code for provisioning failure due to connection failure to the server. 3462 OSU_FAILURE_SERVER_CONNECTION = 3; 3463 3464 // The reason code for provisioning failure due to invalid server certificate. 3465 OSU_FAILURE_SERVER_VALIDATION = 4; 3466 3467 // The reason code for provisioning failure due to invalid service provider. 3468 OSU_FAILURE_SERVICE_PROVIDER_VERIFICATION = 5; 3469 3470 // The reason code for provisioning failure when a provisioning flow is aborted. 3471 OSU_FAILURE_PROVISIONING_ABORTED = 6; 3472 3473 // The reason code for provisioning failure when a provisioning flow is not possible. 3474 OSU_FAILURE_PROVISIONING_NOT_AVAILABLE = 7; 3475 3476 // The reason code for provisioning failure due to invalid web url format for an OSU web page. 3477 OSU_FAILURE_INVALID_URL_FORMAT_FOR_OSU = 8; 3478 3479 // The reason code for provisioning failure when a command received is not the expected command 3480 // type. 3481 OSU_FAILURE_UNEXPECTED_COMMAND_TYPE = 9; 3482 3483 // The reason code for provisioning failure when a SOAP message is not the expected message 3484 // type. 3485 OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_TYPE = 10; 3486 3487 // The reason code for provisioning failure when a SOAP message exchange fails. 3488 OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11; 3489 3490 // The reason code for provisioning failure when a redirect listener fails to start. 3491 OSU_FAILURE_START_REDIRECT_LISTENER = 12; 3492 3493 // The reason code for provisioning failure when a redirect listener timed out to receive a HTTP 3494 // redirect response. 3495 OSU_FAILURE_TIMED_OUT_REDIRECT_LISTENER = 13; 3496 3497 // The reason code for provisioning failure when there is no OSU activity to listen to intent. 3498 OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 14; 3499 3500 // The reason code for provisioning failure when the status of a SOAP message is not the 3501 // expected message status. 3502 OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_STATUS = 15; 3503 3504 // The reason code for provisioning failure when there is no PPS MO. 3505 OSU_FAILURE_NO_PPS_MO = 16; 3506 3507 // The reason code for provisioning failure when there is no AAAServerTrustRoot node in a PPS 3508 // MO. 3509 OSU_FAILURE_NO_AAA_SERVER_TRUST_ROOT_NODE = 17; 3510 3511 // The reason code for provisioning failure when there is no TrustRoot node for remediation 3512 // server in a PPS MO. 3513 OSU_FAILURE_NO_REMEDIATION_SERVER_TRUST_ROOT_NODE = 18; 3514 3515 // The reason code for provisioning failure when there is no TrustRoot node for policy server in 3516 // a PPS MO. 3517 OSU_FAILURE_NO_POLICY_SERVER_TRUST_ROOT_NODE = 19; 3518 3519 // The reason code for provisioning failure when failing to retrieve trust root certificates 3520 // used for validating server certificate for AAA, Remediation and Policy server. 3521 OSU_FAILURE_RETRIEVE_TRUST_ROOT_CERTIFICATES = 20; 3522 3523 // The reason code for provisioning failure when there is no trust root certificate for AAA 3524 // server. 3525 OSU_FAILURE_NO_AAA_TRUST_ROOT_CERTIFICATE = 21; 3526 3527 // The reason code for provisioning failure when a {@link PasspointConfiguration} is failed to 3528 // install. 3529 OSU_FAILURE_ADD_PASSPOINT_CONFIGURATION = 22; 3530 3531 // The reason code for provisioning failure when an {@link OsuProvider} is not found for 3532 // provisioning. 3533 OSU_FAILURE_OSU_PROVIDER_NOT_FOUND = 23; 3534 } 3535 3536 // Number of passpoint provisioning success 3537 optional int32 num_provision_success = 1; 3538 3539 // Count for passpoint provisioning failure 3540 repeated ProvisionFailureCount provision_failure_count = 2; 3541 3542 // Number of occurrences of a specific passpoint provision failure code 3543 message ProvisionFailureCount { 3544 // Failure code 3545 optional ProvisionFailureCode failure_code = 1; 3546 3547 // Number of failure for the failure_code. 3548 optional int32 count = 2; 3549 } 3550} 3551 3552// Counts number of networks on the device that are metered. 3553message MeteredNetworkStats { 3554 // Number of networks that are set or detected as metered. 3555 optional int32 num_metered = 1 [default = 0]; 3556 3557 // Number of networks that are set or detected as unmetered. 3558 optional int32 num_unmetered = 2; 3559 3560 // Number of networks that have meteredOverride set to metered. 3561 optional int32 num_override_metered = 3; 3562 3563 // Number of networks that have meteredOverride set to unmetered. 3564 optional int32 num_override_unmetered = 4; 3565} 3566 3567// An event capturing user action on wifi 3568message UserActionEvent { 3569 enum EventType { 3570 // The default and unused event 3571 EVENT_UNKNOWN = 0; 3572 // User forgets the network 3573 EVENT_FORGET_WIFI = 1; 3574 // User manually triggers disconnect 3575 EVENT_DISCONNECT_WIFI = 2; 3576 // User changes the metered setting to "metered" 3577 EVENT_CONFIGURE_METERED_STATUS_METERED = 3; 3578 // User changes the metered setting to "unmetered" 3579 EVENT_CONFIGURE_METERED_STATUS_UNMETERED = 4; 3580 // User changes the mac randomization setting to use random MAC 3581 EVENT_CONFIGURE_MAC_RANDOMIZATION_ON = 5; 3582 // User changes the mac randomization setting to use factory MAC 3583 EVENT_CONFIGURE_MAC_RANDOMIZATION_OFF = 6; 3584 // User sets auto-connect to on 3585 EVENT_CONFIGURE_AUTO_CONNECT_ON = 7; 3586 // User sets auto-connect to off 3587 EVENT_CONFIGURE_AUTO_CONNECT_OFF = 8; 3588 // User toggles wifi on 3589 EVENT_TOGGLE_WIFI_ON = 9; 3590 // User toggles wifi off 3591 EVENT_TOGGLE_WIFI_OFF = 10; 3592 // User manually connects to a network 3593 EVENT_MANUAL_CONNECT = 11; 3594 // User changes the metered setting to "detect automatically" 3595 EVENT_CONFIGURE_METERED_STATUS_AUTO = 12; 3596 // User adds a new network or updates configurations for an existing network. 3597 EVENT_ADD_OR_UPDATE_NETWORK = 13; 3598 // User sets the adaptive connectivity to on 3599 EVENT_CONFIGURE_ADAPTIVE_CONNECTIVITY_ON = 14; 3600 // User sets the adaptive connectivity to off 3601 EVENT_CONFIGURE_ADAPTIVE_CONNECTIVITY_OFF = 15; 3602 // User restarts wifi subsystem 3603 EVENT_RESTART_WIFI_SUB_SYSTEM = 16; 3604 } 3605 3606 // The type of user action 3607 optional EventType event_type = 1; 3608 3609 // The start time of the event in milliseconds since boot. 3610 optional int64 start_time_millis = 2; 3611 3612 // Additional information on the target network for the action. This is not applicable and will 3613 // be null for some actions such as EVENT_TOGGLE_WIFI_ON. 3614 optional TargetNetworkInfo target_network_info = 3; 3615 3616 // Information about the currently connected network. 3617 optional WifiStatus wifi_status = 4; 3618 3619 // Reasons why the network applicable for this user action is disabled. 3620 // Normally this should be referring to the currently connected network. 3621 // For a manual connection, this is referring to the user selected networks. 3622 optional NetworkDisableReason network_disable_reason = 5; 3623} 3624 3625message WifiStatus { 3626 // Wifi is connected. 3627 optional bool is_connected = 1; 3628 3629 // Wifi is validated 3630 optional bool is_validated = 2; 3631 3632 // The last observed RSSI 3633 optional sint32 last_rssi = 3; 3634 3635 // Estimated TX 3636 optional int32 estimated_tx_kbps = 4; 3637 3638 // Estimated RX 3639 optional int32 estimated_rx_kbps = 5; 3640 3641 // There is another candidate with better score, but user connect choice is preventing the switch. 3642 optional bool is_stuck_due_to_user_connect_choice = 6; 3643} 3644 3645// Additional information on a network 3646message TargetNetworkInfo { 3647 // Whether the network is an ephemeral network. 3648 optional bool is_ephemeral = 1; 3649 3650 // Whether the target is a passpoint network. 3651 optional bool is_passpoint = 2; 3652} 3653 3654// Reasons why a configuration or BSSID is disabled. 3655message NetworkDisableReason { 3656 enum DisableReason { 3657 // Default value, should not be used. 3658 REASON_UNKNOWN = 0; 3659 // AP unable to accept more clients, a special kind of association rejection failure. 3660 REASON_AP_UNABLE_TO_HANDLE_NEW_STA = 1; 3661 // No internet 3662 REASON_NETWORK_VALIDATION_FAILURE = 2; 3663 // Password is incorrect, a special kind of authentication failure. 3664 REASON_WRONG_PASSWORD = 3; 3665 // Incorrect EAP credentials. 3666 REASON_EAP_FAILURE = 4; 3667 // Other association rejection failures. 3668 REASON_ASSOCIATION_REJECTION = 5; 3669 // Associated timeout failures. 3670 REASON_ASSOCIATION_TIMEOUT = 6; 3671 // Other authentication failures. 3672 REASON_AUTHENTICATION_FAILURE = 7; 3673 // DHCP failures. 3674 REASON_DHCP_FAILURE = 8; 3675 // Device disconnected shortly after connection. 3676 REASON_ABNORMAL_DISCONNECT = 9; 3677 // AP initiated disconnect for a given duration. 3678 REASON_FRAMEWORK_DISCONNECT_MBO_OCE = 10; 3679 // Avoid connecting to the failed AP when trying to reconnect on other available candidates. 3680 REASON_FRAMEWORK_DISCONNECT_FAST_RECONNECT = 11; 3681 // The connected scorer has disconnected this network. 3682 REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE = 12; 3683 // The network is disabled due to absence of user credentials 3684 REASON_AUTHENTICATION_NO_CREDENTIALS = 13; 3685 // The network is disabled because service is not subscribed, a special kind of EAP failure. 3686 REASON_AUTHENTICATION_NO_SUBSCRIPTION = 14; 3687 // User disabled auto-join for this network. 3688 REASON_AUTO_JOIN_DISABLED = 15; 3689 } 3690 3691 // The reason for disabling a network. 3692 optional DisableReason disable_reason = 1; 3693 3694 // The configuration is temporarily disabled. 3695 optional bool config_temporarily_disabled = 2; 3696 3697 // The configuration is disabled until the user manually re-enables it. 3698 optional bool config_permanently_disabled = 3; 3699 3700 // Reasons why 1 or more BSSIDs are temporarily disabled. 3701 repeated DisableReason bssid_disable_reasons = 4; 3702} 3703 3704// Number of networks with a large change of connection/disconnection 3705// failure rate or high failure rate at high RSSI 3706message HealthMonitorFailureStats { 3707 // Number of networks with a large change of (or high) association rejection rate 3708 optional int32 cnt_assoc_rejection = 1; 3709 // Number of networks with a large change of (or high) association timeout rate 3710 optional int32 cnt_assoc_timeout = 2; 3711 // Number of networks with a large change of (or high) auth failure rate 3712 optional int32 cnt_auth_failure = 3; 3713 // Number of networks with a large change of (or high) connection failure rate 3714 optional int32 cnt_connection_failure = 4; 3715 // Number of networks with a large change of (or high) nonlocal disconnection rate 3716 optional int32 cnt_disconnection_nonlocal = 5; 3717 // Number of networks with a large change of (or high) short disconnection rate 3718 optional int32 cnt_short_connection_nonlocal = 6; 3719 // Number of networks with a large change of (or high) disconnection-during-connecting rate 3720 optional int32 cnt_disconnection_nonlocal_connecting = 7; 3721} 3722 3723// Metrics collected by health monitor 3724message HealthMonitorMetrics { 3725 // Number of networks with a large increase (compared to stats of previous build) of 3726 // connection/disconnection failure rate 3727 optional HealthMonitorFailureStats failure_stats_increase = 1; 3728 // Number of networks with a large decrease (compared to stats of previous build) of 3729 // connection/disconnection failure rate 3730 optional HealthMonitorFailureStats failure_stats_decrease = 2; 3731 // Number of networks with high connection/disconnection failure rate for 3732 // current build but without sufficient connection attempts for previous build 3733 optional HealthMonitorFailureStats failure_stats_high = 3; 3734 // Number of networks with sufficient connection attempts for current build 3735 // but without suffcient connection attempts for previous build 3736 optional int32 num_network_sufficient_recent_stats_only = 4; 3737 // Number of networks with sufficient connection attempts for both current and previous builds 3738 optional int32 num_network_sufficient_recent_prev_stats = 5; 3739} 3740 3741// Connection duration statistics collected under various health conditions 3742// while Wifi link layer stats report are on 3743message ConnectionDurationStats { 3744 // Total time with sufficient Wifi throughput and with cellular data on 3745 optional int32 total_time_sufficient_throughput_ms = 1; 3746 // Total time with insufficient Wifi throughput and with cellular data on 3747 optional int32 total_time_insufficient_throughput_ms = 2; 3748 // Total time with cellular data off 3749 optional int32 total_time_cellular_data_off_ms = 3; 3750 // Total time with insufficient Wifi throughput and with cellular data on 3751 // while wifi is the default network 3752 optional int32 total_time_insufficient_throughput_default_wifi_ms = 4; 3753} 3754 3755// Wi-Fi off metrics 3756// Keeps track of Wi-Fi off stats 3757message WifiOffMetrics { 3758 // Total number of Wi-Fi off 3759 optional int32 num_wifi_off = 1; 3760 3761 // Total number of Wi-Fi off with deferring 3762 optional int32 num_wifi_off_deferring = 2; 3763 3764 // Total number of Wi-Fi off deferring timeout 3765 optional int32 num_wifi_off_deferring_timeout = 3; 3766 3767 // Histogram of wifi off deferring time 3768 repeated Int32Count wifi_off_deferring_time_histogram = 4; 3769} 3770 3771// SoftAp Config Limitation Metrics 3772message SoftApConfigLimitationMetrics { 3773 // Total number of softap security configuration reset to default because 3774 // hardware limitation when restore configuration from cloud 3775 optional int32 num_security_type_reset_to_default = 1; 3776 3777 // Total number of softap max client setting reset to default because 3778 // hardware limitation when restore configuration from cloud 3779 optional int32 num_max_client_setting_reset_to_default = 2; 3780 3781 // Total number of softap client control by user reset to default because 3782 // hardware limitation when restore configuration from cloud 3783 optional int32 num_client_control_by_user_reset_to_default = 3; 3784 3785 // Histogram of max client count when client connection fail because 3786 // setting limitation 3787 repeated Int32Count max_client_setting_when_reach_histogram = 4; 3788} 3789 3790// Channel utilization histogram 3791// The valid utilization range is between 0 and 255 corresponding to 3792// utilization ratio between 0 and 1 3793message ChannelUtilizationHistogram { 3794 // Histogram at 2G 3795 repeated HistogramBucketInt32 utilization_2g = 1; 3796 // Histogram above 2G 3797 repeated HistogramBucketInt32 utilization_above_2g = 2; 3798} 3799 3800// Throughput histogram 3801message ThroughputMbpsHistogram { 3802 // Tx histogram at 2G 3803 repeated HistogramBucketInt32 tx_2g = 1; 3804 // Tx histogram above 2G 3805 repeated HistogramBucketInt32 tx_above_2g = 2; 3806 // Rx histogram at 2G 3807 repeated HistogramBucketInt32 rx_2g = 3; 3808 // Rx histogram above 2G 3809 repeated HistogramBucketInt32 rx_above_2g = 4; 3810} 3811 3812// Initial Partial Scan stats 3813message InitPartialScanStats { 3814 // Total number of partial scans 3815 optional int32 num_scans = 1; 3816 3817 // Number of instances a partial scan results in finding a network 3818 optional int32 num_success_scans = 2; 3819 3820 // Number of instances a patial scan does not result in finding a network 3821 // and a follow up full scan finds a network. 3822 optional int32 num_failure_scans = 3; 3823 3824 // Histogram of number of channels used in a successful partial scan 3825 repeated HistogramBucketInt32 successful_scan_channel_count_histogram = 4; 3826 3827 // Histogram of number of channels used in a failed partial scan 3828 repeated HistogramBucketInt32 failed_scan_channel_count_histogram = 5; 3829} 3830 3831// User reaction to the carrier IMSI protection exemption UI 3832message UserReactionToApprovalUiEvent { 3833 enum UserActionCode { 3834 // UNKNOWN user action. 3835 ACTION_UNKNOWN = 0; 3836 // Action user allowed. 3837 ACTION_ALLOWED = 1; 3838 // Action user disallowed. 3839 ACTION_DISALLOWED = 2; 3840 // Action user dismiss. 3841 ACTION_DISMISS = 3; 3842 } 3843 message UserReaction { 3844 // User action to the UI. 3845 optional UserActionCode user_action = 1; 3846 // Is UI a dialog or notification. 3847 optional bool is_dialog = 2; 3848 } 3849 3850 // Event of user reaction to the app approval UI. 3851 repeated UserReaction user_approval_app_ui_reaction = 1; 3852 3853 // Event of user reaction to the carrier approval UI. 3854 repeated UserReaction user_approval_carrier_ui_reaction = 2; 3855} 3856 3857message CarrierWifiMetrics { 3858 // Number of successful network connection using Carrier ID 3859 optional int32 num_connection_success = 1; 3860 // Number of failed authentication from network connection using Carrier ID 3861 optional int32 num_connection_auth_failure = 2; 3862 optional int32 num_connection_non_auth_failure = 3; 3863} 3864 3865message FirstConnectAfterBootStats { 3866 message Attempt { 3867 // The attempt completion timestamp, in milliseconds since boot. 3868 optional int64 timestamp_since_boot_millis = 1; 3869 3870 // whether the attempt was successful. 3871 optional bool is_success = 2; 3872 } 3873 3874 // Info about whether Wifi was enabled at boot time. 3875 // `is_success` is true if Wifi is toggled ON at boot, false otherwise. 3876 // This field will never be null. 3877 optional Attempt wifi_enabled_at_boot = 1; 3878 3879 // Info about the first network selection attempt for auto-join. 3880 // `is_success` is true if a network candidate was found, false otherwise. 3881 // This field is null if `wifi_enabled_at_boot.is_success` is false. 3882 optional Attempt first_network_selection = 2; 3883 3884 // Info about the first successful L2 connection. 3885 // `is_success` is true if the L2 connection was successfully established, false otherwise. 3886 // This field is null if `first_network_selection.is_success` is false. 3887 optional Attempt first_l2_connection = 3; 3888 3889 // Info about the first successful L3 connection. 3890 // `is_success` is true if the L3 connection was successfully established, false otherwise. 3891 // This field is null if `first_l2_connection.is_success` is false. 3892 optional Attempt first_l3_connection = 4; 3893} 3894 3895// Stats for Autojoin switches between Wifi networks. Does not include user/app-initiated switches. 3896message WifiToWifiSwitchStats { 3897 // Whether Make Before Break is supported by the hardware and enabled. 3898 optional bool is_make_before_break_supported = 1; 3899 3900 // Number of times Wifi to Wifi switch was triggered. This includes Make Before Break and Break 3901 // Before Make. 3902 optional int32 wifi_to_wifi_switch_trigger_count = 2; 3903 3904 // Number of times Wifi to Wifi switch was triggered using Make Before Break (MBB). 3905 // Note that MBB may not always be used for various reasons e.g. no additional iface available due 3906 // to ongoing SoftAP, both old and new network have MAC randomization disabled, etc. 3907 // TODO(b/180974604): also add metrics for the various reasons to not use MBB even when it is 3908 // supported by the device. 3909 optional int32 make_before_break_trigger_count = 3; 3910 3911 // TODO(b/180974604): add metrics for L2 failure and L3 failure 3912 3913 // Number of times Make Before Break was aborted due to the new network not having internet. 3914 optional int32 make_before_break_no_internet_count = 4; 3915 3916 // Number of times where, for some reason, Make Before Break resulted in the loss of the primary 3917 // ClientModeManager, and we needed to recover by making one of the SECONDARY_TRANSIENT 3918 // ClientModeManagers primary. 3919 optional int32 make_before_break_recover_primary_count = 5; 3920 3921 // Number of times the new network in Make Before Break had its internet connection validated. 3922 optional int32 make_before_break_internet_validated_count = 6; 3923 3924 // Number of times the new network was made primary in Make Before Break. 3925 // TODO(b/180974604): add metrics for the various ways this could fail. 3926 optional int32 make_before_break_success_count = 7; 3927 3928 // Number of times the old network in Make Before Break completed lingering and was disconnected. 3929 optional int32 make_before_break_linger_completed_count = 8; 3930 3931 // Histogram of lingering duration caused by make before break in seconds. 3932 repeated Int32Count make_before_break_linger_duration_seconds = 9; 3933} 3934 3935// Network layer bandwidth estimator stats 3936message BandwidthEstimatorStats { 3937 // Bandwidth stats of each signal level 3938 message PerLevel { 3939 // Signal level derived by RssiUtil.calculateSignalLevel based on RSSI 3940 optional uint32 signal_level = 1; 3941 // Accumulated bandwidth sample count 3942 optional uint32 count = 2; 3943 // Average network layer bandwidth in kbps based on TrafficStats byte count and radio on time 3944 // of link layer stats. 3945 optional uint32 avg_bandwidth_kbps = 3; 3946 // Error of layer 2 link bandwidth in percent 3947 optional uint32 l2_error_percent = 4; 3948 // Error of network layer bandwidth estimation in percent 3949 optional uint32 bandwidth_est_error_percent = 5; 3950 } 3951 3952 // Bandwidth stats of each link 3953 message PerLink { 3954 repeated PerLevel level = 1; 3955 } 3956 3957 // Bandwidth stats of each band 3958 message PerBand { 3959 // Tx bandwidth stats 3960 optional PerLink tx = 1; 3961 // Rx bandwidth stats 3962 optional PerLink rx = 2; 3963 } 3964 3965 // Stats of 2g band 3966 optional PerBand stats_2g = 1; 3967 // Stats of above-2g band 3968 optional PerBand stats_above_2g = 2; 3969} 3970 3971