本文介绍了投影仪控制 - 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,如果你要开放平台,从那里开始.

很多型号都有不同的输入等,但大多数时候所有制造商的保护者都会使用相同的 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的一些休息时间.on 是下面的 ascii 文本,后跟一个回车(如果你不知道.. 'ENTER' 键没有代码.. 它由回车和换行的旧打字机功能表示.这些由十六进制表示CR 为 0d,LF 为 0a)十六进制

字母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

set to input HDMI1 *0IR017

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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 00:30
查看更多