Philips TV RS-232 hex problems

738 Views Asked by At

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.

1

There are 1 best solutions below

0
DALDEI On

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