Comments (5)
@bigt11 Ahhh!! Thanks for reporting this!
So i'm going to do some testing myself, but it sounds to me like it may be an issue with the UID of the app changing on reboot, and with the new permissions on wifi in newer versions of Android, if the UID of the app does not match the UID that created the configuration, you won't be able to add or update it in any way.
Are you running this on an actual Android device, or are you running it on an emulator?
Can you please try using the demo project I created for testing and see if that gives you the same issue?
https://github.com/tripflex/WifiWizard2Demo
I just pushed an update last night that completely refactored how the connect
and disconnect
methods work (see README on 3.0.0 branch for more details)
The demo project has buttons for all the available methods, so that may help debug this further. In the meantime i'm going to do some of my own testing and will report back
from wifiwizard2.
I'll try your demo app and your latest code. I am using a dev version of chrome os on a chromebook that can do android apps.
from wifiwizard2.
@bigt11 that may be the problem but i'm honestly not sure, I know there are issues with trying to use this on emulated versions of android, and that may be the problem.
I just tested this on my personal Android 7.1.1 dev device and was unable to reproduce the issue using the WifiWizard2Demo project
I think the issue is actually with your code base you're using, if you look at where you're turning on wifi, you're not awaiting the promise to resolve before calling connect
So this:
WifiWizard2.setWifiEnabled(true);
should be this await WifiWizard2.setWifiEnabled(true);
Version 3.0.0 also introduces new methods, so instead of using await WifiWizard2.setWifiEnabled(true);
you could use await WifiWizard2.enableWifi();
You also don't need to turn on the wifi manually (you can if you want, but not required), the plugin will automagically turn on WiFi if you call a method that requires WiFi to be enabled
from wifiwizard2.
@bigt11 go ahead and reopen this if it's still an issue (just trying to keep issues clean so I can keep track of them)
from wifiwizard2.
I am re-opening this. I am using your 3.0.0 code commit 63c7748 with a 7.1 device. I have also tried your test app and the outcome is the same.
If I have a freshly restarted device, I can run
WifiWizard2.connect(ssid, bindAll, password, algorithm)
and it will connect to the ssid with the output below. It does connect,
03-14 15:26:00.628 162 179 D WifiService: Connection Successful
but in the logcat, it keeps counting up as it it got an IDLE signal.
03-14 15:26:59.777 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 60 out of 60
Here is the full output
fresh restart, 1st attemp to connect
it connects, but IDLE's out
03-14 15:25:51.795 162 179 D WifiService: Scan Completed
03-14 15:26:00.330 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:26:00.380 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:00.380 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:00.402 4206 4275 D WifiWizard2: WifiWizard2: verifyWifiEnabled entered.
03-14 15:26:00.402 4206 4275 D WifiWizard2: WifiWizard2: add entered.
03-14 15:26:00.403 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:00.403 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:00.449 4206 4275 D WifiWizard2: WifiWizard: Found max WiFi priority of 0
03-14 15:26:00.494 162 1022 D WifiService: SSID: "myssid" StrippedSSID: myssid
03-14 15:26:00.559 162 1022 D WifiService: Host returned Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8 for Ssid: "myssid"
03-14 15:26:00.567 4206 4275 W PluginManager: THREAD WARNING: exec() call to WifiWizard2.add blocked the main thread for 166ms. Plugin should use CordovaInterface.getThreadPool().
03-14 15:26:00.570 4206 4275 D WifiWizard2: WifiWizard2: verifyWifiEnabled entered.
03-14 15:26:00.570 4206 4275 D WifiWizard2: WifiWizard2: connect entered.
03-14 15:26:00.572 4206 4275 D WifiWizard2: Valid networkIdToConnect: attempting connection
03-14 15:26:00.572 4206 4275 D WifiWizard2: registerBindALL: registering net changed receiver
03-14 15:26:00.575 162 518 D WifiService: Disabling Id : Guid 0 : 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:26:00.575 162 1428 D WifiService: Trying to connect to Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:26:00.589 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 1 out of 60
03-14 15:26:00.618 162 179 D WifiService: Scan Completed
03-14 15:26:00.628 162 179 D WifiService: Connection Successful
03-14 15:26:01.590 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 2 out of 60
03-14 15:26:02.591 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 3 out of 60
03-14 15:26:03.592 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 4 out of 60
03-14 15:26:04.593 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 5 out of 60
03-14 15:26:05.594 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 6 out of 60
03-14 15:26:06.600 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 7 out of 60
03-14 15:26:07.604 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 8 out of 60
03-14 15:26:08.610 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 9 out of 60
03-14 15:26:09.615 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 10 out of 60
03-14 15:26:10.616 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 11 out of 60
03-14 15:26:11.617 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 12 out of 60
003-14 15:26:13.022 162 179 D WifiService: Scan Completed
03-14 15:26:13.628 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 14 out of 60
03-14 15:26:14.635 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 15 out of 60
03-14 15:26:15.332 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:26:15.408 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:15.408 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:15.437 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:15.437 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:15.636 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 16 out of 60
03-14 15:26:16.640 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 17 out of 60
03-14 15:26:17.644 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 18 out of 60
03-14 15:26:18.649 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 19 out of 60
03-14 15:26:19.651 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 20 out of 60
03-14 15:26:20.652 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 21 out of 60
03-14 15:26:21.653 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 22 out of 60
03-14 15:26:22.655 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 23 out of 60
03-14 15:26:23.019 162 179 D WifiService: Scan Completed
03-14 15:26:23.656 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 24 out of 60
03-14 15:26:24.662 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 25 out of 60
03-14 15:26:25.668 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 26 out of 60
03-14 15:26:26.672 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 27 out of 60
03-14 15:26:27.676 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 28 out of 60
03-14 15:26:28.681 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 29 out of 60
03-14 15:26:29.682 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 30 out of 60
03-14 15:26:30.329 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:26:30.387 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:30.388 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:30.411 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:30.411 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:30.684 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 31 out of 60
03-14 15:26:31.685 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 32 out of 60
03-14 15:26:32.685 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 33 out of 60
03-14 15:26:33.034 162 179 D WifiService: Scan Completed
03-14 15:26:33.686 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 34 out of 60
03-14 15:26:34.690 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 35 out of 60
03-14 15:26:35.694 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 36 out of 60
03-14 15:26:36.699 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 37 out of 60
03-14 15:26:37.704 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 38 out of 60
03-14 15:26:38.709 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 39 out of 60
03-14 15:26:39.711 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 40 out of 60
03-14 15:26:40.712 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 41 out of 60
03-14 15:26:41.714 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 42 out of 60
03-14 15:26:42.715 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 43 out of 60
03-14 15:26:43.030 162 179 D WifiService: Scan Completed
03-14 15:26:43.718 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 44 out of 60
03-14 15:26:44.725 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 45 out of 60
03-14 15:26:45.332 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:26:45.401 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:45.402 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:45.426 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:26:45.426 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:26:45.730 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 46 out of 60
03-14 15:26:46.735 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 47 out of 60
03-14 15:26:47.739 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 48 out of 60
03-14 15:26:48.743 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 49 out of 60
03-14 15:26:49.744 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 50 out of 60
03-14 15:26:50.745 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 51 out of 60
03-14 15:26:51.746 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 52 out of 60
03-14 15:26:52.748 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 53 out of 60
03-14 15:26:53.012 162 179 D WifiService: Scan Completed
03-14 15:26:53.752 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 54 out of 60
03-14 15:26:54.757 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 55 out of 60
03-14 15:26:55.761 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 56 out of 60
03-14 15:26:56.769 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 57 out of 60
03-14 15:26:57.771 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 58 out of 60
03-14 15:26:58.775 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 59 out of 60
03-14 15:26:59.777 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 60 out of 60
03-14 15:27:00.329 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:27:00.384 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:27:00.384 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:27:00.406 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:27:00.406 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:27:00.429 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:27:00.429 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:27:00.449 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:27:00.449 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:27:00.469 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:27:00.469 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:27:00.777 4206 4275 D WifiWizard2: WifiWizard: Network failed to finish connecting within the timeout
03-14 15:27:00.777 4206 4275 W PluginManager: THREAD WARNING: exec() call to WifiWizard2.connect blocked the main thread for 60208ms. Plugin should use CordovaInterface.getThreadPool().
03-14 15:27:00.785 4206 4206 D SystemWebChromeClient: : Error connecting to WiFi!
03-14 15:27:00.785 4206 4206 I chromium: [INFO:CONSOLE(783)] "Error connecting to WiFi!", source: (783)
No that is connected, If I run the same connect command again
WifiWizard2.connect(ssid, bindAll, password, algorithm)
with it already being connected, it will never connect again.
So it will connect after a fresh restart, but if you connect after it is already connected, it wont connect again. It seems like it disconnects but never successfully connects again.
Running the connect command a second time output is below.
already connected to the current ssid, and you try and connect again.
03-14 15:28:53.012 162 179 D WifiService: Scan Completed
03-14 15:28:58.763 4206 4206 D ViewRootImpl[MainActivity]: updatePointerIcon called with position out of bounds
03-14 15:29:00.329 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:29:00.387 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:00.387 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:00.410 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:00.410 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:00.799 4206 4275 D WifiWizard2: WifiWizard2: verifyWifiEnabled entered.
03-14 15:29:00.800 4206 4275 D WifiWizard2: WifiWizard2: add entered.
03-14 15:29:00.801 4206 4275 D WifiWizard2: WifiWizard: Found max WiFi priority of 1
03-14 15:29:00.802 162 551 D WifiService: Updating Id:Guid 0:9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.802 162 551 D WifiService: SSID: "myssid" StrippedSSID: myssid
03-14 15:29:00.819 162 551 D WifiService: Host returned Guid: cd5401bf-50c2-4f94-aa26-d7bae5fe7b40 for Ssid: "myssid"
03-14 15:29:00.819 162 551 D WifiService: Trying to remove network with Id: 0
03-14 15:29:00.824 162 551 E WifiService: Error removing configured network in the Host 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.824 162 551 D WifiService: Remove network failed for Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.824 162 551 E WifiService: Removing old configuration failed while updating Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.824 162 551 D WifiService: Trying to remove network with Id: 1
03-14 15:29:00.880 162 179 D WifiService: Scan Completed
03-14 15:29:00.912 162 551 I ArcNetworkIdMap: Removed GUID:Id cd5401bf-50c2-4f94-aa26-d7bae5fe7b40:1
03-14 15:29:00.913 4206 4275 W PluginManager: THREAD WARNING: exec() call to WifiWizard2.add blocked the main thread for 114ms. Plugin should use CordovaInterface.getThreadPool().
03-14 15:29:00.914 4206 4275 D WifiWizard2: WifiWizard2: verifyWifiEnabled entered.
03-14 15:29:00.915 4206 4275 D WifiWizard2: WifiWizard2: connect entered.
03-14 15:29:00.916 4206 4275 D WifiWizard2: Valid networkIdToConnect: attempting connection
03-14 15:29:00.916 4206 4275 D WifiWizard2: registerBindALL: registering net changed receiver
03-14 15:29:00.917 162 800 D WifiService: Disabling Id : Guid 0 : 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.917 162 544 D WifiService: Trying to connect to Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.918 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 1 out of 60
03-14 15:29:00.924 162 179 E WifiService: Error connecting to network 1
03-14 15:29:01.920 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 2 out of 60
03-14 15:29:02.921 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 3 out of 60
03-14 15:29:03.927 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 4 out of 60
03-14 15:29:04.930 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 5 out of 60
03-14 15:29:05.934 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 6 out of 60
03-14 15:29:06.936 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 7 out of 60
03-14 15:29:07.941 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 8 out of 60
03-14 15:29:08.942 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 9 out of 60
03-14 15:29:09.943 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 10 out of 60
03-14 15:29:10.944 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 11 out of 60
03-14 15:29:11.788 162 179 D WifiService: Scan Completed
03-14 15:29:11.945 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 12 out of 60
003-14 15:29:13.954 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 14 out of 60
03-14 15:29:14.959 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 15 out of 60
03-14 15:29:15.332 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:29:15.402 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:15.402 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:15.426 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:15.426 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:15.960 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 16 out of 60
03-14 15:29:16.963 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 17 out of 60
03-14 15:29:17.967 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 18 out of 60
03-14 15:29:18.970 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 19 out of 60
03-14 15:29:19.971 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 20 out of 60
03-14 15:29:20.972 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 21 out of 60
03-14 15:29:21.791 162 179 D WifiService: Scan Completed
03-14 15:29:21.973 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 22 out of 60
03-14 15:29:22.979 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 23 out of 60
03-14 15:29:23.985 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 24 out of 60
03-14 15:29:24.990 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 25 out of 60
03-14 15:29:25.996 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 26 out of 60
03-14 15:29:27.002 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 27 out of 60
03-14 15:29:28.006 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 28 out of 60
03-14 15:29:29.008 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 29 out of 60
03-14 15:29:30.009 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 30 out of 60
03-14 15:29:30.329 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:29:30.393 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:30.393 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:30.416 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:30.416 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:30.442 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:30.442 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:30.461 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:30.461 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:30.479 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:30.479 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:31.010 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 31 out of 60
03-14 15:29:31.790 162 179 D WifiService: Scan Completed
03-14 15:29:32.012 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 32 out of 60
03-14 15:29:33.015 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 33 out of 60
03-14 15:29:34.020 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 34 out of 60
03-14 15:29:35.024 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 35 out of 60
03-14 15:29:36.030 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 36 out of 60
03-14 15:29:37.031 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 37 out of 60
03-14 15:29:38.036 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 38 out of 60
03-14 15:29:39.037 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 39 out of 60
03-14 15:29:40.038 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 40 out of 60
03-14 15:29:41.039 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 41 out of 60
03-14 15:29:41.813 162 179 D WifiService: Scan Completed
03-14 15:29:42.040 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 42 out of 60
03-14 15:29:43.045 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 43 out of 60
03-14 15:29:44.046 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 44 out of 60
03-14 15:29:45.052 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 45 out of 60
03-14 15:29:45.332 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:29:45.397 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:45.397 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:45.420 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:29:45.420 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:29:46.059 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 46 out of 60
03-14 15:29:47.065 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 47 out of 60
03-14 15:29:48.070 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 48 out of 60
03-14 15:29:49.071 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 49 out of 60
03-14 15:29:50.072 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 50 out of 60
03-14 15:29:51.073 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 51 out of 60
03-14 15:29:51.788 162 179 D WifiService: Scan Completed
03-14 15:29:52.077 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 52 out of 60
03-14 15:29:53.083 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 53 out of 60
03-14 15:29:54.086 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 54 out of 60
03-14 15:29:55.090 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 55 out of 60
03-14 15:29:56.094 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 56 out of 60
03-14 15:29:57.098 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 57 out of 60
03-14 15:29:58.102 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 58 out of 60
03-14 15:29:59.104 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 59 out of 60
03-14 15:30:00.105 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 60 out of 60
03-14 15:30:00.329 3101 3277 W MDM : DataUsageCollector - planConfig == null. getIsWifiConnected: false. getIsMobileConnected: false
03-14 15:30:00.392 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:30:00.392 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:30:00.417 3101 3277 W MDM : StatsFactory - Interface [arc0] => Type [Mobile]
03-14 15:30:00.417 3101 3277 W MDM : StatsFactory - Interface [lo] => Type [LoopBack]
03-14 15:30:01.105 4206 4275 D WifiWizard2: WifiWizard: Network failed to finish connecting within the timeout
03-14 15:30:01.105 4206 4275 W PluginManager: THREAD WARNING: exec() call to WifiWizard2.connect blocked the main thread for 60191ms. Plugin should use CordovaInterface.getThreadPool().
03-14 15:30:01.116 4206 4206 D SystemWebChromeClient: Line 783 : Error connecting to WiFi!
03-14 15:30:01.116 4206 4206 I chromium: [INFO:CONSOLE(783)] "Error connecting to WiFi!", (783)
03-14 15:30:01.815 162 179 D WifiService: Scan Completed
So regardless, it seems like it gets the IDLE signal for me at all times even if it was successful.
The wild card it, that I tried this same code on a new 7.1 phone I bought (a different device completely, not the device giving me these errors) and the connect command seemed to work always regardless of if it was already connected to the same ssid. I did not get any logcat from that device, because it seemed to work.
I don't know what the connect command does differently running on an ssid that it is already connected to, but maybe a clue is somewhere in here
03-14 15:29:00.799 4206 4275 D WifiWizard2: WifiWizard2: verifyWifiEnabled entered.
03-14 15:29:00.800 4206 4275 D WifiWizard2: WifiWizard2: add entered.
03-14 15:29:00.801 4206 4275 D WifiWizard2: WifiWizard: Found max WiFi priority of 1
03-14 15:29:00.802 162 551 D WifiService: Updating Id:Guid 0:9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.802 162 551 D WifiService: SSID: "myssid" StrippedSSID: myssid
03-14 15:29:00.819 162 551 D WifiService: Host returned Guid: cd5401bf-50c2-4f94-aa26-d7bae5fe7b40 for Ssid: "myssid"
03-14 15:29:00.819 162 551 D WifiService: Trying to remove network with Id: 0
03-14 15:29:00.824 162 551 E WifiService: Error removing configured network in the Host 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.824 162 551 D WifiService: Remove network failed for Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.824 162 551 E WifiService: Removing old configuration failed while updating Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.824 162 551 D WifiService: Trying to remove network with Id: 1
03-14 15:29:00.880 162 179 D WifiService: Scan Completed
03-14 15:29:00.912 162 551 I ArcNetworkIdMap: Removed GUID:Id cd5401bf-50c2-4f94-aa26-d7bae5fe7b40:1
03-14 15:29:00.913 4206 4275 W PluginManager: THREAD WARNING: exec() call to WifiWizard2.add blocked the main thread for 114ms. Plugin should use CordovaInterface.getThreadPool().
03-14 15:29:00.914 4206 4275 D WifiWizard2: WifiWizard2: verifyWifiEnabled entered.
03-14 15:29:00.915 4206 4275 D WifiWizard2: WifiWizard2: connect entered.
03-14 15:29:00.916 4206 4275 D WifiWizard2: Valid networkIdToConnect: attempting connection
03-14 15:29:00.916 4206 4275 D WifiWizard2: registerBindALL: registering net changed receiver
03-14 15:29:00.917 162 800 D WifiService: Disabling Id : Guid 0 : 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.917 162 544 D WifiService: Trying to connect to Guid: 9d76e895-e920-470c-92e8-fdc8140b3ec8
03-14 15:29:00.918 4206 4275 D WifiWizard2: WifiWizard: Got IDLE on 1 out of 60
03-14 15:29:00.924 162 179 E WifiService: Error connecting to network 1
It seems to try and remove network id 0, then id 1. I know in your code, you increase the network ID number so maybe it is something with that.
from wifiwizard2.
Related Issues (20)
- wifiWizard2.scan() returns error "Uncaught (in promise) SCAN_FAILED" HOT 3
- Is WifiWizard2 still maintained? HOT 6
- Android 10 ( 29 ) is not supported - Connect to network, enable, disable and more.. HOT 45
- Empty Array in com.apple.developer.networking.networkextension prevents Apple Upload HOT 8
- I have a working version running on Android 10. I modified it by forking https://github.com/ViggoChavine/WifiWizard2 who already started work for API 29 and i added on top of it for my app feel free to use as a base or as is: https://github.com/VijayVaveHealth/WifiWizard2/.
- Android - SDK android-targetSdkVersion <= 28 HOT 20
- Consulting for this package? HOT 3
- Android 8 will fail when the phone is the first time(new) connect to the wifi network from the app directly.
- Android 10: online/offline problems via wifi plugin HOT 1
- when will the new version that support android 10 be released? HOT 1
- Version 3.3.0 for Android 10+ HOT 13
- Read saved wifi password
- Error: Plugin WifiWizard2 does not respond to method call add. Ensure plugin method exists and uses @objc in its declaration HOT 2
- ERROR_SETWIFIENABLED HOT 1
- Receive `null` from iOSConnectNetwork() when Cellular is enabled and Network is Saved HOT 2
- Unable to install the latest version of WifiWizard2 [Version 3.3.0] in Ionic Project
- Wifi with No Internet Disconnect after some time HOT 1
- internet access outside app
- How i connect to WIFI that requires username and passwoord?
- IOS 16 not get automatically SSID also not show subnet address and ipaddress
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifiwizard2.