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 blacklisted from recommendation by the open network 328 // notification recommender 329 optional int32 open_network_recommender_blacklist_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 BssidBlocklistMonitor 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 738// Information that gets logged for every WiFi connection. 739message RouterFingerPrint { 740 741 enum RoamType { 742 743 // Type is unknown. 744 ROAM_TYPE_UNKNOWN = 0; 745 746 // No roaming - usually happens on a single band (2.4 GHz) router. 747 ROAM_TYPE_NONE = 1; 748 749 // Enterprise router. 750 ROAM_TYPE_ENTERPRISE = 2; 751 752 // DBDC => Dual Band Dual Concurrent essentially a router that 753 // supports both 2.4 GHz and 5 GHz bands. 754 ROAM_TYPE_DBDC = 3; 755 } 756 757 enum Auth { 758 759 // Auth is unknown. 760 AUTH_UNKNOWN = 0; 761 762 // No authentication. 763 AUTH_OPEN = 1; 764 765 // If the router uses a personal authentication. 766 AUTH_PERSONAL = 2; 767 768 // If the router is setup for enterprise authentication. 769 AUTH_ENTERPRISE = 3; 770 } 771 772 enum RouterTechnology { 773 774 // Router is unknown. 775 ROUTER_TECH_UNKNOWN = 0; 776 777 // Router Channel A. 778 ROUTER_TECH_A = 1; 779 780 // Router Channel B. 781 ROUTER_TECH_B = 2; 782 783 // Router Channel G. 784 ROUTER_TECH_G = 3; 785 786 // Router Channel N. 787 ROUTER_TECH_N = 4; 788 789 // Router Channel AC. 790 ROUTER_TECH_AC = 5; 791 792 // When the channel is not one of the above. 793 ROUTER_TECH_OTHER = 6; 794 795 // Router Channel AX. 796 ROUTER_TECH_AX = 7; 797 } 798 799 enum EapMethod { 800 801 // No EAP method used 802 TYPE_EAP_UNKNOWN = 0; 803 804 // EAP with Transport Layer Security 805 TYPE_EAP_TLS = 1; 806 807 // EAP with Tunneled Transport Layer Security 808 TYPE_EAP_TTLS = 2; 809 810 // EAP with Subscriber Identity Module [RFC-4186] 811 TYPE_EAP_SIM = 3; 812 813 // EAP with Authentication and Key Agreement [RFC-4187] 814 TYPE_EAP_AKA = 4; 815 816 // EAP with Authentication and Key Agreement Prime [RFC-5448] 817 TYPE_EAP_AKA_PRIME = 5; 818 819 // Protected EAP 820 TYPE_EAP_PEAP = 6; 821 822 // EAP for Hotspot 2.0 r2 OSEN 823 TYPE_EAP_UNAUTH_TLS = 7; 824 825 // EAP with Password 826 TYPE_EAP_PWD = 8; 827 828 // EAP with WAPI certifcate 829 TYPE_EAP_WAPI_CERT = 9; 830 } 831 832 enum AuthPhase2Method { 833 834 // No phase2 method 835 TYPE_PHASE2_NONE = 0; 836 837 // Password Authentication Protocol 838 TYPE_PHASE2_PAP = 1; 839 840 // Microsoft Challenge Handshake Authentication Protocol 841 TYPE_PHASE2_MSCHAP = 2; 842 843 // Microsoft Challenge Handshake Authentication Protocol v2 844 TYPE_PHASE2_MSCHAPV2 = 3; 845 846 // Generic Token Card 847 TYPE_PHASE2_GTC = 4; 848 849 // EAP-Subscriber Identity Module [RFC-4186] 850 TYPE_PHASE2_SIM = 5; 851 852 // EAP-Authentication and Key Agreement [RFC-4187] 853 TYPE_PHASE2_AKA = 6; 854 855 // EAP-Authentication and Key Agreement Prime [RFC-5448] 856 TYPE_PHASE2_AKA_PRIME = 7; 857 } 858 859 enum OcspType { 860 // Do not use OCSP stapling 861 TYPE_OCSP_NONE = 0; 862 863 // Try to use OCSP stapling, but not require response 864 TYPE_OCSP_REQUEST_CERT_STATUS = 1; 865 866 // Require valid OCSP stapling response 867 TYPE_OCSP_REQUIRE_CERT_STATUS = 2; 868 869 // Require valid OCSP stapling response for all not-trusted certificates 870 // in the server certificate chain 871 TYPE_OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3; 872 } 873 874 optional RoamType roam_type = 1; 875 876 // Channel on which the connection takes place. 877 optional int32 channel_info = 2; 878 879 // DTIM setting of the router. 880 optional int32 dtim = 3; 881 882 // Authentication scheme of the router. 883 optional Auth authentication = 4; 884 885 // If the router is hidden. 886 optional bool hidden = 5; 887 888 // Channel information. 889 optional RouterTechnology router_technology = 6; 890 891 // whether ipv6 is supported. 892 optional bool supports_ipv6 = 7; 893 894 // If the router is a passpoint / hotspot 2.0 network 895 optional bool passpoint = 8; 896 897 // EAP method used by the enterprise network 898 optional EapMethod eap_method = 9; 899 900 // Phase 2 authentication method after setting up a secure channel 901 optional AuthPhase2Method auth_phase2_method = 10; 902 903 // Online certificate status protocol stapling type 904 optional OcspType ocsp_type = 11; 905 906 // PMK caching enablement 907 optional bool pmk_cache_enabled = 12; 908 909 // Max Tx link speed (in Mbps) supported by current network (STA and AP) 910 optional int32 max_supported_tx_link_speed_mbps = 13; 911 912 // Max Rx link speed (in Mbps) supported by current network (STA and AP) 913 optional int32 max_supported_rx_link_speed_mbps = 14; 914} 915 916message ConnectionEvent { 917 918 // Roam Type. 919 enum RoamType { 920 921 // Type is unknown. 922 ROAM_UNKNOWN = 0; 923 924 // No roaming. 925 ROAM_NONE = 1; 926 927 // DBDC roaming. 928 ROAM_DBDC = 2; 929 930 // Enterprise roaming. 931 ROAM_ENTERPRISE = 3; 932 933 // User selected roaming. 934 ROAM_USER_SELECTED = 4; 935 936 // Unrelated. 937 ROAM_UNRELATED = 5; 938 } 939 940 // Connectivity Level Failure. 941 enum ConnectivityLevelFailure { 942 943 // Failure is unknown. 944 HLF_UNKNOWN = 0; 945 946 // No failure. 947 HLF_NONE = 1; 948 949 // DHCP failure. 950 HLF_DHCP = 2; 951 952 // No internet connection. 953 HLF_NO_INTERNET = 3; 954 955 // No internet connection. 956 HLF_UNWANTED = 4; 957 } 958 959 // Level 2 failure reason. 960 enum Level2FailureReason { 961 962 // Unknown default 963 FAILURE_REASON_UNKNOWN = 0; 964 965 // The reason code if there is no error during authentication. It could 966 // also imply that there no authentication in progress. 967 AUTH_FAILURE_NONE = 1; 968 969 // The reason code if there was a timeout authenticating. 970 AUTH_FAILURE_TIMEOUT = 2; 971 972 // The reason code if there was a wrong password while authenticating. 973 AUTH_FAILURE_WRONG_PSWD = 3; 974 975 // The reason code if there was EAP failure while authenticating. 976 AUTH_FAILURE_EAP_FAILURE = 4; 977 978 // The reason code if the AP can no longer accept new clients. 979 ASSOCIATION_REJECTION_AP_UNABLE_TO_HANDLE_NEW_STA = 5; 980 } 981 982 // Entity that recommended connecting to this network. 983 enum ConnectionNominator { 984 // Unknown nominator 985 NOMINATOR_UNKNOWN = 0; 986 987 // User selected network manually 988 NOMINATOR_MANUAL = 1; 989 990 // Saved network 991 NOMINATOR_SAVED = 2; 992 993 // Suggestion API 994 NOMINATOR_SUGGESTION = 3; 995 996 // Passpoint 997 NOMINATOR_PASSPOINT = 4; 998 999 // Carrier suggestion 1000 NOMINATOR_CARRIER = 5; 1001 1002 // External scorer 1003 NOMINATOR_EXTERNAL_SCORED = 6; 1004 1005 // Network Specifier 1006 NOMINATOR_SPECIFIER = 7; 1007 1008 // User connected choice override 1009 NOMINATOR_SAVED_USER_CONNECT_CHOICE = 8; 1010 1011 // Open Network Available Pop-up 1012 NOMINATOR_OPEN_NETWORK_AVAILABLE = 9; 1013 } 1014 1015 enum NetworkType { 1016 // Unknown network type 1017 TYPE_UNKNOWN = 0; 1018 1019 // WPA2 network 1020 TYPE_WPA2 = 1; 1021 1022 // WPA3 network 1023 TYPE_WPA3 = 2; 1024 1025 // Passpoint network 1026 TYPE_PASSPOINT = 3; 1027 1028 // EAP network, excluding passpoint 1029 TYPE_EAP = 4; 1030 1031 // OWE network 1032 TYPE_OWE = 5; 1033 1034 // Open network 1035 TYPE_OPEN = 6; 1036 1037 // WAPI network 1038 TYPE_WAPI = 7; 1039 } 1040 1041 enum NetworkCreator { 1042 // This network is created by an unknown app. 1043 CREATOR_UNKNOWN = 0; 1044 1045 // This network is created by the user. 1046 CREATOR_USER = 1; 1047 1048 // This network is created by a carrier app. 1049 CREATOR_CARRIER = 2; 1050 } 1051 1052 // Start time of the connection, in milliseconds since Unix epoch (1970-01-01). 1053 optional int64 start_time_millis = 1;// [(datapol.semantic_type) = ST_TIMESTAMP]; 1054 1055 // Duration to connect. 1056 optional int32 duration_taken_to_connect_millis = 2; 1057 1058 // Router information. 1059 optional RouterFingerPrint router_fingerprint = 3; 1060 1061 // RSSI at the start of the connection. 1062 optional int32 signal_strength = 4; 1063 1064 // Roam Type. 1065 optional RoamType roam_type = 5; 1066 1067 // Result of the connection. 1068 optional int32 connection_result = 6; 1069 1070 // Reasons for level 2 failure (needs to be coordinated with wpa-supplicant). 1071 optional int32 level_2_failure_code = 7; 1072 1073 // Failures that happen at the connectivity layer. 1074 optional ConnectivityLevelFailure connectivity_level_failure_code = 8; 1075 1076 // Has bug report been taken. 1077 optional bool automatic_bug_report_taken = 9; 1078 1079 // Connection is using locally generated random MAC address. 1080 optional bool use_randomized_mac = 10 [default = false]; 1081 1082 // Who chose to connect. 1083 optional ConnectionNominator connection_nominator = 11; 1084 1085 // The currently running network selector when this connection event occurred. 1086 optional int32 network_selector_experiment_id = 12; 1087 1088 // Breakdown of level_2_failure_code with more detailed reason. 1089 optional Level2FailureReason level_2_failure_reason = 13 1090 [default = FAILURE_REASON_UNKNOWN]; 1091 1092 // Connection is using an aggressively generated random MAC address. 1093 optional bool use_aggressive_mac = 14; 1094 1095 // Number of BSSIDs for this network that were excluded from network selection. 1096 optional int32 num_bssid_in_blocklist = 15; 1097 1098 // The type of network for this connection. 1099 optional NetworkType network_type = 16; 1100 1101 // UID of the app that created this network. 1102 optional NetworkCreator network_creator = 17; 1103 1104 // Whether the screen is on when the connection event starts 1105 optional bool screen_on = 18; 1106 1107 // Number of consecutive connection failures with the same SSID at high RSSI 1108 // before current connection event. Any connection failure at low RSSI in the 1109 // middle won't break the streak count. The count is cleared after 1110 // a network disconnection event. 1111 optional int32 num_consecutive_connection_failure = 19 [default = -1]; 1112 1113 // Indicates if the profile used for the connection was provisioned by Passpoint OSU server 1114 optional bool is_osu_provisioned = 20; 1115} 1116 1117// Number of occurrences of a specific RSSI poll rssi value 1118message RssiPollCount { 1119 // RSSI 1120 optional int32 rssi = 1; 1121 1122 // Number of RSSI polls with 'rssi' 1123 optional int32 count = 2; 1124 1125 // Beacon frequency of the channel in MHz 1126 optional int32 frequency = 3; 1127} 1128 1129// Number of occurrences of a specific alert reason value 1130message AlertReasonCount { 1131 // Alert reason 1132 optional int32 reason = 1; 1133 1134 // Number of alerts with |reason|. 1135 optional int32 count = 2; 1136} 1137 1138// Counts the number of instances of a specific Wifi Score calculated by WifiScoreReport 1139message WifiScoreCount { 1140 // Wifi Score 1141 optional int32 score = 1; 1142 1143 // Number of Wifi score reports with this score 1144 optional int32 count = 2; 1145} 1146 1147// Counts the number of instances of a specific Wifi Usability Score 1148message WifiUsabilityScoreCount { 1149 // Wifi Usability Score 1150 optional int32 score = 1; 1151 1152 // Number of Wifi score reports with this score 1153 optional int32 count = 2; 1154} 1155 1156// Number of occurrences of a specific link speed (Mbps) 1157// and sum of rssi (dBm) and rssi^2 (dBm^2) 1158message LinkSpeedCount { 1159 // Link speed (Mbps) 1160 optional int32 link_speed_mbps = 1; 1161 1162 // Number of RSSI polls with link_speed 1163 optional int32 count = 2; 1164 1165 // Sum of absolute values of rssi values (dBm) 1166 optional int32 rssi_sum_dbm = 3; 1167 1168 // Sum of squares of rssi values (dBm^2) 1169 optional int64 rssi_sum_of_squares_dbm_sq = 4; 1170} 1171 1172 1173// Number of occurrences of Soft AP session durations 1174message SoftApDurationBucket { 1175 // Bucket covers duration : [duration_sec, duration_sec + bucket_size_sec) 1176 // The (inclusive) lower bound of Soft AP session duration represented by this bucket 1177 optional int32 duration_sec = 1; 1178 1179 // The size of this bucket 1180 optional int32 bucket_size_sec = 2; 1181 1182 // Number of soft AP session durations that fit into this bucket 1183 optional int32 count = 3; 1184} 1185 1186// Number of occurrences of a soft AP session return code 1187message SoftApReturnCodeCount { 1188 1189 enum SoftApStartResult { 1190 1191 // SoftApManager return code unknown 1192 SOFT_AP_RETURN_CODE_UNKNOWN = 0; 1193 1194 // SoftAp started successfully 1195 SOFT_AP_STARTED_SUCCESSFULLY = 1; 1196 1197 // Catch all for failures with no specific failure reason 1198 SOFT_AP_FAILED_GENERAL_ERROR = 2; 1199 1200 // SoftAp failed to start due to NO_CHANNEL error 1201 SOFT_AP_FAILED_NO_CHANNEL = 3; 1202 1203 // SoftAp failed to start due to unsupported configuration error 1204 SOFT_AP_FAILED_UNSUPPORTED_CONFIGURATION = 4; 1205 } 1206 1207 // Historical, no longer used for writing as of 01/2017. 1208 optional int32 return_code = 1 [deprecated = true]; 1209 1210 // Occurrences of this soft AP return code 1211 optional int32 count = 2; 1212 1213 // Result of attempt to start SoftAp 1214 optional SoftApStartResult start_result = 3; 1215} 1216 1217message StaEvent { 1218 message ConfigInfo { 1219 // The set of key management protocols supported by this configuration. 1220 optional uint32 allowed_key_management = 1 [default = 0]; 1221 1222 // The set of security protocols supported by this configuration. 1223 optional uint32 allowed_protocols = 2 [default = 0]; 1224 1225 // The set of authentication protocols supported by this configuration. 1226 optional uint32 allowed_auth_algorithms = 3 [default = 0]; 1227 1228 // The set of pairwise ciphers for WPA supported by this configuration. 1229 optional uint32 allowed_pairwise_ciphers = 4 [default = 0]; 1230 1231 // The set of group ciphers supported by this configuration. 1232 optional uint32 allowed_group_ciphers = 5; 1233 1234 // Is this a 'hidden network' 1235 optional bool hidden_ssid = 6; 1236 1237 // Is this a Hotspot 2.0 / passpoint network 1238 optional bool is_passpoint = 7; 1239 1240 // Is this an 'ephemeral' network (Not in saved network list, recommended externally) 1241 optional bool is_ephemeral = 8; 1242 1243 // Has a successful connection ever been established using this WifiConfiguration 1244 optional bool has_ever_connected = 9; 1245 1246 // RSSI of the scan result candidate associated with this WifiConfiguration 1247 optional int32 scan_rssi = 10 [default = -127]; 1248 1249 // Frequency of the scan result candidate associated with this WifiConfiguration 1250 optional int32 scan_freq = 11 [default = -1]; 1251 } 1252 1253 enum EventType { 1254 // Default/Invalid event 1255 TYPE_UNKNOWN = 0; 1256 1257 // Supplicant Association Rejection event. Code contains the 802.11 1258 TYPE_ASSOCIATION_REJECTION_EVENT = 1; 1259 1260 // Supplicant L2 event, 1261 TYPE_AUTHENTICATION_FAILURE_EVENT = 2; 1262 1263 // Supplicant L2 event 1264 TYPE_NETWORK_CONNECTION_EVENT = 3; 1265 1266 // Supplicant L2 event 1267 TYPE_NETWORK_DISCONNECTION_EVENT = 4; 1268 1269 // Supplicant L2 event 1270 TYPE_SUPPLICANT_STATE_CHANGE_EVENT = 5; 1271 1272 // Supplicant L2 event 1273 TYPE_CMD_ASSOCIATED_BSSID = 6; 1274 1275 // IP Manager successfully completed IP Provisioning 1276 TYPE_CMD_IP_CONFIGURATION_SUCCESSFUL = 7; 1277 1278 // IP Manager failed to complete IP Provisioning 1279 TYPE_CMD_IP_CONFIGURATION_LOST = 8; 1280 1281 // IP Manager lost reachability to network neighbors 1282 TYPE_CMD_IP_REACHABILITY_LOST = 9; 1283 1284 // Indicator that Supplicant is targeting a BSSID for roam/connection 1285 TYPE_CMD_TARGET_BSSID = 10; 1286 1287 // Wifi framework is initiating a connection attempt 1288 TYPE_CMD_START_CONNECT = 11; 1289 1290 // Wifi framework is initiating a roaming connection attempt 1291 TYPE_CMD_START_ROAM = 12; 1292 1293 // SystemAPI connect() command, Settings App 1294 TYPE_CONNECT_NETWORK = 13; 1295 1296 // Network Agent has validated the internet connection (Captive Portal Check success, or user 1297 // validation) 1298 TYPE_NETWORK_AGENT_VALID_NETWORK = 14; 1299 1300 // Framework initiated disconnect. Sometimes generated to give an extra reason for a disconnect 1301 // Should typically be followed by a NETWORK_DISCONNECTION_EVENT with a local_gen = true 1302 TYPE_FRAMEWORK_DISCONNECT = 15; 1303 1304 // The NetworkAgent score for wifi has changed in a way that may impact 1305 // connectivity 1306 TYPE_SCORE_BREACH = 16; 1307 1308 // Framework changed Sta interface MAC address 1309 TYPE_MAC_CHANGE = 17; 1310 1311 // Wifi is turned on 1312 TYPE_WIFI_ENABLED = 18; 1313 1314 // Wifi is turned off 1315 TYPE_WIFI_DISABLED = 19; 1316 1317 // The NetworkAgent Wifi usability score has changed in a way that may 1318 // impact connectivity 1319 TYPE_WIFI_USABILITY_SCORE_BREACH = 20; 1320 1321 // Link probe was performed 1322 TYPE_LINK_PROBE = 21; 1323 } 1324 1325 enum FrameworkDisconnectReason { 1326 // default/none/unknown value 1327 DISCONNECT_UNKNOWN = 0; 1328 1329 // API DISCONNECT 1330 DISCONNECT_API = 1; 1331 1332 // Some framework internal reason (generic) 1333 DISCONNECT_GENERIC = 2; 1334 1335 // Network Agent network validation failed, user signaled network unwanted 1336 DISCONNECT_UNWANTED = 3; 1337 1338 // Roaming timed out 1339 DISCONNECT_ROAM_WATCHDOG_TIMER = 4; 1340 1341 // P2P service requested wifi disconnect 1342 DISCONNECT_P2P_DISCONNECT_WIFI_REQUEST = 5; 1343 1344 // SIM was removed while using a SIM config 1345 DISCONNECT_RESET_SIM_NETWORKS = 6; 1346 } 1347 1348 // Authentication Failure reasons as reported through the API. 1349 enum AuthFailureReason { 1350 // Unknown default 1351 AUTH_FAILURE_UNKNOWN = 0; 1352 1353 // The reason code if there is no error during authentication. It could also imply that there no 1354 // authentication in progress, 1355 AUTH_FAILURE_NONE = 1; 1356 1357 // The reason code if there was a timeout authenticating. 1358 AUTH_FAILURE_TIMEOUT = 2; 1359 1360 // The reason code if there was a wrong password while authenticating. 1361 AUTH_FAILURE_WRONG_PSWD = 3; 1362 1363 // The reason code if there was EAP failure while authenticating. 1364 AUTH_FAILURE_EAP_FAILURE = 4; 1365 } 1366 1367 // What event was this 1368 optional EventType type = 1; 1369 1370 // 80211 death reason code, relevant to NETWORK_DISCONNECTION_EVENTs 1371 optional int32 reason = 2 [default = -1]; 1372 1373 // 80211 Association Status code, relevant to ASSOCIATION_REJECTION_EVENTs 1374 optional int32 status = 3 [default = -1]; 1375 1376 // Designates whether a NETWORK_DISCONNECT_EVENT was by the STA or AP 1377 optional bool local_gen = 4 [default = false]; 1378 1379 // Network information from the WifiConfiguration of a framework initiated connection attempt 1380 optional ConfigInfo config_info = 5; 1381 1382 // RSSI from the last rssi poll (Only valid for active connections) 1383 optional int32 last_rssi = 6 [default = -127]; 1384 1385 // Link speed from the last rssi poll (Only valid for active connections) 1386 optional int32 last_link_speed = 7 [default = -1]; 1387 1388 // Frequency from the last rssi poll (Only valid for active connections) 1389 optional int32 last_freq = 8 [default = -1]; 1390 1391 // Enum used to define bit positions in the supplicant_state_change_bitmask 1392 // See {@code frameworks/base/wifi/java/android/net/wifi/SupplicantState.java} for documentation 1393 enum SupplicantState { 1394 STATE_DISCONNECTED = 0; 1395 1396 STATE_INTERFACE_DISABLED = 1; 1397 1398 STATE_INACTIVE = 2; 1399 1400 STATE_SCANNING = 3; 1401 1402 STATE_AUTHENTICATING = 4; 1403 1404 STATE_ASSOCIATING = 5; 1405 1406 STATE_ASSOCIATED = 6; 1407 1408 STATE_FOUR_WAY_HANDSHAKE = 7; 1409 1410 STATE_GROUP_HANDSHAKE = 8; 1411 1412 STATE_COMPLETED = 9; 1413 1414 STATE_DORMANT = 10; 1415 1416 STATE_UNINITIALIZED = 11; 1417 1418 STATE_INVALID = 12; 1419 } 1420 1421 // Bit mask of all supplicant state changes that occurred since the last event 1422 optional uint32 supplicant_state_changes_bitmask = 9 [default = 0]; 1423 1424 // The number of milliseconds that have elapsed since the device booted 1425 optional int64 start_time_millis = 10 [default = 0]; 1426 1427 optional FrameworkDisconnectReason framework_disconnect_reason = 11 [default = DISCONNECT_UNKNOWN]; 1428 1429 // Flag which indicates if an association rejection event occurred due to a timeout 1430 optional bool association_timed_out = 12 [default = false]; 1431 1432 // Authentication failure reason, as reported by WifiManager (calculated from state & deauth code) 1433 optional AuthFailureReason auth_failure_reason = 13 [default = AUTH_FAILURE_UNKNOWN]; 1434 1435 // NetworkAgent score of connected wifi 1436 optional int32 last_score = 14 [default = -1]; 1437 1438 // NetworkAgent Wifi usability score of connected wifi 1439 optional int32 last_wifi_usability_score = 15 [default = -1]; 1440 1441 // Prediction horizon (in second) of Wifi usability score provided by external 1442 // system app 1443 optional int32 last_prediction_horizon_sec = 16 [default = -1]; 1444 1445 // Only valid if event type == TYPE_LINK_PROBE. 1446 // true if link probe succeeded, false otherwise. 1447 optional bool link_probe_was_success = 17; 1448 1449 // Only valid if event type == TYPE_LINK_PROBE and link_probe_was_success == true. 1450 // Elapsed time, in milliseconds, of a successful link probe. 1451 optional int32 link_probe_success_elapsed_time_ms = 18; 1452 1453 // Only valid if event type == TYPE_LINK_PROBE and link_probe_was_success == false. 1454 // Failure reason for an unsuccessful link probe. 1455 optional LinkProbeStats.LinkProbeFailureReason link_probe_failure_reason = 19; 1456 1457 // Number of bytes transmitted across mobile networks since device boot. 1458 optional int64 mobile_tx_bytes = 20 [default = -1]; 1459 1460 // // Number of bytes received across mobile networks since device boot. 1461 optional int64 mobile_rx_bytes = 21 [default = -1]; 1462 1463 // Number of bytes transmitted since device boot. 1464 optional int64 total_tx_bytes = 22 [default = -1]; 1465 1466 // Number of bytes received since device boot. 1467 optional int64 total_rx_bytes = 23 [default = -1]; 1468 1469 // Whether screen is on when the event happens 1470 optional bool screen_on = 24; 1471 1472 // Whether cellular data network is available 1473 optional bool is_cellular_data_available = 25; 1474 1475 //Whether Adaptive Connectivity is enabled 1476 optional bool is_adaptive_connectivity_enabled = 26; 1477} 1478 1479// Wi-Fi Aware metrics 1480message WifiAwareLog { 1481 // total number of unique apps that used Aware (measured on attach) 1482 optional int32 num_apps = 1; 1483 1484 // total number of unique apps that used an identity callback when attaching 1485 optional int32 num_apps_using_identity_callback = 2; 1486 1487 // maximum number of attaches for an app 1488 optional int32 max_concurrent_attach_sessions_in_app = 3; 1489 1490 // histogram of attach request results 1491 repeated NanStatusHistogramBucket histogram_attach_session_status = 4; 1492 1493 // maximum number of concurrent publish sessions in a single app 1494 optional int32 max_concurrent_publish_in_app = 5; 1495 1496 // maximum number of concurrent subscribe sessions in a single app 1497 optional int32 max_concurrent_subscribe_in_app = 6; 1498 1499 // maximum number of concurrent discovery (publish+subscribe) sessions in a single app 1500 optional int32 max_concurrent_discovery_sessions_in_app = 7; 1501 1502 // maximum number of concurrent publish sessions in the system 1503 optional int32 max_concurrent_publish_in_system = 8; 1504 1505 // maximum number of concurrent subscribe sessions in the system 1506 optional int32 max_concurrent_subscribe_in_system = 9; 1507 1508 // maximum number of concurrent discovery (publish+subscribe) sessions in the system 1509 optional int32 max_concurrent_discovery_sessions_in_system = 10; 1510 1511 // histogram of publish request results 1512 repeated NanStatusHistogramBucket histogram_publish_status = 11; 1513 1514 // histogram of subscribe request results 1515 repeated NanStatusHistogramBucket histogram_subscribe_status = 12; 1516 1517 // number of unique apps which experienced a discovery session creation failure due to lack of 1518 // resources 1519 optional int32 num_apps_with_discovery_session_failure_out_of_resources = 13; 1520 1521 // histogram of create ndp request results 1522 repeated NanStatusHistogramBucket histogram_request_ndp_status = 14; 1523 1524 // histogram of create ndp out-of-band (OOB) request results 1525 repeated NanStatusHistogramBucket histogram_request_ndp_oob_status = 15; 1526 1527 // maximum number of concurrent active data-interfaces (NDI) in a single app 1528 optional int32 max_concurrent_ndi_in_app = 19; 1529 1530 // maximum number of concurrent active data-interfaces (NDI) in the system 1531 optional int32 max_concurrent_ndi_in_system = 20; 1532 1533 // maximum number of concurrent data-paths (NDP) in a single app 1534 optional int32 max_concurrent_ndp_in_app = 21; 1535 1536 // maximum number of concurrent data-paths (NDP) in the system 1537 optional int32 max_concurrent_ndp_in_system = 22; 1538 1539 // maximum number of concurrent secure data-paths (NDP) in a single app 1540 optional int32 max_concurrent_secure_ndp_in_app = 23; 1541 1542 // maximum number of concurrent secure data-paths (NDP) in the system 1543 optional int32 max_concurrent_secure_ndp_in_system = 24; 1544 1545 // maximum number of concurrent data-paths (NDP) per data-interface (NDI) 1546 optional int32 max_concurrent_ndp_per_ndi = 25; 1547 1548 // histogram of durations of Aware being available 1549 repeated HistogramBucket histogram_aware_available_duration_ms = 26; 1550 1551 // histogram of durations of Aware being enabled 1552 repeated HistogramBucket histogram_aware_enabled_duration_ms = 27; 1553 1554 // histogram of duration (in ms) of attach sessions 1555 repeated HistogramBucket histogram_attach_duration_ms = 28; 1556 1557 // histogram of duration (in ms) of publish sessions 1558 repeated HistogramBucket histogram_publish_session_duration_ms = 29; 1559 1560 // histogram of duration (in ms) of subscribe sessions 1561 repeated HistogramBucket histogram_subscribe_session_duration_ms = 30; 1562 1563 // histogram of duration (in ms) of data-paths (NDP) 1564 repeated HistogramBucket histogram_ndp_session_duration_ms = 31; 1565 1566 // histogram of usage (in MB) of data-paths (NDP) 1567 repeated HistogramBucket histogram_ndp_session_data_usage_mb = 32; 1568 1569 // histogram of usage (in MB) of data-path creation time (in ms) measured as request -> confirm 1570 repeated HistogramBucket histogram_ndp_creation_time_ms = 33; 1571 1572 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: minimum 1573 optional int64 ndp_creation_time_ms_min = 34; 1574 1575 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: maximum 1576 optional int64 ndp_creation_time_ms_max = 35; 1577 1578 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: sum 1579 optional int64 ndp_creation_time_ms_sum = 36; 1580 1581 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: sum of sq 1582 optional int64 ndp_creation_time_ms_sum_of_sq = 37; 1583 1584 // statistics for data-path (NDP) creation time (in ms) measured as request -> confirm: number of 1585 // samples 1586 optional int64 ndp_creation_time_ms_num_samples = 38; 1587 1588 // total time within the logging window that aware was available 1589 optional int64 available_time_ms = 39; 1590 1591 // total time within the logging window that aware was enabled 1592 optional int64 enabled_time_ms = 40; 1593 1594 // maximum number of concurrent publish sessions enabling ranging in a single app 1595 optional int32 max_concurrent_publish_with_ranging_in_app = 41; 1596 1597 // maximum number of concurrent subscribe sessions specifying a geofence in a single app 1598 optional int32 max_concurrent_subscribe_with_ranging_in_app = 42; 1599 1600 // maximum number of concurrent publish sessions enabling ranging in the system 1601 optional int32 max_concurrent_publish_with_ranging_in_system = 43; 1602 1603 // maximum number of concurrent subscribe sessions specifying a geofence in the system 1604 optional int32 max_concurrent_subscribe_with_ranging_in_system = 44; 1605 1606 // histogram of subscribe session geofence minimum (only when specified) 1607 repeated HistogramBucket histogram_subscribe_geofence_min = 45; 1608 1609 // histogram of subscribe session geofence maximum (only when specified) 1610 repeated HistogramBucket histogram_subscribe_geofence_max = 46; 1611 1612 // total number of subscribe sessions which enabled ranging 1613 optional int32 num_subscribes_with_ranging = 47; 1614 1615 // total number of matches (service discovery indication) with ranging provided 1616 optional int32 num_matches_with_ranging = 48; 1617 1618 // total number of matches (service discovery indication) for service discovery with ranging 1619 // enabled which did not trigger ranging 1620 optional int32 num_matches_without_ranging_for_ranging_enabled_subscribes = 49; 1621 1622 // Histogram bucket for Wi-Fi Aware logs. Range is [start, end) 1623 message HistogramBucket { 1624 // lower range of the bucket (inclusive) 1625 optional int64 start = 1; 1626 1627 // upper range of the bucket (exclusive) 1628 optional int64 end = 2; 1629 1630 // number of samples in the bucket 1631 optional int32 count = 3; 1632 } 1633 1634 // Status of various NAN operations 1635 enum NanStatusTypeEnum { 1636 // constant to be used by proto 1637 UNKNOWN = 0; 1638 1639 // NAN operation succeeded 1640 SUCCESS = 1; 1641 1642 // NAN Discovery Engine/Host driver failures 1643 INTERNAL_FAILURE = 2; 1644 1645 // NAN OTA failures 1646 PROTOCOL_FAILURE = 3; 1647 1648 // The publish/subscribe discovery session id is invalid 1649 INVALID_SESSION_ID = 4; 1650 1651 // Out of resources to fufill request 1652 NO_RESOURCES_AVAILABLE = 5; 1653 1654 // Invalid arguments passed 1655 INVALID_ARGS = 6; 1656 1657 // Invalid peer id 1658 INVALID_PEER_ID = 7; 1659 1660 // Invalid NAN data-path (ndp) id 1661 INVALID_NDP_ID = 8; 1662 1663 // Attempting to enable NAN when not available, e.g. wifi is disabled 1664 NAN_NOT_ALLOWED = 9; 1665 1666 // Over the air ACK not received 1667 NO_OTA_ACK = 10; 1668 1669 // Attempting to enable NAN when already enabled 1670 ALREADY_ENABLED = 11; 1671 1672 // Can't queue tx followup message foor transmission 1673 FOLLOWUP_TX_QUEUE_FULL = 12; 1674 1675 // Unsupported concurrency of NAN and another feature - NAN disabled 1676 UNSUPPORTED_CONCURRENCY_NAN_DISABLED = 13; 1677 1678 // Unknown NanStatusType 1679 UNKNOWN_HAL_STATUS = 14; 1680 } 1681 1682 // Histogram bucket for Wi-Fi Aware (NAN) status. 1683 message NanStatusHistogramBucket { 1684 // status type defining the bucket 1685 optional NanStatusTypeEnum nan_status_type = 1; 1686 1687 // number of samples in the bucket 1688 optional int32 count = 2; 1689 } 1690} 1691 1692// Data point used to build 'Number of Connectable Network' histograms 1693message NumConnectableNetworksBucket { 1694 // Number of connectable networks seen in a scan result 1695 optional int32 num_connectable_networks = 1 [default = 0]; 1696 1697 // Number of scan results with num_connectable_networks 1698 optional int32 count = 2 [default = 0]; 1699} 1700 1701// Pno scan metrics 1702// Here "Pno Scan" refers to the session of offloaded scans, these metrics count the result of a 1703// single session, and not the individual scans within that session. 1704message PnoScanMetrics { 1705 // Total number of attempts to offload pno scans 1706 optional int32 num_pno_scan_attempts = 1; 1707 1708 // Total number of pno scans failed 1709 optional int32 num_pno_scan_failed = 2; 1710 1711 // Number of pno scans started successfully over offload 1712 optional int32 num_pno_scan_started_over_offload = 3; 1713 1714 // Number of pno scans failed over offload 1715 optional int32 num_pno_scan_failed_over_offload = 4; 1716 1717 // Total number of pno scans that found any network 1718 optional int32 num_pno_found_network_events = 5; 1719} 1720 1721// Number of occurrences for a particular "Connect to Network" Notification or 1722// notification Action. 1723message ConnectToNetworkNotificationAndActionCount { 1724 1725 // "Connect to Network" notifications 1726 enum Notification { 1727 1728 // Default 1729 NOTIFICATION_UNKNOWN = 0; 1730 1731 // Initial notification with a recommended network. 1732 NOTIFICATION_RECOMMEND_NETWORK = 1; 1733 1734 // Notification when connecting to the recommended network. 1735 NOTIFICATION_CONNECTING_TO_NETWORK = 2; 1736 1737 // Notification when successfully connected to the network. 1738 NOTIFICATION_CONNECTED_TO_NETWORK = 3; 1739 1740 // Notification when failed to connect to network. 1741 NOTIFICATION_FAILED_TO_CONNECT = 4; 1742 } 1743 1744 // "Connect to Network" notification actions 1745 enum Action { 1746 1747 // Default 1748 ACTION_UNKNOWN = 0; 1749 1750 // User dismissed the "Connect to Network" notification. 1751 ACTION_USER_DISMISSED_NOTIFICATION = 1; 1752 1753 // User tapped action button to connect to recommended network. 1754 ACTION_CONNECT_TO_NETWORK = 2; 1755 1756 // User tapped action button to open Wi-Fi Settings. 1757 ACTION_PICK_WIFI_NETWORK = 3; 1758 1759 // User tapped "Failed to connect" notification to open Wi-Fi Settings. 1760 ACTION_PICK_WIFI_NETWORK_AFTER_CONNECT_FAILURE = 4; 1761 } 1762 1763 // Recommenders of the "Connect to Network" notification 1764 enum Recommender { 1765 1766 // Default. 1767 RECOMMENDER_UNKNOWN = 0; 1768 1769 // Open Network Available recommender. 1770 RECOMMENDER_OPEN = 1; 1771 } 1772 1773 // Notification Type. 1774 optional Notification notification = 1; 1775 1776 // Action Type. 1777 optional Action action = 2; 1778 1779 // Recommender Type. 1780 optional Recommender recommender = 3; 1781 1782 // Occurrences of this action. 1783 optional int32 count = 4; 1784} 1785 1786// SoftAP event tracking sessions and client counts 1787message SoftApConnectedClientsEvent { 1788 1789 // Soft AP event Types 1790 enum SoftApEventType { 1791 1792 // Soft AP is Up and ready for use 1793 SOFT_AP_UP = 0; 1794 1795 // Soft AP is Down 1796 SOFT_AP_DOWN = 1; 1797 1798 // Number of connected soft AP clients has changed 1799 NUM_CLIENTS_CHANGED = 2; 1800 } 1801 1802 // Soft AP channel bandwidth types 1803 enum ChannelBandwidth { 1804 1805 BANDWIDTH_INVALID = 0; 1806 1807 BANDWIDTH_20_NOHT = 1; 1808 1809 BANDWIDTH_20 = 2; 1810 1811 BANDWIDTH_40 = 3; 1812 1813 BANDWIDTH_80 = 4; 1814 1815 BANDWIDTH_80P80 = 5; 1816 1817 BANDWIDTH_160 = 6; 1818 } 1819 1820 // Type of event being recorded 1821 optional SoftApEventType event_type = 1; 1822 1823 // Time passed since last boot in milliseconds 1824 optional int64 time_stamp_millis = 2; 1825 1826 // Number of connected clients if event_type is NUM_CLIENTS_CHANGED, otherwise zero. 1827 optional int32 num_connected_clients = 3; 1828 1829 // Channel frequency used for Soft AP 1830 optional int32 channel_frequency = 4; 1831 1832 // Channel bandwidth used for Soft AP 1833 optional ChannelBandwidth channel_bandwidth = 5; 1834 1835 // Maximum number of client setting in SoftApConfiguration 1836 optional int32 max_num_clients_setting_in_softap_configuration = 6; 1837 1838 // Maximum number of client setting in SoftApCapability 1839 optional int32 max_num_clients_setting_in_softap_capability = 7; 1840 1841 // Auto shutdown timeout setting in SoftApConfiguration 1842 optional int64 shutdown_timeout_setting_in_softap_configuration = 8; 1843 1844 // Framework default auto shutdown timeout setting 1845 optional int64 default_shutdown_timeout_setting = 9; 1846 1847 // Indicates if user enabled the client_control 1848 optional bool client_control_is_enabled = 10; 1849} 1850 1851// Power stats for Wifi 1852message WifiPowerStats { 1853 1854 // Duration of log (ms) 1855 optional int64 logging_duration_ms = 1; 1856 1857 // Energy consumed by wifi (mAh) 1858 optional double energy_consumed_mah = 2; 1859 1860 // Amount of time wifi is in idle (ms) 1861 optional int64 idle_time_ms = 3; 1862 1863 // Amount of time wifi is in rx (ms) 1864 optional int64 rx_time_ms = 4; 1865 1866 // Amount of time wifi is in tx (ms) 1867 optional int64 tx_time_ms = 5; 1868 1869 // Amount of time kernel is active because of wifi data (ms) 1870 optional int64 wifi_kernel_active_time_ms = 6; 1871 1872 // Number of packets sent (tx) 1873 optional int64 num_packets_tx = 7; 1874 1875 // Number of bytes sent (tx) 1876 optional int64 num_bytes_tx = 8; 1877 1878 // Number of packets received (rx) 1879 optional int64 num_packets_rx = 9; 1880 1881 // Number of bytes sent (rx) 1882 optional int64 num_bytes_rx = 10; 1883 1884 // Amount of time wifi is in sleep (ms) 1885 optional int64 sleep_time_ms = 11; 1886 1887 // Amount of time wifi is scanning (ms) 1888 optional int64 scan_time_ms = 12; 1889 1890 // Actual monitored rail energy consumed by wifi (mAh) 1891 optional double monitored_rail_energy_consumed_mah = 13; 1892} 1893 1894// Metrics for Wifi Wake 1895message WifiWakeStats { 1896 // An individual session for Wifi Wake 1897 message Session { 1898 // A Wifi Wake lifecycle event 1899 message Event { 1900 // Elapsed time in milliseconds since start of session. 1901 optional int64 elapsed_time_millis = 1; 1902 1903 // Number of scans that have occurred since start of session. 1904 optional int32 elapsed_scans = 2; 1905 } 1906 1907 // Start time of session in milliseconds. 1908 optional int64 start_time_millis = 1; 1909 1910 // The number of networks the lock was provided with at start. 1911 optional int32 locked_networks_at_start = 2; 1912 1913 // The number of networks in the lock at the time of the initialize event. Only valid if 1914 // initialize_event is recorded. 1915 optional int32 locked_networks_at_initialize = 6; 1916 1917 // Event for fully initializing the WakeupLock (i.e. WakeupLock is "locked"). 1918 optional Event initialize_event = 7; 1919 1920 // Event for unlocking the WakeupLock. Does not occur if lock was initialized with 0 networks. 1921 optional Event unlock_event = 3; 1922 1923 // Event for triggering wakeup. 1924 optional Event wakeup_event = 4; 1925 1926 // Event for WifiWake reset event. This event marks the end of a session. 1927 optional Event reset_event = 5; 1928 } 1929 1930 // Total number of sessions for Wifi Wake. 1931 optional int32 num_sessions = 1; 1932 1933 // Session information for every Wifi Wake session (up to a maximum of 10). 1934 repeated Session sessions = 2; 1935 1936 // Number of ignored calls to start (due to WakeupController already being active). 1937 optional int32 num_ignored_starts = 3; 1938 1939 // Number of Wifi Wake sessions that have recorded wakeup events. 1940 optional int32 num_wakeups = 4; 1941} 1942 1943// Metrics for Wi-Fi RTT 1944message WifiRttLog { 1945 // Number of RTT request API calls 1946 optional int32 num_requests = 1; 1947 1948 // Histogram of RTT operation overall status 1949 repeated RttOverallStatusHistogramBucket histogram_overall_status = 2; 1950 1951 // RTT to Access Points metrics 1952 optional RttToPeerLog rtt_to_ap = 3; 1953 1954 // RTT to Wi-Fi Aware peers metrics 1955 optional RttToPeerLog rtt_to_aware = 4; 1956 1957 // Histogram of how long a measurement with only AP take. 1958 repeated HistogramBucket histogram_measurement_duration_ap_only = 5; 1959 1960 // Histogram of how long a measurement with aware peer included take. 1961 repeated HistogramBucket histogram_measurement_duration_with_aware = 6; 1962 1963 // Metrics for a RTT to Peer (peer = AP or Wi-Fi Aware) 1964 message RttToPeerLog { 1965 // Total number of API calls 1966 optional int32 num_requests = 1; 1967 1968 // Total number of individual requests 1969 optional int32 num_individual_requests = 2; 1970 1971 // Total number of apps which requested RTT 1972 optional int32 num_apps = 3; 1973 1974 // Histogram of total number of RTT requests by an app (WifiRttManager#startRanging) 1975 repeated HistogramBucket histogram_num_requests_per_app = 4; 1976 1977 // Histogram of number of peers in a single RTT request (RangingRequest entries) 1978 repeated HistogramBucket histogram_num_peers_per_request = 5; 1979 1980 // Histogram of status of individual RTT operations (RangingResult entries) 1981 repeated RttIndividualStatusHistogramBucket histogram_individual_status = 6; 1982 1983 // Histogram of measured distances (RangingResult entries) 1984 repeated HistogramBucket histogram_distance = 7; 1985 1986 // Histogram of interval of RTT requests by an app (WifiRttManager#startRanging) 1987 repeated HistogramBucket histogram_request_interval_ms = 8; 1988 } 1989 1990 // Histogram bucket for Wi-Fi RTT logs. Range is [start, end) 1991 message HistogramBucket { 1992 // lower range of the bucket (inclusive) 1993 optional int64 start = 1; 1994 1995 // upper range of the bucket (exclusive) 1996 optional int64 end = 2; 1997 1998 // number of samples in the bucket 1999 optional int32 count = 3; 2000 } 2001 2002 // Status codes for overall RTT operation 2003 enum RttOverallStatusTypeEnum { 2004 // constant to be used by proto 2005 OVERALL_UNKNOWN = 0; 2006 2007 // RTT operation succeeded (individual results may still fail) 2008 OVERALL_SUCCESS = 1; 2009 2010 // RTT operation failed (unspecified reason) 2011 OVERALL_FAIL = 2; 2012 2013 // RTT operation failed since RTT was not available (e.g. Airplane mode) 2014 OVERALL_RTT_NOT_AVAILABLE = 3; 2015 2016 // RTT operation timed-out: didn't receive response from HAL in expected time 2017 OVERALL_TIMEOUT = 4; 2018 2019 // RTT operation aborted since the app is spamming the service 2020 OVERALL_THROTTLE = 5; 2021 2022 // RTT request to HAL received immediate failure 2023 OVERALL_HAL_FAILURE = 6; 2024 2025 // RTT to Wi-Fi Aware peer using PeerHandle failed to get a MAC address translation 2026 OVERALL_AWARE_TRANSLATION_FAILURE = 7; 2027 2028 // RTT operation failed due to missing Location permission (post execution) 2029 OVERALL_LOCATION_PERMISSION_MISSING = 8; 2030 } 2031 2032 // Status codes for individual RTT operation 2033 enum RttIndividualStatusTypeEnum { 2034 // constant to be used by proto 2035 UNKNOWN = 0; 2036 2037 // RTT operation succeeded 2038 SUCCESS = 1; 2039 2040 // RTT failure: generic reason (no further information) 2041 FAILURE = 2; 2042 2043 // Target STA does not respond to request 2044 FAIL_NO_RSP = 3; 2045 2046 // Request rejected. Applies to 2-sided RTT only 2047 FAIL_REJECTED = 4; 2048 2049 // Operation not scheduled 2050 FAIL_NOT_SCHEDULED_YET = 5; 2051 2052 // Timing measurement times out 2053 FAIL_TM_TIMEOUT = 6; 2054 2055 // Target on different channel, cannot range 2056 FAIL_AP_ON_DIFF_CHANNEL = 7; 2057 2058 // Ranging not supported 2059 FAIL_NO_CAPABILITY = 8; 2060 2061 // Request aborted for unknown reason 2062 ABORTED = 9; 2063 2064 // Invalid T1-T4 timestamp 2065 FAIL_INVALID_TS = 10; 2066 2067 // 11mc protocol failed 2068 FAIL_PROTOCOL = 11; 2069 2070 // Request could not be scheduled 2071 FAIL_SCHEDULE = 12; 2072 2073 // Responder cannot collaborate at time of request 2074 FAIL_BUSY_TRY_LATER = 13; 2075 2076 // Bad request args 2077 INVALID_REQ = 14; 2078 2079 // WiFi not enabled 2080 NO_WIFI = 15; 2081 2082 // Responder overrides param info, cannot range with new params 2083 FAIL_FTM_PARAM_OVERRIDE = 16; 2084 2085 // HAL did not provide a result to a framework request 2086 MISSING_RESULT = 17; 2087 } 2088 2089 // Histogram bucket for Wi-Fi RTT overall operation status 2090 message RttOverallStatusHistogramBucket { 2091 // status type defining the bucket 2092 optional RttOverallStatusTypeEnum status_type = 1; 2093 2094 // number of samples in the bucket 2095 optional int32 count = 2; 2096 } 2097 2098 // Histogram bucket for Wi-Fi RTT individual operation status 2099 message RttIndividualStatusHistogramBucket { 2100 // status type defining the bucket 2101 optional RttIndividualStatusTypeEnum status_type = 1; 2102 2103 // number of samples in the bucket 2104 optional int32 count = 2; 2105 } 2106} 2107 2108// Usage data for the wifi radio while device is running on battery. 2109message WifiRadioUsage { 2110 // Duration of log (ms) 2111 optional int64 logging_duration_ms = 1; 2112 2113 // Total time for which the radio is awake due to scan. 2114 optional int64 scan_time_ms = 2; 2115} 2116 2117message ExperimentValues { 2118 // Indicates if we are logging WifiIsUnusableEvent in metrics 2119 optional bool wifi_is_unusable_logging_enabled = 1; 2120 2121 // Minimum number of txBad to trigger a data stall 2122 optional int32 wifi_data_stall_min_tx_bad = 2; 2123 2124 // Minimum number of txSuccess to trigger a data stall 2125 // when rxSuccess is 0 2126 optional int32 wifi_data_stall_min_tx_success_without_rx = 3; 2127 2128 // Indicates if we are logging LinkSpeedCount in metrics 2129 optional bool link_speed_counts_logging_enabled = 4; 2130 2131 // Duration for evaluating Wifi condition to trigger a data stall 2132 // measured in milliseconds 2133 optional int32 data_stall_duration_ms = 5; 2134 2135 // Threshold of Tx throughput below which to trigger a data stall 2136 // measured in Kbps 2137 optional int32 data_stall_tx_tput_thr_kbps = 6; 2138 2139 // Threshold of Rx throughput below which to trigger a data stall 2140 // measured in Kbps 2141 optional int32 data_stall_rx_tput_thr_kbps = 7; 2142 2143 // Threshold of Tx packet error rate above which to trigger a data stall 2144 // in percentage 2145 optional int32 data_stall_tx_per_thr = 8; 2146 2147 // Threshold of CCA level above which to trigger a data stall in percentage 2148 optional int32 data_stall_cca_level_thr = 9; 2149 2150 // Health monitor RSSI poll valid time in ms 2151 optional int32 health_monitor_rssi_poll_valid_time_ms = 10; 2152} 2153 2154message BssidBlocklistStats { 2155 // Distributions of number of blocked BSSIDs filtered out from network selection. 2156 repeated Int32Count network_selection_filtered_bssid_count = 1; 2157 2158 // If this is enabled, then network connections in high movement state will be skipped unless 2159 // we find a candidate BSSID with similar RSSI in 2 scans sufficiently far apart. 2160 optional bool high_movement_multiple_scans_feature_enabled = 2; 2161 2162 // Number of times connection is skipped in the high movement state 2163 // only relevant if high_movement_multiple_scans_feature_enabled=true 2164 optional int32 num_high_movement_connection_skipped = 3; 2165 2166 // Number of times connection is initiated in the high movement state 2167 // only relevant if high_movement_multiple_scans_feature_enabled=true 2168 optional int32 num_high_movement_connection_started = 4; 2169} 2170 2171message WifiIsUnusableEvent { 2172 enum TriggerType { 2173 // Default/Invalid event 2174 TYPE_UNKNOWN = 0; 2175 2176 // There is a data stall from tx failures 2177 TYPE_DATA_STALL_BAD_TX = 1; 2178 2179 // There is a data stall from rx failures 2180 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 2181 2182 // There is a data stall from both tx and rx failures 2183 TYPE_DATA_STALL_BOTH = 3; 2184 2185 // Firmware generated an alert 2186 TYPE_FIRMWARE_ALERT = 4; 2187 2188 // IP Manager lost reachability to network neighbors 2189 TYPE_IP_REACHABILITY_LOST = 5; 2190 } 2191 2192 // What event triggered WifiIsUnusableEvent. 2193 optional TriggerType type = 1; 2194 2195 // The timestamp at which this event occurred. 2196 // Measured in milliseconds that have elapsed since the device booted. 2197 optional int64 start_time_millis = 2; 2198 2199 // NetworkAgent score of connected wifi. 2200 // Defaults to -1 if the score was never set. 2201 optional int32 last_score = 3 [default = -1]; 2202 2203 // Delta of successfully transmitted (ACKed) unicast data packets 2204 // between the last two WifiLinkLayerStats. 2205 optional int64 tx_success_delta = 4; 2206 2207 // Delta of transmitted unicast data retry packets 2208 // between the last two WifiLinkLayerStats. 2209 optional int64 tx_retries_delta = 5; 2210 2211 // Delta of lost (not ACKed) transmitted unicast data packets 2212 // between the last two WifiLinkLayerStats. 2213 optional int64 tx_bad_delta = 6; 2214 2215 // Delta of received unicast data packets 2216 // between the last two WifiLinkLayerStats. 2217 optional int64 rx_success_delta = 7; 2218 2219 // Time in millisecond between the last two WifiLinkLayerStats. 2220 optional int64 packet_update_time_delta = 8; 2221 2222 // The timestamp at which the last WifiLinkLayerStats was updated. 2223 // Measured in milliseconds that have elapsed since the device booted. 2224 optional int64 last_link_layer_stats_update_time = 9; 2225 2226 // Firmware alert code. Only valid when the event was triggered by a firmware alert, otherwise -1. 2227 optional int32 firmware_alert_code = 10 [default = -1]; 2228 2229 // NetworkAgent wifi usability score of connected wifi. 2230 // Defaults to -1 if the score was never set. 2231 optional int32 last_wifi_usability_score = 11 [default = -1]; 2232 2233 // Prediction horizon (in second) of Wifi usability score provided by external 2234 // system app 2235 optional int32 last_prediction_horizon_sec = 12 [default = -1]; 2236 2237 // Whether screen status is on when WifiIsUnusableEvent happens. 2238 optional bool screen_on = 13 [default = false]; 2239 2240 // Number of bytes transmitted across mobile networks since device boot. 2241 optional int64 mobile_tx_bytes = 14 [default = -1]; 2242 2243 // // Number of bytes received across mobile networks since device boot. 2244 optional int64 mobile_rx_bytes = 15 [default = -1]; 2245 2246 // Number of bytes transmitted since device boot. 2247 optional int64 total_tx_bytes = 16 [default = -1]; 2248 2249 // Number of bytes received since device boot. 2250 optional int64 total_rx_bytes = 17 [default = -1]; 2251} 2252 2253message PasspointProfileTypeCount { 2254 enum EapMethod { 2255 // Unknown Type 2256 TYPE_UNKNOWN = 0; 2257 2258 // EAP_TLS (13) 2259 TYPE_EAP_TLS = 1; 2260 2261 // EAP_TTLS (21) 2262 TYPE_EAP_TTLS = 2; 2263 2264 // EAP_SIM (18) 2265 TYPE_EAP_SIM = 3; 2266 2267 // EAP_AKA (23) 2268 TYPE_EAP_AKA = 4; 2269 2270 // EAP_AKA_PRIME (50) 2271 TYPE_EAP_AKA_PRIME = 5; 2272 } 2273 2274 // Eap method type set in Passpoint profile 2275 optional EapMethod eap_method_type = 1; 2276 2277 // Num of installed Passpoint profile with same eap method 2278 optional int32 count = 2; 2279} 2280 2281message WifiLinkLayerUsageStats { 2282 // Total logging duration in ms. 2283 optional int64 logging_duration_ms = 1; 2284 2285 // Total time the wifi radio is on in ms over the logging duration. 2286 optional int64 radio_on_time_ms = 2; 2287 2288 // Total time the wifi radio is doing tx in ms over the logging duration. 2289 optional int64 radio_tx_time_ms = 3; 2290 2291 // Total time the wifi radio is doing rx in ms over the logging duration. 2292 optional int64 radio_rx_time_ms = 4; 2293 2294 // Total time the wifi radio is scanning in ms over the logging duration. 2295 optional int64 radio_scan_time_ms = 5; 2296 2297 // Total time the wifi radio spent doing nan scans in ms over the logging duration. 2298 optional int64 radio_nan_scan_time_ms = 6; 2299 2300 // Total time the wifi radio spent doing background scans in ms over the logging duration. 2301 optional int64 radio_background_scan_time_ms = 7; 2302 2303 // Total time the wifi radio spent doing roam scans in ms over the logging duration. 2304 optional int64 radio_roam_scan_time_ms = 8; 2305 2306 // Total time the wifi radio spent doing pno scans in ms over the logging duration. 2307 optional int64 radio_pno_scan_time_ms = 9; 2308 2309 // Total time the wifi radio spent doing hotspot 2.0 scans and GAS exchange 2310 // in ms over the logging duration. 2311 optional int64 radio_hs20_scan_time_ms = 10; 2312} 2313 2314message WifiUsabilityStatsEntry { 2315 // Status codes for link probe status 2316 enum LinkProbeStatus { 2317 // Link probe status is unknown 2318 PROBE_STATUS_UNKNOWN = 0; 2319 2320 // Link probe is not triggered 2321 PROBE_STATUS_NO_PROBE = 1; 2322 2323 // Link probe is triggered and the result is success 2324 PROBE_STATUS_SUCCESS = 2; 2325 2326 // Link probe is triggered and the result is failure 2327 PROBE_STATUS_FAILURE = 3; 2328 } 2329 2330 // Codes for cellular data network type 2331 enum CellularDataNetworkType { 2332 // Unknown network 2333 NETWORK_TYPE_UNKNOWN = 0; 2334 2335 // GSM network 2336 NETWORK_TYPE_GSM = 1; 2337 2338 // CDMA network 2339 NETWORK_TYPE_CDMA = 2; 2340 2341 // CDMA EVDO network 2342 NETWORK_TYPE_EVDO_0 = 3; 2343 2344 // WCDMA network 2345 NETWORK_TYPE_UMTS = 4; 2346 2347 // TDSCDMA network 2348 NETWORK_TYPE_TD_SCDMA = 5; 2349 2350 // LTE network 2351 NETWORK_TYPE_LTE = 6; 2352 2353 // NR network 2354 NETWORK_TYPE_NR = 7; 2355 } 2356 2357 // Absolute milliseconds from device boot when these stats were sampled 2358 optional int64 time_stamp_ms = 1; 2359 2360 // The RSSI at the sample time 2361 optional int32 rssi = 2; 2362 2363 // Link speed at the sample time in Mbps 2364 optional int32 link_speed_mbps = 3; 2365 2366 // The total number of tx success counted from the last radio chip reset 2367 optional int64 total_tx_success = 4; 2368 2369 // The total number of MPDU data packet retries counted from the last radio chip reset 2370 optional int64 total_tx_retries = 5; 2371 2372 // The total number of tx bad counted from the last radio chip reset 2373 optional int64 total_tx_bad = 6; 2374 2375 // The total number of rx success counted from the last radio chip reset 2376 optional int64 total_rx_success = 7; 2377 2378 // The total time the wifi radio is on in ms counted from the last radio chip reset 2379 optional int64 total_radio_on_time_ms = 8; 2380 2381 // The total time the wifi radio is doing tx in ms counted from the last radio chip reset 2382 optional int64 total_radio_tx_time_ms = 9; 2383 2384 // The total time the wifi radio is doing rx in ms counted from the last radio chip reset 2385 optional int64 total_radio_rx_time_ms = 10; 2386 2387 // The total time spent on all types of scans in ms counted from the last radio chip reset 2388 optional int64 total_scan_time_ms = 11; 2389 2390 // The total time spent on nan scans in ms counted from the last radio chip reset 2391 optional int64 total_nan_scan_time_ms = 12; 2392 2393 // The total time spent on background scans in ms counted from the last radio chip reset 2394 optional int64 total_background_scan_time_ms = 13; 2395 2396 // The total time spent on roam scans in ms counted from the last radio chip reset 2397 optional int64 total_roam_scan_time_ms = 14; 2398 2399 // The total time spent on pno scans in ms counted from the last radio chip reset 2400 optional int64 total_pno_scan_time_ms = 15; 2401 2402 // The total time spent on hotspot2.0 scans and GAS exchange in ms counted from the last radio 2403 // chip reset 2404 optional int64 total_hotspot_2_scan_time_ms = 16; 2405 2406 // Internal framework Wifi score 2407 optional int32 wifi_score = 17; 2408 2409 // Wifi usability score provided by external system app 2410 optional int32 wifi_usability_score = 18; 2411 2412 // Sequence number from external system app to framework 2413 optional int32 seq_num_to_framework = 19; 2414 2415 // The total time CCA is on busy status on the current frequency in ms 2416 // counted from the last radio chip reset 2417 optional int64 total_cca_busy_freq_time_ms = 20; 2418 2419 // The total radio on time of the current frequency from the last radio 2420 // chip reset 2421 optional int64 total_radio_on_freq_time_ms = 21; 2422 2423 // The total number of beacons received from the last radio chip reset 2424 optional int64 total_beacon_rx = 22; 2425 2426 // Prediction horizon (in second) of Wifi usability score provided by external 2427 // system app 2428 optional int32 prediction_horizon_sec = 23; 2429 2430 // The link probe status since last stats update 2431 optional LinkProbeStatus probe_status_since_last_update = 24; 2432 2433 // The elapsed time of the most recent link probe since last stats update; 2434 optional int32 probe_elapsed_time_since_last_update_ms = 25; 2435 2436 // The MCS rate of the most recent link probe since last stats update 2437 optional int32 probe_mcs_rate_since_last_update = 26; 2438 2439 // Rx link speed at the sample time in Mbps 2440 optional int32 rx_link_speed_mbps = 27; 2441 2442 // Sequence number generated by framework 2443 optional int32 seq_num_inside_framework = 28; 2444 2445 // Whether current entry is for the same BSSID on the same frequency compared 2446 // to last entry 2447 optional bool is_same_bssid_and_freq = 29; 2448 2449 // Cellular data network type currently in use on the device for data transmission 2450 optional CellularDataNetworkType cellular_data_network_type = 30; 2451 2452 // Cellular signal strength in dBm, NR: CsiRsrp, LTE: Rsrp, WCDMA/TDSCDMA: Rscp, 2453 // CDMA: Rssi, EVDO: Rssi, GSM: Rssi 2454 optional int32 cellular_signal_strength_dbm = 31; 2455 2456 // Cellular signal strength in dB, NR: CsiSinr, LTE: Rsrq, WCDMA: EcNo, TDSCDMA: invalid, 2457 // CDMA: Ecio, EVDO: SNR, GSM: invalid */ 2458 optional int32 cellular_signal_strength_db = 32; 2459 2460 // Whether the primary registered cell of current entry is same as that of previous entry 2461 optional bool is_same_registered_cell = 33; 2462 2463 // The device mobility state 2464 optional DeviceMobilityStatePnoScanStats.DeviceMobilityState 2465 device_mobility_state = 34; 2466} 2467 2468message WifiUsabilityStats { 2469 enum Label { 2470 // Default label 2471 LABEL_UNKNOWN = 0; 2472 2473 // Wifi is usable 2474 LABEL_GOOD = 1; 2475 2476 // Wifi is unusable 2477 LABEL_BAD = 2; 2478 } 2479 2480 enum UsabilityStatsTriggerType { 2481 // Default/Invalid event 2482 TYPE_UNKNOWN = 0; 2483 2484 // There is a data stall from tx failures 2485 TYPE_DATA_STALL_BAD_TX = 1; 2486 2487 // There is a data stall from rx failures 2488 TYPE_DATA_STALL_TX_WITHOUT_RX = 2; 2489 2490 // There is a data stall from both tx and rx failures 2491 TYPE_DATA_STALL_BOTH = 3; 2492 2493 // Firmware generated an alert 2494 TYPE_FIRMWARE_ALERT = 4; 2495 2496 // IP Manager lost reachability to network neighbors 2497 TYPE_IP_REACHABILITY_LOST = 5; 2498 } 2499 2500 // The current wifi usability state 2501 optional Label label = 1; 2502 2503 // The list of timestamped wifi usability stats 2504 repeated WifiUsabilityStatsEntry stats = 2; 2505 2506 // What event triggered WifiUsabilityStats. 2507 optional UsabilityStatsTriggerType trigger_type = 3; 2508 2509 // Firmware alert code. Only valid when the stats was triggered by a firmware 2510 // alert, otherwise -1. 2511 optional int32 firmware_alert_code = 4 [default = -1]; 2512 2513 // Absolute milliseconds from device boot when these stats were sampled 2514 optional int64 time_stamp_ms = 5; 2515} 2516 2517message DeviceMobilityStatePnoScanStats { 2518 // see WifiManager.DEVICE_MOBILITY_STATE_* constants 2519 enum DeviceMobilityState { 2520 // Unknown mobility 2521 UNKNOWN = 0; 2522 2523 // High movement 2524 HIGH_MVMT = 1; 2525 2526 // Low movement 2527 LOW_MVMT = 2; 2528 2529 // Stationary 2530 STATIONARY = 3; 2531 } 2532 2533 // The device mobility state 2534 optional DeviceMobilityState device_mobility_state = 1; 2535 2536 // The number of times that this state was entered 2537 optional int32 num_times_entered_state = 2; 2538 2539 // The total duration elapsed while in this mobility state, in ms 2540 optional int64 total_duration_ms = 3; 2541 2542 // the total duration elapsed while in this mobility state with PNO scans running, in ms 2543 optional int64 pno_duration_ms = 4; 2544} 2545 2546// The information about the Wifi P2p events. 2547message WifiP2pStats { 2548 2549 // Group event list tracking sessions and client counts in tethered mode. 2550 repeated GroupEvent group_event = 1; 2551 2552 // Session information that gets logged for every Wifi P2p connection. 2553 repeated P2pConnectionEvent connection_event = 2; 2554 2555 // Number of persistent group in the user profile. 2556 optional int32 num_persistent_group = 3; 2557 2558 // Number of peer scan. 2559 optional int32 num_total_peer_scans = 4; 2560 2561 // Number of service scan. 2562 optional int32 num_total_service_scans = 5; 2563} 2564 2565message P2pConnectionEvent { 2566 2567 enum ConnectionType { 2568 2569 // fresh new connection. 2570 CONNECTION_FRESH = 0; 2571 2572 // reinvoke a group. 2573 CONNECTION_REINVOKE = 1; 2574 2575 // create a group with the current device as the group owner locally. 2576 CONNECTION_LOCAL = 2; 2577 2578 // create a group or join a group with config. 2579 CONNECTION_FAST = 3; 2580 } 2581 2582 enum ConnectivityLevelFailure { 2583 2584 // Failure is unknown. 2585 CLF_UNKNOWN = 0; 2586 2587 // No failure. 2588 CLF_NONE = 1; 2589 2590 // Timeout for current connecting request. 2591 CLF_TIMEOUT = 2; 2592 2593 // The connecting request is canceled by the user. 2594 CLF_CANCEL = 3; 2595 2596 // Provision discovery failure, e.g. no pin code, timeout, rejected by the peer. 2597 CLF_PROV_DISC_FAIL = 4; 2598 2599 // Invitation failure, e.g. rejected by the peer. 2600 CLF_INVITATION_FAIL = 5; 2601 2602 // Incoming request is rejected by the user. 2603 CLF_USER_REJECT = 6; 2604 2605 // New connection request is issued before ending previous connecting request. 2606 CLF_NEW_CONNECTION_ATTEMPT = 7; 2607 } 2608 2609 // WPS method. 2610 enum WpsMethod { 2611 // WPS is skipped for Group Reinvoke. 2612 WPS_NA = -1; 2613 2614 // Push button configuration. 2615 WPS_PBC = 0; 2616 2617 // Display pin method configuration - pin is generated and displayed on device. 2618 WPS_DISPLAY = 1; 2619 2620 // Keypad pin method configuration - pin is entered on device. 2621 WPS_KEYPAD = 2; 2622 2623 // Label pin method configuration - pin is labelled on device. 2624 WPS_LABEL = 3; 2625 } 2626 2627 // Start time of the connection. 2628 optional int64 start_time_millis = 1; 2629 2630 // Type of the connection. 2631 optional ConnectionType connection_type = 2; 2632 2633 // WPS method. 2634 optional WpsMethod wps_method = 3 [default = WPS_NA]; 2635 2636 // Duration to connect. 2637 optional int32 duration_taken_to_connect_millis = 4; 2638 2639 // Failures that happen at the connectivity layer. 2640 optional ConnectivityLevelFailure connectivity_level_failure_code = 5; 2641} 2642 2643// GroupEvent tracking group information from GroupStarted to GroupRemoved. 2644message GroupEvent { 2645 2646 enum GroupRole { 2647 2648 GROUP_OWNER = 0; 2649 2650 GROUP_CLIENT = 1; 2651 } 2652 2653 // The ID of network in supplicant for this group. 2654 optional int32 net_id = 1; 2655 2656 // Start time of the group. 2657 optional int64 start_time_millis = 2; 2658 2659 // Channel frequency used for Group. 2660 optional int32 channel_frequency = 3; 2661 2662 // Is group owner or group client. 2663 optional GroupRole group_role = 5; 2664 2665 // Number of connected clients. 2666 optional int32 num_connected_clients = 6; 2667 2668 // Cumulative number of connected clients. 2669 optional int32 num_cumulative_clients = 7; 2670 2671 // The session duration. 2672 optional int32 session_duration_millis = 8; 2673 2674 // The idle duration. A group without any client is in idle. 2675 optional int32 idle_duration_millis = 9; 2676} 2677 2678// Easy Connect (DPP) 2679message WifiDppLog { 2680 reserved 6; 2681 2682 // Number of Configurator-Initiator requests 2683 optional int32 num_dpp_configurator_initiator_requests = 1; 2684 2685 // Number of Enrollee-Initiator requests 2686 optional int32 num_dpp_enrollee_initiator_requests = 2; 2687 2688 // Easy Connect (DPP) Enrollee success 2689 optional int32 num_dpp_enrollee_success = 3; 2690 2691 // Easy Connect (DPP) Configurator success code bucket 2692 repeated DppConfiguratorSuccessStatusHistogramBucket dpp_configurator_success_code = 4; 2693 2694 // Easy Connect (DPP) failure code bucket 2695 repeated DppFailureStatusHistogramBucket dpp_failure_code = 5; 2696 2697 // Easy Connect (DPP) operation time bucket 2698 repeated HistogramBucketInt32 dpp_operation_time = 7; 2699 2700 // Number of Enrollee-Responder peer devices supporting DPP protocol version 1 2701 optional int32 num_dpp_r1_capable_enrollee_responder_devices = 8; 2702 2703 // Number of Enrollee-Responder peer devices supporting DPP protocol version 2 2704 optional int32 num_dpp_r2_capable_enrollee_responder_devices = 9; 2705 2706 // Number of Enrollee-Responder incompatible configurations found in DPP R2 compatibility check. 2707 optional int32 num_dpp_r2_enrollee_responder_incompatible_configuration = 10; 2708 2709 // Histogram bucket for Wi-Fi DPP configurator success 2710 message DppConfiguratorSuccessStatusHistogramBucket { 2711 // status type defining the bucket 2712 optional DppConfiguratorSuccessCode dpp_status_type = 1; 2713 2714 // number of samples in the bucket 2715 optional int32 count = 2; 2716 } 2717 2718 // Histogram bucket for Wi-Fi DPP failures 2719 message DppFailureStatusHistogramBucket { 2720 // status type defining the bucket 2721 optional DppFailureCode dpp_status_type = 1; 2722 2723 // number of samples in the bucket 2724 optional int32 count = 2; 2725 } 2726 2727 enum DppConfiguratorSuccessCode { 2728 // Unknown success code 2729 EASY_CONNECT_EVENT_SUCCESS_UNKNOWN = 0; 2730 2731 // Easy Connect Configurator success event: Configuration sent to enrollee 2732 EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT = 1; 2733 2734 // Easy Connect Configurator success event: Configuration applied by enrollee 2735 EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED = 2; 2736 } 2737 2738 enum DppFailureCode { 2739 // Unknown failure 2740 EASY_CONNECT_EVENT_FAILURE_UNKNOWN = 0; 2741 2742 // Easy Connect Failure event: Scanned QR code is either not a Easy Connect URI, or the Easy 2743 // Connect URI has errors. 2744 EASY_CONNECT_EVENT_FAILURE_INVALID_URI = 1; 2745 2746 // Easy Connect Failure event: Bootstrapping/Authentication initialization process failure. 2747 EASY_CONNECT_EVENT_FAILURE_AUTHENTICATION = 2; 2748 2749 // Easy Connect Failure event: Both devices are implementing the same role and are 2750 // incompatible. 2751 EASY_CONNECT_EVENT_FAILURE_NOT_COMPATIBLE = 3; 2752 2753 // Easy Connect Failure event: Configuration process has failed due to malformed message. 2754 EASY_CONNECT_EVENT_FAILURE_CONFIGURATION = 4; 2755 2756 // Easy Connect Failure event: Easy Connect request while in another Easy Connect exchange. 2757 EASY_CONNECT_EVENT_FAILURE_BUSY = 5; 2758 2759 // Easy Connect Failure event: No response from the peer. 2760 EASY_CONNECT_EVENT_FAILURE_TIMEOUT = 6; 2761 2762 // Easy Connect Failure event: General protocol failure. 2763 EASY_CONNECT_EVENT_FAILURE_GENERIC = 7; 2764 2765 // Easy Connect Failure event: Feature or option is not supported. 2766 EASY_CONNECT_EVENT_FAILURE_NOT_SUPPORTED = 8; 2767 2768 // Easy Connect Failure event: Invalid network provided to Easy Connect configurator. 2769 // Network must either be WPA3-Personal (SAE) or WPA2-Personal (PSK). 2770 EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK = 9; 2771 2772 // Easy Connect R2 Failure event: Enrollee cannot find the network. 2773 EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK = 10; 2774 2775 // Easy Connect R2 Failure event: Enrollee failed to authenticate with the network. 2776 EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION = 11; 2777 2778 // Easy Connect R2 Failure event: Enrollee rejected the configuration. 2779 EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION = 12; 2780 } 2781} 2782 2783// WifiConfigStore read/write metrics. 2784message WifiConfigStoreIO { 2785 // Histogram of config store read durations. 2786 repeated DurationBucket read_durations = 1; 2787 2788 // Histogram of config store write durations. 2789 repeated DurationBucket write_durations = 2; 2790 2791 // Total Number of instances of write/read duration in this duration bucket. 2792 message DurationBucket { 2793 // Bucket covers duration : [range_start_ms, range_end_ms) 2794 // The (inclusive) lower bound of read/write duration represented by this bucket 2795 optional int32 range_start_ms = 1; 2796 2797 // The (exclusive) upper bound of read/write duration represented by this bucket 2798 optional int32 range_end_ms = 2; 2799 2800 // Number of read/write durations that fit into this bucket 2801 optional int32 count = 3; 2802 } 2803} 2804 2805// Histogram bucket counting with int32. Range is [start, end) 2806message HistogramBucketInt32 { 2807 // lower range of the bucket (inclusive) 2808 optional int32 start = 1; 2809 2810 // upper range of the bucket (exclusive) 2811 optional int32 end = 2; 2812 2813 // number of samples in the bucket 2814 optional int32 count = 3; 2815} 2816 2817// Counts occurrences of a int32 key 2818message Int32Count { 2819 // the key 2820 optional int32 key = 1; 2821 2822 // the count 2823 optional int32 count = 2; 2824} 2825 2826message LinkProbeStats { 2827 enum LinkProbeFailureReason { 2828 // unknown reason 2829 LINK_PROBE_FAILURE_REASON_UNKNOWN = 0; 2830 2831 // Specified MCS rate when it is unsupported by the driver. 2832 LINK_PROBE_FAILURE_REASON_MCS_UNSUPPORTED = 1; 2833 2834 // Driver reported that no ACK was received for the transmitted probe. 2835 LINK_PROBE_FAILURE_REASON_NO_ACK = 2; 2836 2837 // Driver failed to report on the status of the transmitted probe within the timeout. 2838 LINK_PROBE_FAILURE_REASON_TIMEOUT = 3; 2839 2840 // An existing link probe is in progress. 2841 LINK_PROBE_FAILURE_REASON_ALREADY_STARTED = 4; 2842 } 2843 2844 // Counts the number of failures for each failure reason. 2845 message LinkProbeFailureReasonCount { 2846 // The failure reason. 2847 optional LinkProbeFailureReason failure_reason = 1; 2848 2849 // The number of occurrences for this failure reason. 2850 optional int32 count = 2; 2851 } 2852 2853 // Counts the number of link probes for each experiment. 2854 message ExperimentProbeCounts { 2855 // The experiment ID. 2856 optional string experiment_id = 1; 2857 2858 // The number of link probes triggered for this experiment. 2859 optional int32 probe_count = 2; 2860 } 2861 2862 // Counts the occurrences of RSSI values when a link probe succeeds. 2863 repeated Int32Count success_rssi_counts = 1; 2864 2865 // Counts the occurrences of RSSI values when a link probe fails. 2866 repeated Int32Count failure_rssi_counts = 2; 2867 2868 // Counts the occurrences of Link Speed values when a link probe succeeds. 2869 repeated Int32Count success_link_speed_counts = 3; 2870 2871 // Counts the occurrences of Link Speed values when a link probe fails. 2872 repeated Int32Count failure_link_speed_counts = 4; 2873 2874 // Histogram for the number of seconds since the last TX success when a link probe succeeds. 2875 repeated HistogramBucketInt32 success_seconds_since_last_tx_success_histogram = 5; 2876 2877 // Histogram for the number of seconds since the last TX success when a link probe fails. 2878 repeated HistogramBucketInt32 failure_seconds_since_last_tx_success_histogram = 6; 2879 2880 // Histogram for the elapsed time of successful link probes, in ms. 2881 repeated HistogramBucketInt32 success_elapsed_time_ms_histogram = 7; 2882 2883 // Counts the occurrences of error codes for failed link probes. 2884 repeated LinkProbeFailureReasonCount failure_reason_counts = 8; 2885 2886 // Counts the number of link probes for each experiment. 2887 repeated ExperimentProbeCounts experiment_probe_counts = 9; 2888} 2889 2890// Stores the decisions that were made by a experiment when compared against another experiment 2891message NetworkSelectionExperimentDecisions { 2892 // the id of one experiment 2893 optional int32 experiment1_id = 1; 2894 2895 // the id of the other experiment 2896 optional int32 experiment2_id = 2; 2897 2898 // Counts occurrences of the number of network choices there were when experiment1 makes the 2899 // same network selection as experiment2. 2900 // The keys are the number of network choices, and the values are the number of occurrences of 2901 // this number of network choices when exp1 and exp2 make the same network selection. 2902 repeated Int32Count same_selection_num_choices_counter = 3; 2903 2904 // Counts occurrences of the number of network choices there were when experiment1 makes the 2905 // same network selection as experiment2. 2906 // The keys are the number of network choices, and the values are the number of occurrences of 2907 // this number of network choices when exp1 and exp2 make different network selections. 2908 // Note that it is possible for the network selection to be different even when there only exists 2909 // a single network choice, since choosing not to connect to that network is a valid choice. 2910 repeated Int32Count different_selection_num_choices_counter = 4; 2911} 2912 2913// NetworkRequest API metrics. 2914message WifiNetworkRequestApiLog { 2915 // Number of requests via this API surface. 2916 optional int32 num_request = 1; 2917 2918 // Histogram of requests via this API surface to number of networks matched in scan results. 2919 repeated HistogramBucketInt32 network_match_size_histogram = 2; 2920 2921 // Number of successful network connection from this API. 2922 optional int32 num_connect_success = 3; 2923 2924 // Number of requests via this API surface that bypassed user approval. 2925 optional int32 num_user_approval_bypass = 4; 2926 2927 // Number of requests via this API surface that was rejected by the user. 2928 optional int32 num_user_reject = 5; 2929 2930 // Number of unique apps using this API surface. 2931 optional int32 num_apps = 6; 2932} 2933 2934// NetworkSuggestion API metrics. 2935message WifiNetworkSuggestionApiLog { 2936 enum SuggestionAppTypeCode { 2937 // UNKNOWN type suggestion app. 2938 TYPE_UNKNOWN = 0; 2939 // Suggestion app with carrier privilege. 2940 TYPE_CARRIER_PRIVILEGED = 1; 2941 // Suggestion app with network provisioning permission(NETWORK_CARRIER_PROVISIONING). 2942 TYPE_NETWORK_PROVISIONING = 2; 2943 // Suggestion app without special privilege. 2944 TYPE_NON_PRIVILEGED = 3; 2945 } 2946 2947 message SuggestionAppCount { 2948 // Suggestion app type. 2949 optional SuggestionAppTypeCode app_type = 1; 2950 // Num of app in this type. 2951 optional int32 count = 2; 2952 } 2953 2954 // Number of modifications to their suggestions by apps. 2955 optional int32 num_modification = 1; 2956 2957 // Number of successful network connection from app suggestions. 2958 optional int32 num_connect_success = 2; 2959 2960 // Number of network connection failures from app suggestions. 2961 optional int32 num_connect_failure = 3; 2962 2963 // Histogram for size of the network lists provided by various apps on the device. 2964 repeated HistogramBucketInt32 network_list_size_histogram = 4; 2965 2966 // Count of app using suggestion API with different privilege. 2967 repeated SuggestionAppCount app_count_per_type = 5; 2968 2969 // Number of user revoke app's permission from settings or disallowed from UI. 2970 optional int32 user_revoke_app_suggestion_permission = 6; 2971} 2972 2973// WifiLock metrics 2974message WifiLockStats { 2975 // Amount of time wifi is actively in HIGH_PERF mode (ms) 2976 // This means the lock takes effect and the device takes the actions required for this mode 2977 optional int64 high_perf_active_time_ms = 1; 2978 2979 // Amount of time wifi is actively in LOW_LATENCY mode (ms) 2980 // This means the lock takes effect and the device takes the actions required for this mode 2981 optional int64 low_latency_active_time_ms = 2; 2982 2983 // Histogram of HIGH_PERF lock acquisition duration (seconds) 2984 // Note that acquiring the lock does not necessarily mean that device is actively in that mode 2985 repeated HistogramBucketInt32 high_perf_lock_acq_duration_sec_histogram = 3; 2986 2987 // Histogram of LOW_LATENCY lock acquisition duration (seconds) 2988 // Note that acquiring the lock does not necessarily mean that device is actively in that mode 2989 repeated HistogramBucketInt32 low_latency_lock_acq_duration_sec_histogram = 4; 2990 2991 // Histogram of HIGH_PERF active session duration (seconds) 2992 // This means the lock takes effect and the device takes the actions required for this mode 2993 repeated HistogramBucketInt32 high_perf_active_session_duration_sec_histogram = 5; 2994 2995 // Histogram of LOW_LATENCY active session duration (seconds) 2996 // This means the lock takes effect and the device takes the actions required for this mode 2997 repeated HistogramBucketInt32 low_latency_active_session_duration_sec_histogram = 6; 2998} 2999 3000// Stats on number of times Wi-Fi is turned on/off though the WifiManager#setWifiEnabled API 3001message WifiToggleStats { 3002 // Number of time Wi-Fi is turned on by privileged apps 3003 optional int32 num_toggle_on_privileged = 1; 3004 3005 // Number of time Wi-Fi is turned off by privileged apps 3006 optional int32 num_toggle_off_privileged = 2; 3007 3008 // Number of time Wi-Fi is turned on by normal apps 3009 optional int32 num_toggle_on_normal = 3; 3010 3011 // Number of time Wi-Fi is turned off by normal apps 3012 optional int32 num_toggle_off_normal = 4; 3013} 3014 3015// Information about the Passpoint provision metrics. 3016message PasspointProvisionStats { 3017 enum ProvisionFailureCode { 3018 // provisioning failure for unknown reason. 3019 OSU_FAILURE_UNKNOWN = 0; 3020 3021 // The reason code for Provisioning Failure due to connection failure to OSU AP. 3022 OSU_FAILURE_AP_CONNECTION = 1; 3023 3024 // The reason code for invalid server URL address. 3025 OSU_FAILURE_SERVER_URL_INVALID = 2; 3026 3027 // The reason code for provisioning failure due to connection failure to the server. 3028 OSU_FAILURE_SERVER_CONNECTION = 3; 3029 3030 // The reason code for provisioning failure due to invalid server certificate. 3031 OSU_FAILURE_SERVER_VALIDATION = 4; 3032 3033 // The reason code for provisioning failure due to invalid service provider. 3034 OSU_FAILURE_SERVICE_PROVIDER_VERIFICATION = 5; 3035 3036 // The reason code for provisioning failure when a provisioning flow is aborted. 3037 OSU_FAILURE_PROVISIONING_ABORTED = 6; 3038 3039 // The reason code for provisioning failure when a provisioning flow is not possible. 3040 OSU_FAILURE_PROVISIONING_NOT_AVAILABLE = 7; 3041 3042 // The reason code for provisioning failure due to invalid web url format for an OSU web page. 3043 OSU_FAILURE_INVALID_URL_FORMAT_FOR_OSU = 8; 3044 3045 // The reason code for provisioning failure when a command received is not the expected command 3046 // type. 3047 OSU_FAILURE_UNEXPECTED_COMMAND_TYPE = 9; 3048 3049 // The reason code for provisioning failure when a SOAP message is not the expected message 3050 // type. 3051 OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_TYPE = 10; 3052 3053 // The reason code for provisioning failure when a SOAP message exchange fails. 3054 OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11; 3055 3056 // The reason code for provisioning failure when a redirect listener fails to start. 3057 OSU_FAILURE_START_REDIRECT_LISTENER = 12; 3058 3059 // The reason code for provisioning failure when a redirect listener timed out to receive a HTTP 3060 // redirect response. 3061 OSU_FAILURE_TIMED_OUT_REDIRECT_LISTENER = 13; 3062 3063 // The reason code for provisioning failure when there is no OSU activity to listen to intent. 3064 OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 14; 3065 3066 // The reason code for provisioning failure when the status of a SOAP message is not the 3067 // expected message status. 3068 OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_STATUS = 15; 3069 3070 // The reason code for provisioning failure when there is no PPS MO. 3071 OSU_FAILURE_NO_PPS_MO = 16; 3072 3073 // The reason code for provisioning failure when there is no AAAServerTrustRoot node in a PPS 3074 // MO. 3075 OSU_FAILURE_NO_AAA_SERVER_TRUST_ROOT_NODE = 17; 3076 3077 // The reason code for provisioning failure when there is no TrustRoot node for remediation 3078 // server in a PPS MO. 3079 OSU_FAILURE_NO_REMEDIATION_SERVER_TRUST_ROOT_NODE = 18; 3080 3081 // The reason code for provisioning failure when there is no TrustRoot node for policy server in 3082 // a PPS MO. 3083 OSU_FAILURE_NO_POLICY_SERVER_TRUST_ROOT_NODE = 19; 3084 3085 // The reason code for provisioning failure when failing to retrieve trust root certificates 3086 // used for validating server certificate for AAA, Remediation and Policy server. 3087 OSU_FAILURE_RETRIEVE_TRUST_ROOT_CERTIFICATES = 20; 3088 3089 // The reason code for provisioning failure when there is no trust root certificate for AAA 3090 // server. 3091 OSU_FAILURE_NO_AAA_TRUST_ROOT_CERTIFICATE = 21; 3092 3093 // The reason code for provisioning failure when a {@link PasspointConfiguration} is failed to 3094 // install. 3095 OSU_FAILURE_ADD_PASSPOINT_CONFIGURATION = 22; 3096 3097 // The reason code for provisioning failure when an {@link OsuProvider} is not found for 3098 // provisioning. 3099 OSU_FAILURE_OSU_PROVIDER_NOT_FOUND = 23; 3100 } 3101 3102 // Number of passpoint provisioning success 3103 optional int32 num_provision_success = 1; 3104 3105 // Count for passpoint provisioning failure 3106 repeated ProvisionFailureCount provision_failure_count = 2; 3107 3108 // Number of occurrences of a specific passpoint provision failure code 3109 message ProvisionFailureCount { 3110 // Failure code 3111 optional ProvisionFailureCode failure_code = 1; 3112 3113 // Number of failure for the failure_code. 3114 optional int32 count = 2; 3115 } 3116} 3117 3118// Counts number of networks on the device that are metered. 3119message MeteredNetworkStats { 3120 // Number of networks that are set or detected as metered. 3121 optional int32 num_metered = 1 [default = 0]; 3122 3123 // Number of networks that are set or detected as unmetered. 3124 optional int32 num_unmetered = 2; 3125 3126 // Number of networks that have meteredOverride set to metered. 3127 optional int32 num_override_metered = 3; 3128 3129 // Number of networks that have meteredOverride set to unmetered. 3130 optional int32 num_override_unmetered = 4; 3131} 3132 3133// An event capturing user action on wifi 3134message UserActionEvent { 3135 enum EventType { 3136 // The default and unused event 3137 EVENT_UNKNOWN = 0; 3138 // User forgets the network 3139 EVENT_FORGET_WIFI = 1; 3140 // User manually triggers disconnect 3141 EVENT_DISCONNECT_WIFI = 2; 3142 // User changes the metered setting to "metered" 3143 EVENT_CONFIGURE_METERED_STATUS_METERED = 3; 3144 // User changes the metered setting to "unmetered" 3145 EVENT_CONFIGURE_METERED_STATUS_UNMETERED = 4; 3146 // User changes the mac randomization setting to use random MAC 3147 EVENT_CONFIGURE_MAC_RANDOMIZATION_ON = 5; 3148 // User changes the mac randomization setting to use factory MAC 3149 EVENT_CONFIGURE_MAC_RANDOMIZATION_OFF = 6; 3150 // User sets auto-connect to on 3151 EVENT_CONFIGURE_AUTO_CONNECT_ON = 7; 3152 // User sets auto-connect to off 3153 EVENT_CONFIGURE_AUTO_CONNECT_OFF = 8; 3154 // User toggles wifi on 3155 EVENT_TOGGLE_WIFI_ON = 9; 3156 // User toggles wifi off 3157 EVENT_TOGGLE_WIFI_OFF = 10; 3158 // User manually connects to a network 3159 EVENT_MANUAL_CONNECT = 11; 3160 // User changes the metered setting to "detect automatically" 3161 EVENT_CONFIGURE_METERED_STATUS_AUTO = 12; 3162 // User adds a new network or updates configurations for an existing network. 3163 EVENT_ADD_OR_UPDATE_NETWORK = 13; 3164 // User sets the adaptive connectivity to on 3165 EVENT_CONFIGURE_ADAPTIVE_CONNECTIVITY_ON = 14; 3166 // User sets the adaptive connectivity to off 3167 EVENT_CONFIGURE_ADAPTIVE_CONNECTIVITY_OFF = 15; 3168 } 3169 3170 // The type of user action 3171 optional EventType event_type = 1; 3172 3173 // The start time of the event in milliseconds since boot. 3174 optional int64 start_time_millis = 2; 3175 3176 // Additional information on the target network for the action. This is not applicable and will 3177 // be null for some actions such as EVENT_TOGGLE_WIFI_ON. 3178 optional TargetNetworkInfo target_network_info = 3; 3179 3180 // Information about the currently connected network. 3181 optional WifiStatus wifi_status = 4; 3182 3183 // Reasons why the network applicable for this user action is disabled. 3184 // Normally this should be referring to the currently connected network. 3185 // For a manual connection, this is referring to the user selected networks. 3186 optional NetworkDisableReason network_disable_reason = 5; 3187} 3188 3189message WifiStatus { 3190 // Wifi is connected. 3191 optional bool is_connected = 1; 3192 3193 // Wifi is validated 3194 optional bool is_validated = 2; 3195 3196 // The last observed RSSI 3197 optional sint32 last_rssi = 3; 3198 3199 // Estimated TX 3200 optional int32 estimated_tx_kbps = 4; 3201 3202 // Estimated RX 3203 optional int32 estimated_rx_kbps = 5; 3204 3205 // There is another candidate with better score, but user connect choice is preventing the switch. 3206 optional bool is_stuck_due_to_user_connect_choice = 6; 3207} 3208 3209// Additional information on a network 3210message TargetNetworkInfo { 3211 // Whether the network is an ephemeral network. 3212 optional bool is_ephemeral = 1; 3213 3214 // Whether the target is a passpoint network. 3215 optional bool is_passpoint = 2; 3216} 3217 3218// Reasons why a configuration or BSSID is disabled. 3219message NetworkDisableReason { 3220 enum DisableReason { 3221 // Default value, should not be used. 3222 REASON_UNKNOWN = 0; 3223 // AP unable to accept more clients, a special kind of association rejection failure. 3224 REASON_AP_UNABLE_TO_HANDLE_NEW_STA = 1; 3225 // No internet 3226 REASON_NETWORK_VALIDATION_FAILURE = 2; 3227 // Password is incorrect, a special kind of authentication failure. 3228 REASON_WRONG_PASSWORD = 3; 3229 // Incorrect EAP credentials. 3230 REASON_EAP_FAILURE = 4; 3231 // Other association rejection failures. 3232 REASON_ASSOCIATION_REJECTION = 5; 3233 // Associated timeout failures. 3234 REASON_ASSOCIATION_TIMEOUT = 6; 3235 // Other authentication failures. 3236 REASON_AUTHENTICATION_FAILURE = 7; 3237 // DHCP failures. 3238 REASON_DHCP_FAILURE = 8; 3239 // Device disconnected shortly after connection. 3240 REASON_ABNORMAL_DISCONNECT = 9; 3241 // AP initiated disconnect for a given duration. 3242 REASON_FRAMEWORK_DISCONNECT_MBO_OCE = 10; 3243 // Avoid connecting to the failed AP when trying to reconnect on other available candidates. 3244 REASON_FRAMEWORK_DISCONNECT_FAST_RECONNECT = 11; 3245 // The connected scorer has disconnected this network. 3246 REASON_FRAMEWORK_DISCONNECT_CONNECTED_SCORE = 12; 3247 // The network is disabled due to absence of user credentials 3248 REASON_AUTHENTICATION_NO_CREDENTIALS = 13; 3249 // The network is disabled because service is not subscribed, a special kind of EAP failure. 3250 REASON_AUTHENTICATION_NO_SUBSCRIPTION = 14; 3251 // User disabled auto-join for this network. 3252 REASON_AUTO_JOIN_DISABLED = 15; 3253 } 3254 3255 // The reason for disabling a network. 3256 optional DisableReason disable_reason = 1; 3257 3258 // The configuration is temporarily disabled. 3259 optional bool config_temporarily_disabled = 2; 3260 3261 // The configuration is disabled until the user manually re-enables it. 3262 optional bool config_permanently_disabled = 3; 3263 3264 // Reasons why 1 or more BSSIDs are temporarily disabled. 3265 repeated DisableReason bssid_disable_reasons = 4; 3266} 3267 3268// Number of networks with a large change of connection/disconnection 3269// failure rate or high failure rate at high RSSI 3270message HealthMonitorFailureStats { 3271 // Number of networks with a large change of (or high) association rejection rate 3272 optional int32 cnt_assoc_rejection = 1; 3273 // Number of networks with a large change of (or high) association timeout rate 3274 optional int32 cnt_assoc_timeout = 2; 3275 // Number of networks with a large change of (or high) auth failure rate 3276 optional int32 cnt_auth_failure = 3; 3277 // Number of networks with a large change of (or high) connection failure rate 3278 optional int32 cnt_connection_failure = 4; 3279 // Number of networks with a large change of (or high) nonlocal disconnection rate 3280 optional int32 cnt_disconnection_nonlocal = 5; 3281 // Number of networks with a large change of (or high) short disconnection rate 3282 optional int32 cnt_short_connection_nonlocal = 6; 3283} 3284 3285// Metrics collected by health monitor 3286message HealthMonitorMetrics { 3287 // Number of networks with a large increase (compared to stats of previous build) of 3288 // connection/disconnection failure rate 3289 optional HealthMonitorFailureStats failure_stats_increase = 1; 3290 // Number of networks with a large decrease (compared to stats of previous build) of 3291 // connection/disconnection failure rate 3292 optional HealthMonitorFailureStats failure_stats_decrease = 2; 3293 // Number of networks with high connection/disconnection failure rate for 3294 // current build but without sufficient connection attempts for previous build 3295 optional HealthMonitorFailureStats failure_stats_high = 3; 3296 // Number of networks with sufficient connection attempts for current build 3297 // but without suffcient connection attempts for previous build 3298 optional int32 num_network_sufficient_recent_stats_only = 4; 3299 // Number of networks with sufficient connection attempts for both current and previous builds 3300 optional int32 num_network_sufficient_recent_prev_stats = 5; 3301} 3302 3303// Connection duration statistics collected under various health conditions 3304// while Wifi link layer stats report are on 3305message ConnectionDurationStats { 3306 // Total time with sufficient Wifi throughput and with cellular data on 3307 optional int32 total_time_sufficient_throughput_ms = 1; 3308 // Total time with insufficient Wifi throughput and with cellular data on 3309 optional int32 total_time_insufficient_throughput_ms = 2; 3310 // Total time with cellular data off 3311 optional int32 total_time_cellular_data_off_ms = 3; 3312} 3313 3314// Wi-Fi off metrics 3315// Keeps track of Wi-Fi off stats 3316message WifiOffMetrics { 3317 // Total number of Wi-Fi off 3318 optional int32 num_wifi_off = 1; 3319 3320 // Total number of Wi-Fi off with deferring 3321 optional int32 num_wifi_off_deferring = 2; 3322 3323 // Total number of Wi-Fi off deferring timeout 3324 optional int32 num_wifi_off_deferring_timeout = 3; 3325 3326 // Histogram of wifi off deferring time 3327 repeated Int32Count wifi_off_deferring_time_histogram = 4; 3328} 3329 3330// SoftAp Config Limitation Metrics 3331message SoftApConfigLimitationMetrics { 3332 // Total number of softap security configuration reset to default because 3333 // hardware limitation when restore configuration from cloud 3334 optional int32 num_security_type_reset_to_default = 1; 3335 3336 // Total number of softap max client setting reset to default because 3337 // hardware limitation when restore configuration from cloud 3338 optional int32 num_max_client_setting_reset_to_default = 2; 3339 3340 // Total number of softap client control by user reset to default because 3341 // hardware limitation when restore configuration from cloud 3342 optional int32 num_client_control_by_user_reset_to_default = 3; 3343 3344 // Histogram of max client count when client connection fail because 3345 // setting limitation 3346 repeated Int32Count max_client_setting_when_reach_histogram = 4; 3347} 3348 3349// Channel utilization histogram 3350// The valid utilization range is between 0 and 255 corresponding to 3351// utilization ratio between 0 and 1 3352message ChannelUtilizationHistogram { 3353 // Histogram at 2G 3354 repeated HistogramBucketInt32 utilization_2g = 1; 3355 // Histogram above 2G 3356 repeated HistogramBucketInt32 utilization_above_2g = 2; 3357} 3358 3359// Throughput histogram 3360message ThroughputMbpsHistogram { 3361 // Tx histogram at 2G 3362 repeated HistogramBucketInt32 tx_2g = 1; 3363 // Tx histogram above 2G 3364 repeated HistogramBucketInt32 tx_above_2g = 2; 3365 // Rx histogram at 2G 3366 repeated HistogramBucketInt32 rx_2g = 3; 3367 // Rx histogram above 2G 3368 repeated HistogramBucketInt32 rx_above_2g = 4; 3369} 3370 3371// Initial Partial Scan stats 3372message InitPartialScanStats { 3373 // Total number of partial scans 3374 optional int32 num_scans = 1; 3375 3376 // Number of instances a partial scan results in finding a network 3377 optional int32 num_success_scans = 2; 3378 3379 // Number of instances a patial scan does not result in finding a network 3380 // and a follow up full scan finds a network. 3381 optional int32 num_failure_scans = 3; 3382 3383 // Histogram of number of channels used in a successful partial scan 3384 repeated HistogramBucketInt32 successful_scan_channel_count_histogram = 4; 3385 3386 // Histogram of number of channels used in a failed partial scan 3387 repeated HistogramBucketInt32 failed_scan_channel_count_histogram = 5; 3388} 3389 3390// User reaction to the carrier IMSI protection exemption UI 3391message UserReactionToApprovalUiEvent { 3392 enum UserActionCode { 3393 // UNKNOWN user action. 3394 ACTION_UNKNOWN = 0; 3395 // Action user allowed. 3396 ACTION_ALLOWED = 1; 3397 // Action user disallowed. 3398 ACTION_DISALLOWED = 2; 3399 // Action user dismiss. 3400 ACTION_DISMISS = 3; 3401 } 3402 message UserReaction { 3403 // User action to the UI. 3404 optional UserActionCode user_action = 1; 3405 // Is UI a dialog or notification. 3406 optional bool is_dialog = 2; 3407 } 3408 3409 // Event of user reaction to the app approval UI. 3410 repeated UserReaction user_approval_app_ui_reaction = 1; 3411 3412 // Event of user reaction to the carrier approval UI. 3413 repeated UserReaction user_approval_carrier_ui_reaction = 2; 3414} 3415 3416message CarrierWifiMetrics { 3417 // Number of successful network connection using Carrier ID 3418 optional int32 num_connection_success = 1; 3419 // Number of failed authentication from network connection using Carrier ID 3420 optional int32 num_connection_auth_failure = 2; 3421 optional int32 num_connection_non_auth_failure = 3; 3422} 3423