Lg Tv Firmware Hack

function execCommandRaw {
echo $2 > $1 && sleep 0.07s && read -dx -t 1 response < $1
return `echo $response grep -q OK`

result=$(execCommandRaw '$1' '$2')
echo $result cut -c8-
}
function testPort {
then
if [ '$(execCommandRaw $1 'ka 1 ff')' = 'a 01 OK01' ]
return 0
fi
}
function findPort {
testPort '$f'
then
return 0
done
testPort $f
then
return 0
done
}
portName=$(findPort)
echo 'Could not find TV'
fi
current=$(execCommand $portName '$2 01 ff')
# The regex is meant to work for zero-padded values
# Combined with the option set above, it's a case-insensitive match
exit 0
execCommand $portName '$2 01 $3'
echo error
fi
execCommand '$portName' '$1 01 $2'
echo error
fi