api – 投影机控制 – RS232 / USB?


我正在使用Java但特别是使用RS232我猜这是无关紧要的,因为协议将处于更低的水平.如果周围没有“标准”(我猜不会有)会有什么建议?目前我正在考虑为我想要的功能定义一个投影机控制界面,然后允许人们编写用于外部控制投影机的类并将它们放在适当位置(也许可以使用新的watchservice API动态反射它们) .)我有没有看到任何瑕疵?


Incredibly useful reply over on AVForums:

almost all gear is simple telnet rs232 of text strings. not all ascii but most is.
you will read of calculated parity and checksum bytes.. but in reality you just need to send a string and the projector will do what its told.
Some are easier to communicate by sending hex bytes, esp if they use odd non ascii characters, but most are simple ascii followed by a linefeed..
thing is, if you use hex, you can support every code, including ascii, if you are going open platform, start there.

lots of models have different iputs etc, but most the time all of a manufacturers proectors will use the same rs232 strings for on, off, input1-7 or hdmi 1-2-3 etc…

keep it simple if you can, just controlling the power state and input selection, and you stand a chance of getting 80% of common projectors without too much work.

ohh, and 9600, 8n1 for almost everything.


as promised…
this is some on offs for optoma..
on is the following ascii text followed by a carriage return (incase you dont know.. there is no code for ‘ENTER’ key.. its represented by the old typewriter functions of a carriage return and a line feed. these are represented by hex values 0d for CR, and 0a for LF) hex

for letter ‘I’ is :49 and ‘R’ is :52


*0IR001 or in hex on next line..

2a 30 49 52 30 30 31 0d

Off is *0IR002 or 2a 30 49 52 30 30 32 0d

set to input HDMI1 *0IR017\r

2a 30 49 52 30 31 37 0d

Panasonic AX200.. different because it has text meaning, but with a hex only character to start a command ’02’ and hex ’03’ to end one.. the ” are not used in the command, just to show its ascii text there inside them


:02 “PON” :03

02 50 4f 4e 03


:02 “POF” :03

02 50 4f 46 03

HDMI1 set input

:02 “IIS:HD1” :03

02 49 49 53 3a 48 44 31 03

Sony is weird, no real ascii in there at all.. just a full stop and a question mark.. this is hex only..

Power On

a9 17 2e 00 00 00 3f 9a

Power Off

a9 17 2f 00 00 00 3f 9a


A9 00 01 00 00 04 05 9A