---
title: networkconfiguration
slug: develop/networkconfiguration
docTags: 
createdAt: 2025-03-26T14:45:22.597Z
---

The *networkconfiguration&#xA0;*&#x6F;bject allows for configuration of the network interfaces on the player. Each object instance corresponds to a single network interface (Ethernet, WiFi, or modem), which is specified using the `type` attribute.

This object only allows you to configure/retrieve settings related to the network interfaces on the device. For other network information, use the Node.js® OS module.

**networkconfiguration IDL**

```javascript
[
    Constructor(String ifName)
] interface NetworkInterface {
    readonly attribute String type; // values: wifi, ethernet, modem
    NetworkInterfaceConfig defaultConfig();
    Promise<NetworkInterfaceConfig> getConfig(NetworkInterfaceConfigRequestParams params[optional]); // Promise will be resolved as WifiInterfaceConfig, ModemInterfaceConfig, EthernetInterfaceConfig
    Promise<void> applyConfig(NetworkInterfaceConfig config);
    [type == "ethernet"] Promise<LLDPNeighborInformation> getNeighborInformation();
    [type == "ethernet"] Promise<void> enableLeds();
    [type == "wifi"] Promise<WifiAccessPointList> scan();
    [type == "wifi"] Promise<void> reassociate();


interface WifiAccessPointList {
    attribute String essId;
    attribute String bssId;
    attribute long signal;
};

interface LLDPNeighborInformation {
    // information is directly converted from LLDP. Fields are defined deep down there.
};

interface NetworkInterfaceConfigRequestParams {
    attribute bool includeEncryptedSecrets;
};

interface NetworkInterfaceConfig {
    attribute bool enable;
    attribute long metric;
    [optional = CONFIG_DHCP_SERVER] attribute DHCPServerConfig dhcpServerConfig;
    attribute Array<String> dnsServerList;
    attribute Array<IPAddress> ipAddressList;
    attribute long inboundShaperRate;
    attribute long mtu;
    [optional = CONFIG_VLAN] attribute Array<int> vlanIdList;
    attribute String clientIdentifier;
    attribute String domain;
	attribute Array<String> enabledProtocolList;
};

[optional = CONFIG_DIALUP] interface DialUpInterfaceConfig : public NetworkInterfaceConfig {
    attribute String user;
    attribute String password;
    attribute String number;
    attribute String initString;
};

interface DHCPServerConfig {
    attribute String start;
    attribute String end;
    [optional] attribute String gateway;
    [optional] attribute Array<String> dnsServerList;
    [optional] attribute String domain;
};

interface IPAddress {
    attribute String family;
    attribute String address;
    attribute String netmask;
    attribute String gateway;
    attribute String broadcast;
};

interface EthernetInterfaceConfig : public NetworkInterfaceConfig {
    attribute String securityMode;
    attribute String identity;
    attribute String eapTlsOptions;
    attribute String caCertificates;
    attribute String clientCertificate;
    attribute String privateKey;
};

interface WifiInterfaceConfig : public NetworkInterfaceConfig{
    attribute String essId;
    attribute String passphrase;
    [optional = CONFIG_SECURE_STORE] attribute String obfuscatedPassphrase;
    attribute String securityMode;
    attribute String identity;
    attribute String eapTlsOptions;
    attribute String caCertificates;
    attribute String clientCertificate;
    attribute String privateKey;
    attribute String frequencies;
    [optional = CONFIG_WIFI_AP] attribute bool accessPointMode;
    [optional = CONFIG_WIFI_AP] attribute long accessPointFrequency;
    [optional = CONFIG_WIFI_AP] attribute bool accessPointHidden;
};
```

## Object Creation

To create a *networkconfiguration* object, first load the `brightsign/networkconfiguration` module using the `require()` method. Then create an instance of the *networkconfiguration* class using a string value that indicates the network interface associated with the instance.

```javascript
var NetworkConfigClass = require("@brightsign/networkconfiguration");
var networkConfigEth = new NetworkConfigClass("eth0");     
```

The `ifName` parameter  can be any of the following: 

- `0` or `"eth0"`: The Ethernet port on the BrightSign player
- `"eth1"`: The “control” Ethernet port on players that have one. This port is for screen control only (DNS relay is not supported). Note that the port is not enabled by default and must be explicitly enabled (which can be done from the BrightSign shell prompt, JavaScript or BrightScript). &#x20;
- `1` or `"wlan0"`: The internal WiFi
- `2` or `"ppp0"`: A connected modem
- `"usb0"`, `"usb1"`, etc: USB ethernet interfaces

## NetworkInterface

Use this interface to configure a network interface on the player. 

