Libraries
bignum
binary
bitmap
ble
bytes
core
crypto
device
ec618
encoding
esp32
expect
fixed-point
flash
font
gpio
i2c
i2s
icons
io
line-wrap
log
math
monitor
net
cellular
ethernet
ip-address
modules
socket-address
tcp
udp
wifi
x509
pulse-counter
reader
reader-writer
rmt
serial
spi
statistics
system
tls
uart
uuid
writer
zlib
Library wifi
To use this library in your code:
import net.wifi
Classes
AccessPoint
Client
Globals
CONFIG-BROADCAST
CONFIG-CHANNEL
CONFIG-PASSWORD
CONFIG-SCAN-CHANNELS
CONFIG-SCAN-PASSIVE
CONFIG-SCAN-PERIOD
CONFIG-SSID
SCAN-AP-AUTHMODE
SCAN-AP-BSSID
SCAN-AP-CHANNEL
SCAN-AP-RSSI
SCAN-AP-SSID
Functions
configure
--ssid/
string
--password/
string
->
none
Configure the WiFi service to connect using the given
ssid
and
password
credentials by default.
The new defaults will take effect on the next call to
open
that where no configuration is explicitly provided.
Use
open --ssid --password --save
to configure the WiFi service only after verifying that connecting succeeds.
configure
config/
Map
->
none
Configure the WiFi service's default way of connecting to an access point. The
config
contains entries for the credentials such as ssid and password.
The new defaults will take effect on the next call to
open
that where no configuration is explicitly provided.
Use
configure --reset
to reset the stored configuration.
configure
--reset/
True
->
none
Reset the stored WiFi configuration and go back to using the WiFi credentials embedded in the firmware image.
establish
--ssid/
string
--password/
string
--name/
string
=
null
--broadcast/
bool
=
true
--channel/
int
=
1
->
Client
Establishes a soft AP with the given
ssid
and
password
credentials.
If the
password
is the empty string, the AP will be open.
establish
config/
Map
--name/
string
=
null
->
Client
Variant of
establish --ssid --password
that takes a configuration map instead of individual arguments.
open
--ssid/
string
--password/
string
--name/
string
=
null
--save/
bool
=
false
->
Client
open
config/
Map
--name/
string
=
null
--save/
bool
=
false
->
Client
scan
channels/
ByteArray
--passive/
bool
=
false
--period-per-channel-ms/
int
=
SCAN-TIMEOUT-MS_
->
List
Scans the given
channels
for access points and returns a list of the found access points.
The
channels
must be a byte-array, where each byte represents a channel number. Channels must be in the range 1-14.
Returns a list of
AccessPoint
objects.