Dang Keith, you're Good..<br><br>--<br><br><div class="gmail_quote">On Wed, Jan 7, 2009 at 3:30 PM, <span dir="ltr"><<a href="mailto:krwatson@cc.gatech.edu">krwatson@cc.gatech.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I did some hardware hacking last night on my Tivax STB-T8 ATSC to NTSC converter box serial interface. So what has this to do with Linux you might ask. The goal is to control my new found miracle of modern electronics with a Linux workstation.<br>
<br>
I have to use the converter to receive digital TV so I can't program my NTSC VCR to change channels anymore. The solution is to control the converter with a computer. I could use an IR blaster but where's the fun in that.<br>
<br>
Here is what I've uncovered so far:<br>
<br>
NOTE: The manufacturer warns that using the serial interface voids your warranty.<br>
<br>
<br>
What is the serial connector for?<br>
<br>
The serial connector is for uploading software by the factory. No, at this time there are no plans to make new software available to consumers.<br>
<br>
The connector can also be used for controlling the unit with a PC. Baudrate is 115kb. Use the command "zir" to issue cmds. This interface is not supported. Do not ask questions what does this or that do. Use of this port voids any warranty.<br>
<br>
<a href="https://shop.tivax.com/faq/index.php?action=artikel&cat=1&id=42&artlang=en" target="_blank">https://shop.tivax.com/faq/index.php?action=artikel&cat=1&id=42&artlang=en</a><br>
<br>
<br>
Of course my response is one or both of the following:<br>
<br>
Your Motto: If it ain't broke, take it apart and fix it.<br>
<a href="http://www.thinkgeek.com/interests/techies/8f52/" target="_blank">http://www.thinkgeek.com/interests/techies/8f52/</a><br>
<br>
<br>
Joss Whedon Serenity Browncoat/I Aim To Misbehave T-Shirt<br>
<a href="http://www.amazon.com/Whedon-Serenity-Browncoat-Misbehave-T-Shirt/dp/B000TYFDU4" target="_blank">http://www.amazon.com/Whedon-Serenity-Browncoat-Misbehave-T-Shirt/dp/B000TYFDU4</a><br>
<br>
<a href="http://tinyurl.com/2llnny" target="_blank">http://tinyurl.com/2llnny</a><br>
<br>
<br>
Enough frivolity and on with the hardware hacking.<br>
<br>
The manufacturer web page above is the only hint given on how to use the serial port but it's all I need (Thank you Tivax).<br>
<br>
I used two standard PC 9 pin female to 25 ping male serial cables connected with a break out box so I could swap pins around. I ended up having to cross connect pins 2 & 3.<br>
<br>
I configured my PC serial port for:<br>
<br>
115200 baud<br>
8 data bits<br>
No parity<br>
1 stop bit<br>
XON/XOFF flow control<br>
<br>
I suspect this is not the correct pin out. At this baud rate I would expect it to use hardware flow control. But it was good enough to talk to the converter.<br>
<br>
Once I was connected I typed in zir<return> which resulted in the following:<br>
<br>
Usage: zir [key]<br>
<br>
key:<br>
menu (menu)<br>
exit (exit from menu)<br>
v- (volume down)<br>
v+ (volume up)<br>
p+ (program up)<br>
p- (program down)<br>
sel (select/enter)<br>
mute (mute)<br>
up (up)<br>
dn (down)<br>
l (left)<br>
r (right)<br>
last (last channel)<br>
pow (power)<br>
info (information)<br>
Guide (Guide)<br>
Last (Last Channel)<br>
Aspect (aspect ratio)<br>
Text (-)<br>
cc (subtitle)<br>
Audio (Audio)<br>
Signal (signal strength)<br>
AudioLR (Audio LR)<br>
Fav+ (Fav Up)<br>
Fav- (Fav Down)<br>
Freeze (Freeze)<br>
ZMon><br>
<br>
<br>
I'll get to what the options mean in a minute but I must note that the ZMon prompt is significant. Apparently the unit is now in monitor mode. This means that the converter is constantly spewing all manner of information about the state of the currently viewed station. The worse the reception (it was very windy last night so it was more than my bowtie antenna could handle) the more information gets spewed. Here's a sampling:<br>
<br>
handleZtvClosedCaptionRegister :ccType=3,serviceType=64<br>
doPSIChange : Warning - unable to match audio language 0x0<br>
Defaulting to first audio stream<br>
doPSIChange : ignored<br>
Warning: Video channel (VBV) buffer underflow<br>
Last message repeated 3 times<br>
Warning: ClearTLVideoBuffer nrdnt2 not configured<br>
has708=0, has608=1, t708=17202510, t608=17202535<br>
cbTimeoutUnmuteTimer : Unmute<br>
Warning: ClearTLVideoBuffer nrdnt2 not configured<br>
Last message repeated 4 times<br>
Warning: Video channel (VBV) buffer underflow<br>
TLCtrlArraySave: Saving backup 550 in slot 3 succ<br>
Invalid FSCOD<br>
AC3 sync word not found<br>
AC3 sync word not found<br>
AC3 sync word not found<br>
has708=1, has608=1, t708=17204174, t608=17204172<br>
AC3 sync word not found<br>
has708=0, has608=1, t708=17204174, t608=17204764<br>
AC3 sync word not found<br>
new key 0x70<br>
new key 0x70<br>
has708=1, has608=1, t708=17206526, t608=17206526<br>
has708=0, has608=1, t708=17206526, t608=17207129<br>
AC3 sync word not found<br>
AC3 sync word not found<br>
Invalid FRMSIZECOD<br>
AC3 sync word not found<br>
AC3 sync word not found<br>
AC3 sync word not found<br>
AC3 sync word not found<br>
symInvalid FRMSIZECOD<br>
<br>
So far I have not figured out how to tell it to stop monitoring.<br>
<br>
Here is what the zir options mean.<br>
<br>
menu (menu) (the same as pressing the menu button on the remote)<br>
exit (exit from menu) (the same as pressing the exit button on the remote)<br>
v- (volume down) (the same as pressing the volume up button on the remote)<br>
v+ (volume up) (the same as pressing the volume down button on the remote)<br>
p+ (program up) (the same as pressing the channel up button on the remote)<br>
p- (program down) (the same as pressing the channel down button on the remote)<br>
sel (select/enter) (the same as pressing the OK button on the remote)<br>
mute (mute) (the same as pressing the mute button on the remote)<br>
up (up) (the same as pressing the up arrow button on the remote)<br>
dn (down) (the same as pressing the down arrow button on the remote)<br>
l (left) (the same as pressing the left arrow button on the remote)<br>
r (right) (the same as pressing the right arrow button on the remote)<br>
last (last channel) (haven't tested this yet)<br>
pow (power) (the same as pressing the standby button on the remote)<br>
info (information) (the same as pressing the info button on the remote)<br>
Guide (Guide) (the same as pressing the guide button on the remote)<br>
Last (Last Channel) (haven't tested this yet)<br>
Aspect (aspect ratio) (the same as pressing the aspect button on the remote)<br>
Text (-)(this brings up the channel identifier)<br>
cc (subtitle) (the same as pressing the caption button on the remote)<br>
Audio (Audio) (the same as pressing the audio button on the remote)<br>
Signal (signal strength) (the same as pressing the signal button on the remote)<br>
AudioLR (Audio LR) (haven't tested this yet)<br>
Fav+ (Fav Up) (haven't tested this yet)<br>
Fav- (Fav Down) (haven't tested this yet)<br>
Freeze (Freeze) (haven't tested this yet)<br>
<br>
<br>
I also figured out why they think using the serial port voids the warranty. You are talking directly to the hardware so it is possible to trash the configuration of the box. Be very, very carful what you type. What may look like gibberish to you could be a command to the box. To see all the commands type help<enter>. (see attachment help.txt)<br>
<br>
<br>
Of course I noticed the "help all" so the output is in the attachment help_all.txt.<br>
<br>
<br>
I did a bit more poking around but I was unable to find out how to tune to a specific channel. However I did find some useful tid bits.<br>
<br>
In the help it mentioned:<br>
<br>
padnum - the padnumber of the pin to configure (see beetle_pad_xxxx.xls)<br>
SDCard - Test SD card initialization process<br>
<br>
<br>
The vidinfo command produced the following:<br>
<br>
ContextSettings - Digital Beetle_420<br>
Display : 720 x 484 I 60Hz- All Formats 4:3 (narrow)<br>
Context : 352 x 480 I @ 29.970030hz (narrow)<br>
ROI : [0 16 352 448] max[0 0 1920 1088]<br>
position: [0 0 720 480] max[0 0 1920 1088]<br>
hScale=2.045455 vRawScale=1.071429 vScale=1.071429<br>
contextFieldTimes=2 extraDelay=2997 invertFieldDecode=0<br>
tcfactor=22.603842 writeback=0 deinterlace=0<br>
bufferModel=Inline mceSize=2 low_delay=0<br>
<br>
<br>
<br>
I then did something (not sure what, maybe the config command) that resulted in the attachment possible_config_data.txt. Here are just a few of the interesting morsels:<br>
<br>
#line 1 "../generated/../config/chip/740REVB<br>
<br>
;; configuration switches<br>
<br>
;; $DateTime: 2007/01/23 17:12:10 $<br>
<br>
;; $Author: pryush.sharma $<br>
<br>
#line 1 "../generated/../config/chip/CONFIGBASE"<br>
<br>
;; Copyright (C) 1997-2004 Zoran Corporation.<br>
<br>
;; $Id: //suprahd/customers/PROJECT17/config/chip/740REVB#1 $<br>
<br>
option COMMON_TARGET_ENDIAN_BIG 2<br>
option COMMON_TARGET_ENDIAN_LITTLE 1<br>
<br>
option BEETLE_CHIP_640 0<br>
option BEETLE_CHIP_660 1<br>
option BEETLE_CHIP_680 2<br>
<br>
option BEETLE_REV_A 10<br>
option BEETLE_REV_B 11<br>
option BEETLE_REV_FPGA 0<br>
<br>
option CLK_166MHZ 2<br>
option CLK_200MHZ 3<br>
option CLK_55MHZ 1<br>
<br>
#line 1 "../generated/../config/platform/../../config/platform/740LEOPARD_CONVBOX"<br>
<br>
<br>
I need to do some Googling. I'm going to see if I can find a programming manual for the chips that are being used. I'll start with strings in the dumps and if I have to I'll pop the case and get a parts list.<br>
<br>
<br>
Here's the results of the ident command:<br>
<br>
$TLVersion: customers/PROJECT17/70186 7.40-24_20080728_Michley REVB_MTC_THOMSON_OGENERIC$<br>
/*<br>
* ident - version identification<br>
*<br>
* Copyright (C) 1997-2004 Zoran Corporation.<br>
* All Rights Reserved<br>
*<br>
* $Id: //suprahd/customers/PROJECT17/ident#219 $<br>
* $Revision: #219 $<br>
* $DateTime: 2007/11/14 00:22:44 $<br>
* $Change: 70201 $<br>
* $Author: dtvswbld $<br>
*/<br>
<br>
#define TL_BUILD_VERSION "customers/PROJECT17/70186"<br>
<br>
/*<br>
* RELEASE - release identification<br>
*<br>
* Copyright (C) 1997-2004 Zoran Corporation.<br>
* All Rights Reserved<br>
*<br>
* $Id: //suprahd/customers/PROJECT17/RELEASE#15 $<br>
* $Revision: #15 $<br>
* $DateTime: 2007-12-13 14:24 $<br>
* $Change: 61847 $<br>
* $Author: catherine.lee $<br>
*/<br>
<br>
//#define TL_RELEASE_VERSION "7.40-24_20080228_Michley"<br>
#define TL_RELEASE_VERSION "7.40-24_20080728_Michley"<br>
<br>
<br>
<br>
That's all I had time for as others in the house wanted to use the TV to actually watch something.<br>
<br>
More later,<br>
<br>
keith<br>
<font color="#888888"><br>
--<br>
<br>
Keith R. Watson Georgia Institute of Technology<br>
Systems Support Specialist IV College of Computing<br>
<a href="mailto:keith.watson@cc.gatech.edu">keith.watson@cc.gatech.edu</a> 801 Atlantic Drive NW<br>
(404) 385-7401 Atlanta, GA 30332-0280<br>
<br>
</font></blockquote></div><br>