- `type` <font color="#6321ae">String</font>: The network interface type, which is read-only. It can be one of the following:
  - `"ethernet"`: An Ethernet port on the BrightSign player.&#x20;
  - `"wifi"`: The internal WiFi
  - `"modem"`: A connected modem

:::hint{type="info"}
The “control” Ethernet port on players that have one, such as the XD6 and HD6, is not enabled by default. It must be explicitly enabled, which can be done from the BrightSign shell prompt, JavaScript or BrightScript.
:::

:::hint{type="success"}
The network interface can be configured as a VLAN using the following string format: "\[parent\_interface].\[vlan\_id]" (e.g "eth0.42"). Once the VLAN interface(s) are configured, they must be enabled on the parent network interface (e.g. "eth0") by including them in the vlanIdList of the parent interface. VLAN interfaces use DHCP by default. They are supported on Series 4 (XTx44, XDx34, HDx24, LS424) and Series 3 (XTx43, XDx33, HDx23, LS423, HO523) players only. Also see [Default Routing Metrics](docId:0jDtAGrV4AlBWLYFJNj45).
:::

**getConfig()**

```javascript
Promise<NetworkInterfaceConfig> getConfig(NetworkInterfaceConfigRequestParams params[optional])
```

Returns configuration settings for the network interface. Depending on the specified `type`, this method will return an `EthernetInterfaceConfig`,  `WiFiInterfaceConfig`, or `ModemInterfaceConfig` interface.  If there is a set password, `getConfig()` will return true for the `password` parameter. If there isn't a set password, `getConfig()` will return false for the `password` parameter.

Note that this class concerns itself with the player's persistent network configuration. If you wish to determine the current settings (for example the IP address that has been retrieved via DHCP) then use the [Node.js® OS module](https://nodejs.org/api/os.html#os_os_networkinterfaces).

**applyConfig()**

```javascript
Promise<void> applyConfig(NetworkInterfaceConfig config)
```

Configures the network interface using the parameters in the passed *NetworkInterfaceConfig* object. This method returns void upon success. 

To reset a network-interface setting to its default value, pass the *NetworkInterfaceConfig &#x20;*&#x6F;bject without the corresponding attribute.

The `config` parameter should contain the complete desired configuration. Any previous configuration is overwritten. If you wish to change one item while keeping the rest of the configuration the same then first call `getConfig` and modify the returned object (see the example in the Examples section).

**getNeighborInformation()**

```javascript
Promise<LLDPNeighborInformation> getNeighborInformation()
```

Returns LLDP information related to the network, or null. This method is available with the ethernet interface only.

**enableLeds()**

```javascript
Promise<void> enableLeds()
```

Enables or disables the ethernet activity LEDs (that is, flashing during link and activity behavior). Ethernet LEDs are enabled by default. Changes to this setting do not persist across reboots. This method is available with the ethernet interface only.

**scan()**

```javascript
Promise<WifiAccessPointList> scan()
```

Scans for WiFi access points are returns a list of detected access points. This method is available with the WiFi interface only.

**reassociate()**

```javascript
Promise<void> reassociate()
```

Attempts to disconnect and reconnect to the currently-configured WiFi network asynchronously. This should not normally be necessary, but could be useful when diagnosing network problems. If successful, the returned promise will be resolved. If unsuccessful, the returned promise will be rejected with error information.

This method is present in BOS 8.4.20 and above, BOS 8.5.26 and above, and in all BOS 9.0 versions.&#x20;

Note that the promise may be resolved before the network has been reconnected. Use `@brightsign/networkhotplug` to determine when reconnection is complete.

## WifiAccessPointList

This interface represents the results of a scan for wireless networks. Each entry in the list contains the following parameters:

- `essID` <font color="#6321ae">String:</font> WiFi ESSId network name
- `bssID` <font color="#6321ae">String</font>: BSSId of the access point
- `signal` <font color="#6321ae">long</font>: The received signal strength. The absolute value of this attribute is usually not relevant, but it can be compared with the reported value on other networks or in different locations.

## LLDPNeighborInformation

This interface contains location information received from the network infrastructure using the [LLDP-MED](docId\:U6ZceYQddlz9xdAKtTmJs) protocol.

## NetworkInterfaceConfigRequestParams 

- <font color="#0C121D">`includeEncryptedSecrets` </font><font color="#6554c0">bool</font>: If set to `true`, encrypted secrets are included, if set to `false` they are not.

## NetworkInterfaceConfig

This interface contains settings related to a network interface.

