Projector control - RS232 / USB?

ε祈祈猫儿з 提交于 2020-01-31 08:53:58

问题


I've noticed a number of projectors have RS232 or USB ports that can be used for controlling the projector's functions, i.e. switching inputs and powering on and off. Does anyone know if there's an API around for controlling these functions programmatically?

I'm using Java but especially with RS232 I'm guessing that's irrelevant as the protocol will be on a much lower level. If there's not a "standard" around (which I'm guessing there won't be) what would be the suggestion? At the moment I'm thinking of defining a projector control interface for the functions I want, then allowing people to write classes for controlling their projector externally and drop those in place (perhaps picking them up by reflection on the fly using the new watchservice API.) Would there be any flaws in place with this that I'm not seeing?

Essentially, I'm looking for a document (if it exists) that describes the serial protocols for performing basic functions on a variety of different projectors.


回答1:


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.

More specifics:

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

On

*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

ON

:02 "PON" :03

02 50 4f 4e 03

OFF

: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

HDMI1

A9 00 01 00 00 04 05 9A



来源:https://stackoverflow.com/questions/6801593/projector-control-rs232-usb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!