-
Notifications
You must be signed in to change notification settings - Fork 182
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
Unable to communicate on network when connected with no internet for android 11 and higher #352
Comments
Infact "registerWifiNetwork" works well but in the dart file we are always returning false as it's a void function. |
Same problem here ! |
I have just managed to make it work by doing: await disconnect(), await connect(), await forceWifiUsage() |
Even with the disconnect, connect then forceWifiUsage it does not work for me. |
@aminebagga There is a fix for returning proper response in PR #318 , almost ready to merge - you can point to it and test until released. |
I will test out the package with Android 12, and get back with result. Debugging such things is hard. Once I spent 2 days to debug a similar issue but turned out that the WiFi device (which was an embedded/IoT device) had power issue, so it would reboot when device would connect to it - this behaviour was not consistent as well. What I mean to say is, check whether there are no such other issues like wrong IP, etc - by connecting to the network independent of the package on PC to confirm if the issue is not in AP itself. |
I succeeded to upgrade my tablet to android 13 and still same issue and same behavior. |
@aminebagga @daadu Have you solved this problem? I've encountered it too. #356 |
Hi @Jay-57blocks, Only use register instead of connect, you will be able to communicate over your AP but still some issue with the register as we are not able to catch the dialog events |
@aminebagga thanks, do have you encountered this problem? #359 |
@Jay-57blocks not sure to have encountered this problem, but as I know, scanning wifi is limited on recent android versions, you have a max number of staring scans. |
@aminebagga I am unable to resolve/verify this as I don't have an Android 11 phone with me. Would urge you to debug it yourself, and see if it is "model specific" issue or in general issue with Android 11? |
@daadu yes I fix this issue using registerWifiNetwork instead of connect api but with these changes richirisu#1 |
@aminebagga Can you file a working PR for it - explaining clearly what the issue and the fix is? |
wifi_iot 0.3.18+1
withInternet false
android 12
I connect to an AP with no internet so withInternet = false, I accept the popup to connect to the wifi
then I can see a brief connected popup.
After the connect API I also call forceWifiUsage(true)
From the AP I can see that my phone is connected and I can even ping it
adb shell commands show also that I'm connected to the asked wifi
All seems to be ok, but I'm not able to communicate on the network, not even able to ping the gateway
Http requests failed with 111 errno
I/flutter ( 1481): Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 192.168.0.10, port = 40148
If my understanding of the android wifi specifications is correct, android offer 3 APIs to connect to wifi
Anyone can help to make it work please ? Any suggestations ? Should we really use registerWifiNetwork and how ?
The text was updated successfully, but these errors were encountered: