...
Configures the metric for the default gateway on the current network interface. Routes with lower metrics are preferred over routes with higher metrics. This function returns true
upon success.
...
SetDHCP(
...
) As Boolean
...
Configures the host-wide forwarding policy (this method applies to all network interfaces, no matter which roNetworkConfiguration instance it is called on). This method accepts an associative array with the following parameters:
[Boolean] forwarding_enabled
: A flag that enables or disables IP forwarding. This value isfalse
by default.[Boolean] nat_enabled
: A flag that enables or disables address translation with IP forwarding. If this parameter isfalse
(the default value), andforwarding_enabled
istrue
, IP datagrams are forwarded between all interfaces and no address translation is done. If this parameter istrue
, andforwarding_enabled
istrue
, IP datagrams are forwarded between all interfaces, but SNAT is applied to any datagrams that are sent out of the "upstream" interface. In this case, an "upstream" interface is defined as any interface on which the default route is set. Note that there can be multiple interfaces that meet this criteria. Datagrams that are destined for an interface that has no default route are forwarded without NAT.
SetDHCP() As Boolean (interface)
Enables DHCP and disables all other settings. This function returns true
if successful.
SetIP4Address(ip As String) As Boolean (interface)
SetIP4Netmask(netmask As String) As Boolean (interface)
SetIP4Broadcast(broadcast As String) As Boolean (interface)
SetIP4Gateway(gateway As String) As Boolean (interface)
Sets the IPv4 interface configuration. All values must be specified explicitly. Unlike the ifconfig
shell command, there is no automatic inference. The parameter is a string dotted decimal quad (i.e. "192.168.1.2" or similar). It returns true
upon success.
Code Block | ||
---|---|---|
| ||
nc = CreateObject("roNetworkConfiguration",0)
nc.SetIP4Address("192.168.1.42")
nc.SetIP4Netmask("255.255.255.0")
nc.SetIP4Broadcast("192.168.1.255")
nc.SetIP4Gateway("192.168.1.1") |
SetVlanIds(vlan_ids As roArray) As Boolean
Enables the specified VLAN IDs (and only those IDs) on the network interface (the VLAN interfaces must be configured first). This method accepts an array of integers.
...
title | Example |
---|
...
(interface)
Enables DHCP and disables all other settings. This function returns true
if successful.
SetIP4Address(ip As String) As Boolean (interface)
SetIP4Netmask(netmask As String) As Boolean (interface)
SetIP4Broadcast(broadcast As String) As Boolean (interface)
SetIP4Gateway(gateway As String) As Boolean (interface)
Sets the IPv4 interface configuration. All values must be specified explicitly. Unlike the ifconfig
shell command, there is no automatic inference. The parameter is a string dotted decimal quad (i.e. "192.168.1.2" or similar). It returns true
upon success.
Code Block | ||
---|---|---|
| ||
nc = CreateObject("roNetworkConfiguration",0)
nc.SetIP4Address("192.168.1.42")
nc.SetIP4Netmask("255.255.255.0")
nc.SetIP4Broadcast("192.168.1.255")
nc.SetIP4Gateway("192.168.1.1") |
SetVlanIds(vlan_ids As roArray) As Boolean
Enables the specified VLAN IDs (and only those IDs) on the network interface (the VLAN interfaces must be configured first). This method accepts an array of integers.
Code Block | ||
---|---|---|
| ||
' Configure the VLANs first. Use defaults for VLAN6. n6=CreateObject("roNetworkConfiguration", "eth0.6") print n6.ResetInterfaceSettings() print n6.Apply() ' Use defaults for VLAN11. n11=CreateObject("roNetworkConfiguration", "eth0.11") print n11.ResetInterfaceSettings() print n11.Apply() ' Use static IP for VLAN15. n15=CreateObject("roNetworkConfiguration", "eth0.15") print n15.SetIP4Address("192.168.15.100") print n15.SetIP4Netmask("255.255.255.0") print n15.Apply() ' Now enable VLANs 6, 11 and 15 on eth0. n0=CreateObject("roNetworkConfiguration", "eth0.6") print n6n0.ResetInterfaceSettings(SetVlanIds([6, 11, 15]) print n6n0.Apply() ' Use defaults for VLAN11. n11=CreateObject("roNetworkConfiguration", "eth0.11") print n11.ResetInterfaceSettings() print n11.Apply() ' Use static IP for VLAN15. n15=CreateObject("roNetworkConfiguration", "eth0.15") print n15.SetIP4Address("192.168.15.100") print n15.SetIP4Netmask("255.255.255.0") print n15.Apply() ' Now enable VLANs 6, 11 and 15 on eth0. n0=CreateObject("roNetworkConfiguration", "eth0") print n0.SetVlanIds([6, 11, 15]) print n0.Apply() |
Note | ||
---|---|---|
| ||
VLAN configuration is persistent, even when VLAN is not enabled. If you use the |
SetWiFiESSID(essid as String) As Boolean
Configures the WiFi ESSID of the wireless network that the player will connect to. This method returns true
on success.
GetWiFiESSID() As String
Retrieves the configured WiFi ESSID, even if the player is not currently connected to that wireless network. Use the GetCurrentConfig().wifi_essid
value to retrieve the ESSID of the wireless network that the player is currently connected to.
SetWiFiPassphrase(passphrase as String) As Boolean
Configures the passphrase or key for the wireless network. This method accepts a plain-text passphrase. It returns true
if the passphrase is successfully set.
SetWiFiPassphraseAndObfuscate(a As String) As String
Configures the passphrase or key for the wireless network. This method accepts a plain-text passphrase and returns the obfuscated result. If the passphrase is not set, an empty string is returned instead.
SetObfuscatedWiFiPassphrase(password As String) As Boolean
Configures the passphrase or key for the wireless network. This method accepts a passphrase that has been obfuscated using a shared secret. It returns true
if the password is successfully set.
Note | ||
---|---|---|
| ||
Contact support@brightsign.biz to learn more about generating a key for obfuscation and storing it on the player. |
SetWiFiAccessPointMode(enable as Boolean) As Boolean
Enables or disables WiFi access-point mode: Passing true
to this method instructs the player to act as a wireless access point, which uses the ESSID and passphrase set with the SetWiFiESSID()
and SetWiFiPassphrase() (
or SetObfuscatedWiFiPassphrase()
) methods. If a passphrase has been set, the wireless access point will use WPA2 authentication–otherwise, it will use no authentication. This method returns true
on success and false
on failure; use the GetFailureReason()
method to return more information in case of failure.
WiFi access-point mode should be used for configuration only. It offers a minimal DHCP server, but does not provide DNS servers or routing to the Ethernet. We recommend assigning a static IP address to the wireless interface, though this is not enforced by the firmware.
Note | ||
---|---|---|
| ||
WiFi access-point mode is not available on Series 2 (4Kx42, XDx32, HDx22) or earlier models. |
SetAccessPointFrequencyMHz(frequency As Integer) As Boolean
Sets the frequency of the wireless access point (in MHz). This method returns true
on success and false
on failure; use the GetFailureReason()
method to return more information in case of failure.
Note | ||
---|---|---|
| ||
The following |
SetWiFiIdentity(identity As String) As Boolean
Sets the RADIUS identity. In EAP-TLS mode, the identity will be taken from the client certificate if this method is not called ("subjectAltName" will be used if present; otherwise, the "commonName" is used). In EAP-PEAP/MSCHAP mode, this method must be called to set the identity.
SetWiFiEapTlsOptions(options As String) As Boolean
Sets EAP-specific options. Currently, this method can be used to enable or disable MD5 support ("md5=enable" or "md5=disable") and to set an anonymous identity for EAP-PEAP/MSCHAP configurations ("anonymous_identity=anon@brightsign.biz"). Multiple parameters can be set with a space-separated list. To clear previous settings, pass an empty string to this method.
SetWiFiCACertificates(certificates As Dynamic) As Boolean
Sets the CA certificate file for EAP-TLS (certificates can also be sent from an EAP peer). The certificate data can be specified as an roByteArray of Base64 data (for .cer, .pfx, or .p12 file formats) or an roString (for the .pem file format ). The supported binary formats are ASN.1 DER (for seperate certificates and keys) and PKCS#12 (for a single file that may contain both certificates and keys). The supported text format is PEM.
SetWiFiClientCertificate(certificate As Dynamic) As Boolean
Sets the client certificate for EAP-TLS. The certificate data can be specified as an roByteArray of Base64 data or an roString.
SetWiFiPrivateKey(key As Dynamic) As Boolean
Sets the private key for authentication. The certificate data can be specified as an roByteArray of Base64 data or an roString. If the private key is password protected, use the SetWiFiPassphrase()
method to set the password.
Note | ||
---|---|---|
| ||
If the client certificate and associated private key are in the same PKCS#12 file, the file contents should be specified using the |
SetWiFiSecurityMode(mode As String) As Boolean
Sets the WiFi encryption method. By default, both WPA (TKIP) and WPA2 (CCMP) encryption are permitted. This method accepts a space-separated, case-insensitive list that can include either "tkip" or "ccmp" values. Passing an empty string sets the default mode. If both CCMP and TKIP are allowed, CCMP always has priority.
ConfigureDHCPServer(config As roAssociativeArray) As Boolean
...
Note | ||
---|---|---|
| ||
VLAN configuration is persistent, even when VLAN is not enabled. If you use the |
SetWiFiESSID(essid as String) As Boolean
Configures the WiFi ESSID of the wireless network that the player will connect to. This method returns true
on success.
GetWiFiESSID() As String
Retrieves the configured WiFi ESSID, even if the player is not currently connected to that wireless network. Use the GetCurrentConfig().wifi_essid
value to retrieve the ESSID of the wireless network that the player is currently connected to.
SetWiFiPassphrase(passphrase as String) As Boolean
Configures the passphrase or key for the wireless network. This method accepts a plain-text passphrase. It returns true
if the passphrase is successfully set.
SetWiFiPassphraseAndObfuscate(a As String) As String
Configures the passphrase or key for the wireless network. This method accepts a plain-text passphrase and returns the obfuscated result. If the passphrase is not set, an empty string is returned instead.
SetObfuscatedWiFiPassphrase(password As String) As Boolean
Configures the passphrase or key for the wireless network. This method accepts a passphrase that has been obfuscated using a shared secret. It returns true
if the password is successfully set.
Note | ||
---|---|---|
| ||
Contact support@brightsign.biz to learn more about generating a key for obfuscation and storing it on the player. |
SetWiFiAccessPointMode(enable as Boolean) As Boolean
Enables or disables WiFi access-point mode: Passing true
to this method instructs the player to act as a wireless access point, which uses the ESSID and passphrase set with the SetWiFiESSID()
and SetWiFiPassphrase() (
or SetObfuscatedWiFiPassphrase()
) methods. If a passphrase has been set, the wireless access point will use WPA2 authentication–otherwise, it will use no authentication. This method returns true
on success and false
on failure; use the GetFailureReason()
method to return more information in case of failure.
WiFi access-point mode should be used for configuration only. It offers a minimal DHCP server, but does not provide DNS servers or routing to the Ethernet. We recommend assigning a static IP address to the wireless interface, though this is not enforced by the firmware.
Note | ||
---|---|---|
| ||
WiFi access-point mode is not available on Series 2 (4Kx42, XDx32, HDx22) or earlier models. |
SetAccessPointFrequencyMHz(frequency As Integer) As Boolean
Sets the frequency of the wireless access point (in MHz). This method returns true
on success and false
on failure; use the GetFailureReason()
method to return more information in case of failure.
Note | ||
---|---|---|
| ||
The following |
SetWiFiIdentity(identity As String) As Boolean
Sets the RADIUS identity. In EAP-TLS mode, the identity will be taken from the client certificate if this method is not called ("subjectAltName" will be used if present; otherwise, the "commonName" is used). In EAP-PEAP/MSCHAP mode, this method must be called to set the identity.
SetWiFiEapTlsOptions(options As String) As Boolean
Sets EAP-specific options. Currently, this method can be used to enable or disable MD5 support ("md5=enable" or "md5=disable") and to set an anonymous identity for EAP-PEAP/MSCHAP configurations ("anonymous_identity=anon@brightsign.biz"). Multiple parameters can be set with a space-separated list. To clear previous settings, pass an empty string to this method.
SetWiFiCACertificates(certificates As Dynamic) As Boolean
Sets the CA certificate file for EAP-TLS (certificates can also be sent from an EAP peer). The certificate data can be specified as an roByteArray of Base64 data (for .cer, .pfx, or .p12 file formats) or an roString (for the .pem file format ). The supported binary formats are ASN.1 DER (for seperate certificates and keys) and PKCS#12 (for a single file that may contain both certificates and keys). The supported text format is PEM.
SetWiFiClientCertificate(certificate As Dynamic) As Boolean
Sets the client certificate for EAP-TLS. The certificate data can be specified as an roByteArray of Base64 data or an roString.
SetWiFiPrivateKey(key As Dynamic) As Boolean
Sets the private key for authentication. The certificate data can be specified as an roByteArray of Base64 data or an roString. If the private key is password protected, use the SetWiFiPassphrase()
method to set the password.
Note | ||
---|---|---|
| ||
If the client certificate and associated private key are in the same PKCS#12 file, the file contents should be specified using the |
SetWiFiSecurityMode(mode As String) As Boolean
Sets the WiFi encryption method. By default, both WPA (TKIP) and WPA2 (CCMP) encryption are permitted. This method accepts a space-separated, case-insensitive list that can include either "tkip" or "ccmp" values. Passing an empty string sets the default mode. If both CCMP and TKIP are allowed, CCMP always has priority.
ConfigureDHCPServer(config As roAssociativeArray) As Boolean
Configures a DHCP server on the Ethernet port or wireless access point. This method accepts an associative array with the following parameters:
[string] ip4_start
:(Required) The beginning of the range of offered IP addresses[string] ip4_end
:(Required) The end of the range of offered IP addresses[roArray] name_servers
: An array of strings containing the IPv4 addresses of name servers (IPv6 addresses are not currently supported)[string] domain
: The domain suffix to be used by clients[string] ip4_gateway
: The IPv4 address of the gateway to be used by clients
To disable the DHCP server, pass an empty associative array ({}
) to this method. This method returns true
on success and false
on failure; use the GetFailureReason()
method to return information in case of failure.
SetForwardingPolicy(parameters As roAssociativeArray) As Boolean
Configures the host-wide forwarding policy (this method applies to all network interfaces, no matter which roNetworkConfiguration instance it is called on). This method accepts an associative array with the following parameters:
[Boolean] forwarding_enabled
: A flag that enables or disables IP forwarding. This value isfalse
by default.[Boolean] nat_enabled
: A flag that enables or disables address translation with IP forwarding. If this parameter isfalse
(the default value), andforwarding_enabled
istrue
, IP datagrams are forwarded between all interfaces and no address translation is done. If this parameter istrue
, andforwarding_enabled
istrue
, IP datagrams are forwarded between all interfaces, but SNAT is applied to any datagrams that are sent out of the "upstream" interface. In this case, an "upstream" interface is defined as any interface on which the default route is set. Note that there can be multiple interfaces that meet this criteria. Datagrams that are destined for an interface that has no default route are forwarded without NAT.
SetDomain(domain As String) As Boolean (host)
...