Library wifi

To use this library in your code:

import net.wifi

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.