Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
# ./20_LG_TV.sh 1 2 /dev/ttyUSB1LG TV detection script queue 2A 01 OK01x\r\nA 01 OK01x\r\nIt's not a LG TV
# /usr/pluto/bin/TestSerialPort -p /dev/ttyUSB1 -P N81 -b 9600 -t "ka 01 00\r\n" -s "a 01 OK" -i 2A 01 OK00x\r\n
# /usr/pluto/bin/TestSerialPort -p /dev/ttyUSB1 -P N81 -b 9600 -t "ka 01 01\r\n" -s "a 01 OK" -i 2A 01 OK01x\r\n
#!/bin/bashecho "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 2if [[ "$?" -ne 0 ]]; thenecho "It's not a LG TV"#/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 0exitfiecho "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 2if [[ "$?" -eq 0 ]]; thenecho "LG TV with newer command set"#/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 2126exitfi# 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 2if [[ "$?" -eq 0 ]]; thenecho "LG TV with older command set"#/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 1915fi