WIFI

CONSTANTS

wifi.STATION, wifi.SOFTAP, wifi.STATIONAP


wifi.setmode()

Description

Set WIFI operation mode.

Syntax

wifi.setmode(mode)

Parameters

mode: wifi.STATION, wifi.SOFTAP or wifi.STATIONAP

Returns

nil

Example

wifi.setmode(wifi.STATION)
wifi.config("SSID", "PASSWORD")

See also

– wifi.config()


wifi.config()

Description

Set the SSID and password for the station mode.

Syntax

wifi.config(ssid, password)

Parameters

ssid: string (length <= 32). password: string (length <= 64).

Returns

nil

Example

wifi.setmode(wifi.STATION)
wifi.config("SSID", "PASSWORD")

See also

– wifi.setmode()
– wifi.getip()


wifi.getip()

Description

Get the IP address of the Node.

Syntax

wifi.getip()

Returns

string: the IP address

Example

print(wifi.getip())

See also

– wifi.config()