0

Help with Serial input and output

I'm trying to use a XT1144 with USB-C serial control of a USB_S3_16x16 controller from HMS Electronics. Basically, an attract video plays. When a user pushes a button, an associated video plays, the button LED lights up, when the video is done, the attract starts playing again and the LED turns off. Nothing fancy.

I'm struggling getting the communication over serial. The attract video plays, but button presses do nothing. On bootup, the LEDs do lightup for a split second, so I believe my wiring is correct.

I'm using port 2 for the interactive presentation properties.

I have a serial input event to trigger video 1 playing.

If I plug the board into my laptop, and use putty to listen to incoming messages, the buttons do correctly send bytes. i.e. button 1 sends "1" and button 2 sends "2".

I also added a command to the serial input event to trigger the LED to turn on associated with that video file.

Then, after the video plays, I send a command to turn off the lights on the arcade buttons:

According to the board manufacturer, these are the codes I use to control the LEDs:

  • To turn LED 1 on, send "1"
  • To turn LED 2 on, send "2"
  • To turn LED 3 on, send "4"
  • To turn LED 4 on, send "8"
  • To turn LED 5 on, send "16"
  • To turn LED 6 on, send "32"
  • To turn LED 7 on, send "64"
  • To turn LED 8 on, send "128"
  • To turn LED 9 on, send "0,1"
  • To turn LED 10 on, send "0,2"
  • To turn LED 11 on, send " 0,4"
  • To turn LED 1 on, send "0,8"
  • To turn off all LEDs, send "0"
  • To turn on both LEDs 1 and 8, send "129" (which is 1 + 128)
  • To turn on all LEDs, send "255,255"

I'm using BrightAuthor 4.7.2.5. I have updated the firmware on the XT4. I've tried publishing the SD card on both Windows 7 and Mac Mojave via Parallels 14.

Anyone have any suggestions? Is port 2 the correct port for USB serial communication?

