0

HD1010 Carriage Return question



What exactly is the Brightsign looking for as a "Carriage Return" when sending it in a serial string? All of the “CR” string equivalents (%0D, \r, 13, cr) I have tried don’t work. The only way I can get it to work is using a terminal program that actually passes through the CR from the keyboard. For example I have added the command "vol25" in Bright Author which is programmed to set the volume level to 25%, what is the correct syntax to trigger this? Or how do I disable the need for the "Carriage Return" in the script? Thanks, Dan

8 comments

  • 0
    Avatar
    RokuLyndon


    what program are you using to send the serial commands to the brightsign? Hitting enter in the terminal window is the same as attaching a cr to a string. So, if attaching the carriage return isn't working, then it sounds like a valid carriage return isn't being sent.
  • 0
    Avatar
    Prea

    So, what's the answer to the question?  what is the valid character format that the Brightsign uses for a carriage return?

     

    I'm using php to open a socket and send a command.

  • 0
    Avatar
    Romeo

    Can you please send some examples of strings you're sending?

  • 0
    Avatar
    Prea

    <?php
     $fp = stream_socket_client("udp://10.1.21.150:9600", $errno, $errstr);
     if (!$fp) {
        echo "$errno - $errstr<br />\n";
     } else {      
        fwrite($fp, "Video2");    
        echo fread($fp, 15);
        fclose($fp);
     }
    ?>

  • 0
    Avatar
    Prea

    Also, I tried to send with different port numbers.

    I found some other documentation that says you don't need a carriage return for UDP.  Not sure what's up. It could be the script but I have not seen any examples of working UDP communication on the forums; so I don't know. 

  • 0
    Avatar
    Prea

    Here's the answer.  The default UDP port is 5000

  • 0
    Avatar
    Romeo

    Is this your full PHP code that's running on your server?

  • 0
    Avatar
    Prea

    Yup. 

    I'm just loading that page to trigger a UDP message while testing.  One post somewhere said that UDP needed a carriage return to work.  That's why I posted in this topic. But I have since found out that it doesn't need the carriage return.

     

    In case anyone finds this post while searching for UDP communication issues via PHP here are some steps to try and get through it.  13 steps.  My example works with static ip addressed boxes. 

    1.  Open your bright author project.

    2. click the Edit tab

    3. click File -> Presentation Properties

    4. Go to the "interactive" tab

    5.  Look at the UDP section of the page.  Look at the UDP Receiver port.  The default port is 5000

    6.  Cancel out of the menu unless you are making changes to the port.

    7.  add your UDP string to your presentation however you want to use it via the UDP input event.

    8.  publish it

    9.  make a file on your PHP enabled web server and make a file "test.php" 

    10.  Put my code from above into it. 

    11.  change the IP address to the address of your bright sign player (this only works with static ip addresses, although if you use the broadcast range of your network it may also work)

    12.  Change the payload of the message.  Mine is "Video2"  yours is whatever you set in your bright author udp input event.

    13.  run the file from your web browser.

    If your video changes then you have successfully sent a UDP message.  Win!

     

     

    also, comment out the fread(... line.  The script is passing too many arguments to the function and it gives you an error.  It won't stop the script from working but it will definitely give an error.

Please sign in to leave a comment.