[Nexus 7 Q&A, Help & Troubleshooting] evlo:
I tried my 2012 Nexus7 grouper after about year or two and it did not connect to my wifi. So reinstalled it - put on latest twrp, and then latest AOSP build (https://xdaforums.com/nexus-7/development/rom-android-7-aosp-grouper-t3467514) with google play and it still does not connect - it just quickly goes over save - connecting - authenticating - saved.

It is old device, so it can be hardware failure, but why would it be able to scan networks and not to connect.

I tried upc wifree from neighbors that use different router and it is same.

05-13 23:02:28.239 514 585 D WifiService: Connect with configID: 0 SSID: "blah" PROVIDER-NAME: null BSSID: null FQDN: null PRIO: 1 HIDDEN: false
05-13 23:02:28.239 514 585 D WifiService: NetworkSelectionStatus NETWORK_SELECTION_ENABLED
05-13 23:02:28.239 514 585 D WifiService: hasEverConnected: false
05-13 23:02:28.239 514 585 D WifiService: KeyMgmt: WPA_PSK Protocols: WPA RSN
05-13 23:02:28.239 514 585 D WifiService: AuthAlgorithms:
05-13 23:02:28.239 514 585 D WifiService: PairwiseCiphers: TKIP CCMP
05-13 23:02:28.239 514 585 D WifiService: GroupCiphers: TKIP CCMP
05-13 23:02:28.239 514 585 D WifiService: PSK: *
05-13 23:02:28.239 514 585 D WifiService: Enterprise config:
05-13 23:02:28.239 514 585 D WifiService: altsubject_match NULL
05-13 23:02:28.239 514 585 D WifiService: password <removed>
05-13 23:02:28.239 514 585 D WifiService: ca_path NULL
05-13 23:02:28.239 514 585 D WifiService: subject_match NULL
05-13 23:02:28.239 514 585 D WifiService: engine 0
05-13 23:02:28.239 514 585 D WifiService: client_cert NULL
05-13 23:02:28.239 514 585 D WifiService: ca_cert NULL
05-13 23:02:28.239 514 585 D WifiService: anonymous_identity NULL
05-13 23:02:28.239 514 585 D WifiService: identity NULL
05-13 23:02:28.239 514 585 D WifiService: key_id NULL
05-13 23:02:28.239 514 585 D WifiService: domain_suffix_match NULL
05-13 23:02:28.239 514 585 D WifiService: engine_id NULL
05-13 23:02:28.239 514 585 D WifiService: IP config:
05-13 23:02:28.239 514 585 D WifiService: IP assignment: DHCP
05-13 23:02:28.239 514 585 D WifiService: Proxy settings: NONE
05-13 23:02:28.239 514 585 D WifiService: networkSelectionBSSID=any cuid=1000 cname=android.uid.system:1000 luid=1000 lname=android.uid.system:1000 lcuid=-1 userApproved=USER_APPROVED noInternetAccessExpected=false isCarrierNetwork=false roamingFailureBlackListTimeMilli: 1000
05-13 23:02:28.239 514 585 D WifiService: triggeredLow: 0 triggeredBad: 0 triggeredNotHigh: 0
05-13 23:02:28.239 514 585 D WifiService: ticksLow: 0 ticksBad: 0 ticksNotHigh: 0
05-13 23:02:28.239 514 585 D WifiService: triggeredJoin: 0
05-13 23:02:28.240 514 586 D WifiStateMachine: CONNECT_NETWORK updating existing config with id=0 configKey="v"WPA_PSK
05-13 23:02:28.305 514 1608 D WifiNetworkHistory: saving network history: "v"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:2 nid:0 hasEverConnected: false
05-13 23:02:28.305 514 1608 V WifiNetworkHistory: writeKnownNetworkHistory write config "v"WPA_PSK
05-13 23:02:28.334 514 586 I WifiConnectivityManager: connectToUserSelectNetwork: netId=0 persist=true
05-13 23:02:28.359 514 1610 D WifiNetworkHistory: saving network history: "v"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:2 nid:0 hasEverConnected: false
05-13 23:02:28.359 514 1610 V WifiNetworkHistory: writeKnownNetworkHistory write config "v"WPA_PSK
05-13 23:02:28.362 514 586 I WifiConnectivityManager: scheduleWatchdogTimer
05-13 23:02:28.804 514 586 D WifiStateMachine: CMD_AUTO_CONNECT sup state DisconnectedState my state DisconnectedState nid=0 roam=false
05-13 23:02:28.807 514 586 D WifiStateMachine: CMD_AUTO_CONNECT will save config -> "v" nid=0
05-13 23:02:28.864 514 1616 D WifiNetworkHistory: saving network history: "v"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:2 nid:0 hasEverConnected: false
05-13 23:02:28.864 514 1616 V WifiNetworkHistory: writeKnownNetworkHistory write config "v"WPA_PSK
05-13 23:02:28.889 514 586 D WifiStateMachine: CMD_AUTO_CONNECT did save config -> nid=0
05-13 23:02:28.892 514 1617 D WifiNetworkHistory: saving network history: "v"WPA_PSK gw: null Network Selection-status: NETWORK_SELECTION_ENABLED ephemeral=false choice:null link:0 status:2 nid:0 hasEverConnected: false
05-13 23:02:28.892 514 1617 V WifiNetworkHistory: writeKnownNetworkHistory write config "v"WPA_PSK
05-13 23:02:28.893 710 710 I wpa_supplicant: wlan0: Trying to associate with 2c:56:dc:d0:c2:d8 (SSID='blah' freq=2427 MHz)
05-13 23:02:29.195 710 710 I wpa_supplicant: wlan0: Associated with 2c:56:dc:d0:c2:d8
05-13 23:02:29.195 710 710 I wpa_supplicant: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
05-13 23:02:29.225 710 710 I wpa_supplicant: wlan0: WPA: Key negotiation completed with 2c:56:dc:d0:c2:d8 [PTK=CCMP GTK=CCMP]
05-13 23:02:29.225 710 710 I wpa_supplicant: wlan0: CTRL-EVENT-CONNECTED - Connection to 2c:56:dc:d0:c2:d8 completed [id=0 id_str=%7B%22creatorUid%22%3A%221000%22%2C%22configKey%22%3A%22%5C%22v%5C%22WPA_PSK%22%7D]
05-13 23:02:29.233 710 710 W wpa_supplicant: wlan0: WPA: Failed to configure IGTK to the driver
05-13 23:02:29.233 710 710 I wpa_supplicant: wlan0: RSN: Failed to configure IGTK
05-13 23:02:29.241 710 710 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=2c:56:dc:d0:c2:d8 reason=1 locally_generated=1
05-13 23:02:29.248 514 586 D ConnectivityService: registerNetworkAgent NetworkAgentInfo{ ni{[type: WIFI[], state: CONNECTING/CONNECTING, reason: (unspecified), extra: "v", failover: false, available: true, roaming: false, metered: false]} network{103} nethandle{442398067422} lp{{InterfaceName: wlan0 LinkAddresses: [fe80::3285:a9ff:fe5f:e317/64,] Routes: [fe80::/64 -> :: wlan0,] DnsAddresses: [] Domains: null MTU: 0 TcpBufferSizes: 524288,1048576,2097152,262144,524288,1048576}} nc{[ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps]} Score{20} everValidated{false} lastValidated{false} created{false} lingering{false} explicitlySelected{false} acceptUnvalidated{false} everCaptivePortalDetected{false} lastCaptivePortalDetected{false} }
05-13 23:02:29.249 514 590 D ConnectivityService: NetworkAgentInfo [WIFI () - 103] EVENT_NETWORK_INFO_CHANGED, going from null to CONNECTING
05-13 23:02:29.264 514 586 D WifiHAL : Getting APF capabilities, halHandle = 0x56c6f1e0
05-13 23:02:29.264 514 586 I WifiHAL :
05-13 23:02:29.264 514 586 I WifiHAL : createRequest: APF get capabilities request
05-13 23:02:29.265 514 586 I WifiHAL : Request Response failed for APF, result = -95
05-13 23:02:29.271 514 586 D WifiStateMachine: Start Dhcp Watchdog 4
05-13 23:02:29.275 514 586 D WifiStateMachine: updateCapabilities for config:vfalse,false
05-13 23:02:29.278 514 586 D WifiHAL : Start get packet fate command
05-13 23:02:29.278 514 586 D WifiHAL : createRequest Get Tx packet fate request
05-13 23:02:29.278 514 586 E WifiHAL : Failed to register get pkt fate response; result = -95
05-13 23:02:29.278 514 586 E WifiNative-HAL: getTxPktFatesNative returned -95
05-13 23:02:29.279 514 586 D WifiHAL : Start get packet fate command
05-13 23:02:29.279 514 586 D WifiHAL : createRequest Get Rx packet fate request
05-13 23:02:29.279 514 586 E WifiHAL : Failed to register get pkt fate response; result = -95
05-13 23:02:29.279 514 586 E WifiNative-HAL: getRxPktFatesNative returned -95
05-13 23:02:29.279 514 586 D WifiNative-HAL: stopRssiMonitoring, cmdId 0
05-13 23:02:29.289 514 586 I WifiConnectivityManager: scheduleWatchdogTimer
05-13 23:02:29.293 514 586 D WifiNative-wlan0: configureNeighborDiscoveryOffload(true)
05-13 23:02:29.294 514 590 D ConnectivityService: NetworkAgentInfo [WIFI () - 103] EVENT_NETWORK_INFO_CHANGED, going from CONNECTING to DISCONNECTED
05-13 23:02:29.294 514 586 D WifiNative-wlan0: configureNeighborDiscoveryOffload(true) returned: -95
05-13 23:02:29.294 514 590 D ConnectivityService: NetworkAgentInfo [WIFI () - 103] got DISCONNECTED, was satisfying 0
05-13 23:02:29.300 514 587 D DhcpClient: doQuit
05-13 23:02:29.304 514 586 D WifiNetworkAgent: NetworkAgent: NetworkAgent channel lost
05-13 23:02:29.335 514 1623 D DhcpClient: Receive thread started
05-13 23:02:29.336 514 1623 D DhcpClient: Receive thread stopped
05-13 23:02:29.379 514 1621 D DhcpClient: onQuitting
05-13 23:02:29.387 211 497 E Netd : Failed to destroy IPv6 sockets on fe80::3285:a9ff:fe5f:e317: No such file or directory
05-13 23:02:29.387 211 497 E Netd : Error destroying sockets: Unknown error -2
05-13 23:02:29.391 211 505 D CommandListener: Clearing all IP addresses on wlan0