RS-232 Protocol for the technically inclined

Posted by: Scott

RS-232 Protocol for the technically inclined - 05/27/05 11:48 AM

Protocol

The Crestron and AMX interfaces are presently being worked on.

Enjoy!
Posted by: rance

Re: RS-232 Protocol for the technically inclined - 05/27/05 01:21 PM

Scott,
Can't open the Protocol page. Says it needs the Korean language support.
Posted by: Scott

Re: RS-232 Protocol for the technically inclined - 05/27/05 01:32 PM

Font
Posted by: trikos

Re: RS-232 Protocol for the technically inclined - 05/27/05 04:34 PM

Looks great Scott!

I am sure there will be many geek threads for this one..
Posted by: trikos

Re: RS-232 Protocol for the technically inclined - 05/31/05 12:14 PM

Anyone doing anything with this yet? I don't have my equipment so I can't frown

But it would be good to get some feedback from anyone that does..
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/09/05 12:56 PM

Has anyone been able to control the 990 with the serial protocol? I've been attempting to control with the MLGenericSerial plugin for MainLobby, but have had no luck. I can't tell from the protocol documentation whether each command must be preceded with the system ID (0x8345), nor can I tell whether each command must end with a carriage return or other symbol.

I've tried simply sending commands, but get no response from the unit. I know it is connected, b/c I can see data being returned when I operate the unit with the remote, but I can't get it to respond to any data that I send.

Can anyone shed any light on this?

Thanks,
Ken
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/11/05 04:19 PM

With the help of a knowledgeable guy over at the MainLobby (Cinemar) forum, I was able to figure out how to send discrete commands to the Outlaw in hexidecimal. The trick was in figuring out how to add the "checksum" at the end of each command line.

For example:

Power On is 83 45 01 C9 in hex, where 83 45 is the system ID and precedes every command. 01 is the "power on" command, and C9 is the checksum.

To calculate the checksum, you convert each hex value to its decimal equivalent and add them up, and then express the sum in hex.

This gives you 131+69+1 = 201.

201 in hex is C9.

So the command is written 83 45 01 C9.

For standby, it would 83 45 02 with a checksum of CA (202 in hex).

For "Tuner" input select, it would 83 45 03 CB.

If you have a terminal program, or any other type of program (such as the Girder serial plugin) that can send hex to the serial port, then you can send discrete commands directly to the 990.

IMO, serial control is infinitely more robust than IR control.

The next challenge is to figure out how to work with the data being returned by the 990 through its serial port. This will allow your control device (Creston, AMX, HTPC with MainLobby, etc.) to know the state of the unit, regardless of whether the unit's state has been changed by a sent command, the remote, or by someone turning the dial. It allows cool things like displaying the current volume level on your touchscreen controllers . .. .

If there's interest, let me know .. . .
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/11/05 10:31 PM

Great that you got as far as you did....

I for one am absolutely interested....I do custom installs, integrated with home automation.

RS232 control and RS232 feedback would be invaluable for MANY installations, and IMO, for many users once they realize how much flexibility it adds to the 990.

I am anxiously awaiting further clarification on a code control list that is indeed usable, as well as any feedback sent by the 990.

Keep up the superb efforts!!!

Harris
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/11/05 11:08 PM

I was able to verify all of the discrete control commands tonight. So it is definitely possible to execute one-way control through the serial port.

But parsing the return data will be a formidable task, b/c it appears that the return data is variable in length. It may require some advance scripting to compare the return data to known values or to convert the return data to ascii or and parse out the meaningful stuff.

Such scripting is beyond me, but someone familiar with Lua scripting in Girder could probably handle it, or perhaps someone with Crestron or AMX programming experience.

Anyone care to help? I'll post an inquiry over at the Proximis Girder forum to see if I can generate some interest there.

- Ken
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/12/05 06:22 AM

Ken,

I, and no doubt others, very much
appreciate your efforts...

Hope someone responds with something tangible!

Any chance that you could explain in simpler terms the conversion process, OR perhaps post the converted actual 232 commands for each discrete code (as per your example)? I seem to have brain freeze following the conversion technique ;-)

Thanks,
Harris
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/12/05 11:14 AM

Harris:
No problem. It is extremely confusing, and I only understood it after a lot of experimentation.

I'll try a short explanation and, when I get home, will shoot you a file with the commands translated into hex.

A key tool is a hex to decimal convertor, like this one:

http://www.ronshardwebapps.com/Numbers.asp#marker

Each command is written in hex and consists of three parts: (1) the system ID; (2) the command; and (3) a checksum.

The system ID is always 83 45 in hex. (Hex is always two digits and usually written as "0x83" or "83h").

The commands are in the protocol document; the command for PowerOn is 01 in hex.

The checksum must be calculated by converting each hex value into its decimal equivalent, adding them, and then expressing the result as a hex value.

To do this, use the online tool (or a lookup table) and convert each hex value to decimal. For example:

83 = 141 in decimal
45 = 69
01 = 1
The sum is 201.
Converting 201 from decimal to hex gives you C9 in hex.

So the resulting command is written as 834501C9.

Sending this command to the Outlaw will turn it on.

- Ken
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/12/05 11:18 AM

Here are some of the most common commands:

834501C9 = Power On
834502CA = Standby On
834503CB = Tuner select
834504CC = CD select
834505CD = Aux select
834506CE = Phono select
834507CF = DVD select
834508D0 = Video 1 select

