[mythtv-users] Serial control of a TV
Yan Seiner
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....
--Yan
--
o__
,>/'_ o__
(_)\(_) ,>/'_ o__
Yan Seiner (_)\(_) ,>/'_ o__
Personal Trainer (_)\(_) ,>/'_ o__
Professional Engineer (_)\(_) ,>/'_
Support my bid for the 4J School Board. (_)\(_)
Visit http://www.seiner.com/schoolboard
More information about the mythtv-users
mailing list