Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 31 Next »

ON THIS PAGE


This object provides various methods for configuring the network interfaces on a BrightSign player.

Object Creation: The roNetworkConfiguration object is created with a single parameter.

CreateObject("roNetworkConfiguration", network_interface as Integer)

The network_interface parameter is used to distinguish between the following: 

  • 0: The Ethernet port (if available) on the rear of the BrightSign player
  • 1: The optional internal WiFi

Some of the settings are specific to the network interface, while others are used by the BrightSign host for all network interfaces.

BrightSign players support most commonly used wireless encryption formats: WEP (64 & 128), WPA (TKIP), and WPA2 (AES). WPA Enterprise is also supported using DER, PEM, or PKCS#12 certificates. Wired authentication via 802.1x is not supported for WPA/WPA2 Enterprise, nor are other modes such as PEAPv0/MSCAPv2.

ifNetworkConfiguration

Apply() As Boolean

Applies the requested changes to the network interface. This may take several seconds to complete.

Note

"Set" and "Reset" methods do not take effect until Apply() is called.

SetupDWS(settings As roAssociativeArray) As Boolean

Configures the Diagnostic Web Server (DWS). By default, the Diagnostic Web Server is enabled on port 80, with the player serial number as password. Settings for the DWS are specified in an associative array. These properties are written to the registry and persist after reboot:

  • port: The port number of the Diagnostic Web Server, located at the IP address of the player. Setting this value to 0 will disable the DWS, while setting it to "default" will make the DWS accessible on the default port (80). Specifying only this parameter in the associative array is equivalent to enabling the DWS without password protection.
  • password: An obfuscated password for the DWS. This method uses digest access authentication. Specifying this parameter without setting a port number will make the DWS accessible on the default port.
  • open: An unobfuscated password for the DWS. This method uses digest access authentication. Specifying this parameter without setting a port number will make the DWS accessible on the default port.
  • basic: A flag indicating whether basic authentication should be used or not. Setting this parameter to true allows the password set with the open parameter to be validated using basic authentication, rather than digest access authentication. This option allows for backwards compatibility with older platforms; most, if not all, modern browsers require basic authentication to be disabled in order to communicate with the DWS.

The user name is "admin" for all authentication configurations.

EnableLEDs(enable As Boolean) As Boolean

Enables or disables the Ethernet activity LED (i.e. flashing during link and activity behavior). The Ethernet LED is enabled by default. Changes to this setting do not persist across reboots. This method returns true upon success and false upon failure. Note that this method is not available on HDx10, HDx20, and LSx22 models.

GetProxy() As String

SetClientIdentifier(a As String) As Boolean

Sets the DHCP client identifier. 

GetClientIdentifier() As String

Returns the DHCP client identifier.

SetLoginPassword(password As String) As Boolean

Specifies a login password for the SSH connection (if SSH has been enabled in the registry). This method accepts a plain-text password.

SetObfuscatedLoginPassword(password As String) As Boolean

Specifies a login password for the SSH connection (if SSH has been enabled in the registry). This method accepts a password that has been obfuscated using a shared secret.

Note

Contact support@brightsign.biz to learn more about generating a key for obfuscation and storing it on the player.

SetInboundShaperRate(rate As Integer) As Boolean

Sets the bandwidth limit for inbound traffic in bits per second. For the default bandwidth limit, pass -1 to the method; for no bandwidth limit, pass 0 (though these two settings are functionally the same). You will need to call Apply() for this setting to take effect, and changing this setting at any time will cause the network interface to be taken down and reinitialized.

Note

Because of overhead on the shaping algorithm, attempting to limit the bandwidth at rates greater than approximately 2Mbit/s will reduce speeds to less than the specified rate.

SetMTU(mtu As Integer) As Boolean

Sets the maximum transmission unit (MTU) for the network interface in bytes. Currently, the MTU setting is not returned when the GetCurrentConfig() method is called.