83450fD7 = Master volume up
834510D8 = Master volume down
834511D9 = Mute

- Ken
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/12/05 11:33 AM

Ken, very interesting indeed.

I will try to follow these instructions later, and appreciate your sending them (as well as the codes for many of the commands).

One interesting thought:

I wonder if there are other codes for the P965 Newcastle, and if any of those would work on the 990.....

Harris
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/12/05 01:31 PM

The Sherwood protocol looks virtually identical to the Outlaw protocol document, with the exception that the Sherwood document contains additional codes for controlling the surround modes. I have no idea what effect, if any, sending these codes to the Outlaw would have! My guess is that the Outlaw software is sufficiently different from the Sherwood that the codes would have no effect.

I can email you a copy of the the Sherwood document if you're interested.

- Ken
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/12/05 01:44 PM

Thanks Ken...
Controlling the individual surround modes seems to be a valuable addition to the code set. This would seem to be far better than having to toggle through the different surround modes to get to one in particular.

One would hope that the 990 would be the same in that regard; if you can email the 965 codes, I would appreciate it.

hrbstereo@verizon.net

You are probably correct in not trying them on your own unit; perhaps there is a risk of causing some unforseen changes in the 990 (although I would doubt it, but it wouldn't be worth the risk IMO).

Harris
Posted by: drhb

Re: RS-232 Protocol for the technically inclined - 07/12/05 02:13 PM

Ken, just a followup re the code instructions:

so, volume low would be: 83455411C
volume mid would be: 85455511D
and, volume high would be: 85455611E

Seems to be a simple process with your instructions!!

Thanks,
Haris
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/12/05 02:54 PM

Yes -- that's exactly it. Although it would blow my ears off to send a "volume high" command!

BTW -- playing with serial control can be a dangerous thing -- I once blew my midranges on a pair of ACI Sapphires with an errant max volume code.

Be careful out there!
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/16/05 01:07 PM

Has anyone else attempted 232 control???

I tried using hyperterminal to send some of the commands noted above, but got no response from the 990.

I used a straight through db9 cable, and also tried a null modem cable, but still didn't get any response by the 990.

HOWEVER, it may be a problem with not knowing how to send these commands to the 990 from hyperterminal. I am not well versed in this program unfortunately.

Has anyone used hyperterminal for this purpose??
Posted by: old_school

Re: RS-232 Protocol for the technically inclined - 07/16/05 01:49 PM

As a minimum... I would suggest killing the power to any and all amps before attempting to send codes (as you explore what they do). At least in this way you could see how the 990 is interpreting the commands without risk to amps, speakers, or pocketbook.

Let us know...
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/16/05 01:54 PM

Good Suggestion...

But at this point, I still don't know how to send these codes from hyperterminal.

Anyone have a suggestion as to precisely how to use this program for this?
Posted by: Bob045

Re: RS-232 Protocol for the technically inclined - 07/16/05 02:10 PM

kwoodrow,

This may be slightly off base, but you said to find the checksum amount, you convert the values to decimal, add them up and then reconvert to Hex...additionally one could simply add the values in hex:

83 83
45 45
01 19 ( example code only )
-------
C9 D1

The converting and reconverting would probably be the parts that trip me up. smile
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 07/17/05 06:42 PM

CI,

You can't do this in Hyperterminal. You need something capable of sending raw bytes to the serial port.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/17/05 07:46 PM

Appreciate the clarification!
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 07/18/05 01:55 PM

The two programs I've used to communicate with the Outlaw are Cinemar's MainLobby Server (MLServer) and Proximis' Girder. Both are pc-based automation programs capable of controlling PC applications and external hardware. MainLobby is known for its gorgeous Flash-based GUI, while Girder is famous for its robust application control. Girder also has a built-in scripting language, based on Lua, that can be used to parse and perform logic on the returned data strings. I'm not a programmer, but some of the folks at the Girder forum are helping me out. Eventually I'll figure out how to work with the data being returned from the Outlaw's serial port and use it keep track of the current settings, display volume on my touchscreens, and control the processor remotely from networked computers (useful for Zone 2 stuff). I'll keep everyone posted as to my progress!
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 07/19/05 11:39 AM

Thanks Ken!
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 09/27/05 03:21 PM

I'm starting to look into doing some control of the 990 using the serial port. The omissions in the protocol are definitely disappointing. I'm definitely not going to pull of quite what I want.

The protocol lacks the following things, which would be _really_ helpful:

- Direct volume setting (one command to set volume to a specified level)
- Direct surround mode setting (one command to set the desired surround mode)
- Commands to read back and set each of the configuration parameters (e.g. trim levels, crossover points, speaker configs, etc.)


It looks like most of the config can be read back, but not changed in any easy way. The best I can figure is I might be able to get into the menu mode (not sure if there is a command for this, however), and have some software iteratively "navigate" through the menus and make changes effectively blindly. Ugh!

Same goes for the surround modes. Since there only exist commands for "next surround mode" and "previous surround mode," one must iteratively cycle through until the one you want is selected.

Same for volume: You can command the 990 to go to -40, -10, or +5, but from there you have to send multiple up/down commands to get to a level you want.

In short, it looks like it's merely an adaptation of the infrared commands rather than being a more generally useful serial protocol. I'm disappointed because I have grand plans to automate my setup to the point where I have preferred surround modes stored for my different media on my HTPC, and I'd like to have my automation system automatically set up the 990 before starting the film.

I also had hoped to be able to easily enable or disable the rear surrounds (switch between 5.1 and 7.1) because I have a compromised room setup with my rear row against the back wall. I'm unsure at this stage whether it will be acceptable to listen to the system with people in the back row with the rear surrounds blaring directly above their heads. My system will be used probably 50% of the time with just two people in the front row, so 7.1 is fine. I had hoped to automate switching to 5.1 mode if necessary.

I suspect the chances of getting Outlaw to extend the protocol are pretty low, but I had to make the request. It's disappointing because having the RS232 port gets us so close, but the lack of good protocol support keeps us so far away.
Posted by: gonk

Re: RS-232 Protocol for the technically inclined - 09/27/05 03:30 PM

You may have already done so, but I compared the 990's RS-232 protocols to the P-965's and the two seemed the be nearly identical - which is an interesting bit of data that may or may not suggest how much flexibility exists to add to the protocol. I look forward to hearing about your RS-232 interface project, and about the potential for Outlaw expanding on the existing RS-232 command set.
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 09/27/05 03:46 PM

Do you have a link to the P-965 protocol? I looked around a bit and couldn't turn anything up.
Posted by: gonk

Re: RS-232 Protocol for the technically inclined - 09/27/05 04:50 PM

I don't have a link, but I think I still have the PDF lying around somewhere...
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 09/28/05 05:54 PM

I wanted to update this thread with my experiences with the RS232 protocol for the Outlaw and let you guys know of my favorable experiences with using Charmed Quark Controller (CQC) software to control the Outlaw (as well as the rest of my home theater and whole-house audio systems).

In a nutshell, I’ve been incredibly impressed with both the CQC software and the customer support I’ve received from its developers. I am now in the process of switching my entire control system to CQC. CQC is a PC-based theater and home automation software that can be used to create elaborate touchscreen-based graphical user interfaces and to control virtually and IR or serial-based device.

I worked directly with the developer of CQC to write a device driver for the CQC software to control the Outlaw via its serial port. From his office in California, he was able to directly access the Outlaw in my Virginia house using a software-based serial port server program that is built-in to CQC. In less than two-days time, he wrote a driver that exploits the full functionality of the 990's protocol.

I now have a gorgeous touchscreen interface that controls most of the Outlaw's functions and provides direct feedback of the volume level and front panel display. It also handles feeback from the second zone, which comes in handy when you want to control it from another room using a touchscreen interface. Finally, b/c the CQC software is aware of the status of the unit, it is possible to write intelligent macros based on the status of the unit.

Unfortunately, as Prefect noted, the protocol is limited in certain respects. It does appear to be a serial implementation of the IR functions.

But, despite the lack of discrete controls for surround mode settings, with direct feedback of the front panel display, you can reliably toggle through the settings and see what the unit is doing.

In terms of everyday control, I am very pleased with the reliability of serial control.

It's well-worth looking into the CQC product for home theater and home automation control, particularly now that it supports the Outlaw [and the Sherwood, I would guess!]

- Ken
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 09/28/05 06:03 PM

Prefect:
It may be possible, using the macro logic available in CQC, to mimic discrete commands by reacting to the feedback provided by the device. In other words, b/c the serial port constantly sends out status information, the software would know what the current surround settings are and would know when the proper surround setting had been reached (even though it would have to toggle through them to get there). In other words, the existence of two-way feedback makes many things possible, as long as you have software with the capability of applying logic to the return data. I have no doubt that CQC could do this.
- Ken
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 09/29/05 09:41 AM

Ken,

I'm working with Dean at CQC as well to evaluate the beta 990 driver. I haven't purchased CQC yet, but I like what I've seen so far in my evaluation.

I've been messing around with creating an interface just to test out the 990 driver. A few quirks here and there, but CQC seems to be doing its job.

The latest bit of odd behavior is that when I send the "select DVD input" command, I get video 1. When I send "select video 4" I get DVD. Some of the other video inputs are messed up too. I'll email Dean about it.

Doing a macro to iterate through the settings is what I was thinking. Unfortunately I haven't figured out how to get everything that I can do from the remote & front panel to work through CQC. For example, if I've got some DTS material playing, I can send commands to switch between DTS and DTS:Neo 6 and that works fine, but I'm not able to change the Dolby modes (which I believe are controlling how the rear channels are decoded in a 7.1 setup). I can do that from the remote.

Also, I haven't been able to get things like turning the front panel dimmer on/off to work, though that is probably my own unfamiliarity with CQC.

Overall it's pretty cool though. My current thinking is that I'm going to run CQC on my HTPC, using Zoom Player to play back content out of the DVI output to my projector, and the VGA output will connect to a Xenarc or Lilliput 8" touchscreen. The touchscreen will be set up as the primary display and will contain the desktop and run the CQC interface. If I can make it work, the projector will never show desktop or menus, just content. Much more cinematic in my opinion.
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 09/29/05 12:52 PM

Prefect:

Alan Gouger at AVSForum is doing exactly what you describe -- running CQC on his HTPC and using a Xenarc touchscreen to control his projector and pre/pro from his theater chair. Very Captain Kirk.

http://www.avsforum.com/avs-vb/showthread.php?t=584418&highlight=cqc]

I have not noticed the DVD/Video 4 anomaly that you mentioned; if I did, I may have just chalked it up to how I had my audio/video inputs assigned. But if it is a bug, Dean will doubtless fix it and provide us both with an updated driver.

I have not started writing the macros necessary for my HT; I'm still perfecting my user interfaces (which becomes addictive) and working on getting my TiVo under control with the USB-UIRT driver.

If you (or Dean) manage to work out a macro for cycling through the audio formats, please share it!

- Ken
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 10/03/05 12:16 PM

Just thought I'd post a little teaser with the CQC interface I'm cooking up. This is just a proof of concept thing to test out the driver that I've been working on for the 990.

Still running into some things that are surely 990 bugs in the protocol implementation. These are not just things that I wish the protocol had implemented, but outright bugs like crossover points for rear surrounds not being reported properly, and other documented commands having no effect at all. I'll be sending in a formal list to Outlaw support soon.

Posted by: gonk

Re: RS-232 Protocol for the technically inclined - 10/03/05 12:28 PM

Very nice, Prefect - I like what you're doing here.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/18/05 12:36 PM

Does anyone know how to send a serial command via the Windows XP hyperterminal program??

1. Is a straight through or modem db9 cable needed?

2. How does one get commands to be typed into the Hyperterminal program?? After opening up this program, nothing is displayed when typing anything. I tried to type in the serial command for the 990 (eg, power on), but as noted, I cannot get anything to display in the dialog box of this program, when typing. Am I missing something here?? I am not familiar with sending commands via hyperterminal, so this MAY be the problem. Anyone have any suggestions??

Thanks!
Posted by: gband

Re: RS-232 Protocol for the technically inclined - 12/19/05 08:12 AM

You need to turn on 'echo on' in hyperterminal to see what your typing. Not sure if you need a null modem cable but I suspect you do. Also other parameters in hyperterminal may need to be set up such as bit rate, stop bits, etc. It will work if everything is set up correctly.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/19/05 12:22 PM

Thanks gband for the getback...

You were right, the commands can now be seen. I will try to see later today if the 990 can respond, and will post the findings.
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 12/19/05 04:45 PM

You won't be able to send commands to the 990 or parse its output in Hyperterminal. It's a binary protocol that requires you to form packets and generate a checksum.

You'll need to write code to talk to it properly. You could always download a demo of CQC from charmedquark.com and try out the 990 driver that Dean and I wrote.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/19/05 06:06 PM

Thanks for the heads up....


I was hoping it wouldn't require a separate program, as the goal was to use it as part of a home automation controller (JDS STARGATE), which is capable of sending out asci commands via one of its serial ports.

We do alot of home automation installs with the above device in mind, but I guess this would not really work in the way I had hoped.
Posted by: gband

Re: RS-232 Protocol for the technically inclined - 12/20/05 08:30 AM

You "could" make it work, but as prefect said its a binary protocol. Looking at it you could take the binary, convert it to the appropriate ascii so hyperterminal could send it out (i.e. hyperterminal would see it as ascii, but the 990 would see it as binary streams). The characters woiuld be a mess, and is a real pain.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/21/05 07:14 AM

I just needed ONE code (Mute: 834511D9).

I would really appreciate any help in obtaining this "workaround" to generate the asci translation for this one code.

My hope is as you noted, to send it either as a binary code by the terminal program, or basically the same thing from the com port of the Stargate home automation controller).


