### Install and Build Development Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md Commands to install project dependencies and build the development version of the application. ```bash npm install npm run build:dev ``` -------------------------------- ### Copying Files to Player Script Example Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md This bash loop within a script indicates the files that will be copied to the BrightSign player. It includes HTML, JavaScript, and BrightScript files from the 'dist' and 'src' directories. ```bash for f in dist/*.html dist/*.js src/autorun.brs ``` -------------------------------- ### BrightSign Shell Commands to Restart App Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md These commands are executed within the BrightSign Shell debugger. 'exit' leaves the debugger, and 'script autorun.brs' starts the main application script. ```bash BrightScript Debugger> exit BrightSign> script autorun.brs ``` -------------------------------- ### Listing Serial Ports with @brightsign/serialportlist Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md This JavaScript code snippet demonstrates how to use the @brightsign/serialportlist module to get a list of available serial ports on a BrightSign player. It logs the JSON string representation of the list to the console. ```javascript var SerialPortListClass = require("@brightsign/serialportlist"); var serialPortList = new SerialPortListClass(); serialPortList.getList().then( (l) => { console.log(JSON.stringify(l)) } ) ``` -------------------------------- ### Running Deployment Script via npm Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md This npm script command executes the deployment process, which typically involves building the application (e.g., using webpack) and then copying the necessary files to the BrightSign player. ```bash npm run cp ``` -------------------------------- ### Setting Environment Variables for Deployment Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md These bash commands set environment variables required for deploying code to a BrightSign player. PLAYER specifies the player's IP address or hostname, and PLAYER_PW is the player's password. ```bash export PLAYER={your XC5 IP address or hostname} export PLAYER_PW={the pw for that player, by default it's serial number} ``` -------------------------------- ### Enabling Console and Rebooting Player Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md These bash commands are executed on the BrightSign player after interrupting the automatic startup. 'console on' enables serial console access, and 'reboot' restarts the player. ```bash console on reboot ``` -------------------------------- ### Connecting to Serial Port with Screen Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md This command uses the 'screen' utility to establish a serial connection to a specified device at a given baud rate. It's commonly used on Linux and Mac for serial communication. ```bash screen /dev/tty.usbserial 115200 ``` -------------------------------- ### Restarting Application on Player via npm Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md This npm script command restarts the application running on the BrightSign player. It's a convenient way to apply changes after deployment. ```bash npm run rp ``` -------------------------------- ### Enable Development Tools via Registry Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md Registry commands to enable the BrightScript Debugger, DWS APIs, and the Chromium Web Inspector for development purposes. A reboot is required for changes to take effect. ```brightscript registry write brightscript debug 1 registry write networking dwse on registry write html enable_web_inspector 1 reboot ``` -------------------------------- ### Finding USB Serial Port Source: https://github.com/brightsign/bs-node-serialport/blob/master/README.md This bash command lists available serial ports on a Linux or Mac system, helping to identify the USB serial port connected to a BrightSign player. ```bash ls /dev/tty* ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.