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

查看:210
本文介绍了投影机控制-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.

推荐答案

几乎所有设备都是文本字符串的简单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.

很多型号具有不同的输入等,但是大多数时候所有制造商都会使用相同的rs232字符串进行开,关,input1-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"键的代码..它由回车符和换行符的旧打字机功能表示.这些由十六进制表示值为0d(对于CR),值为0a(对于LF)(十六进制)

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天全站免登陆