new LuCI.Network.WifiNetwork()
Methods
-
get(opt){null|string|Array.<string>}
network.js, line 3313 -
Read the given UCI option value of this wireless network.
Name Type Description optstring The UCI option name to read.
Returns:
Type Description null | string | Array.<string> Returns the UCI option value or nullif the requested option is not found. -
getActiveBSSID(){string}
network.js, line 3566 -
Query the current BSSID from runtime information.
Returns:
Type Description string Returns the current BSSID or Mesh ID as reported by ubusruntime information. -
getActiveEncryption(){string}
network.js, line 3577 -
Query the current encryption settings from runtime information.
Returns:
Type Description string Returns a string describing the current encryption or -if the the encryption state could not be found inubusruntime information. -
getActiveMode(){string}
network.js, line 3514 -
Query the current operation mode from runtime information.
Returns:
Type Description string Returns the human readable mode name as reported by ubusruntime state. Possible returned values are:MasterAd-HocClientMonitorMaster (VLAN)WDSMesh PointP2P ClientP2P GoUnknown
-
getActiveModeI18n(){string}
network.js, line 3535 -
Query the current operation mode from runtime information as translated string.
Returns:
Type Description string Returns the translated, human readable mode name as reported by ubusruntime state. -
getActiveSSID(){string}
network.js, line 3555 -
Query the current SSID from runtime information.
Returns:
Type Description string Returns the current SSID or Mesh ID as reported by ubusruntime information. -
getAssocList(){Promise.<Array.<LuCI.Network.WifiPeerEntry>>}
network.js, line 3757 -
Fetch the list of associated peers.
Returns:
Type Description Promise.<Array.<LuCI.Network.WifiPeerEntry>> Returns a promise resolving to an array of wireless peers associated with this network. -
getBitRate(){null|number}
network.js, line 3787 -
Query the current average bitrate of all peers associated to this wireless network.
Returns:
Type Description null | number Returns the average bit rate among all peers associated to the network as reported by ubusruntime information ornullif the information is not available. -
getBSSID(){null|string}
network.js, line 3392 -
Get the configured BSSID of the wireless network.
Returns:
Type Description null | string Returns the BSSID value or nullif none has been specified. -
getChannel(){null|number}
network.js, line 3803 -
Query the current wireless channel.
Returns:
Type Description null | number Returns the wireless channel as reported by ubusruntime information ornullif it cannot be determined. -
getCountryCode(){string}
network.js, line 3836 -
Query the current country code.
Returns:
Type Description string Returns the wireless country code as reported by ubusruntime information or00if it cannot be determined. -
getDevice(){LuCI.Network.Device}
network.js, line 3982 -
Get the associated Linux network device.
Returns:
Type Description LuCI.Network.Device Returns a Network.Deviceinstance representing the Linux network device associted with this wireless network. -
getFrequency(){null|string}
network.js, line 3769 -
Query the current operating frequency of the wireless network.
Returns:
Type Description null | string Returns the current operating frequency of the network from ubusruntime information in GHz ornullif the information is not available. -
getI18n(){string}
network.js, line 3930 -
Get a description string for this wireless network.
Returns:
Type Description string Returns a string describing this network, consisting of the term Wireless Network, followed by the active operation mode, the SSID, BSSID or internal network ID and the Linux network device name, depending on which information is available. -
getID(){string}
network.js, line 3417 -
Get the internal network ID of this wireless network.
The network ID is a LuCI specific identifer in the form
radio#.network#to identify wireless networks by their corresponding radio and network index numbers.Returns:
Type Description string Returns the LuCI specific network ID. -
getIfname(){null|string}
network.js, line 3439 -
Get the Linux network device name.
Returns:
Type Description null | string Returns the current Linux network device name as resolved from ubusruntime information ornullif this network has no associated network device, e.g. when not configured or up. -
getMeshID(){null|string}
network.js, line 3379 -
Get the configured Mesh ID of the wireless network.
Returns:
Type Description null | string Returns the configured mesh ID value or nullwhen this network is not in mesh mode. -
getMode(){string}
network.js, line 3354 -
Get the configured operation mode of the wireless network.
Returns:
Type Description string Returns the configured operation mode. Possible values are: ap- Master (Access Point) modesta- Station (client) modeadhoc- Ad-Hoc (IBSS) modemesh- Mesh (IEEE 802.11s) modemonitor- Monitor mode
-
getName(){string}
network.js, line 3427 -
Get the configuration ID of this wireless network.
Returns:
Type Description string Returns the corresponding UCI section ID of the network. -
getNetwork(){null|LuCI.Network.Protocol}
network.js, line 3946 -
Get the primary logical interface this wireless network is attached to.
Returns:
Type Description null | LuCI.Network.Protocol Returns a Network.Protocolinstance representing the logical interface ornullif this network is not attached to any logical interface. -
getNetworkNames(){Array.<string>}
network.js, line 3403 -
Get the names of the logical interfaces this wireless network is attached to.
Returns:
Type Description Array.<string> Returns an array of logical interface names. -
getNetworks(){Array.<LuCI.Network.Protocol>}
network.js, line 3957 -
Get the logical interfaces this wireless network is attached to.
Returns:
Type Description Array.<LuCI.Network.Protocol> Returns an array of Network.Protocolinstances representing the logical interfaces this wireless network is attached to. -
getNoise(){number}
network.js, line 3825 -
Query the current radio noise floor.
Returns:
Type Description number Returns the radio noise floor in dBm as reported by ubusruntime information or0if it cannot be determined. -
getShortName(){string}
network.js, line 3915 -
Get a short description string for this wireless network.
Returns:
Type Description string Returns a string describing this network, consisting of the active operation mode, followed by either the SSID, BSSID or internal network ID, depending on which information is available. -
getSignal(){null|number}
network.js, line 3814 -
Query the current wireless signal.
Returns:
Type Description null | number Returns the wireless signal in dBm as reported by ubusruntime information ornullif it cannot be determined. -
getSignalLevel(){number}
network.js, line 3874 -
Calculate the current signal.
- Deprecated
- Yes
Returns:
Type Description number Returns the calculated signal level, which is the difference between noise and signal (SNR), divided by 5. -
getSignalPercent(){number}
network.js, line 3897 -
Calculate the current signal quality percentage.
Returns:
Type Description number Returns the calculated signal quality in percent. The value is calculated from the qualityandquality_maxindicators reported byubusruntime state. -
getSSID(){null|string}
network.js, line 3365 -
Get the configured SSID of the wireless network.
Returns:
Type Description null | string Returns the configured SSID value or nullwhen this network is in mesh mode. -
getTXPower(){null|number}
network.js, line 3847 -
Query the current radio TX power.
Returns:
Type Description null | number Returns the wireless network transmit power in dBm as reported by ubusruntime information ornullif it cannot be determined. -
getTXPowerOffset(){number}
network.js, line 3862 -
Query the radio TX power offset.
Some wireless radios have a fixed power offset, e.g. due to the use of external amplifiers.
Returns:
Type Description number Returns the wireless network transmit power offset in dBm as reported by ubusruntime information or0if there is no offset, or if it cannot be determined. -
getWifiDevice(){null|LuCI.Network.WifiDevice}
network.js, line 3467 -
Get the corresponding wifi radio device.
Returns:
Type Description null | LuCI.Network.WifiDevice Returns a Network.WifiDeviceinstance representing the corresponding wifi radio device ornullif the related radio device could not be found. -
getWifiDeviceName(){null|string}
network.js, line 3455 -
Get the name of the corresponding wifi radio device.
Returns:
Type Description null | string Returns the name of the radio device this network is configured on or nullif it cannot be determined. -
isDisabled(){boolean}
network.js, line 3339 -
Checks whether this wireless network is disabled.
Returns:
Type Description boolean Returns truewhen the wireless radio is marked as disabled inubusruntime state or when thedisabledoption is set in the corresponding UCI configuration. -
isUp(){boolean}
network.js, line 3488 -
Check whether the radio network is up.
This function actually queries the up state of the related radio device and assumes this network to be up as well when the parent radio is up. This is due to the fact that OpenWrt does not control virtual interfaces individually but within one common hostapd instance.
Returns:
Type Description boolean Returns truewhen the network is up, elsefalse. -
set(opt, val)
network.js, line 3327 -
Set the given UCI option of this network to the given value.
Name Type Description optstring The name of the UCI option to set.
valnull | string | Array.<string> The value to set or
nullto remove the given option from the configuration.