Originally Posted by newlinux
although I don't know how much you'll be able to use any of the communication back from rs-232 in linux...
I used RS-232 to control my Plus UP-1100 projector before it blew up. I wrote a simple tool in C that ran at startup and shutdown, and could also switch video sources. It used two-way communication with the projector to check bulb status, power status, etc.
RS-232 is infinitely better than IR when it comes to reliability. Most high-end equipment includes an RS-232 port, such as the home theater receivers from Harman-Kardon and other mid-high to high-end brands. Proprietary touchscreen controllers, such as those from Crestron and AMX, commonly installed in million dollar homes, use RS-232 to control everything, falling back to IR only as a last resort.
At the simplest level, if you don't mind the command line (which is where the power of Linux lies anyway, so not using the command line when setting up a powerhouse HTPC is like not using the Tiptronic mode of your new Acura), you can control a serial device with two steps:
1. set the baud rate
stty -F /dev/ttyS0 [baud rate]
stty -F /dev/ttyS0 115200
stty stands for set teletype
/dev/ttyS0 is the UNIX equivalent to COM1 in Windows
2. send the control string
printf "blahblah" > /dev/ttyS0
printf "Input 02\
" > /dev/ttyS0
printf "\\x08\\x0f" > /dev/ttyS0
prints a Windows-style newline, in case your device requires such a newline after a command. \\x lets you use hexadecimal bytes directly, as my Plus projector required, for example.
To go beyond one-way control, there is a program called chat or expect or something like that, that can run scripted conversations with your devices. It was designed for handling logins to dial-up Internet/network access back in the day. Beyond that, you can write something in C/C++, perl, bash, or any other language to do your bidding.