12 comments

  • 0
    Avatar
    Chris Evans

    Upon further discovery, I've also tried port 0 with a 3.5mm TRS cable. And I've tried both port 0 and port 2 with "Invert Signals" in the Presentation Properties window. And I've tried loading a simple .brs script, by passing BrightAuthor. In all cases, when the BrightSign is in standby mode playing my attract video, the 3.5mm serial cable has no voltage in the tip, but -8.8v in the sleeve. I was expecting 5v in the tip. 

    It appears the inverted signal button is not working in this version of BrightSign XT1144. I have installed the latest firmware 7.1.95. 

    Is this a bug?

  • 0
    Avatar
    Chris Evans

    A followup in case others come across this post. From BrightSign Support, ""The XT1144 uses RS232 levels. http://docs.brightsign.biz/display/DOC/XTx44+Hardware+Interfaces  and Invert Signals does not work on the Series 4 players and newer." 

    So, I can't use the 3.5mm serial cable with the HMS Electronics boards. 

    And my USB-C cable was bad. If I use an older USB-B cable and a USB-C adapter (mine from Apple). All is well. I can now do all as explained i the first post with screenshots. Sometimes it's the simple ones that take the longest to figure out, right?

  • 0
    Avatar
    Shandor Chury

    Hello Chris,

     

    I have a similar problem but with normal USB. No commands are executed or received and I think HMS is the worst possible way to go: non professional, plainly stupid documentation, confusing explanation. Stuck with this stupid board and no way to get it working

  • 0
    Avatar
    Lance Lander

    Hi Chris,

    I'm trying to use an HMS USB-S3-32_OUT board with an XT-1143 player. I can switch dip switch #4 on the HMS board to run a diagnostic mode and everything I have is connected and working but I can't get the XT-1143 to send serial commands to the HMS board. I have tried the 3.5mm stereo serial cable (port 0) and the USB-b (port 2). I have even tried a USB-c to USB and Serial adapter that I purchased from BrightSign. I'm not using inputs, just outputs. My settings for the ports match your screen shots. I'm sending serial bytes (comma separated) to port 0 or port1, bytes = 255,255,255,255. But it's not working. Any suggestions?

  • 0
    Avatar
    Chris Dotson

    Oh, the hours I lost trying to get this to work, but I finally got it. Let me know if you still need help.

  • 0
    Avatar
    Aweed

    Chris:   Can you please post what you eventually did to get this working?  I am running into the same problems and was hoping your fix would save me many more hours as well.  Everything works for me out of the 3.5mm port 0 to a computer's serial com port.  As soon as I go to a microcontroller with a MAX232 (for level shifting), there is no input .  I don't know if the inversion is working either.  

  • 0
    Avatar
    Chris Evans

    If I use an older USB-B cable and a USB-C adapter (mine from Apple). All is well. Don't use the 3.5mm. Good luck.

  • 0
    Avatar
    Brandon

    FYI, Invert Signals only works on certain player serial hardware:

    Invert Signals does NOT work on:
    • Series 4/newer units with 3.5mm serial port
    • XD3/XT3 units Rev H and later

    If you need lines other than Tx/Rs, you will need to try USB-serial adapter and check that it supports what you need in its default configuration as the player doesn't apply any special settings to USB-serial adapters.

    _________________________________________________________________________

    Friendly reminder, the community forum is intended for user-to-user discussion.  It is not regularly monitored. For troubleshooting problems and to ensure a timely answer from a BrightSign representative, please submit a support ticket.

  • 0
    Avatar
    Aweed

    I found my problem... The Brightsign works well with a max232 chip.  I didn't have my microcontroller's RX/TX swapped.  I did a little poking around with my oscope.. Now I just have to figure out how to add a serial receive.  I was told I had to add another Layer and do it through BrightAuthor.  Will keep status posted.

    Here are my findings for others to see:

    Above picture is the output of the BrightSign sending a zero (ascii 48).  The voltages look great.

    Above Picture is the output of a Dell Com port sending a zero.  You can see the voltages are a little lower.

    The above picture is the BrightSign sending data to the microcontroller board via the 3.5mm serial.  This is an XT1144.

  • 0
    Avatar
    Chris Dotson

    Glad you got it sorted. Serial on a BrightSign can be a bit tricky. To make the BrightSign listen, just make a serial event and specify what port to listen to. If you are using ASCII, you can use a * as a wildcard or you can specify what input to listen for. If you are talking BINARY, you can't use wildcards. 

    I made a contactless candy dispenser for Halloween this year. I communicated between an Arduino Mega and the BrightSign via serial over USB. The Mega controlled several motors and there was quite a bit of communication to turn lights and motors off and o at timecode events. Once you get it working, there is a wealth of possibilities! It also allowed me to move away from the HMS products. You can do all of that with Arduino and accessories.

  • 0
    Avatar
    Aweed

    Chris, these are the projects that you need to document and post. It will not only peak interests, but it will help others along the bumpy road. I am new to Brightsign products and I see the potential and the limitless uses. However, there probably should be better documentation or projects like yours (ours) with good explanations on how they were done. The serial port as an example doesnt have very good documentation and the ports should have more emphasis given so tinkerers can get a jump start. As an example, the code to write to the serial port is there, but to read, you have to do something completely different. This can probably be done with BrightScripting, but there are no good examples that I found.

    I would LOVE to see pictures or a video of your candy dispenser. That is awesome!

  • 0
    Avatar
    Aweed

    Receiving serial data was a problem.  The Brightsign kept crashing.  Lyndon was able to help figure out what the issue was.. In case anyone else is having these problems... This line was missing in my serial setup:

    s.serial0.SetUserData("0")

    So the serial initialization was:

    Function newreboot(msgPort As Object, userVariables As Object, bsp as Object)
    print "newreboot"

    s = {}
    s.version = 0.1
    s.msgPort = msgPort
    s.userVariables = userVariables
    s.bsp = bsp
    s.ProcessEvent = reboot_ProcessEvent
    s.clearvalues = saveserial_clearvalues
    s.objectName = "reboot_object"
    s.debug = true

    'serial instance creation...
    s.serial0 = CreateObject("roSerialPort",0,9600)
    s.serial0.SetBaudRate(9600)
    s.serial0.SetMode("8N1")
    s.serial0.SetUserData("0")
    s.serial0.SetLineEventPort(msgPort)

    return s
    End Function

    '-------------------------------------------------------------------------

    There error messages I was receiving was:

     [ 222.175] Script runtime error: Type Mismatch. (runtime error &h18) in SD:/autorun.brs(13522)       

     [ 222.175]

     [ 222.175] Press SVC to debug.

     

    Adding this line to the serial port configuration fixed the crashing.  To find the problem if your unit is rebooting with the 10 red error flashes, you can log into the web interface and look at the log file before the unit reboots.  Or you can telnet into the device and watch the output.

     

     

Please sign in to leave a comment.