Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectToProtectedSSID fail to conect #12

Open
jpdarveau opened this issue Oct 22, 2018 · 5 comments
Open

connectToProtectedSSID fail to conect #12

jpdarveau opened this issue Oct 22, 2018 · 5 comments

Comments

@jpdarveau
Copy link

I am trying to use the connectToProtectedSSID function and I always get the connection failed alert on my android phone.

I am able to get the wifi list, the current SSID, etc...

Could I be missing some configuration somewhere?

Is there a specific way to send the SSID and Password to the function?

I am using a Oneplus 6 phone and on Android 9

If you need more info, let me know.

Thanks

@bntzio
Copy link

bntzio commented Nov 6, 2018

Provide code snippets, please.

@anton-shumanski
Copy link

anton-shumanski commented Nov 21, 2018

I have same problem.
I use:
react-native-cli: 2.0.1
react-native: 0.57.5
and test on samsung S8. The code is from the example:

let ssid = 'test';
let password = 'test';
WifiManager.connectToProtectedSSID(ssid, password, false)
.then(() => {
console.log('Connected successfully!')
}, () => {
console.log('Connection failed!')
})

Every time the result is "Connection failed"

@jnystrom
Copy link

anybody have a solution here? I am also seeing this problem.

@tosscaster
Copy link

Android, In RNWifiModule.java, line 186

Maybe, this is bug
connected = connectTo(result, password, ssid);
==>
connected = connectTo(result, password, ssid);
if (connected) { break; } <-- must be added

-> this may cause problems in some case

@7laria
Copy link

7laria commented May 30, 2019

it happen to me on iOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants