Your Universal Remote Control Center
RemoteCentral.com
RS-232 & IP Control Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
What is RS-232 and IP - A Primer
This thread has 6 replies. Displaying all posts.
Post 1 made on Thursday August 20, 2009 at 13:08
crosen
Senior Member
Joined:
Posts:
April 2009
1,262
Hi All - I've been very much enjoying and benefiting from RC for a while now. In an attempt to give back to the community, I drafted up this primer. I hope it is of some use. Of course, I welcome comments and corrections!

------------------------
What is RS-232 and IP - A Primer

BACKGROUND

Anyone reading this likely knows that IR control provides a way for sending control commands to a component "through the air" by modulating radio waves in the infrared spectrum. As a control option, IR has about one thing going for it: it is very inexpensive to implement. It's well known limitations include "line of sight" requirements, one-way only communication and the omission of discrete commands in many implementations. Additionally, when IR commands are represented in text, the ridiculously long and random character sequences are anything but human readable.

Simply put, IR was a great way to let couch potatoes change TV channels from afar, but was never intended as a control technology for automation or integration scenarios. So, what's a geek to do?

Enter RS-232 and IP.


WHY RS-232 and IP?

If you are looking for a control protocol that provides robust, two-way communication for device control and automation/integration, RS-232 and IP will hit the spot. Key benefits of these control protocols include:

1. Options for reliable, hard-wired connections. (Actually, RS-232 is inherently a wired communication method. IP can be wired or wireless, as described below.)

2. Robust, two-way communication that enables command verification, device status reporting and transmission of information in addition to control data.

3. Rich API's that include, and go way beyond, discrete commands.

These factors make RS-232 and IP great options for automated control of devices. However, when it comes to universal remotes, the story is mixed. IP control can be done with a remote that supports wifi, but because of relatively long "wake-up" times for wifi, this is not suitable for all applications. RS-232 is hardly suitable for universal remotes, since it does not natively support wireless communication.


TECHNICALLY SPEAKING

Before going further, some technical notes to keep in mind:

1. Technically speaking, RS-232 is a standard for serial data communication that has numerous implementations. While a detailed discussion of the standard is beyond the scope of this primer, it is important to know that not all RS-232 ports are created equal. This means some fuss can go into finding the right cable for connecting two devices over RS-232. As always, Wikipedia is your friend: RS-232, Null modem


2. IP, which is short for Internet Protocol, does not actually specify a physical connection standard. Rather, it describes a method for sending packetized data over any manner of physical connection. In the context of AV and home automation, it is safe to say that IP refers to "IP over Ethernet", where Ethernet describes the physical medium through which the data is sent.


THE SPECIFICS

RS-232

In order to control a device using RS-232, several things are required:

1. Both the device and the controller must have a RS-232 port
2. The two devices must be connected using a cable that properly matches the specific variety of RS-232 interface on each device (see TECHNICALLY SPEAKING above)
3. The port of the controller must be configured to use the same settings (speed, data bits, parity and stop bits) as the devices.
4. The ASCII character sequence of the commands supported by the device must be programmed into the controller.

If your device has a RS-232 port for control, chances are your manual will document the ASCII commands. For example, my Panasonic TH-50PHD8UK monitor manual shows that sending the following sequence of characters to the ASCII port will turn the device on:

02h P O N 03h

In this example, 5 characters in all are sent. The first character is the hex value 02, the second character is the letter "P", and so on.

Now, if your mindset is geared around a universal remote control, you are probably wondering, "how does this benefit me if I don't have a RS-232 cable running from my remote to the devices I want to control!?"

The answer lies in gateway devices, such as the URC MSC-400. These devices sit between your remote control (or other user interface) and the devices you wish to control. When you push a button on your remote, the remote sends an instruction to the gateway (typically through either IR or RF), and the gateway then forwards the appropriate command to the target device over the RS-232 connection. Here's what that looks like using a RF remote, the URC MSC-400 gateway and a TV:

Remote --[RF]--> MSC 400 --[RS-232]--> TV

One drawback with RS-232 control is that many AV components don't support it. If your AV receiver costs less than $1000, there's a good chance that you're out of luck. If you have a large screen plasma or LCD high def tv/monitor, you've got a reasonable shot.


IP

In order to control a device using IP (over Ethernet), here's what's required:

1. Both the device and the controller must have Ethernet ports
2. Both devices must be on the same IP network
3. The controller must know the IP address of the target device
4. The character sequence of the commands supported by the device must be programmed into the controller.

As where RS-232 control requires a gateway device between a universal remote and target devices, IP control can be done directly from remotes that support wifi. (TIP: your iPhone or iPod Touch makes a great IP remote!) However, it is still often the case that gateway devices are used for IP control, including whole home control processors from companies such as Crestron, AMX and Control4.


WHAT NOW?

If you already own devices that support RS-232 or IP communication, why not explore products and options for exploiting that capability. You can do so right here on RC!

If you don't already own such devices, consider making RS-232 or IP support a requirement for one of your future purchases. Once you enjoy the reliability and flexibility of these protocols, there's just no going back.

Also, keep an eye out for other two-way communication protocols such as ZigBee and Z-Wave. Unlike RS-232 and IP, these are complete protocol stacks designed from scratch for automation and device integration.

Last edited by crosen on August 21, 2009 01:18.
If it's not simple, it's not sufficiently advanced.
Post 2 made on Thursday August 20, 2009 at 13:47
39 Cent Stamp
Elite Member
Joined:
Posts:
May 2007
17,515
Great article! Keep it coming :).

I noticed something that didnt look finished...

"The answer lies in gateway devices, such as the URC MSC-400 [Link: universalremote.com] These devices sit between your remote control (or other user interface) and the devices you wish to control. When you push a button on your remote"

I feel like you missed the rest of the last sentence or forgot to delete it and im in suspense :).
Avid Stamp Collector - I really love 39 Cent Stamps
OP | Post 3 made on Thursday August 20, 2009 at 14:20
crosen
Senior Member
Joined:
Posts:
April 2009
1,262
So right you are - thanks for pointing that out! I made an edit to complete the thought.
If it's not simple, it's not sufficiently advanced.
Post 4 made on Thursday August 20, 2009 at 20:27
39 Cent Stamp
Elite Member
Joined:
Posts:
May 2007
17,515
Awesome! This question gets asked often so now we have a starting point post to link them to.
Avid Stamp Collector - I really love 39 Cent Stamps
Post 5 made on Friday August 21, 2009 at 00:27
smokinghot
Super Member
Joined:
Posts:
August 2006
3,688
On August 20, 2009 at 13:08, crosen said...
TECHNICALLY SPEAKING

Before going further, two notes of clarification:

1. Technically speaking, RS-232 is a standard for serial data communication that has numerous implementations. In the context of AV and home automation, it generally refers to a specific implementation (RS-232C) that uses a 9 pin connector.

THE SPECIFICS

In order to control a device using RS-232, several things are required:

1. Both the device and the controller must have a RS-232 port
2. The two RS-232 ports must be connected using a proper cable

Maybe I'm being overly critical, but I think the bolded sections are misleading, in the case of the first two, and the last is weakly worded. Which could fortify the misconception of the first two.

Using your example of the MSC-400 I can easily site, that RS-232 does not always necessarily use the DB-9 connector. In fact the MSC only utilizes three pins Tx, Rx, common, and is terminated by the use of a stereo 3.5mm jack. Obviously, you can't list every possible connection/configuration, but stating that RS-232 control uses a DB-9 and then going on to say that both devices "must have a RS-232 port" can confuse those in need of a primer.

To go a little further...: Although your second point about the "proper cable" has nothing to do with the DB-9 connection. It certainly reads like it does. Maybe you could slightly reword and expand so it reads more like.

2. The device and controller must be connected using the appropriate cable configuration. Which will be either "normal" or "null modem".

...and then possibly attach wikipedia links to "normal" and "null modem", so you don't have to go through the effort of explaining the differences and pin-out. ...and why not link to the DB-9 while you have the wiki open.

Just some suggestions, but otherwise good work. I'm sure many will appreciate your efforts.
....Light travels faster than sound. That's why some people appear bright until you hear them speak.
OP | Post 6 made on Friday August 21, 2009 at 01:15
crosen
Senior Member
Joined:
Posts:
April 2009
1,262
Thank you for pointing that out. I did some rewording and added some links to hopefully clear things up.
If it's not simple, it's not sufficiently advanced.
Post 7 made on Friday August 21, 2009 at 01:22
smokinghot
Super Member
Joined:
Posts:
August 2006
3,688
In all fairness... It made total sense to me, and obviously Stamp, but seeing as this is being labelled as a primer. I think more of an "Idiot's Guide" approach would be better suited.

It's not my baby. Just my .02
....Light travels faster than sound. That's why some people appear bright until you hear them speak.


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse