intval3/lib/wifi/Readme.md

3.3 KiB

Wifi

Class representing the wifi features

Kind: global class

wifi.list(callback)

List available wifi access points

Kind: instance method of Wifi

Param Type Description
callback function Function which gets invoked after list is returned

wifi._readConfigCb(err, data)

(internal function) Invoked after config file is read, then invokes file write on the config file

Kind: instance method of Wifi

Param Type Description
err object (optional) Error object only present if problem reading config file
data string Contents of the config file

wifi._writeConfigCb(err)

(internal function) Invoked after config file is written, then executes reconfiguration command

Kind: instance method of Wifi

Param Type Description
err object (optional) Error object only present if problem writing config file

wifi._reconfigureCb(err, stdout, stderr)

(internal function) Invoked after reconfiguration command is complete

Kind: instance method of Wifi

Param Type Description
err object (optional) Error object only present if configuration command fails
stdout string Standard output from reconfiguration command
stderr string Error output from command if fails

wifi._refreshCb(err, stdout, stderr)

(internal function) Invoked after wifi refresh command is complete

Kind: instance method of Wifi

Param Type Description
err object (optional) Error object only present if refresh command fails
stdout string Standard output from refresh command
stderr string Error output from command if fails

wifi.setNetwork(ssid, pwd, callback)

Function which initializes the processes for adding a wifi access point authentication

Kind: instance method of Wifi

Param Type Description
ssid string SSID of network to configure
pwd string Password of access point, plaintext
callback function Function invoked after process is complete, or fails

wifi.getNetwork(callback)

Executes command which gets the currently connected network

Kind: instance method of Wifi

Param Type Description
callback function Function which is invoked after command is completed