ThanosFisherman / WifiUtils

Easily Connect to WiFi Networks
Apache License 2.0
731 stars 188 forks source link

when i connect to a network it tele me timeout but connect success #114

Open willpyshan13 opened 2 years ago

willpyshan13 commented 2 years ago

in WifiConnectionReceiver

switch (state) { case COMPLETED: case FOUR_WAY_HANDSHAKE: //is it need to check if mScanResult is not empty it have a ssid and you can check the connect status? like this: // boolean isConnectWithResult = mScanResult!=null&&isAlreadyConnected2(mWifiManager,mScanResult.SSID); if (isConnectWithResult || isAlreadyConnected2(mWifiManager, ssid)) { mWifiConnectionCallback.successfulConnect(); } else if (isAlreadyConnected(mWifiManager, of(mScanResult).next(scanResult -> scanResult.BSSID).get())) { mWifiConnectionCallback.successfulConnect(); } break; case DISCONNECTED: if (supl_error == WifiManager.ERROR_AUTHENTICATING) { wifiLog("Authentication error..."); mWifiConnectionCallback.errorConnect(ConnectionErrorCode.AUTHENTICATION_ERROR_OCCURRED); } else { wifiLog("Disconnected. Re-attempting to connect..."); reEnableNetworkIfPossible(mWifiManager, mScanResult); } }

deng-yc commented 2 years ago

Same problem, My WiFi doesn't have the Internet

deng-yc commented 2 years ago

My WIFI is enabled SSID converge. 2.4GHz and 5GHz have the same SSID