You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When called, this function places the ESP8266 in station mode. This means that we will not be an access point.
140
140
Once done, we then connect to the named access point using the network and password parameters supplied by `ssid` and `password`. The optional callback is a function that is invoked when an IP address has been assigned to us meaning that we are now ready for TCP/IP based work.
@@ -146,10 +146,8 @@ Once done, we then connect to the named access point using the network and passw
146
146
147
147
The `options` object can contain the following optional properties:
148
148
149
-
*`autoConnect` - A boolean value. When `true`, a reconnect to the supplied access point
150
-
will be performed each time the ESP8266 boots. When `false`, reconnection to the access point will not
151
-
be attempted when the device boots. When not set, the current `autoConnect` settings will be
152
-
maintained.
149
+
*`default` - A boolean value. When `true`, a reconnect to the supplied access point
150
+
will be performed each time the ESP8266 boots.
153
151
*`dnsServers` - An array of strings. Specify an array of up to two IP addresses supplied as
154
152
dotted decimal strings. Each entry represents the server address of a DNS server to be used for
Become an access point for the network supplied by `ssid` with a password of `password`. If no
182
180
password is supplied or is null, then the access point is considered open and be connected to by
@@ -186,6 +184,7 @@ eight characters in size.
186
184
The `options` allows us to supply options.
187
185
188
186
*`authMode` - The authentication mode to use. Can be one of `open`, `wpa2`, `wpa` or `wpa_wpa2`. If not supplied then the value will be `wpa2` if a password is supplied and `open` if no password is supplied.
187
+
*`default` - If true then we will automatically be an access point at boot time. The default is false in which case the current boot settings will be maintained.
189
188
190
189
The `callback` is a a function with the following signature:
191
190
@@ -198,14 +197,20 @@ The `err` parameter is an object with properties of `errorCode` and `errorMessag
198
197
##wifi.disconnect
199
198
Disconnect the ESP8266 from the access point.
200
199
201
-
`wifi.disconnect(callback)`
200
+
`wifi.disconnect([options [,callback]])`
202
201
203
202
For example:
204
203
205
204
var wifi = require("wifi");
206
205
// ... connect ...
207
206
wifi.disconnect();
208
207
208
+
The optional `options` is a JavaScript object that controls the operation of this function. It
209
+
may be `null` if not needed. If supplied, it may contain the following properties:
210
+
211
+
*`default` - A boolean which, if set to true, will result in the device not attempt to connect on
212
+
subsequent boots.
213
+
209
214
The optional `callback` function will be invoked when the disconnect outcome is known. The signature of
210
215
the callback function is:
211
216
@@ -266,11 +271,16 @@ For example:
266
271
267
272
Don't be an access point any longer.
268
273
269
-
`wifi.stopAP([callback])`
274
+
`wifi.stopAP([options[,callback]])`
270
275
271
276
If we are playing the role of an access point, stop performing that function. Connected stations will be
272
277
disconnected and we will no longer be visible as a WiFi network.
273
278
279
+
The `options` is a JavaScript object controlling the options for the function. It may be `null`. The
280
+
following properties are honored:
281
+
282
+
*`default` - A boolean. If set to true, then the access point will not be started at boot time.
283
+
274
284
The optional `callback` is a callback function to be invoked when the device is no longer an
0 commit comments