Thanks!!!
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 12/21/05 01:55 PM

Well, that code effectively is ASCII. It's four bytes:

83 hex (unprintable upper ASCII)
45 hex (uppercase "E")
11 hex (control Q)
D9 hex (unprintable upper ASCII)

I don't know how the Stargate stuff works, but if you can define arbitrary data and send it, you should basically just put that in and send it and it should work.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/21/05 08:41 PM

83 hex (unprintable upper ASCII)
45 hex (uppercase "E")
11 hex (control Q)
D9 hex (unprintable upper ASCII)
Thanks Ken....

Sorry for not getting it...but I do not follow...

What exactly do I type? 83hex (and the hex doesn't appear)
45 hEx (hex with an uppercase E)
11 hex (and press control Q)
and, D9 hex (and the hex doesn't appear)

Am I understanding correctly??

I had already tried the straight command:
834511D9
and got nothing.

Appreciate the clafification!
Posted by: gband

Re: RS-232 Protocol for the technically inclined - 12/22/05 08:45 AM

Google up ascii tables and you'll get lots of links to "hex to ascii" conversion.

Its been a while since I've dump hex out of HT and if I have time today I'll try it.
What Prefect is saying is create a file which will dump out the appropriate bytes in sequence. So in this case it will need to dump out 83(hex) or 131 (dec). You can't just type 83 or 131 as HT will send out the ASCII for 1, then 3, then 1. It needs 131 as a byte, which is an extended ascii.
I'll try to get to it this afternoon. Like I said its a pain.
Posted by: Eric A

Re: RS-232 Protocol for the technically inclined - 12/22/05 11:41 AM

If using a PC, try using the numeric keypad. Hold down ALT, then type 131 and let go of the ALT key. That should send the byte value of 131.

then type E
then ALT+17
then ALT+217 on the keypad

You can type this in notepad and then paste into your terminal program. You can try pasting this into your terminal program. I typed the byte string into notepad and pasted it below. I don't know if it will survive the posting process intact:

âE◄┘
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/22/05 02:44 PM

Thanks very much Eric and Gband. M'God, that looks like Klingon language....don't even have a way of typing that!!!!

Eric, tried with notepad and got nothing.

Gband, if you do have a way to get this code, it would be a lifesaver indeed. My email is: hrbstereo@verizon.net

Thanks again for the help......

Harris
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/23/05 10:31 AM

%38%33%34%35%31%31%44%39
(Above symbols are percent signs followed by the number)

The above code was generated with an ascii to hex converter, translating the 834511D9 code to hex.

Is this the correct conversion to use with HT??
Posted by: Prefect

Re: RS-232 Protocol for the technically inclined - 12/23/05 05:37 PM

That's just the point; you don't really have a way of typing it directly, because most of the characters are not normal printable/typable ASCII. The trick Eric discusses is a way to allow you to "type" arbitrary ASCII characters by way of their code in decimal. So the codes are all converted from hexadecimal to decimal.

If you fire up Hyperterminal you should be able to do the following:

- Make sure num lock is turned on.

- Make sure you're focused on your Hyperterminal window.

- Hold down ALT and type the following codes using your numeric keypad. After each code, let go of ALT and move on to the next code.

The codes:
131
69
17
217


Normally you wouldn't ever use it this way. You'd have software written capable of sending arbitrary commands, and you'd put this string of bytes into the command and have it send it automatically.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/23/05 06:22 PM

Thanks a mill...

I think I get it. Can the string which is obtained this way be saved, and copied, to another terminal type program (which is what Stargate essentially is), for use as a command in a home automation routine?

e.g., if phone rings, this command would be sent by the home automation controller to the 990, to temporarily mute it. All that is needed for the controller is a line of characters that the 990 would respond to, so I am hoping that the "trick"
to producing this string as you described, would result in an actual command line of characters which could be cut and pasted into the Stargate program, for routine use.

Hope this is clear!

Appreciate any feedback on this,
Thanks,
Harris
Posted by: Eric A

Re: RS-232 Protocol for the technically inclined - 12/24/05 08:41 AM

CI the string you created "%38%33%34%35%31%31%44%39" is incorrect. This is the hex for the ascii string rather the the byte values.

You should be able to create the string and paste it into another program using the ALT key method, unless some character set conversion issue kills it.

Let's see if this works for you. Paste this into a excel spread sheet cell, and then paste out the displayed contents into your terminal program.

=CONCATENATE(CHAR(131),CHAR(69),CHAR(17),CHAR(217))
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/24/05 10:25 AM

Eric, THANKS,

I will try this, and post the results later today (Saturday)...

Harris
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/24/05 10:44 AM

Eric, it was worth a try....but as copied from Excel, all the characters in the generated string did not paste correctly.

I also tried the slightly different string you had provided earlier, but as above, my computer would not copy and paste the symbols exactly as they were.

I guess I have to give up on this, but again, I appreciate the help.

Harris
Posted by: Eric A

Re: RS-232 Protocol for the technically inclined - 12/24/05 12:31 PM

I found this about send the codes with hyperterminal:

"You can also use an old DOS trick to send particular ASCII values that may not have control-key equivalents. Hold down the Alt key and type the decimal ASCII value on the keyboard's numeric keypad (not the number keys along the top of the keyboard), then release Alt. Precede the number with a 0 (zero). For example, to send ASCII 133, press and hold Alt, type 0 1 3 3 on the keypad, then release Alt.

Don't leave out the 0 (zero) preceding the number! If you do, the actual value sent can be changed in odd ways. For example, ASCII 14 sent as Alt-down 1 4 Alt-up works fine, but ASCII 15 sent as Alt-down 1 5 Alt-up gets translated to ASCII 164.

The smart customer who pointed out the necessity of the leading zero speculates that it has to do with Windows' conversion of character codes to the DOS character set."

So try:

ALT key method above with these codes:

0131
069
017
0217
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/24/05 01:08 PM

Eric,

I just tried it, and indeed characters were generated but these were not the same as the ones I got from the Excel conversion or from the ones you had posted.

Something like an a with a carrot, a heart, 2 capital E's, a return symbol, and a capital Y.

Not sure if these would be a different command for the 990....
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/24/05 01:14 PM

tried it again and got the following:

ƒEÙ


Is this string correct?


(nothing printed out when using the alt-017-alt command, although the 0131, 069, and 0217 commands did print, and resulted in the ƒEÙ string).
Posted by: Eric A

Re: RS-232 Protocol for the technically inclined - 12/24/05 01:53 PM

For alt 017 I get a left pointing arrow head. That should be the same thing you see when pressing control-q. If you don't see anything hitting control-q, then x-on, o-off protocol is probably turned on.

To turn off XON/XOFF , file->properties->settings->emulation and select ANSI.

That should disable xon/xoff and you should get a character when hitting control-q
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 12/24/05 03:19 PM

Eric,

I am trying to get the codes in the Terminal mode of the Stargate HA controller I mentioned; unfortunately, using control-q doesn't allow any symbol to be printed.

In the regular HT program, I get a Heart, an E, a left arrow, and a capital Y.

This can't be copied to the Stargate controller, and as mentioned, the only characters I get with it are the ƒEÙ characters (with nothing shown for the 017 entry...even when pressing control q while entering the 017.

I think there is no way to get this to work as I needed... frown
Posted by: Dean Roddey

Re: RS-232 Protocol for the technically inclined - 12/31/05 09:44 PM

The characters you see are somewhat irrelevant and will differ based on the text encoding used by any given program. Most programs for US Windows are going to use the Windows 1252 code page, which provides a paritcular mapping of glyphs (visible representations of characters) to binary values (bytes, or sequences of bytes if the encoding is multi-byte or variable byte.)

So if you spit out a sequence of bytes in any particular program, you might see different results according to whether they are using Windows 1252, Unicode, ASCI, Latin 1, etc... code pages. All that really matters is what the binary values are.

If you are trying to send some binary sequence from a small controller, and you can only issue ASCII characters and it's really only ASCII characters, then you may be screwed because ASCII doesn't define any characters with the high bit on. There are variations on ASCII that do and your controller might use such a variation.

Most such systems should provide some sort of 'escapement mechanism' by which you can generate untypable characters, such as the %xx scheme used in one of the examples above, where XX is the hex value you want to send or \xYY, where YY is the hex value you want to send. If it doesn't, you may be out o' luck.
Posted by: CI

Re: RS-232 Protocol for the technically inclined - 01/01/06 08:55 AM

Dean, thanks for the explanation.

If I understand correctly, if I pasted the above command, %38%33%34%35%31%31%44%39, into the controller, despite not seeing anything but this exact set of characters, it may work? Or, putting the characters ƒEÙ may work?

Is there any way to know if my controller sends the correct command (either of the two commands above, for MUTE) without actually seeing a change in the characters displayed in the controller?

Thanks...

(BTW, happy 2006!!!!)
Posted by: David Delbridge

Re: RS-232 Protocol for the technically inclined - 01/09/06 02:22 PM

Correct me if I'm wrong, but the 990's EVENT messages (i.e., "responses") appear to be fixed-length, afterall. I see nothing in the protocol to suggest that anything less than the full complement of 13 text bytes and 11 status bytes are returned in every EVENT message. Hence, the COUNT value should always be 24 (or 18h) and the location of each status bit fixed. Sorta nice.

I haven't received my 990 yet, so can't verify.

Dave
Posted by: twinned

Re: RS-232 Protocol for the technically inclined - 02/04/06 06:22 PM

I am using my Outlaw 990 in two ways: 1) Primary processor for HT room and 2) zone 2 output bridged across to a whole-home audio system. The Whole Home audio system was recently radiclly reconfigured by dumping a Russound-keypad system and replacing with a 3 Sonos zone players (ZP100's). The only functionality I lost in my whole home system was the remote-IR capabalities that passed through the Russound.

My question is, has someone yet created a server application (intranet only) that could reside on a computer (same head end room as the 990), and send serial commands based upon input from computers somewhere else in the home network. From what it looks like in this forum, my request seems doable, but has it been done? Where would I start? Rather than replace the infrared control system, I'd rather have a more reliable interface. Basically, I'd like to be able to replace the Zone 2 remote with a web interface.

BTW, IMHO, for any listening that is less critical than absolute audiophile quality, the Sonos is an awesome product.
Posted by: kwoodrow

Re: RS-232 Protocol for the technically inclined - 02/06/06 04:05 PM

Charmed Quark Controller (CQC) is precisely such a program (and a whole lot more). It is a network-distributed home automation and home theater control program that also includes media management features and a robust interface designer for making cool user interfaces for touchscreens, PocketPCs, and WinCE devices.

Dean Roddey, who posted a few messages back in this thread, is the software engineer who designed CQC. At my request, he wrote a device driver for CQC specifically to control the 990 via its serial port. I currently control the 990 (and the rest of my theater components) with a touchscreen interface in my theater, but I also control the 990 (and its second zone output) and my whole-house music system using wireless touchsreens in my kitchen and bedroom.

Check out CQC here: CQC

And check out my system here: My Page

HTH,
Ken
Posted by: gonk

Re: RS-232 Protocol for the technically inclined - 02/06/06 11:13 PM

Great page, Ken - thanks for sharing the links. You've got a pretty slick setup there.
Posted by: Control_System_Guy

Re: RS-232 Protocol for the technically inclined - 06/21/06 09:41 PM

Has anyone developed a Crestron module yet?
Posted by: dgtlpro

Re: RS-232 Protocol for the technically inclined - 02/21/08 12:49 AM

I doubt any one looks at this page any more, but my question is:

once you get to hex 0x38 and do the conversion as stated above, you get a check sum of 100 which is not a valid hex code. How do you rectify this?
Posted by: gonk

Re: RS-232 Protocol for the technically inclined - 02/21/08 04:41 AM

I don't know the answer to this one, but while waiting to see if others around here do you might also inquire directly with Outlaw (either via the phone or online ).
Posted by: dgtlpro

Re: RS-232 Protocol for the technically inclined - 02/23/08 04:54 PM

Thanks gonk
Posted by: cvinfig

Re: RS-232 Protocol for the technically inclined - 02/23/08 05:27 PM

My guess would be 0x00. For the command 0x39, the checksum would be 0x01, etc... By the way, I used to write code for medical device interfaces so this guess isn't completely uneducated. wink

--Chuck
Posted by: dgtlpro

Re: RS-232 Protocol for the technically inclined - 02/24/08 01:25 AM

cvinfig,

Thank You :-) your guess was right on!

