Send Hex Commands or Bytes in BrightAuthor

Sending Hex Commands

You can easily send Hex values using an Interactive presentation in BrightAuthor.

This is an example of a "power on" command for a Viewsonic projector. The hex values are indicated by the “0x” prefix. 

0x06 0x14 0x00 0x04 0x00 0x34 0x11 0x00 0x00 0x5D

To send this command to the projector using the serial port on a player, do the following:

  1. Create an Interactive presentation in BrightAuthor.

  2. Open the Media State or Event where you want to send the hex command.

  3. Select the Advanced tab.

  4. Select Add Command and set the command to Send -- Serial Bytes.

  5. Set the Port to 0 (this is the case for most standard serial devices).

  6. Enter the command in the Bytes field. Use a comma to separate each byte.

Sending/Receiving Bytes

BrightSign players that have a serial port support sending and receiving bytes, in addition to strings. When sending serial bytes, you must use decimal values, not hex values. You can convert hex values to decimal values using any number of free websites or with a standard Windows calculator (to do this, go to View and select Programmer mode).

Hex values: 06 00 04 00 34 11 00 00 5D

Equivalent decimal values: 06 00 04 00 52 17 00 00 93

The DE-9 (more commonly referred to as DB-9) serial port is fully RS-232 compatible, but the 3.5mm serial port can only interoperate with some RS-232 compatible devices. It can receive from any RS-232 device, but transmission may not work depending on the electrical characteristics of the device.

Sending Bytes

  1. Select an Interactive playlist in BrightAuthor

  2. Open the State or Event where you want to send the command.

  3. Select the Advanced tab.

  4. Under File > Presentation Properties > Interactive, set the serial Protocol to ASCII mode.

  5. Use the Send - Serial byte or Send - Serial bytes (comma separated) commands in BrightAuthor to send a byte or bytes.

Receiving Bytes

serial_protocol___binary.jpg
Image 1
  1. Under File > Presentation Properties > Interactive, set the serial Protocol to Binary mode (see Image 1).

  2. Use Serial Input events to trigger transitions and other events in an Interactive playlist (see Image 2). Separate the serial values with a comma in the Specify serial input field. For example, "31 0D" in hex would be "49,13" in decimal.

serial_-_receive_bytes.jpg
Image 2

Troubleshooting

Most serial issues are caused by one of the following:

  • Wrong or poorly formatted commands

  • Serial port settings not being correct

  • Serial cable

To check on what is being sent, either:

  1. Turn on system log debugging in the BrightAuthor Publish tab (not serial debugging), then log into the player IP address. The Log tab which should show the output of any commands that were sent.

  2. Add a Serial event and a variable in your BrightAuthor project. In the event, specify that you want any serial commands received to be assigned to the variable. Display the variable on your screen or log into the player on port 8008 (if the local server is enabled on the player) to see the variable value.