[mythtv-users] Serial control of a TV

Ronald Frazier ron at ronfrazier.net
Tue Mar 17 12:58:40 UTC 2009


> Sorry I'm a few days late replying, but I am doing serial control of
> my Aquos. I wrote a custom perl script to handle it using the
> Device::SerialPort module. You can download the perl module here:

I forgot to mention a few things about my module. Very occasionally I
have a little hiccup communicating with the TV, sometimes the TV seems
to have a delay in responding, or just outright not respond at all.
I've worked around most of the gotchas, by implementing a timeout
waiting for the response, trying the command up 3 times if the first
few attempts fail out, and clearing out the read buffer before writing
(in case the TV eventually decides to respond long after I've given
up, which has happened, usually in the form of non-text characters).
It seems to have dealt with almost everything.

The one case I haven't cleared up yet (though it only happens very
rarely) is related to the volume. Since the Aquos serial protocol has
no way to issue a VOL +/-, you instead have to read the current
volume, increment/decrement, and write back the new volume (seems like
a huge oversight in the protocol design to me). Well, occasionally
something will happen and when I query the volume, I get back a zero,
and thus the volume will jump to 0 or 1. I haven't yet figured out the
cause (I'm trying to debug it now, but it hasn't happened in over a
week).

Also, when checking the input, there doesn't seem to be a way to query
if it is on the TV tuner. When you query serial port with the IAVD?
command, it will return 1 to 7 if you are on any of the non-tuner
inputs, but otherwise it just returns an ERR response. I thought maybe
it was undocumented that ITVD? could query the tuner status, but that
doesn't seem to work. So instead, I just interpret ERR from the IAVD?
command as meaning you are on the tuner (which I consider input 0 in
my module).

FYI...I'm currently using this with an Aquos LC-46D64U model.


-- 
Ron
Ronald Frazier Photography - http://www.ronfphoto.com/
Blogging About Photography - http://ronfrazier.blogspot.com/


More information about the mythtv-users mailing list