3 comments

  • 0
    Avatar
    RokuLyndon


    You can send ascii commands or hex commands. I emailed you an updated version of our autoplay file (autorun.bas) that includes support for sending and receving serial commands from an interactive playlist (csv file). You'll need the 2.x software to do so on your HD2000. I included directions for that as well.
  • 0
    Avatar
    rerb


    Concerning Product: BrightSign HD2000

    With version (if applicable): Not Sure



    Description:

    We need to understand how to successfully send and receive binary data messages via the RS232. Here is what we have started with. At this point the send seems to work, but we are not getting a response. It could be that we haven't got the sequence of data bytes correct yet. Can you verify that what we have done so far is correct BrightScript? Here is the code we have tried so far:

    if debug or info then print #tf, "Open Serial"

           serial = CreateObject("roSerialPort", 1, 9600)

           p = CreateObject("roMessagePort")

           serial.SetLineEventPort(p)



    serial_only:

       if debug then print #tf, "Start Wait- Serial"



       print #tf, "sending "

           serial.SendByte( &HFF )

           serial.SendByte( &H00 )

           serial.SendByte( &H09 )

           serial.SendByte( &H1D )

           serial.SendByte( &H06 )

           print #tf, "sent "



           msg = wait(0, p) ' Wait forever for a message.

    print #tf, "received"

           msgtype = type(msg)



       if debug then print #tf, msgtype

       if debug then print #tf, msg





    It waits forever. We just want to make sure that the BrightScript is okay so far to send binary. And are we on the right path for reading binary data.
  • 0
    Avatar
    RokuLyndon


    Hey,



    I replied an email on this topic, but it must not have gotten through. I sent an updated version of the script in reply. Please email me at <!-- e --><a href="mailto:lallydice@roku.com">lallydice@roku.com</a><!-- e -->



    The first thing I noticed is that you used SetLineEventPort. That assumes the serial information coming in is terminated by a carriage return. If you're just sending bytpes, then you sould initialize p with SetByteEventPort.
Please sign in to leave a comment.