YOU DA MAN Chuck, it works like a charm.
Posted by: dgtlpro

Re: RS-232 Protocol for the technically inclined - 02/24/08 01:27 AM

I've made an excel sheet with all the info, if you want it let me know.
Posted by: ComputerCowboy

Re: RS-232 Protocol for the technically inclined - 05/13/08 02:36 AM

Is it possible to have more discrete volume controls added to the 990 via firmware update?
For example:
Master volume -15db
Master volume -10db
Master volume -5db
Not just low medium and high
I know that I can start at a point and go up and down.

Also can I request that the next Pre/Pro have ASCII based range control vs the current Hex / Byte commands. For example my InFocus projector is easy to control via ASCII and the codes are humanly readable.
BRT 55 sets the brightness to 55
BRT 73 sets the brightness to 73
PWR 0 powers down the projector
PWR 1 powers up the projector
OVS 0 turns over scan off
Etc.
This is a lot more practical user friendly way to do the job

BTW here is a bit of C# code I have been working on to control the Outlaw 990
Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO.Ports;

namespace MediaControl.Logic
{

    public partial class RS232Logic
    {
        /// <summary>
        /// Sends a Hex Command to a RS232 Device
        /// </summary>
        public static void SendCommand(string HexCommand, string ComPort, int BaudRate, Parity Parity, int DataBits, StopBits StopBits)
        {
            // Create Serial Port
            SerialPort sp = new SerialPort(ComPort, BaudRate, Parity, DataBits, StopBits);

            // Convert Hex Command into bytes
            byte[] HexBytes = HexStringConverter.ToByteArray(HexCommand);

            // Open serial port
            sp.Open();

            // send out the bytes
            sp.Write(HexBytes, 0, HexBytes.Length);

            // clean up
            sp.Close();
        }
    }
    /// <summary>
    /// Converts Hex Strings 
    /// </summary>
    static class HexStringConverter
    {
        /// <summary>
        /// Converts Hex Strings to byte arrays
        /// </summary>
        /// <param name="HexString">Hex number in string format</param>
        /// <returns>byte array</returns>
        public static byte[] ToByteArray(string HexString)
        {
            // Get HexString Length
            int NumberChars = HexString.Length; 
            
            // The Hex numbers come in pairs of 2 like "DF"
            // so the length of the byte array will naturally
            // be half the length of the hex string
            byte[] bytes = new byte[NumberChars / 2];

            // Loop through the hex numbers converting each character pair to byte
            for (int i = 0; i < NumberChars; i += 2)
            {
                bytes[i / 2] = Convert.ToByte(HexString.Substring(i, 2), 16);
            } 
            return bytes;
        }
    }
}
  
