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:
Been doing ir for years, now trying out rs232
This thread has 5 replies. Displaying all posts.
Post 1 made on Wednesday April 7, 2010 at 13:46
wowhowdididothat
Lurking Member
Joined:
Posts:
April 2010
2
I want to learn how to understand and figure out how to write the commands for rs-232 such as the protocol for a denon dvd5900, and how to parse data. I have both a rti xp8, t3v zigbee, and a phillips pronto tsu-9400 and rfx-9600. Is there a book or anyone know of a trick, ive seen people say its dying out but its still good to know. any help would be very much appreciated
Post 2 made on Wednesday April 7, 2010 at 15:44
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
There is no easy answer to your question.


RS232 , Hummm where to start , we do some training on this subject, and 6 hours will only just scratch the surface.

RS232 can be done via IRDA, copper wire , blue tooth and RF,

Now the Data that is used on the RS232 connection is called a Protocol. These vary with every supplier, and can be written in Hex ( not the same as IR hex) decimal or Ascii. somtimes they mix the protocol up using HEX and ascci in the same String ( String is the Data)

The Data can be sent at different rates know as Baud rates , these also vary, along with the start and stop bits and parity and handshaking and check sums.


I think you will see its not a simple as IR :)

Try Google there is Loads of info out there.

EG. Mitsubusi Projctor On command,
9600,8,1 speed , data bits and stop bits..
30, 30 21, 0D in hex, some times displayed in the manual as

h30,h30,h21,h0D or x30,x30,x21,x0D

see what i mean :)

Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
Post 3 made on Friday April 16, 2010 at 02:48
HiFidel
Long Time Member
Joined:
Posts:
July 2005
165
Other common prefixes for indicating a hex byte (ie: two hex characters):
0x
\x

eg: 0x2F or \x2F

Get hold of a terminal program that lets you send preset strings out of serial ports, such as Crestron Viewport. Makes it a lot easier to test 232 on AV gear. Have a variety of cables available: DB9 female-male straight through and a DB9 female female crossover (aka null modem) will take care of 90% of the gear but you get oddball equipment where you might need female-female straight through (panasonic commercial plasmas) or the 232 port is an RJ45 (DLO homedock pro) or minijack (Nuvo simplese) so always be chasing down documents for the gear. Service centers are sometimes better places to call than consumer support numbers for this sort of thing.

This pinout is correct most of the time:

DB9 Male
Looking into male, 5 pins on top, count left to right top to bottom
1 DCD IN Data Carrier Detect. Raised by DCE when modem synchronized.
2 RD IN Receive Data (a.k.a RxD, Rx). Arriving data from DCE.
3 TD OUT Transmit Data (a.k.a TxD, Tx). Sending data from DTE.
4 DTR OUT Data Terminal Ready. Raised by DTE when powered on. In auto-answer mode raised only when RI arrives from DCE.
5 SGND - Ground
6 DSR IN Data Set Ready. Raised by DCE to indicate ready.
7 RTS OUT Request To Send. Raised by DTE when it wishes to send. Expects CTS from DCE.
8 CTS IN Clear To Send. Raised by DCE in response to RTS from DTE.
9 RI IN Ring Indicator. Set when incoming ring detected - used for auto-answer application. DTE raised DTR to answer.

Most of the time in AV land only pin 2, 3 and 5 matter (receive, transmit, ground).

Here's another copy/paste:

232 guidelines (there are exceptions):
If a device has a male DB9 connector, then pinouts are as listed above under "DB9 Male"
To control this sort of device with a controller with a male DB9, you'll need a null modem connection (Swap: 2/3, 4/6, 7/8. Straight: 1-1, 5-5, 9-9)

Some devices have female DB9 connections, these are usually crossed so you can use a straight through serial cable with a male end with pinouts as listed under "DB9 Male"
Post 4 made on Wednesday April 21, 2010 at 08:52
Matt
Founding Member
Joined:
Posts:
August 2001
1,802
When you get started, just remember that to the controller the different variations of a value are the same.

so if you send \x30 (or how your controller represents a single hex byte of 30) or '0' (ASCII 0, usually represented like this...but not always) it's the same exact thing.

By dying out, perhaps the RS232 transport will die out someday, but you will most likely use the same protocol on the new transport which is probably IP. So learning RS232 isn't really accurate, you're learning protocols, data manipulation, and binary mathematics, which will always be important no matter the transport mechanism.
Post 5 made on Wednesday April 21, 2010 at 19:19
pconroy
Lurking Member
Joined:
Posts:
April 2010
3
On April 21, 2010 at 08:52, Matt said...
By dying out, perhaps the RS232 transport will die out someday, but you will most likely use the same protocol on the new transport which is probably IP. So learning RS232 isn't really accurate, you're learning protocols, data manipulation, and binary mathematics, which will always be important no matter the transport mechanism.

Well said.

RS232 is simply specification. A piece of paper. Oversimplifying, it says things like "apply +5 volts to pin 1 for 50 milliseconds"... :)

The "RS232" ports on the back of your computer, often a DB-9 connector, are also called "Serial Ports" or "COM ports".

By "dying", I think it's more accurate to observe that the number of PCs (or devices for that matter) shipping with serial ports is falling. Serial Ports are being replaced by USB ports, for lots of good reasons.



Whether the protocol changes, when a device manufacturer changes from serial to USB, depends on the manufacturer.


Again - oversimplifying - the commands I send, over the serial port to a CM11A device, to turn on light A-1 might be "02 05 3F AA" (in hex).

X-10, could choose to keep that same command string, to turn on light A-1 for their CM15A device, their USB version of the CM11A.

Or they could choose to change it.

--
Same thing goes for a device that has an IP connection - they could choose to accept an IP packet with those bytes in them, or they could decide to change it, to implement some new device control protocol.
Post 6 made on Wednesday April 21, 2010 at 19:49
Matt
Founding Member
Joined:
Posts:
August 2001
1,802
Well said to you too.... ;-)


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