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:
Reverse engineer RS232 code...
This thread has 12 replies. Displaying all posts.
Post 1 made on Monday March 15, 2010 at 22:50
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
The manufacture will not provide the information, so I am trying to reverse engineer the RS232 code/protocol. I have a windows program that communicates with an amplifier through a com port. Using a port monitor I obtained the following:
Send#Receive#Initial Volume#result volume
254 2 0 240 0 97 0 0 0 1 25 247 240 0 97 0 4 0 1 29 247#240 127 97 0 0 0 1 120 247 240 127 97 0 4 0 1 116 247#0#-0.1
254 2 0 240 0 97 0 0 0 2 28 247 240 0 97 0 4 0 2 32 247#240 127 97 0 0 0 2 117 247 240 127 97 0 4 0 2 113 247#-0.1#-0.2
254 2 0 240 0 97 0 0 0 3 27 247 240 0 97 0 4 0 3 31 247#240 127 97 0 0 0 3 118 247 240 127 97 0 4 0 3 114 247 #-0.2#-0.3
254 2 0 240 0 97 0 0 0 4 30 247 240 0 97 0 4 0 4 26 247#240 127 97 0 0 0 4 115 247 240 127 97 0 4 0 4 119 247#-0.3#-0.4
254 2 0 240 0 97 0 0 7 103 122 247 240 0 97 0 4 7 103 126 247#240 127 97 0 0 7 103 23 247 240 127 97 0 4 7 103 19 247#-100#-99.9
254 2 0 240 0 97 0 0 7 102 121 247 240 0 97 0 4 7 102 125 247#240 127 97 0 0 7 102 24 247 240 127 97 0 4 7 102 20 247 #-99.9#-99.8

but I can't figure out what is going on.... I've used decimal vs. hex, because I thought it would be easier to read and I have delimited the results with # sign's...
Post 2 made on Monday March 15, 2010 at 23:12
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
hex will be easer.
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
Post 3 made on Monday March 15, 2010 at 23:12
gopronto
Senior Member
Joined:
Posts:
April 2008
1,453
hex will be easier.
Pronto still one of the best Wi-Fi Remotes,
www.ikonavs.co.nz and [Link: axiumcontrol.com] Axium Control
OP | Post 4 made on Tuesday March 16, 2010 at 09:30
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
<!--[if !excel]>  I converted this in Excel (hopefully it is correct):  A snap shot is the best way I can think of to embed the file to see here...
<!----------------------------->

Last edited by shaun5 on March 16, 2010 09:56.
Post 5 made on Tuesday March 16, 2010 at 10:50
anyhomeneeds
Super Member
Joined:
Posts:
December 2007
4,149
Maybe if you listed what product you need the codes for, someone on here probably has them.
"You can't fix stupid."
OP | Post 6 made on Tuesday March 16, 2010 at 11:05
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
Dynaudio AIR series speakers.
OP | Post 7 made on Tuesday March 16, 2010 at 11:51
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
I only have a small amount of experience with RS232 (hence the request for help).  I have added color coding to how I think the requests break down:

Initialization string (FE 2 0).
a command (F0 0 61 0 0).
a VALUE for volume
a checksum.
a termination (F7).
a command (F0 0 61 0 4).
a VALUE for volume.
a checksum.
a termination (F7).

I can't figure out the relationship between the VALUE and actual volume. I also can't figure out how to compute the checksum. In the program volume goes between +12 and -100, so for me to figure it out I think I will need more values. I COULD BE COMPLETE WRONG ABOUT EVERYTHING....

Last edited by shaun5 on March 16, 2010 12:11.
OP | Post 8 made on Wednesday March 17, 2010 at 07:27
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
My program was giving me bad data.  Below are the necessary commands, but I still can't calculate volume. I also tried sending one and can't get the protocol correct..

Post 9 made on Wednesday March 17, 2010 at 13:07
n2hifi
Long Time Member
Joined:
Posts:
August 2007
192
Well the negative numbers are pretty straight forward. Multiply column 'F' by 128 and add column 'G'. You get column 'J' shifted by a decimal point.
Mark Olsen, CTS
Cannon Design
Post 10 made on Wednesday March 17, 2010 at 13:25
n2hifi
Long Time Member
Joined:
Posts:
August 2007
192
The positive numbers are equilivant to 128 - column 'G' shifted by a decimal. This is essentially 16384 (which is 128x128) minus 16256 (which is128x column 'F') minus 'G'

This makes the negative numbers make more sense since they are subtracted from a baseline instead of additive.
Mark Olsen, CTS
Cannon Design
OP | Post 11 made on Wednesday March 17, 2010 at 13:45
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
Wow! Thank you!!! I was considering giving up...
OP | Post 12 made on Thursday March 18, 2010 at 14:08
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
I have been unsuccessful sending a command. I hope it due to me incorrectly configuring the port. Is there a port monitor (or something else) that can tell me the configuration of an open port?
OP | Post 13 made on Saturday March 20, 2010 at 08:56
shaun5
Long Time Member
Joined:
Posts:
December 2008
52
I've got the protocol figured out, but I missed that I still don't know how to compute column H. Any ideas??


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