Posted by: Humanzee

Re: RS-232 Protocol for the technically inclined - 08/05/08 05:29 PM

I appreciate the recommendation for CQC, however, after reviewing that product and my budget some time ago I came to the conclusion that I would lean towards open source applications for my automation. In that regard, has anybody looked into developing a plug-in for EventGhost ? EventGhost is a free and open-source automation tool for MS Windows, that can be extended through plug-ins. There are already serial plug-ins for other receivers so I imagine that a plug-in for the 990 is quite do-able.

I would attempt this myself however, I am better at testing than programing. smile Of course I could set up IR commands for the 990 in EventGhost but I think that serial port control would be better.

For home automation I am using software called vcrib . It's free also but not yet open. I'm helping test and develop features there and have talked with the author about adding EventGhost support to extend the device compatibility of that product past lighting and simple appliance control. It already has an IR module but it is not as robust as EventGhost.

Anyway, I was hoping that one of you geniuses might be interested in taking a look at an open source method of serial control for the 990 so that we could all benefit.

Also can somebody post the entire command communication protocol with check sums so that we all don't have to repeat the math.

Thanks,
-Humanzee
Posted by: Club Chapin

Re: RS-232 Protocol for the technically inclined - 09/09/08 02:59 PM

I just purchased a Pronto TSU9600. Does anyone know there is a pronto script for this remote, either Outlaw provided or User created?

