- Source
Methods
addWifiNetwork(optionsopt) → {Promise.<(null|LuCI.network.WifiNetwork)>}
Adds a new wireless network associated with this radio device to the configuration and sets its options to the provided values.
| Name | Type | Attributes | Description |
|---|---|---|---|
options | Object.<string, (string|Array.<string>)> | <optional> | The options to set for the newly added wireless network. |
- Source
Returns a promise resolving to a WifiNetwork instance describing the newly added wireless network or null if the given options were invalid.
- Type:
- Promise.<(null|LuCI.network.WifiNetwork)>
deleteWifiNetwork(network) → {Promise.<boolean>}
Deletes the wireless network with the given name associated with this radio device.
| Name | Type | Description |
|---|---|---|
network | string | The name of the wireless network to look up. This may be either an uci configuration section ID, a network ID in the form |
- Source
Returns a promise resolving to true when the wireless network was successfully deleted from the configuration or false when the given network could not be found or if the found network was not associated with this wireless radio device.
- Type:
- Promise.<boolean>
get(opt) → {null|string|Array.<string>}
Read the given UCI option value of this wireless device.
| Name | Type | Description |
|---|---|---|
opt | string | The UCI option name to read. |
- Source
Returns the UCI option value or null if the requested option is not found.
- Type:
- null |
string | Array.<string>
getHTModes() → {Array.<string>}
Gets a list of supported htmodes.
The htmode values describe the wide-frequency options supported by the wireless phy.
- Source
Returns an array of valid htmode values for this radio. Currently known mode values are:
HT20- applicable to IEEE 802.11n, 20 MHz wide channelsHT40- applicable to IEEE 802.11n, 40 MHz wide channelsVHT20- applicable to IEEE 802.11ac, 20 MHz wide channelsVHT40- applicable to IEEE 802.11ac, 40 MHz wide channelsVHT80- applicable to IEEE 802.11ac, 80 MHz wide channelsVHT160- applicable to IEEE 802.11ac, 160 MHz wide channelsHE20- applicable to IEEE 802.11ax, 20 MHz wide channelsHE40- applicable to IEEE 802.11ax, 40 MHz wide channelsHE80- applicable to IEEE 802.11ax, 80 MHz wide channelsHE160- applicable to IEEE 802.11ax, 160 MHz wide channelsEHT20- applicable to IEEE 802.11be, 20 MHz wide channelsEHT40- applicable to IEEE 802.11be, 40 MHz wide channelsEHT80- applicable to IEEE 802.11be, 80 MHz wide channelsEHT160- applicable to IEEE 802.11be, 160 MHz wide channelsEHT320- applicable to IEEE 802.11be, 320 MHz wide channels
- Type:
- Array.<string>
getHWModes() → {Array.<string>}
Gets a list of supported hwmodes.
The hwmode values describe the frequency band and wireless standard versions supported by the wireless phy.
- Source
Returns an array of valid hwmode values for this radio. Currently known mode values are:
a- Legacy 802.11a mode, 5 GHz, up to 54 Mbit/sb- Legacy 802.11b mode, 2.4 GHz, up to 11 Mbit/sg- Legacy 802.11g mode, 2.4 GHz, up to 54 Mbit/sn- IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/sac- IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/sax- IEEE 802.11ax mode, 2.4 or 5 GHz- 'be' - IEEE 802.11be mode, 2.4, 5 or 6 GHz
- Type:
- Array.<string>
getI18n() → {string}
Get a string describing the wireless radio hardware.
- Source
Returns the description string.
- Type:
- string
getName() → {string}
Get the configuration name of this wireless radio.
- Source
Returns the UCI section name (e.g. radio0) of the corresponding radio configuration, which also serves as a unique logical identifier for the wireless phy.
- Type:
- string
getScanList() → {Promise.<Array.<LuCI.network.WifiScanResult>>}
Trigger a wireless scan on this radio device and obtain a list of nearby networks.
- Source
Returns a promise resolving to an array of scan result objects describing the networks found in the vicinity.
- Type:
- Promise.<Array.<LuCI.network.WifiScanResult>>
getWifiNetwork(network) → {Promise.<LuCI.network.WifiNetwork>}
Get the wifi network of the given name belonging to this radio device
| Name | Type | Description |
|---|---|---|
network | string | The name of the wireless network to look up. This may be either an uci configuration section ID, a network ID in the form |
- Source
Returns a promise resolving to a Network.WifiNetwork instance representing the wireless network and rejecting with null if the given network could not be found or is not associated with this radio device.
- Type:
- Promise.<LuCI.network.WifiNetwork>
getWifiNetworks() → {Promise.<Array.<LuCI.network.WifiNetwork>>}
Get all wireless networks associated with this wireless radio device.
- Source
Returns a promise resolving to an array of Network.WifiNetwork instances representing the wireless networks associated with this radio device.
- Type:
- Promise.<Array.<LuCI.network.WifiNetwork>>
isDisabled() → {boolean}
Checks whether this wireless radio is disabled.
- Source
Returns true when the wireless radio is marked as disabled in ubus runtime state or when the disabled option is set in the corresponding UCI configuration.
- Type:
- boolean
isUp() → {boolean}
Check whether the wireless radio is marked as up in the ubus runtime state.
- Source
Returns true when the radio device is up, else false.
- Type:
- boolean
set(opt, value) → {null}
Set the given UCI option of this network to the given value.
| Name | Type | Description |
|---|---|---|
opt | string | The name of the UCI option to set. |
value | null | | The value to set or |
- Source
- Type:
- null