- `metric` <font color="#6321ae">long</font>: The routing metric for the default gateway on the interface. Routes with lower metrics are preferred over routes with higher metrics. If not specified the metric will be set to ensure that interfaces are preferred consistently for a given configuration.
- `dhcpServerConfig` <font color="#6321ae">DHCPServerConfig</font>:  A *DHCPServerConfig* interface that specifies the DHCP server configuration for the interface. The DHCP server can be disabled by setting this attribute to a null value when calling `applyConfig()`.
- `dnsServerList` <font color="#6321ae">Array&lt;String&gt;</font>: A string list containing a maximum of three DNS servers. Each string should contain the dotted-quad IP address of a DNS server. 
- `ipAddressList` <font color="#6321ae">Array&lt;IPAddress&gt;:</font> An array containing zero or one static IPv4 address configurations. Players do not currently support more than one IPv4 address per interface or static configuration of IPv6 addresses. If the array is empty then IP addresses will be assigned using DHCP.
- `inboundShaperRate`<font color="#6321ae"> long</font>: The bandwidth limit for inbound traffic in bits per second. If undefined, there is no bandwidth limit.
- `mtu` <font color="#6321ae">long</font>: The maximum transmission unit (MTU) for the network interface in bytes. If not specified an appropriate mtu value will be chosen automatically.
- `vlanIdList` <font color="#6321ae">Array&lt;unsigned short&gt;</font>: A list of VLAN IDs that this network interface is the parent for.
- `clientIdentifier` <font color="#6321ae">String</font>: The DHCP client identifier for the network interface
- `domain`  <font color="#6321ae">String</font>: The domain name for the network interface
- `enabledProtocolList` <font color="#6321ae">Array&lt;String&gt;</font>: An optional array containing the set of enabled IP protocols. The default value is \[`IPv4`, `IPv6`].

## DialUpInterfaceConfig

This interface contains attributes related to the modem interface:

- `user` <font color="#6321ae">String</font>: The username that has been entered: some operators will require the username, others will not.
- `password` <font color="#6321ae">String</font>: The password that has been entered: some operators will require the password, others will not.
- `number` <font color="#6321ae">String</font>: The "start connection" command, which previously dialed a number. Now, number is almost always "\*99#". 
- `initString` <font color="#6321ae">String</font>: The general modem setup string, which varies between operators. 

## DHCPServerConfig

This interface configures a DHCP server on the Ethernet port or wireless access point. If configuring DHCP for WiFi, note that the WiFi interface must be in access point mode.

A static IP address must be assigned to the wlan0 interface for the DHCP server to work correctly. To apply a static `IP address`, refer to [NetworkInterfaceConfig](docId:6MS7rdjWWhP21clMeDRwv), and use the `ipAddressList` setting.

- `start` <font color="#6321ae">String</font>: The beginning of the range of offered IP addresses
- `end` <font color="#6321ae">String</font>: The end of the range of offered IP addresses
- `gateway` <font color="#6321ae">String</font> <font color="#01a0af">optional</font>:  IPv4 address of the gateway to be used by clients.
- `dnsServerList` <font color="#6554c0">Array&lt;String&gt;</font> <font color="#01a0af">optional</font>:  An array of strings containing the IPv4 addresses of name servers (IPv6 addresses are not currently supported)
- `domain ` <font color="#6554c0">String</font> <font color="#01a0af">optional</font>: The domain suffix to be used by clients

## IPAddress

This interface represents an IP address configuration.

- `family` <font color="#6554c0">String</font>: The IP configuration (must be set to IPv4).
- `address` <font color="#6554c0">String</font>: The IP4 address. This a string dotted decimal quad, for example "192.168.1.42".
- `netmask` <font color="#6554c0">String</font>: The IP4 netmask. This a string dotted decimal quad, for example "255.255.255.0".
- `gateway` <font color="#6554c0">String</font>: The IP4 interface configuration. This a string dotted decimal quad, for example "192.168.1.2".
- `broadcast` <font color="#6554c0">String</font>: The IP4 broadcast address. This a string dotted decimal quad, for example "192.168.1.255".

## EthernetInterfaceConfig

- `securityMode` <font color="#6554c0">String</font>: Sets the encryption method.
- `identity` <font color="#6554c0">String</font>: The RADIUS (Remote Authentication Dial-In User Service) identity. If this value is blank, it will be taken from the specified client certificate ("subjectAltName" will be used if present; otherwise, the "commonName" is used).
- `eapTlsOptions` <font color="#6554c0">String</font>: A string containing EAP-specific options
- `caCertificates` <font color="#6554c0">String</font>: The contents of a CA certificate file in text form (that is, a "pem" file)
- `clientCertificate` <font color="#6554c0">String</font>: The contents of a client certificate file in text form (that is, a "pem" file)
- `privateKey` <font color="#6554c0">String:</font> The private key for authentication

## WiFiInterfaceConfig

This interface contains attributes related to the WiFi interface:

