hoerresb / WifiWizard

A Cordova plugin for managing Wifi networks
Apache License 2.0
205 stars 178 forks source link

Unable to connect to open networks... #114

Open iPzard opened 7 years ago

iPzard commented 7 years ago

It seems like "" is not accepted in the event of no password. I've tried the following w/o success:

var config = WifiWizard.formatWifiConfig("xfinitywifi", ""); WifiWizard.addNetwork(config, function() { WifiWizard.connectNetwork("xfinitywifi"); });

Also, how would I declare a wildcard for the network name? I'd like my app to connect to any open network available if possible.

Steve-3d commented 6 years ago

You can leave out the password completely - internally the WifiWizard will handle this correctly using "NONE" as authentication method. Passing "NONE" and an empty password into formatWifiConfig is not supported, though.

To pick an existing SSID, you need to start a scan and then retrieve the results using getScanResults. The returned list can then be filtered using a regular expression and a matching SSID can be chosen.