投影机控制 - RS232/USB? [英] Projector control - RS232 / USB?

查看:48
本文介绍了投影机控制 - RS232/USB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到许多投影机都有 RS232 或 USB 端口,可用于控制投影机的功能,即切换输入和打开和关闭电源.有谁知道是否有用于以编程方式控制这些功能的 API?

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?

我使用的是 Java,但特别是 RS232,我猜这无关紧要,因为协议的级别要低得多.如果周围没有标准"(我猜不会有),建议是什么?目前我正在考虑为我想要的功能定义一个投影仪控制接口,然后允许人们编写类来控制他们的投影仪外部并将它们放置到位(也许使用新的 watchservice API 通过即时反射来获取它们).) 会不会有任何我没有看到的缺陷?

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.

推荐答案

AVForums 上非常有用的回复:

几乎所有的设备都是简单的 telnet rs232 文本字符串.不是所有的 ascii,但大多数是.您将读取计算出的奇偶校验和校验和字节......但实际上您只需要发送一个字符串,投影仪就会按照它的指示进行操作.有些通过发送十六进制字节更容易进行通信,特别是如果它们使用奇数非 ascii 字符,但大多数是简单的 ascii 后跟换行符.事实是,如果您使用十六进制,则可以支持所有代码,包括 ascii,如果您要使用开放平台,请从那里开始.

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.

许多型号有不同的 iputs 等,但大多数情况下,所有制造商的保护器都会使用相同的 rs232 字符串进行开、关、输入 1-7 或 hdmi 1-2-3 等...

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...

如果可以,尽量保持简单,只需控制电源状态和输入选择,您就有机会获得 80% 的普通投影仪,而无需太多工作.

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.

哦,还有 9600、8n1 几乎适用于所有情况.

ohh, and 9600, 8n1 for almost everything.

更多细节:

如承诺...这是 optoma 的一些关闭.下面是以下 ascii 文本,后跟一个回车(以防万一你不知道......没有'ENTER'键的代码......它由回车和换行的旧打字机功能表示.这些由十六进制表示CR 值为 0d,LF 值为 0a)十六进制

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

对于字母 'I' 是 :49 和 'R' 是 :52

for letter 'I' is :49 and 'R' is :52

开启

*0IR001 或在下一行的十六进制..

*0IR001 or in hex on next line..

2a 30 49 52 30 30 31 0d

2a 30 49 52 30 30 31 0d

关闭是 *0IR002 或 2a 30 49 52 30 30 32 0d

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

设置为输入 HDMI1 *0IR017\r

set to input HDMI1 *0IR017\r

2a 30 49 52 30 31 37 0d

2a 30 49 52 30 31 37 0d

Panasonic AX200 .. 不同,因为它具有文本含义,但仅使用十六进制字符来开始命令 '02' 和十六进制 '03' 结束命令.. 命令中未使用 ",只是为了显示其里面有ascii文本

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 "PON" :03

02 50 4f 4e 03

02 50 4f 4e 03

关闭

:02 "POF" :03

:02 "POF" :03

02 50 4f 46 03

02 50 4f 46 03

HDMI1 设置输入

:02 "IIS:HD1" :03

:02 "IIS:HD1" :03

02 49 49 53 3a 48 44 31 03

02 49 49 53 3a 48 44 31 03

Sony 很奇怪,里面根本没有真正的 ascii.. 只是一个句号和一个问号.. 这只是十六进制..

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

开机

a9 17 2e 00 00 00 3f 9a

a9 17 2e 00 00 00 3f 9a

关机

a9 17 2f 00 00 00 3f 9a

a9 17 2f 00 00 00 3f 9a

HDMI1

A9 00 01 00 00 04 05 9A

A9 00 01 00 00 04 05 9A

这篇关于投影机控制 - RS232/USB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