Author Topic: Serial Control  (Read 1365 times)

davidkresley

  • Newbie
  • *
  • Posts: 4
    • View Profile
Serial Control
« on: February 18, 2008, 12:40:41 am »
Thanks in advance for any assistance.

Running Hybrid 7.10 install with an overhead HD projector as display device.
The projector is a Dwin Projector the Model is Transvision 2
It has a male serial port on the back and the users manual states that it can be controlled via RS232.
I went through the setup process to control this projector with LinuxMCE.
I tried sending the test codes via the admin website and the projector did not react in any way.
To rule out the software I decided to try to use my laptop with hyperterminal on it.
I tried null modem cables, straight through cables (with gender changer) due to male port on both PC and Projector and other cables that I was not sure of the pinout.
I get no response from this method either.

So, I know it is not a problem with MCE but was hoping someone here might know what to expect from a serial controlled device.

I have set all the settings according to the manual 9600,8,N,1 but I am not sure how a controlled device will interact, should I expect to get feedback when I type?

What is the typical cable used for serial control? Null modem cable... ect.

Thanks

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Serial Control
« Reply #1 on: February 18, 2008, 01:04:32 am »
Its not likely to react unless you send it commands that it recognises. Do you know what the protocol looks like? If its a binary protocol then you won't be able to get Hyperterm to do anything that it recognises. Also, you may actually have to enable control through that port, in the projector first beforehand...

davidkresley

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Serial Control
« Reply #2 on: February 18, 2008, 01:47:25 am »
Copy and paste from the owners manual:

                            TransVisionTM TV2 RS232 Control
The RS232 interface for the TransVisionTM TV2 can be operated from any terminal, such as a Windows
based PC running HyperTerminal.
                                           
Communication Port Set-Up      Connector pin-out
Baud Rate : 9600                            3     TX (Transmit Data)
Parity       : none                         2     RX (Receive Data)
Stop bits    : 1                            5     GND (Signal Ground)
Num. of bits : 8 bits
Flow control : none
Each command is enclosed in the [ ] character envelope.
Note: Sequential commands must be separated with proper delays.
Any command followed by POWER ON must be delayed 10 seconds.
Any command followed by INPUT SELECT must be delayed 1 second.
The following table lists the commands available:
POWER CONTROL                                INPUT SELECT
[PON]          power on                      [I1]         Video 1
[POFF]         power off                      [I2]         Video 2
                                                        [I3]         S-Video 1
                                                        [I4]         S-Video 2
ASPECT RATIO SELECT
                                                        [I5]         YCrCb 1
[S1]           Standard (4:3)
                                             [I6]         YCrCb 2
[S2]           Anamorphic
                                             [I6]         YCrCb 3
[S3]           Letterbox
                                             [I8]         RGB 1
                                             [I9]         RGB 2
RELAY CONTROL
[Y1ON]         RY1 on
[Y1OFF]        RY1 off
[Y2ON]         RY2 on
[Y2OFF]        RY2 off
VIDEO SETTINGS
Contrast
[Rxxx]         set value between 0 -100
Color
[Cxxx]         set value between 0 –100
Brightness
[Bxxx]         set value between 0 - 100
Tint
[Txxx]         set value between 0 -100
Sharpness
 [Ax]          set value between 0 - 10

There is not an option on the on-screen projector setup. The manual only states this:

4.  RS-232 COMPUTER INPUT
The RS-232C serial interface is provided for external control of the TransVisionTM from a central
controller, such as a Home Theater control computer, Smart Home automation system, etc.
For D-sub 9 pin connector pin-out and RS232 command list, please refer to “TransVisionTM TV2 RS232
Control” section.


Again, thank you for your help.... even though this is not a problem with LinuxMCE.

I am not sure if I should try my null modem again and just type [POFF] or [PON] or if I would just type poff..... ect.



colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Serial Control
« Reply #3 on: February 18, 2008, 02:49:36 am »
Seems simple enough, and it is obviously ASCII based. Yes, you will have to try everything twice - once with null modem, once without until you get a reaction - it isn't clear if it is DTE or DCE, so best to try with and without until something happens!

Don't think its wise to attempt to type the commands, there could be timing requirements. Try creating a text file with the correct commands (make sure you follow the upper case specified in the manual, just in case!) then pipe this to the serial port either from the command line or from Hyperterm. Be concious that your PC will probably add <cr><lf> at the end and the projector might not like that, and yes, you will definitely need the [], looks like it uses this to parse/as delimiters....