- `essId` <font color="#6554c0">String</font>: The ESSID of the wireless network
- `passphrase` <font color="#6554c0">String</font>: The plain-text passphrase/key for the wireless network
- `obfuscatedPassphrase` <font color="#6554c0">String</font> <font color="#01a0af">optional</font>: The passphrase/key for the wireless network that has been obfuscated using a shared secret. Contact [support@brightsign.biz](mailto\:support@brightsign.biz)  to learn more about generating a key for obfuscation and storing it on the player.

The following attributes relate to WPA Enterprise support:

- `securityMode` <font color="#6554c0">String</font>: 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.
- `identity` <font color="#6554c0">String</font>: The RADIUS identity. If this value is blank, it will be taken from the specified client certificate ("subjectAltName" will be used if present; otherwise, the "commonName" is used).
- `eapTlsOptions` <font color="#6554c0">String</font>: A string that contains EAP-specific options. Currently, this string can be used to enable or disable MD5 support ("md5=enable" or "md5=disable").
- `caCertificates` <font color="#6554c0">String</font>: The contents of a CA certificate file in text form (i.e. a "pem" file). Certificates can also be sent from an EAP peer.
- `clientCertificate` <font color="#6554c0">String</font>: The contents of a client certificate in text form (i.e. a "pem" file)
- `privateKey` <font color="#6554c0">String</font>: The private key for authentication. If the private key is password protected, use the passphrase/obfuscatedPassphrase attribute to set the password. If the client certificate and associated private key are in the same PKCS#12 file, the file contents should be specified in the privateKey field and the clientCertificate field should be left blank.
- `frequencies` <font color="#6554c0">String</font>: Gets the WiFi frequencies list
- `accessPointMode` <font color="#6554c0">bool</font> <font color="#01a0af">optional</font><font color="#00b8d9">:</font> Whether WiFi access-point mode is enabled or disabled. The ESSID and passphrase of the WiFi access point is set with the essId and passphrase/obfuscatedPassphrase attributes. If a passphrase has been set, the wireless access point will use WPA2 authentication–otherwise, it will use no authentication.
- `accessPointFrequency` <font color="#6554c0">long</font> <font color="#01a0af">optional</font><font color="#00b8d9">:</font> The [frequency](https://en.wikipedia.org/wiki/List_of_WLAN_channels) of the WiFi access point (in MHz)
- `accessPointHidden` <font color="#6554c0">bool</font> <font color="#01a0af">optional</font>: If hidden is `true`, the SSID is hidden, if `false` it is visible. The default is non-hidden, which was the previous behavior.

## Examples

The following example queries a BrightSign device for the network settings of a specific interface and prints the results (or any error) to the console:

```javascript
var networkConfigClass = require("@brightsign/networkconfiguration");
var nc = new networkConfigClass("ethO");

nc.getConfig().then(
        function(data) {
            console.log("***General Interface Data***");
            console.log(JSON.stringify(data));
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });
```

The following download example applies a static IP address to the ethernet interface. If a static IP address is not provided, it configures the interface for DHCP instead:

::File{src="https://api.archbee.com/api/presign/0prk6SO2dy9LdU77jB8D1/BKHvC_APRGVsZs01Qs_yp-20260128-192327.zip" label="js-networkconfiguration-staticip_updated.zip"}

The following code example restricts IP version support to IPv4 only:

```javascript
var networkConfigClass = require("@brightsign/networkconfiguration");
var networkConfigEthernet = new networkConfigClass("eth0");
networkConfigEthernet.getConfig()
    .then(
        function(data) {
            networkConfig = {}
            networkConfig.enabledProtocolList = ["IPv4"];
            networkConfigEthernet.applyConfig(networkConfig)
                .then(
                    function() {
                        console.log("Success");
                    })
                .catch(
                    function(err) {
                        console.log(err);
                    });
        })
    .catch(
        function(err) {
            console.log(err);
        });
```

To change one item while keeping the rest of the configuration the same, call getConfig and modify the returned object:

```javascript
  var NetworkConfiguration = require('@brightsign/networkconfiguration');
  var address = {
    ipAddress:"10.0.1.20",
    defaultGateway:"10.0.1.1",
    subnetMask:"255.255.255.0",
    broadcast: "10.0.1.255"
  };
  var networkConfig = new NetworkConfiguration("eth0");
  networkConfig.getConfig()
  .then(function(config) {
    var ipAddress = {
      family: "IPv4",
      address: address.ipAddress,
      netmask: address.subnetMask,
      gateway: address.defaultGateway,
      broadcast: address.broadcast,
    };
    config.ipAddressList = [ipAddress];
    networkConfig.applyConfig(config);
  })
  .then(function() {
    console.log("Success");
  })
  .catch(function(error) {
    console.log(`${JSON.stringify(error)}`);
  });
```

