ThanosFisherman / WifiUtils

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

error when connect use bssid #110

Open eggysudianto opened 3 years ago

eggysudianto commented 3 years ago

when I use ssid can connect to wifi, but when I add bssid return error DID_NOT_FIND_NETWORK_BY_SCANNING. how to fix that?

 WifiUtils.withContext(getApplicationContext())
                        .connectWith("MARS","C3:AE:34:48:E8:02", "pluto")
                        .onConnectionResult(new ConnectionSuccessListener() {
                            @Override
                            public void success() {
                                Toast.makeText(MainActivity.this, "SUCCESS!", Toast.LENGTH_SHORT).show();
                            }

                            @Override
                            public void failed(@NonNull ConnectionErrorCode errorCode) {
                                Toast.makeText(MainActivity.this, "EPIC FAIL!" + errorCode.toString(), Toast.LENGTH_SHORT).show();
                            }
                        })
                        .start();
RUHULRUHUL commented 1 year ago

"C3:AE:34:48:E8:02" maybe it is a Static value make sure your device mac Address (Bssid)