RichardP

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Serial Control
« Reply #4 on: February 18, 2008, 03:22:18 am »
Thanks in advance for any assistance.

Running Hybrid 7.10 install with an overhead HD projector as display device.
The projector is a Dwin Projector the Model is Transvision 2
It has a male serial port on the back and the users manual states that it can be controlled via RS232.
I went through the setup process to control this projector with LinuxMCE.
I tried sending the test codes via the admin website and the projector did not react in any way.
To rule out the software I decided to try to use my laptop with hyperterminal on it.
I tried null modem cables, straight through cables (with gender changer) due to male port on both PC and Projector and other cables that I was not sure of the pinout.
I get no response from this method either.

So, I know it is not a problem with MCE but was hoping someone here might know what to expect from a serial controlled device.

I have set all the settings according to the manual 9600,8,N,1 but I am not sure how a controlled device will interact, should I expect to get feedback when I type?

What is the typical cable used for serial control? Null modem cable... ect.

Thanks

Hi,

What you want to do first off is to check the cable with a multimeter if you can. Pin 2 on one side must be connected to pin 3 on the other side. Pin 5 on one side must be connected to pin 5 on the other. No other connections will matter for you.

In Hyperterminal, go to File->Properties and set the comms parameters, just as you've indicated you have. Then change the flow control to Xon/Xoff or None.

You should now be able to connect. Type '[PON]' and enter. If you don't see anything as you type, change turn on "Local Echo" in Settings under File->Properties.

Good luck.

Best Regards,
Richard.
Best Regards,
Richard

davidkresley

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Serial Control
« Reply #5 on: February 19, 2008, 03:19:38 am »
Got it to work with hyperterminal by typing [PON] and using a Null modem cable.
Thanks for the advice.

Now trying to find a linux equivalent to winterm/hyperterminal to test my Hybrid's comm ports because the ruby script is not working for me. I am not sure if the comm port settings are even correct in the Generic Serial Device setttings and I am not sure how to check them.

I have been entering the Ruby script in the <"xxx"> format so for power on it is <"[PON]"> but this is not working for me so I will continue experimenting. I am sure I have a good cable but not sure if I have a working comm port on this machine.


Thanks

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5476
  • DOES work for LinuxMCE.
    • View Profile
Re: Serial Control
« Reply #6 on: February 19, 2008, 03:48:12 am »
make sure your syntax is correct:

<$"message"$>

-Thom

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Serial Control
« Reply #7 on: February 19, 2008, 03:56:20 am »
Pin 3 is tx, that's DTE.

You will need a null modem cable.
you can make one, 2 female 9pin ends,
pin 5-5
pin 2-3
pin 3-2
done.
:)
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

RichardP

  • Veteran
  • ***
  • Posts: 131
    • View Profile
Re: Serial Control
« Reply #8 on: February 19, 2008, 04:01:33 am »
Got it to work with hyperterminal by typing [PON] and using a Null modem cable.
Thanks for the advice.

Now trying to find a linux equivalent to winterm/hyperterminal to test my Hybrid's comm ports because the ruby script is not working for me. I am not sure if the comm port settings are even correct in the Generic Serial Device setttings and I am not sure how to check them.

I have been entering the Ruby script in the <"xxx"> format so for power on it is <"[PON]"> but this is not working for me so I will continue experimenting. I am sure I have a good cable but not sure if I have a working comm port on this machine.


Thanks

You'll probably get extra mileage out of getting the Ruby script to work. One way of checking what would go out of the serial port is to change your device from /dev/tty something to /tmp/tfile. You can then check the contents of /tmp/tfile to see what the script sent out, as compared to what you expected it to send out.

If you really want to use a terminal emulator, you can try kermit or minicom. Don't know if this will still work, but you can try installing kermit with sudo apt-get install gkermit

Best Regards,
Richard.
Best Regards,
Richard

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: Serial Control
« Reply #9 on: February 19, 2008, 06:03:20 am »
I noticed 0710b3 has improved debugging for GSD logs..
it shows bytes IN and OUT in the form of 0x00 0x01 0x02 etc..
it also shows much more detail on the command/event side..

HTH,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.