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

Constant disconnect on OnePlus devices #63

Open
gadget-man opened this issue Apr 25, 2020 · 17 comments
Open

Constant disconnect on OnePlus devices #63

gadget-man opened this issue Apr 25, 2020 · 17 comments

Comments

@gadget-man
Copy link

I'm using the latest WifiUtils and it works OK on most devices, but whenever we try it on OnePlus on Android 10 the connection to the new WiFi network drops and gets stuck in a loop.

I've attached a video showing the behaviour on OnePlus8:
https://drive.google.com/open?id=1-vP8LR-rMQcaWBRugKhmPMZ8R2C-OabD

All I get in the logs when the 'Device to use with iParcelBox' pops up is the following:
D/WifiUtils: WifiUtils: AndroidQ+ connected to wifi V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 152 V/FA: Activity paused, time: 83058133 D/ViewRootImpl[MainActivity]: windowFocusChanged hasFocus=false inTouchMode=true D/DecorView: onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@527918c[MainActivity]

@Jasperben
Copy link

me too

@gadget-man
Copy link
Author

I'm wondering whether this is somehow linked to the below, which I can't see implemented in WifiUtils anywhere (if it's even relevant)
https://developer.android.com/guide/topics/connectivity/wifi-suggest

@ThanosFisherman
Copy link
Owner

ThanosFisherman commented Apr 25, 2020

I will have to look into it. The annoying thing is that Wifi behavior differs across different devices and since I do not own an OnePlus to test it I will have to guess and generally code in blind.

@gadget-man
Copy link
Author

I think it may be an issue with OxygenOS on OnePlus Devices:
https://issuetracker.google.com/issues/143549613

@eliaslecomte
Copy link
Contributor

I am having the same issue and also looking into it.

@eliaslecomte
Copy link
Contributor

I'm wondering whether this is somehow linked to the below, which I can't see implemented in WifiUtils anywhere (if it's even relevant)
https://developer.android.com/guide/topics/connectivity/wifi-suggest

At the moment this api is not used. For android 10 there are 2 approaches. A new api to temporary connect to a wifi access point (setup of IoT devices) and this suggestion api.

@gadget-man
Copy link
Author

My use case it temporary connection to an IoT device for provisioning purposes. It works on most devices, just not OnePlus. I did manage to do something on one device and it started working fine (no idea what!), but after a factory reset, the device reverted to the error state originally described above. I've submitted a bug report to OnePlus and google as it seems to be on their side rather than @ThanosFisherman

@eliaslecomte
Copy link
Contributor

If you can link your bug reports pls do. I am also using this library for IoT provisioning. Do notice there is an issue with 1.5.1 & android 10. Better use 1.5.0 or the next release (#66).

@gadget-man
Copy link
Author

Sure:
https://issuetracker.google.com/issues/143549613
https://forums.oneplus.com/threads/wifinetworkspecifier-immediately-drops-connection.1219734/

I'm using 1.6.0
Note your comment about bindProcess being required - I'd prefer that this wasn't in the library - it's useful when you connect to the iOT device, but after provisioning is complete and you want to reconnect to the original wifi network, you don't want to necessarily bind to that network. I therefore call a seperate bind process function outside the lib and only bind if and when I'm connecting to the IoT AP. Perhaps it could be included with an optional flag?

@eliaslecomte
Copy link
Contributor

eliaslecomte commented May 1, 2020

How do you disconnect from the IoT device? Or does it terminate by itself?

For IoT device I understand that it's required, but it also isn't possible to do api calls if the AP does have internet connectivity. By disconnecting via the library it should remove the bind.

@gadget-man
Copy link
Author

My IoT device does a reboot, so the connection get terminated.

@JavaDeveloper08
Copy link

@gadget-man did you solve the problem?. I am facing with same problem in your video. I am using OnePlus7 Pro device.

@gadget-man
Copy link
Author

No, it appears that it is a bug in either OxygenOS or Android 10. It affects all OnePlus devices, and possibly also Samsung S7 edge (we're trying to verify). I've raised a bug report on both Android and OnePlus and have provided logs etc, but still waiting for resolution.

@qcasey
Copy link

qcasey commented Jun 1, 2020

I'm hoping 10.3.3 Oxygen OS silently fixes this, but I won't hold my breath. Has anyone tried this issue against the latest stable release?

@gadget-man
Copy link
Author

I'm on 10.5.6.IN21BA and it's still an issue.

@qcasey
Copy link

qcasey commented Jun 1, 2020

Good to know, thanks.

@eliaslecomte
Copy link
Contributor

eliaslecomte commented Aug 17, 2020

This is fixed on OxygenOS starting 10.5.7.IN21BA (Oneplus 8).

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