From 2b2c668df924ef8e65c281dd4230539b73796e1b Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Thu, 14 Aug 2025 11:27:32 -0700 Subject: [PATCH 01/13] feat(PE-1039): add examples to enable ldws --- examples/enable-ldws-example/README.md | 161 ++++++++++++++++++ .../enable-ldws-example/autorun-nodejs.brs | 14 ++ examples/enable-ldws-example/autorun.brs | 22 +++ examples/enable-ldws-example/index.js | 28 +++ examples/enable-ldws-example/registry.brs | 27 +++ 5 files changed, 252 insertions(+) create mode 100644 examples/enable-ldws-example/README.md create mode 100644 examples/enable-ldws-example/autorun-nodejs.brs create mode 100644 examples/enable-ldws-example/autorun.brs create mode 100644 examples/enable-ldws-example/index.js create mode 100644 examples/enable-ldws-example/registry.brs diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md new file mode 100644 index 0000000..1c79e19 --- /dev/null +++ b/examples/enable-ldws-example/README.md @@ -0,0 +1,161 @@ +# Enable Local Diagnostic Web Server (LDWS) Example + +## Introduction + +This example demonstrates three different methods to enable and configure the Local Diagnostic Web Server (LDWS) on a BrightSign device. The LDWS provides a web interface for device diagnostics, monitoring, and configuration that can be accessed from a web browser on the same network. + +## Overview + +The example showcases three different approaches: +1. **BrightScript Method** - Using `roNetworkConfiguration` object (recommended for BrightScript applications) +2. **Node.js Method** - Using the `@brightsign/dwsconfiguration` module (recommended for Node.js applications) +3. **Registry Method** - Using registry settings (alternative approach) + +## Files + +- `autorun.brs` - BrightScript application demonstrating LDWS configuration via NetworkConfiguration +- `index.js` - Node.js application demonstrating LDWS configuration via DWSConfiguration module +- `autorun-nodejs.brs` - Alternative autorun file for launching the Node.js example +- `registry.brs` - BrightScript application demonstrating LDWS configuration via registry settings + +## Method 1: BrightScript with roNetworkConfiguration (Recommended) + +### File: `autorun.brs` + +This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to configure the LDWS settings. + +**Features:** +- Direct API approach using BrightScript +- Automatic reboot handling when required +- Password protection with custom password +- Immediate configuration application + +**How it works:** +1. Creates a `roNetworkConfiguration` object +2. Defines DWS configuration with password +3. Applies configuration using `SetupDWS()` +4. Automatically reboots the device if required + +### Configuration Options: +- `open`: Sets the password for LDWS access +- The function returns `true` if a reboot is required to apply changes + +## Method 2: Node.js with @brightsign/dwsconfiguration Module + +### File: `index.js` + +This method uses the Node.js `@brightsign/dwsconfiguration` module to configure LDWS settings. + +**Features:** +- Modern Node.js API approach +- Detailed configuration options +- Support for multiple authentication methods +- Flexible password obfuscation options + +**How it works:** +1. Imports the `@brightsign/dwsconfiguration` module +2. Creates a new DWSConfiguration instance +3. Defines comprehensive configuration object +4. Applies configuration using `applyConfig()` + +### Configuration Options: +- `port`: HTTP port for the web server (default: 80) +- `password.value`: Password for accessing the web interface +- `password.obfuscated`: Whether the password is obfuscated (false = plain text) +- `authenticationList`: Array of supported authentication methods (e.g., ["basic"]) + +## Method 3: Registry Settings + +### File: `registry.brs` + +This method uses the BrightSign registry to configure LDWS settings. + +**Features:** +- Low-level configuration approach +- Direct registry manipulation +- Persistent settings storage +- Requires manual reboot or restart + +**How it works:** +1. Creates a `roRegistrySection` for "networking" +2. Writes the HTTP server port configuration +3. Flushes changes to persistent storage + +### Configuration Options: +- `http_server`: Sets the port number for the HTTP server + +## Running the Examples + +### Method 1 (BrightScript - Recommended) +1. Copy `autorun.brs` to the root of your BrightSign player's SD card +2. Power on or restart your BrightSign player +3. The device will automatically configure LDWS and reboot if necessary +4. Access the web interface at `http:///` with password "brightsign_ldws_2024" + +### Method 2 (Node.js) +1. Ensure your BrightSign player supports Node.js applications +2. Copy `index.js` and `autorun-nodejs.brs` to the root of your BrightSign player's SD card +3. Rename `autorun-nodejs.brs` to `autorun.brs` (or use the provided file as a reference) +4. Power on or restart your BrightSign player +5. Access the web interface at `http:///` with password "nodejs_ldws_2024" + +### Method 3 (Registry) +1. Copy `registry.brs` to the root of your BrightSign player's SD card (rename to `autorun.brs`) +2. Power on or restart your BrightSign player +3. Manually restart the device or network service for changes to take effect +4. Access the web interface at `http://:80/` + +## Accessing the LDWS Web Interface + +Once LDWS is enabled: + +1. **Find the Device IP Address:** + - Check your router's connected devices + - Use BrightAuthor:connected device discovery + - Boot the player without an SD card to see network information + +2. **Access the Web Interface:** + - Open a web browser on a device connected to the same network + - Navigate to `http:///` (or `http://:80/` for Method 3) + - Enter the configured password when prompted + +3. **Available Features:** + - Device diagnostics and system information + - Network configuration and status + - Log file access and download + - System monitoring and performance metrics + +## Security Considerations + +- **Change Default Passwords:** Always use strong, unique passwords in production +- **Network Security:** LDWS should only be enabled on trusted networks +- **Access Control:** Consider network-level restrictions to limit access to the web interface +- **Password Protection:** All methods support password protection - use it + +## Troubleshooting + +- **Cannot Access Web Interface:** + - Verify the device IP address is correct + - Ensure your computer and BrightSign device are on the same network + - Check that the correct port is being used (default: 80) + - Verify the password is entered correctly + +- **Configuration Not Applied:** + - Method 1: Check if device rebooted after configuration + - Method 2: Ensure Node.js support is available on the device + - Method 3: Manually restart the device or network service + +- **Port Conflicts:** + - If port 80 is in use by another application, choose a different port + - Update your browser URL to include the custom port number + +## Best Practices + +1. **Use Method 1 (BrightScript)** for most BrightScript-based applications +2. **Use Method 2 (Node.js)** when developing Node.js applications +3. **Use strong passwords** and change them regularly +4. **Document the LDWS password** for future reference +5. **Test access** after configuration to ensure it works correctly +6. **Disable LDWS** in production if not needed for ongoing maintenance + +This example provides a foundation for implementing LDWS configuration in your BrightSign applications using the method that best fits your development approach. diff --git a/examples/enable-ldws-example/autorun-nodejs.brs b/examples/enable-ldws-example/autorun-nodejs.brs new file mode 100644 index 0000000..7d284ea --- /dev/null +++ b/examples/enable-ldws-example/autorun-nodejs.brs @@ -0,0 +1,14 @@ +' Autorun file for Node.js LDWS configuration example +' This file launches the Node.js application that configures LDWS + +Sub Main() + print "Starting Node.js LDWS configuration application..." + + ' Create and run Node.js application + nodeApp = CreateObject("roNodeApp") + if nodeApp <> invalid then + nodeApp.Run("index.js") + else + print "Error: Could not create Node.js application object" + end if +End Sub diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs new file mode 100644 index 0000000..84a61de --- /dev/null +++ b/examples/enable-ldws-example/autorun.brs @@ -0,0 +1,22 @@ +' Example: Enable LDWS and set password using BrightScript +' This method uses roNetworkConfiguration to configure Local Diagnostic Web Server +Sub Main() + ' Create network configuration object + nc = CreateObject("roNetworkConfiguration", 0) + + ' Enable LDWS and set the password + ' The "open" field sets the password for web interface access + dwsConfig = { open: "brightsign_ldws_2024" } + + print "Configuring Local Diagnostic Web Server..." + rebootRequired = nc.SetupDWS(dwsConfig) + + ' Reboot if required for changes to take effect + if rebootRequired then + print "Reboot required. Restarting device..." + RebootSystem() + else + print "LDWS configuration applied successfully!" + print "Access web interface at http:/// with password: brightsign_ldws_2024" + end if +End Sub diff --git a/examples/enable-ldws-example/index.js b/examples/enable-ldws-example/index.js new file mode 100644 index 0000000..0fa009d --- /dev/null +++ b/examples/enable-ldws-example/index.js @@ -0,0 +1,28 @@ +// Example: Enable LDWS using Node.js @brightsign/dwsconfiguration module +// This method provides more detailed configuration options for LDWS + +const DWSConfiguration = require("@brightsign/dwsconfiguration"); + +console.log("Configuring Local Diagnostic Web Server via Node.js..."); + +// Create DWS configuration instance +const dwsConfig = new DWSConfiguration(); + +// Define comprehensive LDWS configuration +const config = { + port: 80, // HTTP port for web server + password: { + value: "nodejs_ldws_2024", // Password for web interface access + obfuscated: false // Password is in plain text (not obfuscated) + }, + authenticationList: ["basic"] // Support basic HTTP authentication +}; + +try { + // Apply the LDWS configuration + dwsConfig.applyConfig(config); + console.log("LDWS configuration applied successfully!"); + console.log(`Access web interface at http://:${config.port}/ with password: ${config.password.value}`); +} catch (error) { + console.error("Failed to configure LDWS:", error.message); +} \ No newline at end of file diff --git a/examples/enable-ldws-example/registry.brs b/examples/enable-ldws-example/registry.brs new file mode 100644 index 0000000..fb2a11c --- /dev/null +++ b/examples/enable-ldws-example/registry.brs @@ -0,0 +1,27 @@ +' Example: Enable LDWS using registry settings +' This method uses direct registry manipulation to configure LDWS +' Note: This method requires manual device restart for changes to take effect + +function Main() + print "Configuring LDWS via registry settings..." + + ' Create registry section for networking configuration + registrySection = CreateObject("roRegistrySection", "networking") + + if type(registrySection) = "roRegistrySection" then + ' Set HTTP server port for LDWS + ' Port 80 is the default HTTP port + registrySection.Write("http_server", "80") + + print "Registry setting applied: http_server = 80" + print "Manual device restart required for changes to take effect" + print "After restart, access web interface at http://:80/" + else + print "Error: Could not create registry section" + end if + + ' Flush changes to persistent storage + registrySection.Flush() + + return 0 +end function \ No newline at end of file From f55cf743cb6e5f7d4fa91efab5a9dc80c386bfbf Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Thu, 14 Aug 2025 12:25:39 -0700 Subject: [PATCH 02/13] docs: renamed and restructured the examples --- examples/enable-ldws-example/README.md | 69 ++++++++++--------- examples/enable-ldws-example/autorun.brs | 4 +- .../autorun.brs} | 0 .../{ => javascript}/index.js | 2 +- .../autorun.brs} | 0 5 files changed, 41 insertions(+), 34 deletions(-) rename examples/enable-ldws-example/{autorun-nodejs.brs => javascript/autorun.brs} (100%) rename examples/enable-ldws-example/{ => javascript}/index.js (93%) rename examples/enable-ldws-example/{registry.brs => registry-config/autorun.brs} (100%) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 1c79e19..7ebbfc5 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -6,21 +6,26 @@ This example demonstrates three different methods to enable and configure the Lo ## Overview -The example showcases three different approaches: -1. **BrightScript Method** - Using `roNetworkConfiguration` object (recommended for BrightScript applications) -2. **Node.js Method** - Using the `@brightsign/dwsconfiguration` module (recommended for Node.js applications) -3. **Registry Method** - Using registry settings (alternative approach) -## Files +The example showcases three different approaches, listed in order of recommendation: +1. **BrightScript Method** (recommended for most applications) — Using `roNetworkConfiguration` in `autorun.brs` at the root of this directory +2. **Node.js Method** (recommended for Node.js-based projects) — Using the `@brightsign/dwsconfiguration` module in the `javascript/` subdirectory +3. **Registry Method** (lowest priority, not recommended unless required) — Using direct registry settings in the `registry-config/` subdirectory -- `autorun.brs` - BrightScript application demonstrating LDWS configuration via NetworkConfiguration -- `index.js` - Node.js application demonstrating LDWS configuration via DWSConfiguration module -- `autorun-nodejs.brs` - Alternative autorun file for launching the Node.js example -- `registry.brs` - BrightScript application demonstrating LDWS configuration via registry settings -## Method 1: BrightScript with roNetworkConfiguration (Recommended) +## Directory and Files -### File: `autorun.brs` +- `autorun.brs` — BrightScript application (recommended): enables LDWS using `roNetworkConfiguration`. +- `javascript/` + - `autorun.brs` — BrightScript autorun file to launch the Node.js example. + - `index.js` — Node.js application: enables LDWS using the `@brightsign/dwsconfiguration` module. +- `registry-config/` + - `autorun.brs` — BrightScript application: enables LDWS by writing directly to the registry (lowest priority method). + + +## Method 1: BrightScript with roNetworkConfiguration (**Recommended**) + +**File:** `autorun.brs` (in this directory) This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to configure the LDWS settings. @@ -40,11 +45,12 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to - `open`: Sets the password for LDWS access - The function returns `true` if a reboot is required to apply changes + ## Method 2: Node.js with @brightsign/dwsconfiguration Module -### File: `index.js` +**Files:** `javascript/autorun.brs` and `javascript/index.js` -This method uses the Node.js `@brightsign/dwsconfiguration` module to configure LDWS settings. +This method uses the Node.js `@brightsign/dwsconfiguration` module to configure LDWS settings. The BrightScript `autorun.brs` in the `javascript/` folder launches the Node.js script. **Features:** - Modern Node.js API approach @@ -64,11 +70,12 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure - `password.obfuscated`: Whether the password is obfuscated (false = plain text) - `authenticationList`: Array of supported authentication methods (e.g., ["basic"]) -## Method 3: Registry Settings -### File: `registry.brs` +## Method 3: Registry Settings (**Not recommended unless required**) + +**File:** `registry-config/autorun.brs` -This method uses the BrightSign registry to configure LDWS settings. +This method uses the BrightSign registry to configure LDWS settings. It is the least preferred method and should only be used if the other two are not possible. **Features:** - Low-level configuration approach @@ -86,24 +93,24 @@ This method uses the BrightSign registry to configure LDWS settings. ## Running the Examples + ### Method 1 (BrightScript - Recommended) -1. Copy `autorun.brs` to the root of your BrightSign player's SD card -2. Power on or restart your BrightSign player -3. The device will automatically configure LDWS and reboot if necessary -4. Access the web interface at `http:///` with password "brightsign_ldws_2024" +1. Copy `autorun.brs` (from this directory) to the root of your BrightSign player's SD card. +2. Power on or restart your BrightSign player. +3. The device will automatically configure LDWS and reboot if necessary. +4. Access the web interface at `http:///` with your configured password. ### Method 2 (Node.js) -1. Ensure your BrightSign player supports Node.js applications -2. Copy `index.js` and `autorun-nodejs.brs` to the root of your BrightSign player's SD card -3. Rename `autorun-nodejs.brs` to `autorun.brs` (or use the provided file as a reference) -4. Power on or restart your BrightSign player -5. Access the web interface at `http:///` with password "nodejs_ldws_2024" - -### Method 3 (Registry) -1. Copy `registry.brs` to the root of your BrightSign player's SD card (rename to `autorun.brs`) -2. Power on or restart your BrightSign player -3. Manually restart the device or network service for changes to take effect -4. Access the web interface at `http://:80/` +1. Ensure your BrightSign player supports Node.js applications. +2. Copy both `javascript/autorun.brs` and `javascript/index.js` to the root of your BrightSign player's SD card. +3. Power on or restart your BrightSign player. +4. Access the web interface at `http:///` with your configured password. + +### Method 3 (Registry - Not recommended) +1. Copy `registry-config/autorun.brs` to the root of your BrightSign player's SD card. +2. Power on or restart your BrightSign player. +3. Manually restart the device or network service for changes to take effect. +4. Access the web interface at `http://:80/`. ## Accessing the LDWS Web Interface diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index 84a61de..4efe9d0 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -6,7 +6,7 @@ Sub Main() ' Enable LDWS and set the password ' The "open" field sets the password for web interface access - dwsConfig = { open: "brightsign_ldws_2024" } + dwsConfig = { open: "your_password_here" } print "Configuring Local Diagnostic Web Server..." rebootRequired = nc.SetupDWS(dwsConfig) @@ -17,6 +17,6 @@ Sub Main() RebootSystem() else print "LDWS configuration applied successfully!" - print "Access web interface at http:/// with password: brightsign_ldws_2024" + print "Access web interface at http:/// with password: your_password_here" end if End Sub diff --git a/examples/enable-ldws-example/autorun-nodejs.brs b/examples/enable-ldws-example/javascript/autorun.brs similarity index 100% rename from examples/enable-ldws-example/autorun-nodejs.brs rename to examples/enable-ldws-example/javascript/autorun.brs diff --git a/examples/enable-ldws-example/index.js b/examples/enable-ldws-example/javascript/index.js similarity index 93% rename from examples/enable-ldws-example/index.js rename to examples/enable-ldws-example/javascript/index.js index 0fa009d..eb65670 100644 --- a/examples/enable-ldws-example/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -12,7 +12,7 @@ const dwsConfig = new DWSConfiguration(); const config = { port: 80, // HTTP port for web server password: { - value: "nodejs_ldws_2024", // Password for web interface access + value: "your_password_here", // Password for web interface access obfuscated: false // Password is in plain text (not obfuscated) }, authenticationList: ["basic"] // Support basic HTTP authentication diff --git a/examples/enable-ldws-example/registry.brs b/examples/enable-ldws-example/registry-config/autorun.brs similarity index 100% rename from examples/enable-ldws-example/registry.brs rename to examples/enable-ldws-example/registry-config/autorun.brs From 94a765a842ccfd6c08d4d3a6ab9c7a7dc37d1aa8 Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Thu, 14 Aug 2025 23:30:00 -0700 Subject: [PATCH 03/13] fix(PE-1039): ensured scripts properly enable ldws on player --- examples/enable-ldws-example/README.md | 77 +++++++------------ examples/enable-ldws-example/autorun.brs | 27 ++++++- .../javascript/autorun.brs | 19 +++-- .../enable-ldws-example/javascript/index.js | 57 +++++++++----- .../registry-config/autorun.brs | 9 +-- 5 files changed, 105 insertions(+), 84 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 7ebbfc5..75502f5 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -4,23 +4,20 @@ This example demonstrates three different methods to enable and configure the Local Diagnostic Web Server (LDWS) on a BrightSign device. The LDWS provides a web interface for device diagnostics, monitoring, and configuration that can be accessed from a web browser on the same network. -## Overview +## Overview and Directory Structure -The example showcases three different approaches, listed in order of recommendation: -1. **BrightScript Method** (recommended for most applications) — Using `roNetworkConfiguration` in `autorun.brs` at the root of this directory -2. **Node.js Method** (recommended for Node.js-based projects) — Using the `@brightsign/dwsconfiguration` module in the `javascript/` subdirectory -3. **Registry Method** (lowest priority, not recommended unless required) — Using direct registry settings in the `registry-config/` subdirectory +This example showcases three different approaches to enabling and configuring the Local Diagnostic Web Server (LDWS) on a BrightSign device, listed in order of recommendation: +- **BrightScript Method** (recommended for most applications): + - `autorun.brs` — BrightScript application at the root of this directory. Enables LDWS using `roNetworkConfiguration`. -## Directory and Files +- **Node.js Method** (recommended for Node.js-based projects): + - `javascript/autorun.brs` — BrightScript autorun file to launch the Node.js example. + - `javascript/index.js` — Node.js application that enables LDWS using the `@brightsign/dwsconfiguration` module. -- `autorun.brs` — BrightScript application (recommended): enables LDWS using `roNetworkConfiguration`. -- `javascript/` - - `autorun.brs` — BrightScript autorun file to launch the Node.js example. - - `index.js` — Node.js application: enables LDWS using the `@brightsign/dwsconfiguration` module. -- `registry-config/` - - `autorun.brs` — BrightScript application: enables LDWS by writing directly to the registry (lowest priority method). +- **Registry Method** (lowest priority, not recommended unless required): + - `registry-config/autorun.brs` — BrightScript application that enables LDWS by writing directly to the registry. ## Method 1: BrightScript with roNetworkConfiguration (**Recommended**) @@ -29,20 +26,15 @@ The example showcases three different approaches, listed in order of recommendat This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to configure the LDWS settings. -**Features:** -- Direct API approach using BrightScript -- Automatic reboot handling when required -- Password protection with custom password -- Immediate configuration application -**How it works:** -1. Creates a `roNetworkConfiguration` object -2. Defines DWS configuration with password -3. Applies configuration using `SetupDWS()` -4. Automatically reboots the device if required +**How it works & Features:** +- Uses the BrightScript `roNetworkConfiguration` API to enable LDWS with a custom password +- Applies configuration immediately and reboots the device if required +- Automatically retrieves and displays the device's IP address in the console output ### Configuration Options: - `open`: Sets the password for LDWS access +- `port`: Sets the HTTP port for the web server (default: 80) - The function returns `true` if a reboot is required to apply changes @@ -52,17 +44,12 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to This method uses the Node.js `@brightsign/dwsconfiguration` module to configure LDWS settings. The BrightScript `autorun.brs` in the `javascript/` folder launches the Node.js script. -**Features:** -- Modern Node.js API approach -- Detailed configuration options -- Support for multiple authentication methods -- Flexible password obfuscation options **How it works:** -1. Imports the `@brightsign/dwsconfiguration` module -2. Creates a new DWSConfiguration instance -3. Defines comprehensive configuration object -4. Applies configuration using `applyConfig()` +- Uses the Node.js `@brightsign/dwsconfiguration` module to enable LDWS with flexible configuration options +- Supports multiple authentication methods and password obfuscation +- Applies configuration programmatically from Node.js using async/await for clean error handling +- Automatically retrieves and displays the device's IP address from the network interface ### Configuration Options: - `port`: HTTP port for the web server (default: 80) @@ -77,18 +64,13 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure This method uses the BrightSign registry to configure LDWS settings. It is the least preferred method and should only be used if the other two are not possible. -**Features:** -- Low-level configuration approach -- Direct registry manipulation -- Persistent settings storage -- Requires manual reboot or restart **How it works:** -1. Creates a `roRegistrySection` for "networking" -2. Writes the HTTP server port configuration -3. Flushes changes to persistent storage +- Uses direct registry manipulation to enable LDWS by setting the `dwse` registry key +- Settings persist across reboots but require a manual restart to take effect ### Configuration Options: +- `dwse`: Registry key to enable/disable LDWS ("yes" to enable) - `http_server`: Sets the port number for the HTTP server ## Running the Examples @@ -98,13 +80,13 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l 1. Copy `autorun.brs` (from this directory) to the root of your BrightSign player's SD card. 2. Power on or restart your BrightSign player. 3. The device will automatically configure LDWS and reboot if necessary. -4. Access the web interface at `http:///` with your configured password. +4. Check the console output for the actual device IP address and access the web interface with your configured password. ### Method 2 (Node.js) 1. Ensure your BrightSign player supports Node.js applications. 2. Copy both `javascript/autorun.brs` and `javascript/index.js` to the root of your BrightSign player's SD card. 3. Power on or restart your BrightSign player. -4. Access the web interface at `http:///` with your configured password. +4. Check the console output for the actual device IP address and access the web interface with your configured password. ### Method 3 (Registry - Not recommended) 1. Copy `registry-config/autorun.brs` to the root of your BrightSign player's SD card. @@ -117,21 +99,14 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l Once LDWS is enabled: 1. **Find the Device IP Address:** - - Check your router's connected devices - - Use BrightAuthor:connected device discovery - - Boot the player without an SD card to see network information + - **Methods 1 & 2:** Check the console output after running the examples - the actual IP address will be displayed + - **Alternative methods:** Check your router's connected devices, use BrightAuthor:connected device discovery, or boot the player without an SD card to see network information 2. **Access the Web Interface:** - - Open a web browser on a device connected to the same network + - Open a web browser on a computer / laptop connected to the same network - Navigate to `http:///` (or `http://:80/` for Method 3) - Enter the configured password when prompted -3. **Available Features:** - - Device diagnostics and system information - - Network configuration and status - - Log file access and download - - System monitoring and performance metrics - ## Security Considerations - **Change Default Passwords:** Always use strong, unique passwords in production diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index 4efe9d0..7eb78fc 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -1,22 +1,45 @@ ' Example: Enable LDWS and set password using BrightScript ' This method uses roNetworkConfiguration to configure Local Diagnostic Web Server Sub Main() + + ' Create registry section for networking configuration + registrySection = CreateObject("roRegistrySection", "networking") + + if type(registrySection) = "roRegistrySection" then + ' Set HTTP server port for LDWS + ' Port 80 is the default HTTP port + registrySection.Write("dwse", "yes") + + print "Registry setting applied: bsne = yes" + else + print "Error: Could not create registry section" + end if + ' Create network configuration object + ' 0 corresponds to eth0, 1 for wlan0, 2 for ppp0, usb0 and usb1 can be input as well nc = CreateObject("roNetworkConfiguration", 0) ' Enable LDWS and set the password ' The "open" field sets the password for web interface access - dwsConfig = { open: "your_password_here" } + dwsConfig = { port: 80, open: "your_password_here" } print "Configuring Local Diagnostic Web Server..." rebootRequired = nc.SetupDWS(dwsConfig) + currentConfig = nc.GetCurrentConfig() + + if type(currentConfig) = "roAssociativeArray" then + ipAddress$ = currentConfig.ip4_address + else + ipAddress$ = "" + endif + ' Reboot if required for changes to take effect if rebootRequired then print "Reboot required. Restarting device..." RebootSystem() else print "LDWS configuration applied successfully!" - print "Access web interface at http:/// with password: your_password_here" + print "Access web interface at http://"; ipAddress$; "/ with password: your_password_here" end if End Sub diff --git a/examples/enable-ldws-example/javascript/autorun.brs b/examples/enable-ldws-example/javascript/autorun.brs index 7d284ea..5763915 100644 --- a/examples/enable-ldws-example/javascript/autorun.brs +++ b/examples/enable-ldws-example/javascript/autorun.brs @@ -3,12 +3,19 @@ Sub Main() print "Starting Node.js LDWS configuration application..." + + mp = CreateObject("roMessagePort") ' Create and run Node.js application - nodeApp = CreateObject("roNodeApp") - if nodeApp <> invalid then - nodeApp.Run("index.js") - else - print "Error: Could not create Node.js application object" - end if + nodeApp = CreateObject("roNodeJs", "index.js", { message_port: mp }) + + 'Event Loop + while true + msg = wait(0,mp) + print "msg received - type=";type(msg) + + if type(msg) = "roNodeJsEvent" then + print "msg: ";msg + end if + end while End Sub diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index eb65670..b78d56f 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -2,27 +2,44 @@ // This method provides more detailed configuration options for LDWS const DWSConfiguration = require("@brightsign/dwsconfiguration"); +const NetworkConfiguration = require("@brightsign/networkconfiguration"); +const registryClass = require("@brightsign/registry"); -console.log("Configuring Local Diagnostic Web Server via Node.js..."); +async function configureLDWS() { + console.log("Configuring Local Diagnostic Web Server via Node.js..."); -// Create DWS configuration instance -const dwsConfig = new DWSConfiguration(); + // Create DWS configuration instance + const dwsConfig = new DWSConfiguration(); -// Define comprehensive LDWS configuration -const config = { - port: 80, // HTTP port for web server - password: { - value: "your_password_here", // Password for web interface access - obfuscated: false // Password is in plain text (not obfuscated) - }, - authenticationList: ["basic"] // Support basic HTTP authentication -}; + // Define comprehensive LDWS configuration + const config = { + port: 80, // HTTP port for web server + password: { + value: "your_password_here", // Password for web interface access + obfuscated: false // Password is in plain text + }, + authenticationList: ["basic"] // Support basic HTTP authentication + }; -try { - // Apply the LDWS configuration - dwsConfig.applyConfig(config); - console.log("LDWS configuration applied successfully!"); - console.log(`Access web interface at http://:${config.port}/ with password: ${config.password.value}`); -} catch (error) { - console.error("Failed to configure LDWS:", error.message); -} \ No newline at end of file + try { + const registry = new registryClass(); + registry.write("networking", "dwse", "yes"); // Enable LDWS in the registry + registry.flush(); + + // Apply the LDWS configuration + dwsConfig.applyConfig(config); + console.log("LDWS configuration applied successfully!"); + + // Get the device IP address from wlan0 + const nc = new NetworkConfiguration("wlan0"); + const networkConfig = await nc.getConfig(); + const ipAddress = networkConfig.ipAddress || ""; + console.log(`Access web interface at http://${ipAddress}:${config.port}/ with password: ${config.password.value}`); + } catch (error) { + console.error("Failed to configure LDWS or retrieve IP address:", error.message); + console.log(`Access web interface at http://:${config.port}/ with password: ${config.password.value}`); + } +} + +// Run the configuration +configureLDWS(); \ No newline at end of file diff --git a/examples/enable-ldws-example/registry-config/autorun.brs b/examples/enable-ldws-example/registry-config/autorun.brs index fb2a11c..fb7fed7 100644 --- a/examples/enable-ldws-example/registry-config/autorun.brs +++ b/examples/enable-ldws-example/registry-config/autorun.brs @@ -11,9 +11,10 @@ function Main() if type(registrySection) = "roRegistrySection" then ' Set HTTP server port for LDWS ' Port 80 is the default HTTP port - registrySection.Write("http_server", "80") - - print "Registry setting applied: http_server = 80" + registrySection.write("dwse", "yes") + registrySection.write("http_server", 80) + + print "Registry setting applied: dwse = yes" print "Manual device restart required for changes to take effect" print "After restart, access web interface at http://:80/" else @@ -22,6 +23,4 @@ function Main() ' Flush changes to persistent storage registrySection.Flush() - - return 0 end function \ No newline at end of file From 6828186a559cc491b68a8c5789ae1d25365eae9c Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Fri, 15 Aug 2025 15:35:50 -0700 Subject: [PATCH 04/13] docs(PE-1039): clarify that dwse registry key is not required for enabling default disabled local dws players --- examples/enable-ldws-example/README.md | 6 ++++++ examples/enable-ldws-example/autorun.brs | 7 ++++++- examples/enable-ldws-example/javascript/index.js | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 75502f5..908344c 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -31,6 +31,9 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to - Uses the BrightScript `roNetworkConfiguration` API to enable LDWS with a custom password - Applies configuration immediately and reboots the device if required - Automatically retrieves and displays the device's IP address in the console output +- Includes registry setting for players that have been previously configured to disable LDWS + +**Note:** The registry setting (`dwse`) is only needed if the player has been used with a setup that previously disabled LDWS. For enabling LDWS on a player that has it disabled by default, the `SetupDWS()` function is the primary solution. ### Configuration Options: - `open`: Sets the password for LDWS access @@ -50,6 +53,9 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure - Supports multiple authentication methods and password obfuscation - Applies configuration programmatically from Node.js using async/await for clean error handling - Automatically retrieves and displays the device's IP address from the network interface +- Includes registry setting for players that have been previously configured to disable LDWS via setup files + +**Note:** The registry setting (`dwse`) is only needed if the player has been used with a setup that previously disabled LDWS. For enabling LDWS on a player that has it disabled by default, the `applyConfig()` function is the primary solution. ### Configuration Options: - `port`: HTTP port for the web server (default: 80) diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index 7eb78fc..e67ad56 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -2,6 +2,10 @@ ' This method uses roNetworkConfiguration to configure Local Diagnostic Web Server Sub Main() + ' NOTE: The registry setting below is only needed if the player has been used with + ' a setup that previously disabled LDWS. For enabling LDWS on a player that has it + ' disabled by default, the SetupDWS() function below is the primary solution. + ' Create registry section for networking configuration registrySection = CreateObject("roRegistrySection", "networking") @@ -19,7 +23,8 @@ Sub Main() ' 0 corresponds to eth0, 1 for wlan0, 2 for ppp0, usb0 and usb1 can be input as well nc = CreateObject("roNetworkConfiguration", 0) - ' Enable LDWS and set the password + ' Primary method: Enable LDWS and set the password using the API + ' This is the recommended approach for most use cases ' The "open" field sets the password for web interface access dwsConfig = { port: 80, open: "your_password_here" } diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index b78d56f..67091b2 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -22,11 +22,15 @@ async function configureLDWS() { }; try { + // NOTE: The registry setting below is only needed if the player has been used with + // a setup that previously disabled LDWS. For enabling LDWS on a player that has it + // disabled by default, the applyConfig() function below is the primary solution. const registry = new registryClass(); registry.write("networking", "dwse", "yes"); // Enable LDWS in the registry registry.flush(); - // Apply the LDWS configuration + // Primary method: Apply the LDWS configuration using the API + // This is the recommended approach for most use cases dwsConfig.applyConfig(config); console.log("LDWS configuration applied successfully!"); From 2edbe94f8c5ce83822cbac3f4d240f760c7d3be4 Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Wed, 20 Aug 2025 10:48:44 -0700 Subject: [PATCH 05/13] fix(PE-1039): removed unrelated dwse registry change but kept note in readme to provide solution for players that have ldws disabled via setup, not just disabled by default --- examples/enable-ldws-example/README.md | 13 +++++-------- examples/enable-ldws-example/autorun.brs | 19 ------------------- .../enable-ldws-example/javascript/index.js | 14 +++----------- .../registry-config/autorun.brs | 3 +-- 4 files changed, 9 insertions(+), 40 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 908344c..0c66d9a 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -31,9 +31,6 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to - Uses the BrightScript `roNetworkConfiguration` API to enable LDWS with a custom password - Applies configuration immediately and reboots the device if required - Automatically retrieves and displays the device's IP address in the console output -- Includes registry setting for players that have been previously configured to disable LDWS - -**Note:** The registry setting (`dwse`) is only needed if the player has been used with a setup that previously disabled LDWS. For enabling LDWS on a player that has it disabled by default, the `SetupDWS()` function is the primary solution. ### Configuration Options: - `open`: Sets the password for LDWS access @@ -53,9 +50,6 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure - Supports multiple authentication methods and password obfuscation - Applies configuration programmatically from Node.js using async/await for clean error handling - Automatically retrieves and displays the device's IP address from the network interface -- Includes registry setting for players that have been previously configured to disable LDWS via setup files - -**Note:** The registry setting (`dwse`) is only needed if the player has been used with a setup that previously disabled LDWS. For enabling LDWS on a player that has it disabled by default, the `applyConfig()` function is the primary solution. ### Configuration Options: - `port`: HTTP port for the web server (default: 80) @@ -72,11 +66,10 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l **How it works:** -- Uses direct registry manipulation to enable LDWS by setting the `dwse` registry key +- Uses direct registry manipulation to enable LDWS - Settings persist across reboots but require a manual restart to take effect ### Configuration Options: -- `dwse`: Registry key to enable/disable LDWS ("yes" to enable) - `http_server`: Sets the port number for the HTTP server ## Running the Examples @@ -137,6 +130,10 @@ Once LDWS is enabled: - If port 80 is in use by another application, choose a different port - Update your browser URL to include the custom port number +## Important Note: Registry Configuration (`dwse`) + +**Note:** The `dwse` registry key is only required for players that have been previously configured with a setup file that explicitly disabled LDWS. This registry setting is NOT needed when LDWS is simply disabled by default on the player. For standard LDWS enablement, use the `SetupDWS()` function (Method 1) or the `@brightsign/dwsconfiguration` module (Method 2) as these are the primary solutions for enabling LDWS functionality. + ## Best Practices 1. **Use Method 1 (BrightScript)** for most BrightScript-based applications diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index e67ad56..bda2bfe 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -1,31 +1,12 @@ ' Example: Enable LDWS and set password using BrightScript ' This method uses roNetworkConfiguration to configure Local Diagnostic Web Server Sub Main() - - ' NOTE: The registry setting below is only needed if the player has been used with - ' a setup that previously disabled LDWS. For enabling LDWS on a player that has it - ' disabled by default, the SetupDWS() function below is the primary solution. - - ' Create registry section for networking configuration - registrySection = CreateObject("roRegistrySection", "networking") - - if type(registrySection) = "roRegistrySection" then - ' Set HTTP server port for LDWS - ' Port 80 is the default HTTP port - registrySection.Write("dwse", "yes") - - print "Registry setting applied: bsne = yes" - else - print "Error: Could not create registry section" - end if - ' Create network configuration object ' 0 corresponds to eth0, 1 for wlan0, 2 for ppp0, usb0 and usb1 can be input as well nc = CreateObject("roNetworkConfiguration", 0) ' Primary method: Enable LDWS and set the password using the API ' This is the recommended approach for most use cases - ' The "open" field sets the password for web interface access dwsConfig = { port: 80, open: "your_password_here" } print "Configuring Local Diagnostic Web Server..." diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index 67091b2..1828472 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -3,7 +3,6 @@ const DWSConfiguration = require("@brightsign/dwsconfiguration"); const NetworkConfiguration = require("@brightsign/networkconfiguration"); -const registryClass = require("@brightsign/registry"); async function configureLDWS() { console.log("Configuring Local Diagnostic Web Server via Node.js..."); @@ -22,20 +21,13 @@ async function configureLDWS() { }; try { - // NOTE: The registry setting below is only needed if the player has been used with - // a setup that previously disabled LDWS. For enabling LDWS on a player that has it - // disabled by default, the applyConfig() function below is the primary solution. - const registry = new registryClass(); - registry.write("networking", "dwse", "yes"); // Enable LDWS in the registry - registry.flush(); - // Primary method: Apply the LDWS configuration using the API // This is the recommended approach for most use cases dwsConfig.applyConfig(config); console.log("LDWS configuration applied successfully!"); - - // Get the device IP address from wlan0 - const nc = new NetworkConfiguration("wlan0"); + + // Get the device IP address from eth0 + const nc = new NetworkConfiguration("eth0"); const networkConfig = await nc.getConfig(); const ipAddress = networkConfig.ipAddress || ""; console.log(`Access web interface at http://${ipAddress}:${config.port}/ with password: ${config.password.value}`); diff --git a/examples/enable-ldws-example/registry-config/autorun.brs b/examples/enable-ldws-example/registry-config/autorun.brs index fb7fed7..de46465 100644 --- a/examples/enable-ldws-example/registry-config/autorun.brs +++ b/examples/enable-ldws-example/registry-config/autorun.brs @@ -11,10 +11,9 @@ function Main() if type(registrySection) = "roRegistrySection" then ' Set HTTP server port for LDWS ' Port 80 is the default HTTP port - registrySection.write("dwse", "yes") registrySection.write("http_server", 80) - print "Registry setting applied: dwse = yes" + print "Registry setting applied: http_server = 80" print "Manual device restart required for changes to take effect" print "After restart, access web interface at http://:80/" else From 304530d9ed61c57cfc54e05d7250938f6743917f Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Thu, 21 Aug 2025 14:55:19 -0700 Subject: [PATCH 06/13] docs(PE-1039): refined inline comments to better explain scripts --- examples/enable-ldws-example/autorun.brs | 22 ++++++------- .../javascript/autorun.brs | 16 +++------- .../enable-ldws-example/javascript/index.js | 31 ++++++++----------- .../registry-config/autorun.brs | 22 +++++-------- 4 files changed, 34 insertions(+), 57 deletions(-) diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index bda2bfe..87a5071 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -1,31 +1,27 @@ -' Example: Enable LDWS and set password using BrightScript -' This method uses roNetworkConfiguration to configure Local Diagnostic Web Server Sub Main() - ' Create network configuration object - ' 0 corresponds to eth0, 1 for wlan0, 2 for ppp0, usb0 and usb1 can be input as well + ' Create network configuration object (0 = eth0, 1 = wlan0, 2 = ppp0, usb0 and usb1 can be input as well) nc = CreateObject("roNetworkConfiguration", 0) - ' Primary method: Enable LDWS and set the password using the API - ' This is the recommended approach for most use cases + ' Configure LDWS: enable on port 80 with password dwsConfig = { port: 80, open: "your_password_here" } - print "Configuring Local Diagnostic Web Server..." + print "Enabling LDWS..." rebootRequired = nc.SetupDWS(dwsConfig) - currentConfig = nc.GetCurrentConfig() - + ' Get device IP address to show user where to connect + currentConfig = nc.GetCurrentConfig() if type(currentConfig) = "roAssociativeArray" then ipAddress$ = currentConfig.ip4_address else ipAddress$ = "" endif - ' Reboot if required for changes to take effect + ' Some configurations require restart to take effect if rebootRequired then - print "Reboot required. Restarting device..." + print "Restarting device to apply changes..." RebootSystem() else - print "LDWS configuration applied successfully!" - print "Access web interface at http://"; ipAddress$; "/ with password: your_password_here" + print "LDWS enabled! Access at: http://"; ipAddress$; "/" + print "Password: your_password_here" end if End Sub diff --git a/examples/enable-ldws-example/javascript/autorun.brs b/examples/enable-ldws-example/javascript/autorun.brs index 5763915..4c74a5a 100644 --- a/examples/enable-ldws-example/javascript/autorun.brs +++ b/examples/enable-ldws-example/javascript/autorun.brs @@ -1,21 +1,15 @@ -' Autorun file for Node.js LDWS configuration example -' This file launches the Node.js application that configures LDWS - Sub Main() - print "Starting Node.js LDWS configuration application..." + print "Starting LDWS configuration..." + ' Create message port to communicate with Node.js mp = CreateObject("roMessagePort") - - ' Create and run Node.js application nodeApp = CreateObject("roNodeJs", "index.js", { message_port: mp }) - 'Event Loop + ' Event loop to handle Node.js messages while true - msg = wait(0,mp) - print "msg received - type=";type(msg) - + msg = wait(0, mp) if type(msg) = "roNodeJsEvent" then - print "msg: ";msg + print "Node.js: "; msg end if end while End Sub diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index 1828472..46418a8 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -1,41 +1,36 @@ -// Example: Enable LDWS using Node.js @brightsign/dwsconfiguration module -// This method provides more detailed configuration options for LDWS - const DWSConfiguration = require("@brightsign/dwsconfiguration"); const NetworkConfiguration = require("@brightsign/networkconfiguration"); async function configureLDWS() { - console.log("Configuring Local Diagnostic Web Server via Node.js..."); + console.log("Enabling LDWS..."); // Create DWS configuration instance const dwsConfig = new DWSConfiguration(); - - // Define comprehensive LDWS configuration const config = { - port: 80, // HTTP port for web server + port: 80, // HTTP port for web interface password: { - value: "your_password_here", // Password for web interface access - obfuscated: false // Password is in plain text + value: "your_password_here", + obfuscated: false // Password stored as plain text }, - authenticationList: ["basic"] // Support basic HTTP authentication + authenticationList: ["basic"] // Use basic HTTP authentication }; try { - // Primary method: Apply the LDWS configuration using the API - // This is the recommended approach for most use cases + // Apply LDWS configuration to device dwsConfig.applyConfig(config); - console.log("LDWS configuration applied successfully!"); + console.log("LDWS enabled!"); - // Get the device IP address from eth0 + // Get device IP address to show user where to connect const nc = new NetworkConfiguration("eth0"); const networkConfig = await nc.getConfig(); const ipAddress = networkConfig.ipAddress || ""; - console.log(`Access web interface at http://${ipAddress}:${config.port}/ with password: ${config.password.value}`); + console.log(`Access: http://${ipAddress}/`); + console.log(`Password: ${config.password.value}`); } catch (error) { - console.error("Failed to configure LDWS or retrieve IP address:", error.message); - console.log(`Access web interface at http://:${config.port}/ with password: ${config.password.value}`); + console.error("Configuration failed:", error.message); + console.log(`Access: http:///`); + console.log(`Password: ${config.password.value}`); } } -// Run the configuration configureLDWS(); \ No newline at end of file diff --git a/examples/enable-ldws-example/registry-config/autorun.brs b/examples/enable-ldws-example/registry-config/autorun.brs index de46465..8b45cd1 100644 --- a/examples/enable-ldws-example/registry-config/autorun.brs +++ b/examples/enable-ldws-example/registry-config/autorun.brs @@ -1,25 +1,17 @@ -' Example: Enable LDWS using registry settings -' This method uses direct registry manipulation to configure LDWS -' Note: This method requires manual device restart for changes to take effect - function Main() - print "Configuring LDWS via registry settings..." + print "Enabling LDWS via registry..." - ' Create registry section for networking configuration + ' Access the networking section of device registry registrySection = CreateObject("roRegistrySection", "networking") if type(registrySection) = "roRegistrySection" then - ' Set HTTP server port for LDWS - ' Port 80 is the default HTTP port + ' Set HTTP server to enable LDWS on port 80 registrySection.write("http_server", 80) + registrySection.Flush() - print "Registry setting applied: http_server = 80" - print "Manual device restart required for changes to take effect" - print "After restart, access web interface at http://:80/" + print "Registry updated - restart device manually" + print "After restart: http:///" else - print "Error: Could not create registry section" + print "Error: Could not access registry" end if - - ' Flush changes to persistent storage - registrySection.Flush() end function \ No newline at end of file From 0ad36f8da941ac1fc150e9e0acfbeee15969152c Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Thu, 4 Sep 2025 12:34:33 -0700 Subject: [PATCH 07/13] docs(PE-1039): clean up documentation formatting and remove unnecessary script lines --- examples/enable-ldws-example/README.md | 10 +--------- .../enable-ldws-example/javascript/index.js | 18 +++++------------- .../registry-config/autorun.brs | 1 + 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 0c66d9a..6f576aa 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -4,7 +4,6 @@ This example demonstrates three different methods to enable and configure the Local Diagnostic Web Server (LDWS) on a BrightSign device. The LDWS provides a web interface for device diagnostics, monitoring, and configuration that can be accessed from a web browser on the same network. - ## Overview and Directory Structure This example showcases three different approaches to enabling and configuring the Local Diagnostic Web Server (LDWS) on a BrightSign device, listed in order of recommendation: @@ -19,14 +18,12 @@ This example showcases three different approaches to enabling and configuring th - **Registry Method** (lowest priority, not recommended unless required): - `registry-config/autorun.brs` — BrightScript application that enables LDWS by writing directly to the registry. - ## Method 1: BrightScript with roNetworkConfiguration (**Recommended**) **File:** `autorun.brs` (in this directory) This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to configure the LDWS settings. - **How it works & Features:** - Uses the BrightScript `roNetworkConfiguration` API to enable LDWS with a custom password - Applies configuration immediately and reboots the device if required @@ -37,14 +34,12 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to - `port`: Sets the HTTP port for the web server (default: 80) - The function returns `true` if a reboot is required to apply changes - ## Method 2: Node.js with @brightsign/dwsconfiguration Module **Files:** `javascript/autorun.brs` and `javascript/index.js` This method uses the Node.js `@brightsign/dwsconfiguration` module to configure LDWS settings. The BrightScript `autorun.brs` in the `javascript/` folder launches the Node.js script. - **How it works:** - Uses the Node.js `@brightsign/dwsconfiguration` module to enable LDWS with flexible configuration options - Supports multiple authentication methods and password obfuscation @@ -57,14 +52,12 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure - `password.obfuscated`: Whether the password is obfuscated (false = plain text) - `authenticationList`: Array of supported authentication methods (e.g., ["basic"]) - ## Method 3: Registry Settings (**Not recommended unless required**) **File:** `registry-config/autorun.brs` This method uses the BrightSign registry to configure LDWS settings. It is the least preferred method and should only be used if the other two are not possible. - **How it works:** - Uses direct registry manipulation to enable LDWS - Settings persist across reboots but require a manual restart to take effect @@ -74,7 +67,6 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l ## Running the Examples - ### Method 1 (BrightScript - Recommended) 1. Copy `autorun.brs` (from this directory) to the root of your BrightSign player's SD card. 2. Power on or restart your BrightSign player. @@ -103,7 +95,7 @@ Once LDWS is enabled: 2. **Access the Web Interface:** - Open a web browser on a computer / laptop connected to the same network - - Navigate to `http:///` (or `http://:80/` for Method 3) + - Navigate to `http:///` (or `http://:80/` for Method 3); by default, the Diagnostic Web Server is enabled on port 80 - Enter the configured password when prompted ## Security Considerations diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index 46418a8..5c6f4f6 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -1,8 +1,9 @@ const DWSConfiguration = require("@brightsign/dwsconfiguration"); -const NetworkConfiguration = require("@brightsign/networkconfiguration"); +const systemClass = require("@brightsign/system"); async function configureLDWS() { console.log("Enabling LDWS..."); + const system = new systemClass(); // Create DWS configuration instance const dwsConfig = new DWSConfiguration(); @@ -12,24 +13,15 @@ async function configureLDWS() { value: "your_password_here", obfuscated: false // Password stored as plain text }, - authenticationList: ["basic"] // Use basic HTTP authentication + authenticationList: ["digest"] // Use digest HTTP authentication }; try { // Apply LDWS configuration to device dwsConfig.applyConfig(config); - console.log("LDWS enabled!"); - - // Get device IP address to show user where to connect - const nc = new NetworkConfiguration("eth0"); - const networkConfig = await nc.getConfig(); - const ipAddress = networkConfig.ipAddress || ""; - console.log(`Access: http://${ipAddress}/`); - console.log(`Password: ${config.password.value}`); - } catch (error) { + console.log("Reboot to apply LDWS changes."); + } catch (error) { console.error("Configuration failed:", error.message); - console.log(`Access: http:///`); - console.log(`Password: ${config.password.value}`); } } diff --git a/examples/enable-ldws-example/registry-config/autorun.brs b/examples/enable-ldws-example/registry-config/autorun.brs index 8b45cd1..954b0e9 100644 --- a/examples/enable-ldws-example/registry-config/autorun.brs +++ b/examples/enable-ldws-example/registry-config/autorun.brs @@ -6,6 +6,7 @@ function Main() if type(registrySection) = "roRegistrySection" then ' Set HTTP server to enable LDWS on port 80 + registrySection.write("dwse", "yes") registrySection.write("http_server", 80) registrySection.Flush() From 1509699a09690eeba0ddf23c1978a18581930932 Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Thu, 4 Sep 2025 14:33:47 -0700 Subject: [PATCH 08/13] fix(PE-1039): added apply and reboot logic to scripts --- examples/enable-ldws-example/README.md | 5 +++-- examples/enable-ldws-example/autorun.brs | 1 + examples/enable-ldws-example/javascript/index.js | 8 ++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 6f576aa..209c9d6 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -50,7 +50,7 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure - `port`: HTTP port for the web server (default: 80) - `password.value`: Password for accessing the web interface - `password.obfuscated`: Whether the password is obfuscated (false = plain text) -- `authenticationList`: Array of supported authentication methods (e.g., ["basic"]) +- `authenticationList`: Array of supported authentication methods (e.g., ["digest"]) ## Method 3: Registry Settings (**Not recommended unless required**) @@ -64,6 +64,7 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l ### Configuration Options: - `http_server`: Sets the port number for the HTTP server +- `dwse`: Enables the local DWS when disabled from setup package ## Running the Examples @@ -95,7 +96,7 @@ Once LDWS is enabled: 2. **Access the Web Interface:** - Open a web browser on a computer / laptop connected to the same network - - Navigate to `http:///` (or `http://:80/` for Method 3); by default, the Diagnostic Web Server is enabled on port 80 + - Navigate to `https:///`; by default, the Diagnostic Web Server is enabled on port 80 - Enter the configured password when prompted ## Security Considerations diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index 87a5071..3276658 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -7,6 +7,7 @@ Sub Main() print "Enabling LDWS..." rebootRequired = nc.SetupDWS(dwsConfig) + ok = nc.Apply(); ' Get device IP address to show user where to connect currentConfig = nc.GetCurrentConfig() diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index 5c6f4f6..cc6df6f 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -19,8 +19,12 @@ async function configureLDWS() { try { // Apply LDWS configuration to device dwsConfig.applyConfig(config); - console.log("Reboot to apply LDWS changes."); - } catch (error) { + console.log("LDWS enabled!"); + + // Reboot device to apply changes + console.log("Rebooting device to apply changes..."); + system.reboot(); + } catch (error) { console.error("Configuration failed:", error.message); } } From 560e5c5df88cd054f7241f1b8b1b4215d988165b Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Mon, 8 Sep 2025 13:03:44 -0700 Subject: [PATCH 09/13] fix(PE-1039): removed unnecessary function call and added more context to registry script --- examples/enable-ldws-example/autorun.brs | 1 - .../enable-ldws-example/registry-config/autorun.brs | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index 3276658..87a5071 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -7,7 +7,6 @@ Sub Main() print "Enabling LDWS..." rebootRequired = nc.SetupDWS(dwsConfig) - ok = nc.Apply(); ' Get device IP address to show user where to connect currentConfig = nc.GetCurrentConfig() diff --git a/examples/enable-ldws-example/registry-config/autorun.brs b/examples/enable-ldws-example/registry-config/autorun.brs index 954b0e9..e66d635 100644 --- a/examples/enable-ldws-example/registry-config/autorun.brs +++ b/examples/enable-ldws-example/registry-config/autorun.brs @@ -4,14 +4,14 @@ function Main() ' Access the networking section of device registry registrySection = CreateObject("roRegistrySection", "networking") - if type(registrySection) = "roRegistrySection" then - ' Set HTTP server to enable LDWS on port 80 + if type(registrySection) = "roRegistrySection" then + ' Enable Local DWS on the default port 80 registrySection.write("dwse", "yes") - registrySection.write("http_server", 80) - registrySection.Flush() - - print "Registry updated - restart device manually" + ' Set HTTP server to enable LDWS on the specified port + ' registrySection.write("http_server", "80") + print "Registry updated - restart device" print "After restart: http:///" + RebootSystem() else print "Error: Could not access registry" end if From 30c4b6e7f725d2b87994440b3edf0e81fdc62c62 Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Mon, 8 Sep 2025 16:06:00 -0700 Subject: [PATCH 10/13] docs(PE-1039): added more specific scripting context --- examples/enable-ldws-example/README.md | 46 +++++++++++++++--------- examples/enable-ldws-example/autorun.brs | 1 + 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 209c9d6..961f3a5 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -60,31 +60,43 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l **How it works:** - Uses direct registry manipulation to enable LDWS -- Settings persist across reboots but require a manual restart to take effect +- Automatically reboots the device to apply changes +- No password protection (less secure than other methods) ### Configuration Options: -- `http_server`: Sets the port number for the HTTP server -- `dwse`: Enables the local DWS when disabled from setup package +These registry keys work independently and can be used separately: +- `http_server`: Sets the port number for the HTTP server (enables LDWS on specified port) +- `dwse`: Enables the local DWS when disabled from setup package (only needed if previously disabled by setup) + +## WARNING: Prevent Reboot Loops + +**Methods 2 and 3 will cause infinite reboot loops if the autorun files are left on the device after configuration.** This is because: +- The scripts run every time the device boots +- Methods 2 and 3 always trigger reboots to apply LDWS settings +- The device will continuously reboot until the autorun files are removed + +**Method 1 only reboots when required, but should still be removed after successful configuration for best practices.** ## Running the Examples ### Method 1 (BrightScript - Recommended) -1. Copy `autorun.brs` (from this directory) to the root of your BrightSign player's SD card. -2. Power on or restart your BrightSign player. +1. Copy `autorun.brs` (from this directory) to the root of your SD card. +2. Insert the SD card into your BrightSign player and power on (or restart if already running). 3. The device will automatically configure LDWS and reboot if necessary. 4. Check the console output for the actual device IP address and access the web interface with your configured password. ### Method 2 (Node.js) 1. Ensure your BrightSign player supports Node.js applications. -2. Copy both `javascript/autorun.brs` and `javascript/index.js` to the root of your BrightSign player's SD card. -3. Power on or restart your BrightSign player. -4. Check the console output for the actual device IP address and access the web interface with your configured password. +2. Copy both `javascript/autorun.brs` and `javascript/index.js` to the root of your SD card. +3. Insert the SD card into your BrightSign player and power on (or restart if already running). +4. The device will automatically reboot. +5. Check the console output for the actual device IP address and access the web interface with your configured password. ### Method 3 (Registry - Not recommended) -1. Copy `registry-config/autorun.brs` to the root of your BrightSign player's SD card. -2. Power on or restart your BrightSign player. -3. Manually restart the device or network service for changes to take effect. -4. Access the web interface at `http://:80/`. +1. Copy `registry-config/autorun.brs` to the root of your SD card. +2. Insert the SD card into your BrightSign player and power on (or restart if already running). +3. The script will automatically reboot the device for changes to take effect. +4. Access the web interface at `https:///` (no password required with this method). ## Accessing the LDWS Web Interface @@ -92,12 +104,12 @@ Once LDWS is enabled: 1. **Find the Device IP Address:** - **Methods 1 & 2:** Check the console output after running the examples - the actual IP address will be displayed - - **Alternative methods:** Check your router's connected devices, use BrightAuthor:connected device discovery, or boot the player without an SD card to see network information + - **Alternative methods:** Check your router's connected devices or boot the player without an SD card to see network information 2. **Access the Web Interface:** - - Open a web browser on a computer / laptop connected to the same network + - Open a web browser on a computer/laptop connected to the same network - Navigate to `https:///`; by default, the Diagnostic Web Server is enabled on port 80 - - Enter the configured password when prompted + - Enter the configured password when prompted (default: "your_password_here" for all examples) ## Security Considerations @@ -116,8 +128,8 @@ Once LDWS is enabled: - **Configuration Not Applied:** - Method 1: Check if device rebooted after configuration - - Method 2: Ensure Node.js support is available on the device - - Method 3: Manually restart the device or network service + - Method 2: Ensure Node.js support is available on the device + - Method 3: The device should automatically reboot - wait for restart to complete - **Port Conflicts:** - If port 80 is in use by another application, choose a different port diff --git a/examples/enable-ldws-example/autorun.brs b/examples/enable-ldws-example/autorun.brs index 87a5071..5d40d6c 100644 --- a/examples/enable-ldws-example/autorun.brs +++ b/examples/enable-ldws-example/autorun.brs @@ -7,6 +7,7 @@ Sub Main() print "Enabling LDWS..." rebootRequired = nc.SetupDWS(dwsConfig) + nc.Apply() ' Get device IP address to show user where to connect currentConfig = nc.GetCurrentConfig() From 1bf467aa7ba1b0fc32ed233a031b9cd85f9d50b1 Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Tue, 9 Sep 2025 12:53:22 -0700 Subject: [PATCH 11/13] docs(PE-1039): requested changes to avoid boot loop and update docs --- examples/enable-ldws-example/README.md | 15 +++++-------- .../enable-ldws-example/javascript/index.js | 10 +++++++++ .../registry-config/autorun.brs | 22 +++++++++++++------ 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 961f3a5..7b128e0 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -68,15 +68,6 @@ These registry keys work independently and can be used separately: - `http_server`: Sets the port number for the HTTP server (enables LDWS on specified port) - `dwse`: Enables the local DWS when disabled from setup package (only needed if previously disabled by setup) -## WARNING: Prevent Reboot Loops - -**Methods 2 and 3 will cause infinite reboot loops if the autorun files are left on the device after configuration.** This is because: -- The scripts run every time the device boots -- Methods 2 and 3 always trigger reboots to apply LDWS settings -- The device will continuously reboot until the autorun files are removed - -**Method 1 only reboots when required, but should still be removed after successful configuration for best practices.** - ## Running the Examples ### Method 1 (BrightScript - Recommended) @@ -104,7 +95,11 @@ Once LDWS is enabled: 1. **Find the Device IP Address:** - **Methods 1 & 2:** Check the console output after running the examples - the actual IP address will be displayed - - **Alternative methods:** Check your router's connected devices or boot the player without an SD card to see network information + - **Alternative methods:** + - Check your router's connected devices + - Boot the player without an SD card to see network information on screen + - Use the device serial number: navigate to `http://brightsign-.local` (replace `` with your device's serial number) + - For console access (if needed), see the [BrightSign Shell documentation](https://docs.brightsign.biz/developers/brightsign-shell) for using a serial cable 2. **Access the Web Interface:** - Open a web browser on a computer/laptop connected to the same network diff --git a/examples/enable-ldws-example/javascript/index.js b/examples/enable-ldws-example/javascript/index.js index cc6df6f..17ee5a1 100644 --- a/examples/enable-ldws-example/javascript/index.js +++ b/examples/enable-ldws-example/javascript/index.js @@ -1,9 +1,11 @@ const DWSConfiguration = require("@brightsign/dwsconfiguration"); const systemClass = require("@brightsign/system"); +const registryClass = require("@brightsign/registry"); async function configureLDWS() { console.log("Enabling LDWS..."); const system = new systemClass(); + const registry = new registryClass(); // Create DWS configuration instance const dwsConfig = new DWSConfiguration(); @@ -17,6 +19,14 @@ async function configureLDWS() { }; try { + const httpServerPort = await registry.read("networking", "http_server"); + // Check if LDWS is already enabled + if (httpServerPort !== "" && httpServerPort !== "0") { + // LDWS is already enabled + console.log(`HTTP server port already set to ${httpServerPort}. LDWS may already be enabled.`); + return; + } + // Apply LDWS configuration to device dwsConfig.applyConfig(config); console.log("LDWS enabled!"); diff --git a/examples/enable-ldws-example/registry-config/autorun.brs b/examples/enable-ldws-example/registry-config/autorun.brs index e66d635..392388d 100644 --- a/examples/enable-ldws-example/registry-config/autorun.brs +++ b/examples/enable-ldws-example/registry-config/autorun.brs @@ -5,13 +5,21 @@ function Main() registrySection = CreateObject("roRegistrySection", "networking") if type(registrySection) = "roRegistrySection" then - ' Enable Local DWS on the default port 80 - registrySection.write("dwse", "yes") - ' Set HTTP server to enable LDWS on the specified port - ' registrySection.write("http_server", "80") - print "Registry updated - restart device" - print "After restart: http:///" - RebootSystem() + + ' Check if LDWS is already enabled + if registrySection.read("http_server") <> "" and registrySection.read("http_server") <> "0" then + print "HTTP server port already set. LDWS may already be enabled." + else if registrySection.read("dwse") = "yes" then + print "LDWS already enabled." + else + ' Set HTTP server to enable LDWS on the specified port + registrySection.write("http_server", "80") + ' Enable Local DWS on the default port 80 + ' registrySection.write("dwse", "yes") + print "Registry updated - restart device" + print "After restart: http:///" + RebootSystem() + end if else print "Error: Could not access registry" end if From fdf81ddb2bc4e981ee6e8cb592ddcdf4b8e9945c Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Tue, 9 Sep 2025 14:24:11 -0700 Subject: [PATCH 12/13] docs(PE-1039): removed redundancies from readme --- examples/enable-ldws-example/README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 7b128e0..88e8c81 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -6,8 +6,6 @@ This example demonstrates three different methods to enable and configure the Lo ## Overview and Directory Structure -This example showcases three different approaches to enabling and configuring the Local Diagnostic Web Server (LDWS) on a BrightSign device, listed in order of recommendation: - - **BrightScript Method** (recommended for most applications): - `autorun.brs` — BrightScript application at the root of this directory. Enables LDWS using `roNetworkConfiguration`. @@ -26,7 +24,7 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to **How it works & Features:** - Uses the BrightScript `roNetworkConfiguration` API to enable LDWS with a custom password -- Applies configuration immediately and reboots the device if required +- Applies configuration immediately and reboots only if required - Automatically retrieves and displays the device's IP address in the console output ### Configuration Options: @@ -43,8 +41,8 @@ This method uses the Node.js `@brightsign/dwsconfiguration` module to configure **How it works:** - Uses the Node.js `@brightsign/dwsconfiguration` module to enable LDWS with flexible configuration options - Supports multiple authentication methods and password obfuscation -- Applies configuration programmatically from Node.js using async/await for clean error handling -- Automatically retrieves and displays the device's IP address from the network interface +- Checks if LDWS is already enabled before applying configuration +- Only reboots if configuration changes are needed ### Configuration Options: - `port`: HTTP port for the web server (default: 80) @@ -60,7 +58,8 @@ This method uses the BrightSign registry to configure LDWS settings. It is the l **How it works:** - Uses direct registry manipulation to enable LDWS -- Automatically reboots the device to apply changes +- Checks if LDWS is already enabled to prevent redundant configuration +- Reboots the device to apply registry changes - No password protection (less secure than other methods) ### Configuration Options: @@ -111,7 +110,7 @@ Once LDWS is enabled: - **Change Default Passwords:** Always use strong, unique passwords in production - **Network Security:** LDWS should only be enabled on trusted networks - **Access Control:** Consider network-level restrictions to limit access to the web interface -- **Password Protection:** All methods support password protection - use it +- **Password Protection:** Methods 1 and 2 support password protection - use it ## Troubleshooting From 1c9a47e7ad71907d31a393739be8bf342d7f9765 Mon Sep 17 00:00:00 2001 From: jdmedlin1 Date: Tue, 9 Sep 2025 16:11:12 -0700 Subject: [PATCH 13/13] docs(PE-1039): linked console access docs wherever mentioned --- examples/enable-ldws-example/README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/enable-ldws-example/README.md b/examples/enable-ldws-example/README.md index 88e8c81..46eccfc 100644 --- a/examples/enable-ldws-example/README.md +++ b/examples/enable-ldws-example/README.md @@ -25,7 +25,7 @@ This method uses the `roNetworkConfiguration` object's `SetupDWS()` function to **How it works & Features:** - Uses the BrightScript `roNetworkConfiguration` API to enable LDWS with a custom password - Applies configuration immediately and reboots only if required -- Automatically retrieves and displays the device's IP address in the console output +- Automatically retrieves and displays the device's IP address in the console output (see [BrightSign Shell documentation](https://docs.brightsign.biz/developers/brightsign-shell) for console access) ### Configuration Options: - `open`: Sets the password for LDWS access @@ -69,36 +69,38 @@ These registry keys work independently and can be used separately: ## Running the Examples +**Note**: Check the console output for additional information regarding accessing the web interface with your configured password. (See [BrightSign Shell documentation](https://docs.brightsign.biz/developers/brightsign-shell) for console access) + ### Method 1 (BrightScript - Recommended) 1. Copy `autorun.brs` (from this directory) to the root of your SD card. 2. Insert the SD card into your BrightSign player and power on (or restart if already running). 3. The device will automatically configure LDWS and reboot if necessary. -4. Check the console output for the actual device IP address and access the web interface with your configured password. +4. Check the console output for the actual device IP address ### Method 2 (Node.js) 1. Ensure your BrightSign player supports Node.js applications. 2. Copy both `javascript/autorun.brs` and `javascript/index.js` to the root of your SD card. 3. Insert the SD card into your BrightSign player and power on (or restart if already running). 4. The device will automatically reboot. -5. Check the console output for the actual device IP address and access the web interface with your configured password. +5. Check the console output for the actual device IP address ### Method 3 (Registry - Not recommended) 1. Copy `registry-config/autorun.brs` to the root of your SD card. 2. Insert the SD card into your BrightSign player and power on (or restart if already running). 3. The script will automatically reboot the device for changes to take effect. 4. Access the web interface at `https:///` (no password required with this method). +5. Check the console output for the actual device IP address ## Accessing the LDWS Web Interface Once LDWS is enabled: 1. **Find the Device IP Address:** - - **Methods 1 & 2:** Check the console output after running the examples - the actual IP address will be displayed + - **Methods 1 & 2:** Check the console output after running the examples - the actual IP address will be displayed (see [BrightSign Shell documentation](https://docs.brightsign.biz/developers/brightsign-shell) for console access) - **Alternative methods:** - Check your router's connected devices - Boot the player without an SD card to see network information on screen - Use the device serial number: navigate to `http://brightsign-.local` (replace `` with your device's serial number) - - For console access (if needed), see the [BrightSign Shell documentation](https://docs.brightsign.biz/developers/brightsign-shell) for using a serial cable 2. **Access the Web Interface:** - Open a web browser on a computer/laptop connected to the same network