associate method is used to associate (and connect) a device with a given WiFi network.
var request = navigator.mozWifiManager.associate(network);
Associating a secured network with the device requires setting some extra properties on the
network object passed to the method:
- For network with WEP encryption method:
wep: This property must be set with the proper password to access the network.
- For network with WPA-PSK encryption method:
psk: This property must be set with the proper password to access the network.
- For network with WPA-EAP encryption method:
eap: A string representing the EAP method to use.
password: A string representing the password to access the network.
identity: A string representing the identity to access the network.
pin: A string representing the pin code required to access the network.
It returns a
DOMRequest to handle the success or error of the operation. A successful operation means than the device enters the connection workflow to the provided network. The success or failure of the connection itself can be tracked through the
statuschange event by attaching an event handler to
Not part of any specification.
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.