At the beginning of this thread I see a reference to crestron and amx interfaces. Are these posted somewhere that they can be downloaded?

Also, in this thread there is discussion about discreet surround mode selection via 232. It is not listed in the 990 protocol. There is speculation that it could be added. Has this been added in 990 updates? I've fallen behind as my cinema has been offline for 1.5 years.

It does exist in the Sherwood protocol and someone suggests trying those commands, but there is no confirmation whether these were tried or not.

Has anyone tried the Sherwood discreet surround commands and did they work or not?

There are a few references to these. Does anyone know where these can be found?

Thanks, Pete
Posted by: Humanzee

Re: RS-232 Protocol for the technically inclined - 10/17/08 09:39 PM

Hex codes with check sums

834501C9 = Power On
834502CA = Standby On
834503CB = TUNER input select
834504CC = CD input select
834505CD = AUX input select
834506CE = PHONO input select
834507CF = DVD input select
834508D0 = VCR1 input select
834509D1 = VCR2 input select
83450aD2 = VCR3 input select
83450bD3 = VCR4 input select
83450cD4 = VCR5 input select
83450dD5 = TAPE input select
83450eD6 = 7.1ch direct input select On/Off
83450fD7 = Master volume up
834510D8 = Master volume down
834511D9 = Main mute On/Off
834515DD = OSD On/Off
834517DF = Cursor move up
834518E0 = Cursor move down
834519E1 = Cursor move left
83451aE2 = Cursor move right
83451bE3 = Sleep On, sleep time adjust and Off
83451cE4 = System display dimmer, Off and On
83451fE7 = Test tone
834526EE = Digital/Analog input select
834527EF = Select Stereo mode
834528F0 = Surround mode select up.
834529F1 = Surround mode select down
83452fF7 = Tuner preset No.0
834530F8 = Tuner preset No. 1
834531F9 = Tuner preset No. 2
834532FA = Tuner preset No. 3
834533FB = Tuner preset No. 4
834534FC = Tuner preset No. 5
834535FD = Tuner preset No. 6
834536FE = Tuner preset No. 7
834537FF = Tuner preset No. 8
834538100 = Tuner preset No. 9
834539101 = Tuner preset scan
83453a102 = Tuner preset up
83453b103 = Tuner preset down
83453c104 = Tuner tune up
83453d105 = Tuner tune down
83453e106 = OSD Enter
83453f107 = Multi-Room On/Off
834541109 = Multi-Room volume up
83454210A = Multi-Room volume down
83454310B = Multi-Room mute On/Off
83454410C = Mutli-Room TUNER input select
83454510D = Multi-Room CD input select
83454610E = Mutli-Room AUX input select
83454710F = Multi-Room PHONO input select
834548110 = Multi-Romm DVD input select
834549111 = Multi-Room VIDEO1 input select
83454a112 = Multi-Room VIDEO2 input select
83454b113 = Multi-Room VIDEO3 input select
83454c114 = Multi-Room VIDEO4 input select
83454d115 = Multi-Room VIDEO5 input select
83455311B = Event request (In the case of check sum error, etc.)
83455411C = Master Volume Level : Low (-40dB)
83455511D = Master Volume Level : Middle (-10dB)
83455611E = Master Volume Level : High (+5dB)
Posted by: Robert_Davi

