[mythtv-users] Serial control of a TV
yan at seiner.com
Sat Mar 14 23:17:05 UTC 2009
George Nassas wrote:
> On 14-Mar-09, at 2:11 AM, Greg Newton wrote:
>> I'd stick with the line-ends theory too - the manual for my LC46PD7X
>> says "Eight ASCII codes + CR" - maybe try
>> echo -e "POWR0 \r"
> Not sure what the -e is doing but echo sends a newline (\n) after its
> output. The TV might be taking that newline as the start of its next
> command and, deciding it doesn't like it, ignoring everything until
> the next \r.
> The shell printf command doesn't send any extra characters so a printf
> "POWER0 \r" might do it for you and also leave the TV in a good state
> for the next command. echo -n works too if you're without printf.
-e enables parsing of special characters like '\r'.
I like the idea of printf. For some reason, the TV just doesn't like
echo - I've now figured out that out of maybe 20 attempts one succeeds.
OTOH minicom succeeds 100% of the time.
I'll try printf when the TV is not in use....
(_)\(_) ,>/'_ o__
Yan Seiner (_)\(_) ,>/'_ o__
Personal Trainer (_)\(_) ,>/'_ o__
Professional Engineer (_)\(_) ,>/'_
Support my bid for the 4J School Board. (_)\(_)
More information about the mythtv-users