0

hd410 serial problem



Hi, I am trying to get a hd410 going with rs232 serial. In the past I have succeeded with other projects, but now I am having problems. The hd410 doesn't react at all. I am sending in the right format (9600,8, no parity, true, 1 stop) and the right level(rs232). Also the right information(I send P3<CR>, and then hd410 should play 3.mov), I checked with a terminal program. But nothing. I also checked if the 3.mov can play, and it can (if set to the startup-play). Probably something is wrong in the settings in BrightAuthor. Could it be the port setting? I have searched for the right port number to put in the SERIAL INPUT EVENT box at SPECIFY PORT, but there seems to be no explanation which port does what and is where. I tried all 5 of them, but no luck yet. In PRESENTATION PROPERTIES, the serial port is set to 0,9600,8,n,1. Or something else...? Help. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->

6 comments

  • 0
    Avatar
    RokuShawnS


    Wrong forum <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> ... moving it to the proper one.

    C. Shawn Smith
  • 0
    Avatar
    GvB


    Resolved!

    After some further forum searching I found the solution.
    Content(movies etc.) needs to be in a subfolder on the sdCard. If it is not the player just plays the content and doesn't listen to the serial port.
    So:
    Make a subfolder for your movies if you want to use serial connection.

    It was a hard to find solution. Can this be in some manual?
  • 0
    Avatar
    RokuLyndon


    I thought that it was already covered. THat's only if you want to use the shell to communicate over serial.

    It's more flexible to use a script to accept your serial commands, or if you can use a brightauthor project to accept serial commands.
  • 0
    Avatar
    GvB


    I decided to write a script for my use of the hd410's.
    But I can't get the video's to play.
    this is my autorun.brs:
    START:
    print "start"
    v = CreateObject("roVideoPlayer")
    serial = CreateObject("roSerialPort", 0, 9600)
    p = CreateObject("roMessagePort")
    v.SetPort(p)
    serial.SetLineEventPort(p)
    serial_only:
    msg = wait(0,p) ' Wait forever for a message.
    if(type(msg) <> "roStreamLineEvent") goto serial_only 'Accept serial messages only.
    serial.SendLine(msg) ' Echo the message back to serial.
    if msg="ik" then
    print "goed"
    v.PlayFile("1.mov")
    else
    print "fout"
    v.PlayFile("2.mov")
    endif
    goto START


    Serial works fine, but video doesn't. I am pretty new to brightscript so i am probably missing something obvious.
    My videofiles do play on the hd410, I tested that. They are on my sd card root. (I also tried sd:/1.mov but no luck)
  • 0
    Avatar
    GvB


    Ah. and again found it.
    Strange that when you have tried all morning <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> , and have decided to post a question <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> , that after posting the question there seems to be a higher chance of solving the problem.... <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
    adding:

    videomode$="1280x720x60p"
    v=CreateObject("roVideoPlayer")
    vmode = createobject("roVideoMode")
    vmode.SetMode(videomode$)

    to the script it plays.
    apparently something missing from the video mode..
  • 0
    Avatar
    RokuLyndon


    You can't go back to start. At that point, you'll be recreating the video object again which will destroy the existing one. AFter you start playback you need to go to serial only where you are waiting for the next serial message.

    Also, what's supposed to happen when you're finished with the video? You aren't listening for video events. So, if you want the video to just loop until there's another command, you need to use:

    v.setloopmode(True) after creating the video object.

    Finally, I am not sure why you are creating a script unless you need to do something much more complicated. What you've written so far you can do very easily in BrightAuthor.
Please sign in to leave a comment.