If, while a script is running, a runtime error occurs or a STOP
statement is encountered, the BrightSign application will enter the BrightScript debug console. The debug console can be accessed via the BrightSign application console, which communicates over the primary serial port by default and can be accessed from a terminal program using a null-modem cable. The BrightSign application console can alternatively be routed over Telnet or SSH.
You can also access the debug console at bootup:
- Power off the device.
- Power on the device and wait between 5 and 15 seconds.
- Press and hold the SVC button on the side of the player.
- Wait until the
BrightSign>
prompt appears in the serial/Telnet/SSH terminal (which indicates that you are in the BrightSign Shell). You can now release the SVC button. - Enter
script
at the prompt while in the BrightSign Shell. This will take you to the BrightScript debug console.
The console scope is set to the function that was running when a runtime error or STOP
statement occurred. While in the console, you can type in any BrightScript statement; it will then be compiled and executed in the current context.
BrightScript Console Commands
The following console commands are currently available in the BrightScript debug console:
Command | Description |
---|---|
| Print a backtrace of call-function context frames. |
| List all public classes. |
| Continue script execution. |
| List count of BrightScript Component instances. |
| Show disassembly and bytecode for this function. |
| Move one position down the function context chain. |
| Exit the debug shell. |
| Run the garbage collector and show collection statistics. |
| Print the internal hash-table histograms. |
| Show the last line that executed. |
| List methods provided by specified class. |
| List methods provided by the specified interface or class. |
| List the current source of the current function. |
| Show line data (source records) |
| Show the next line to execute. |
| List all allocated BrightScript Component instances. |
| Show statistics. |
| Step one program statement. |
| Step one statement and show each executed opcode. |
| Move one function up the context chain. |
| Display local variables and their types/values. |
| Print variable value or expression.* |
*BrightScript print
messages are routed to the BrightSign application console, which is accessible via the primary serial port or Telnet/SSH, as noted above.
BrightSign Shell Commands
The following commands are currently available in the BrightSign Shell:
Command | Description |
---|---|
? | Display the list of available commands. |
help | Provide more information about a command. |
clear | Clear the terminal window. |
exit | Exit the shell. |
dir <directory> | List the contents of a storage directory. |
readperf | Measure the performance of file reading. |
writeperf | Measure the performance of file writing. |
rwperf | Measure simultaneus file read/write performance. |
audioplay | Play an audio snippet. |
script | Start the BrightScript debug console. |
mfg | Perform a manufacturing test. |
ps | List tasks. |
reboot | Reboot the system. |
shutdown | Shut down the system. |
date | Display the date and time. |
date <YYYY/MM/DD hh:mm:ss> | Set the date and time. |
timezone | Display the time zone. |
timezone list | Display a list of accepted time zones. |
timezone <zone> | Set the time zone. |
chdir <path> or cd <path> | Change the current directory. |
delete <filename> | Delete files or or directories recursively. |
version | Display software versions. |
registry | Access the device registry. |
uptime | Display device uptime. |
writebootfile | Write a boot file to flash. |
erasebootfile | Erase a boot file in flash. |
id | Display device identification information. |
file <filename> | Determine a file type. |
hash | Cryptographically hash a file. |
factoryreset | Reset the system to factory defaults. |
format <drive> [<filesystem>] | Format a drive using one of the following file systems: "vfat", "ext3", "ext4". |
eject <drive> | Eject a drive. |
log | Display the system log. |
unsetrtc | Clear the real time clock (RTC). Note that this action does not modify the system clock. |
probe | Probe a file. |
analyze | Analyze a file. |
ptpstatus | Display the PTP status. |
usblist | Display a list of discovered USB devices. |
ifconfig | Configure the network interface. Type help ifconfig for a full list of configuration options. |
wifiscan | Scan for WiFi networks. |
httpgetperf <url> [<destination_file>] | Measure the download performance from the specified URL. If a destination file is not specified, the contents are discarded. |
nslookup <hostname> | Look up the hostname in the DNS. |
videoplay | Play a video snippet. |
imageplay | Display an image. |
videomode | Change the current video mode. |
edid hdmi | Read the EDID from the attached monitor. |
powersave | Set the VGA power saving mode. |