WirelessNetworkInterface¶
Description¶
The WirelessNetworkInterface object represents a wireless network interface attached to the device. It provides all required settings to act as a wireless network client (ssid/passphrase). Additionally the provided configuration items can be used to make the settings available to generic property-based frontends.
› Inherits: | NetworkInterface |
---|
Properties¶
availableNetworks¶
This property holds a list with information about all available wireless networks found during the last scan. Every list entry contains several properties including ssid
, signal
, mode
, wpa`, ``frequency
and privacy
. Per default this list is updated every 30 s. It’s also possible to manually trigger a network scan by calling scanAvailableNetworks().
This property was introduced in InCore 2.5.
› Type: | List |
---|---|
› Signal: | availableNetworksChanged() |
› Attributes: | Writable |
countryCode¶
This property holds a country code used to set the wireless regulatory domain. This controls which channels, bandwidths and transmission powers are used to comply with the respective national laws. Per default the world domain with limited channels and transmission power is used.
See ISO 3166-1 alpha-2 for details and a code list table.
› Type: | String |
---|---|
› Signal: | countryCodeChanged() |
› Attributes: | Writable |
countryCodeItem¶
This property holds an internal ConfigurationItem instance for the countryCode property.
› Type: | ConfigurationItem |
---|---|
› Attributes: | Readonly |
index¶
This property holds the index of the wireless network interface which to represent and configure through this object instance.
› Type: | Index |
---|---|
› Default: | WirelessNetworkInterface.WirelessNone |
› Signal: | indexChanged() |
› Attributes: | Writable |
indexItem¶
This property holds an internal ConfigurationItem instance for the index property.
› Type: | ConfigurationItem |
---|---|
› Attributes: | Readonly |
passphrase¶
This property holds the passphrase (pre-shared key) to use for connecting to the wireless network. The minimum length for WPA/WPA2 passphrases is 8 characters. When setting an invalid passphrase the NetworkInterface.InvalidConfigurationError error will be raised.
› Type: | String |
---|---|
› Signal: | passphraseChanged() |
› Attributes: | Writable |
passphraseItem¶
This property holds an internal ConfigurationItem instance for the passphrase property.
› Type: | ConfigurationItem |
---|---|
› Attributes: | Readonly |
ssid¶
This property holds the SSID, i.e. the wireless network name, which to connect to. The maximum length is 31 characters. When setting an invalid SSID the NetworkInterface.InvalidConfigurationError error will be raised.
› Type: | String |
---|---|
› Signal: | ssidChanged() |
› Attributes: | Writable |
ssidItem¶
This property holds an internal ConfigurationItem instance for the ssid property.
› Type: | ConfigurationItem |
---|---|
› Attributes: | Readonly |
Methods¶
Enumerations¶
Index¶
This enumeration describes indexes for all supported wireless network interfaces.
Name | Value | Description |
---|---|---|
WirelessNetworkInterface.WirelessNone |
0 |
The object does not represent a valid wireless network interface. |
WirelessNetworkInterface.Wireless1 |
1 |
The object represents the first wireless network interface. |
WirelessNetworkInterface.Wireless2 |
2 |
The object represents the second wireless network interface. |
Example¶
import InCore.Foundation 2.5
Application {
NetworkConfiguration {
WirelessNetworkInterface {
index: WirelessNetworkInterface.Wireless1
ssid: "inhub"
passphrase: "MyS3cr3tP4ssw0rd"
countryCode: "DE"
onAvailableNetworksChanged: console.log(JSON.stringify(availableNetworks))
}
}
}