SetRoutingMetric(a As Integer) As Boolean 

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 (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.

Example
nc.SetIP4Address("192.168.1.42")
nc.SetIP4Netmask("255.255.255.0")
nc.SetIP4Broadcast("192.168.1.255")
nc.SetIP4Gateway("192.168.1.1")
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 SetWifi* methods are used to configure WPA Enterprise with EAP-TLS. 

SetWiFiIdentity(identity As String) As Boolean

Sets the RADIUS identity. If this value is not set, it will be taken from the specified client certificate ("subjectAltName" will be used if present; otherwise, the "commonName" is used).

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").

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 SetWiFiPrivateKey() method and the SetWiFiClientCertificate() value should be left empty.

ConfigureDHCPServer(config As roAssociativeArray) As Boolean

Configures a DHCP server on the wireless access point. The associative array should consist of two properties: ip4_start, which specifies the beginning of the range of offered IP addresses, and ip4_end, which specifies the end of the range. 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.

SetDomain(domain As String) As Boolean (host)

Sets the device domain name. This will be appended to names to fully qualify them, though it is not necessary to call this. This method returns true on success.

Example
nc.SetDomain("brightsign.biz")
SetDNSServers(servers As roArray) As Boolean (host)

Sets the list of DNS servers if there were no DNS servers when the object was created. This method accepts an array of strings, each containing the dotted-quad IP address of a DNS server, and it returns true on success. There is currently a maximum of three servers; the method will return false if you attempt to add more than three servers.

Tip

To clear the list of DNS servers, call SetDNSServers([]).

AddDNSServer(server As String) As Boolean (host)

Adds another DNS server to the list if there were no DNS servers when the object was created. This method accepts the dotted-quad IP address of a DNS server as a string, and it returns true on success. There is currently a maximum of three servers; the method will return false if you attempt to add more than three servers. 

SetTimeServer(time_server As String) As Boolean (host)

Sets the default time server, which is "time.brightsignnetwork.com". You can disable the use of NTP by calling SetTimeServer(""). You can use URL syntax to specify that the player use an HTTP or HTTPS server to synchronize the clock. The following are valid time server addresses:

  • http://time.brightsignnetwork.com/
  • https://time.brightsignnetwork.com/
  • ntp://time.brightsignnetwork.com/
  • time.brightsignnetwork.com

Note

The last two addresses are equivalent.
GetTimeServer() As String

Retrieves the (host) time server currently in use.

SetTimeServerIntervalSeconds(interval_in_seconds As Integer) As Boolean

Specifies how often the player should communicate with the time server and adjust its clock. The default interval is 12 hours; passing a value of 0 specifies the default interval. The minimum interval allowed is 120 seconds.

GetTimeServerIntervalSeconds() As Integer

Returns the current interval for time-server renewal (in seconds).

SetHostName(name as String) As Boolean (host)

Sets the device host name. If no host name has been explicitly set, then a host name is automatically generated based on the device serial number. Passing an empty string to this method resets the device host name to its automatically generated value.

GetHostName() As String (host)

Retrieves the host name currently in use.

SetProxy(proxy as String) As Boolean (host)

Sets the name or address of the proxy server used for HTTP and FTP requests. The proxy string should be formatted as "http://user:password@hostname:port". The hostname can contain up to four "*" characters; each "*" character can be used to replace one octet from the current IP address. For example, if the IP address is currently 192.168.1.2, and the proxy is set to "proxy-*-*", then the player will attempt to use a proxy named "proxy-192.168".

SetProxyBypass(hostnames As Array) As Boolean

Exempts the specified hosts from the proxy setting. The passed array should consist of one or more hostnames. The player will attempt to reach the specified hosts directly rather than using the proxy that has been specified with the SetProxy() method. For example, the hostname "example.com" would exempt "example.com", "example.com:80", and "www.example.com" from the proxy setting.

GetProxyBypass() As roArray

Returns an array of hostnames that have been exempted from the proxy setting using the SetProxyBypass() method.

GetRecoveryUrl() As String

Returns the current recovery URL, which is stored in the "ru" entry of the "networking" registry section. If the recovery URL is set via DHCP Option 43, it will take precedence over the "ru" registry entry.

ResetInterfaceSettings() As Boolean

Clears all interface-specific settings (e.g. IP address, default gateway). This method is ideal for resetting an interface to a known, empty state before configuring specific settings.

ResetHostSettings() As Boolean

Clears all host settings (i.e. settings that don't take the interface number into account and that don't affect the specified network interface; e.g. the time server). 

GetFailureReason() As String

Returns additional information when a member function returns false.

GetCurrentConfig() As Object

Retrieves the entire current configuration as an associative array containing the following members:

ValueTypeHost/InterfaceDescription

metric

Integer

Interface

Returns the current routing metric for the interface. See the SetRoutingMetric() entry for more details.

dhcp

Boolean

Interface

Returns true if the system is currently configured to use DHCP. Returns false otherwise.

hostname

String

Host

The currently configured host name

mdns_hostname

String

Host

The Zeroconf host name currently in use. This may be longer than the host name if there is a collision on the current network.

ethernet_mac

String

Interface

The Ethernet MAC address

ip4_address

String

Interface

The current IPv4 address. If none is currently set, the string will be empty.

ip4_netmask

String

Interface

The current IPv4 network mask. If none is currently set, the string will be empty.

ip4_broadcast

String

Interface

The current IPv4 broadcast address. If none is currently set, the string will be empty.

ip4_gateway

String

Interface

The current IPv4 gateway address. If none is currently set, the string will be empty.

domain

String

Host

The current domain suffix

dns_servers

roArray of Strings

Host

The currently active DNS servers

time_server

String

Host

The current time server

configured_proxy

String

Host

The currently configured proxy. This may contain magic characters as explained under SetProxy() above.

current_proxy

String

Host

The currently active proxy. Any magic characters will have been replaced as explained under SetProxy() above.

shape_inbound

Integer

Interface

The current bandwidth shaping for inbound traffic determined by the SetInboundShaperRate() method.

type

String

Interface

Either "wired" or "wifi"

link

Boolean

Interface

Indicates whether the network interface is currently connected.

wifi_essid

String

Interface

The name of the current Wi-Fi network (if any)

wifi_signal

Integer

Interface

An indication of the received signal strength. The absolute value of this field is usually not meaningful, but it can be compared with the reported value on other networks or in different locations.

TestInterface() As Object

Performs various tests on the network interface to determine whether it appears to be working correctly. It reports the results via an associative array containing the following members:

ValueTypeDescription

ok

Boolean

This value is true if the tests find no problems, or false if at least one problem was identified.

diagnosis

String

A single-line diagnosis of the first problem identified in the network interface.

log

roArray of strings

A complete log of all the tests performed and their results.

TestInternetConnectivity() As Object

Performs various tests on the Internet connection (via any available network interface, not necessarily the one specified when the roNetworkConfiguration object was created) to determine whether it appears to be working correctly. It reports the results via an associative array containing the following members:

ValueTypeDescription

ok

Boolean

This value is true if the tests find no problems, or false if at least one problem was identified.

diagnosis

String

A single line diagnosis of the first problem identified with the Internet connection.

log

roArray of strings

A complete log of all the tests performed and their results.

GetNeighborInformation() As roAssociativeArray

Retrieves location information from the network infrastructure using the LLDP-MED protocol. The information is returned as an associative array of strings corresponding to civic-address types, which are defined as follows according to the LLDP-MED specification: 

CAtype

Label

Description

1

A1

national subdivisions (state, region, province, prefecture)

2

A2

county, parish, gun(JP), district(IN)

3

A3

city, township, shi(JP)

4

A4

city division, borough, city district, ward, chou(JP)

5

A5

neighborhood, block

6

A6

street

CAtype

NENA

PIDF

Description

Examples

0

 

 

language

i-default [3]

16

PRD

PRD

leading street direction

N

17

POD

POD

trailing street suffix

SW

18

STS

STS

street suffix

Ave, Platz

19

HNO

HNO

house number

123

20

HNS

HNS

house number suffix

A, 1/2

21

LMK

LMK

landmark or vanity address

Columbia University

22

LOC

LOC

additional location information

South Wing

23

NAM

NAM

name (residence and office occupant)

Joe's Barbershop

24

ZIP

PC

postal/ZIP code

10027-1234

25

 

 

building (structure)

Low Library

26

 

 

unit (apartment, suite)

Apt 42

27

 

FLR

floor

4

28

 

 

room number

450F

29

 

 

placetype

office

30

PCN

 

postal community name

Leonia

31

 

 

post office box (P.O Box)

12345

32

 

 

additional code

13203000003

128

 

 

script

Latn

255

 

 

reserved

 

ifWiFiConfiguration

ScanWiFi() As roArray

Scans for available wireless networks. The results are reported as an roArray containing one or more associative arrays with the following members:

ValueTypeDescription

essid

String

Network name

bssid

String

Access point BSSID

signal

Integer

Received signal strength indication. The absolute value of this field is not usually relevant, but it can be compared with the reported value on other networks or in different locations.

  • No labels