docs » hs.wifi
Inspect WiFi networks
- Functions - API calls offered directly by the extension
- associate
- availableNetworks
- currentNetwork
- disassociate
- interfaceDetails
- interfaces
- setPower
- Constructors - API calls which return an object, typically one that offers API methods
- backgroundScan
- Methods - API calls which can only be made on an object returned by a constructor
- isDone
Signature | hs.wifi.associate(network, passphrase[, interface]) -> boolean |
---|---|
Type | Function |
Description | Connect the interface to a wireless network |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.wifi.availableNetworks([interface]) -> table |
---|---|
Type | Function |
Description | Gets a list of available WiFi networks |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.wifi.currentNetwork([interface]) -> string or nil |
---|---|
Type | Function |
Description | Gets the name of the current WiFi network |
Parameters |
|
Returns |
|
Signature | hs.wifi.disassociate([interface]) -> nil |
---|---|
Type | Function |
Description | Disconnect the interface from its current network. |
Parameters |
|
Returns |
|
Signature | hs.wifi.interfaceDetails([interface]) -> table |
---|---|
Type | Function |
Description | Returns a table containing details about the wireless interface. |
Parameters |
|
Returns |
|
Signature | hs.wifi.interfaces() -> table |
---|---|
Type | Function |
Description | Returns a list of interface names for WLAN devices attached to the system |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.wifi.setPower(state, [interface]) -> boolean |
---|---|
Type | Function |
Description | Turns a wifi interface on or off |
Parameters |
|
Returns |
|
Signature | hs.wifi.backgroundScan(fn, [interface]) -> scanObject |
---|---|
Type | Constructor |
Description | Perform a scan for available wifi networks in the background (non-blocking) |
Parameters |
|
Returns |
|
Notes |
|
Signature | hs.wifi:isDone() -> boolean |
---|---|
Type | Method |
Description | Returns whether or not a scan object has completed its scan for wireless networks. |
Parameters |
|
Returns |
|
Notes |
|