When I connect my LG TV via rs232 the detection script does not find it. When I run the command manually I get:
# ./20_LG_TV.sh 1 2 /dev/ttyUSB1
LG TV detection script queue 2
A 01 OK01x\r\n
A 01 OK01x\r\n
It's not a LG TV
However the connection works fine as when I do:
# /usr/pluto/bin/TestSerialPort -p /dev/ttyUSB1 -P N81 -b 9600 -t "ka 01 00\r\n" -s "a 01 OK" -i 2
A 01 OK00x\r\n
it turns off and with
# /usr/pluto/bin/TestSerialPort -p /dev/ttyUSB1 -P N81 -b 9600 -t "ka 01 01\r\n" -s "a 01 OK" -i 2
A 01 OK01x\r\n
it goes on again.
This is the content of the script:
#!/bin/bash
echo "LG TV detection script queue $2"
# make sure its on
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 9600 -t "ka 01 01\r\n" -s "a 01 OK" -i 2
# double check that its on
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 9600 -t "ka 01 FF\r\n" -s "a 01 OK" -i 2
if [[ "$?" -ne 0 ]]; then
echo "It's not a LG TV"
#/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 0
exit
fi
echo "test"
# older TVs should not have a "xb" command
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 9600 -t "xb 01 FF\r\n" -s "b 01 OK" -i 2
if [[ "$?" -eq 0 ]]; then
echo "LG TV with newer command set"
#/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 2126
exit
fi
# double check that it responds correctly to the older command
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 9600 -t "kb 01 FF\r\n" -s "b 01 OK" -i 2
if [[ "$?" -eq 0 ]]; then
echo "LG TV with older command set"
#/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 1915
fi
Anyone sees what needs to be changed? thx
This looks to be case related.
trac.linuxmce.org/trac/ticket/2095
Hi,
Just curious - was the LG TV in standby mode?
Cheers.
iirc not
O.K.
It was just that "most - meaning newer" LG panels won't transmit/send "FF" status when in standby mode.
It was just a thought.
Good Luck.
Hi,
I was just wondering, what the timing delay was from turning on the TV, waiting for the TV to actually power up and receive a signal through the AVReceiver (or directly from your sat/cable provider)?
Since TV sets are not instant on, how long was your delay between sending the "on" message to sending the status query?
Cheers.