0

I am trying to control a Philips tv via the rs232 port. Currently I am doing this by communicating with a raspberry pi. Using docklight (a windows program that allows the sending of sequences) I am able to successfully control the tv. I spent a fair amount of time messing with the exact syntax needed to pass a duplicate string from my raspberry pi (as it appears in docklight or when I cat /dev/ttyACM0) so it seems as if the right hex commands are being sent but the tv does not respond to any code that I send to it. This is the command that I am currently trying:

echo -ne '\x05\x01\x18\x02\x1E' > /dev/ttyAMA0

All baud rates and similar settings are appropriate (9600) I'm at a loss at where to go here. The only thought I have left is that there is some sort of voltage issue between the pi and the tv that doesn't exist between the desktop and the tv, but that's a bit of a longshot I believe.

ergonaut
  • 6,929
  • 1
  • 17
  • 47
Mk2004
  • 13
  • 1
  • `echo -n` suppresses a newline output, which may also be causing your chars to stuck in a buffer somewhere. try removing it and see if that makes a difference. then also try READING from the port to see what (if anything) the tv is sending back. – Marc B Feb 02 '15 at 20:51
  • I got rid of the -n flag and also, separately, tried to get a reading from the port. I tried this by opening minicom at the appropriate baud as well as cat -v /dev/ttyAMA0 and got no response. – Mk2004 Feb 02 '15 at 21:01
  • I think the long and short about how to solve this problem is seeing exactly the command as it is being sent by the program that works (docklight) The problem has been that I have NO idea how to do this as performing cat on the appropriate COM port returns nothing, nor does sending the command from docklight and receiving it in minicom. I'm at a loss here. I feel like if I could see the data being sent I'd have a much better chance at replicating it instead of just taking stabs in the dark. – Mk2004 Feb 03 '15 at 19:44
  • yeah. it's a pain. vague idea: set up a "proxy" port, something like the `tee` command that'll copy everything going out the serial port to a file as well, but since you'd have to do this in windows to capture the docklight output, it'd probably be a lot harder than in linux. – Marc B Feb 03 '15 at 19:46

1 Answers1

0

I had the same problem. Turns out that newer Philips TVs require a Group ID at byte 2. You can set this to 00. This affects both the first byte (message size) and last byte (checksum)

Example 
OLD FORMAT -L GETPOWER  [ msglen ] [ display id ] [ command ] [ Checksum ]
04 01 19 1C   --> This results in no response at all on newer Philips TVs    
NEW FORMAT  [ msglen] [ display id ] [ group id ] [ command=19 ]  [ checksum = XOR ]
05 01 00 19 1d
DALDEI
  • 3,722
  • 13
  • 9