Re: RS-232 Protocol for the technically inclined - 11/14/08 04:52 PM

Ok I read all the post on this issue and I think I have a handle on it. I started to add 131 (Hex = 83) to 69 (hex = 45) to the number in the PDF for the code I want.. All went well till… I got to tuner preset 9. The hex is 38 the decimal of that is 56. When I add 131 + 69 + 56 I get 256. The hex of that is 100 and every hex check sum after that are 3 digits. What do I put down as mu check sum, 100, or 10, or 00? Please let me know.

Issue two, I will need real time feedback has any one actually gotten this to work? What am I looking for to pars out? I am working with Creston. Any input would be great.
Posted by: deanb

Re: RS-232 Protocol for the technically inclined - 01/08/09 10:17 PM

Fixed for wrap-around after FF checksum.

Quote:
Originally posted by Humanzee:
Hex codes with check sums

834501C9 = Power On
834502CA = Standby On
834503CB = TUNER input select
834504CC = CD input select
834505CD = AUX input select
834506CE = PHONO input select
834507CF = DVD input select
834508D0 = VCR1 input select
834509D1 = VCR2 input select
83450aD2 = VCR3 input select
83450bD3 = VCR4 input select
83450cD4 = VCR5 input select
83450dD5 = TAPE input select
83450eD6 = 7.1ch direct input select On/Off
83450fD7 = Master volume up
834510D8 = Master volume down
834511D9 = Main mute On/Off
834515DD = OSD On/Off
834517DF = Cursor move up
834518E0 = Cursor move down
834519E1 = Cursor move left
83451aE2 = Cursor move right
83451bE3 = Sleep On, sleep time adjust and Off
83451cE4 = System display dimmer, Off and On
83451fE7 = Test tone
834526EE = Digital/Analog input select
834527EF = Select Stereo mode
834528F0 = Surround mode select up.
834529F1 = Surround mode select down
83452fF7 = Tuner preset No.0
834530F8 = Tuner preset No. 1
834531F9 = Tuner preset No. 2
834532FA = Tuner preset No. 3
834533FB = Tuner preset No. 4
834534FC = Tuner preset No. 5
834535FD = Tuner preset No. 6
834536FE = Tuner preset No. 7
834537FF = Tuner preset No. 8
83453800 = Tuner preset No. 9
83453901 = Tuner preset scan
83453a02 = Tuner preset up
83453b03 = Tuner preset down
83453c04 = Tuner tune up
83453d05 = Tuner tune down
83453e06 = OSD Enter
83453f07 = Multi-Room On/Off
83454109 = Multi-Room volume up
8345420A = Multi-Room volume down
8345430B = Multi-Room mute On/Off
8345440C = Mutli-Room TUNER input select
8345450D = Multi-Room CD input select
8345460E = Mutli-Room AUX input select
8345470F = Multi-Room PHONO input select
83454810 = Multi-Romm DVD input select
83454911 = Multi-Room VIDEO1 input select
83454a12 = Multi-Room VIDEO2 input select
83454b13 = Multi-Room VIDEO3 input select
83454c14 = Multi-Room VIDEO4 input select
83454d15 = Multi-Room VIDEO5 input select
8345531B = Event request (In the case of check sum error, etc.)
8345541C = Master Volume Level : Low (-40dB)
8345551D = Master Volume Level : Middle (-10dB)
8345561E = Master Volume Level : High (+5dB)
Posted by: syrotchen

Re: RS-232 Protocol for the technically inclined - 01/24/09 06:18 PM

I've written a complete module for the 990 its posted in crestron forum on yahoo groups. To answer your question, if I remember correctly the checksum is only one byte, which means you drop the overflow. In other words if your calc produces a 123 sum, the checksum value is 23. Please note there is an error in the documentation on the checksum the 990 sends back to you, so if your checking it, you'll need to look at the data it sends and verify it. I can't remember if it included one more byte or it containted one less byte. Just look at both ways and you should be able to determine it quickly, or you can look at my module at groups.yahoo.com and search for crestron.