Patching the DIT9719

Started by is0-mick, 23. Apr 2008, 18:26

previous topic - next topic
Go Down

is0-mick

I have applied the patch I made.


CPU Chip ID: 00001000011000110000000000000001 (08630001)
*** Found a SigmaDesigns SMP8634 Rev A CPU chip ***

    - EJTAG IMPCODE ....... : 01000000010000010100000000000000 (40414000)
    - EJTAG Version ....... : 2.6
    - EJTAG DMA Support ... : No

Issuing Processor / Peripheral Reset ... Done
Halting Processor ... <Processor Entered Debug Mode!> ... Done
Clearing Watchdog ... Done
============================
Detecting Bootloader Version
============================
0x9363f520: cd92f0cafaa0010
0x9363f618: 0cd8d00f
BT vision Version 1039 found
Patch applied !
...   now press OK Button on the X300T.
Processor exited debug mode.




but the box seems to be in disaster recovery mode.

I can't seem to get it out of this, and it doesnt seem to look at the hard drive at all.
It does exactly the same with the hard drive removed.


It displays a screen saying "Your set top box is experiencing difficulties. Please wait a few minutes while we try to resolve the issue"

If you plug a network lead into it, the progress bar moves along the bottom..
Eventually it displays a message on the screen saying "An error has occoured. Please call ......"

When it displays that message it also outputs this on the serial port

HALTING

any help appriciated....

Mick


redband

The behavior you are seeing is the result of the bootloader not finding a BOOT.PRF, or finding one that has reached the max number of reboots.
Each reboot without full initialisation increments the value in the BOOT.PRF.

Do you get the debug output over the jtag, or do you have the serial sorted now too?

is0-mick

I managed to get the serial output, but still not sure what pin is the input for the serial.

is there a way to reset the BOOT.PRF file? i have a copy of when I first got the box.

I did a compare and the there is one byte and what looks like a CRC different.
I did replace the file with the original one, but it seems to have the same effect....



is0-mick

OK i replaced the boot.prf again with the version that has the value of 00 in it.

The box said "loading..." then said there was a problem

I did run the patch before it, loaded the kernel as i was monitoring the serial output and as soon as it said
Microsoft IPTV Bootloader, Build (1527)
Built by BM-DELL-131, Aug 22 2006 21:43:55

i hit return...

The NK.BIN I already patched with the replacement booterCE

any ideas?

is0-mick

I added another patch in the code to patch the length.. but I have a strange result.

It boots the loader.. then seems to reboot 3 x

xosPe0 serial#ce43545946316b9xxxxxxxxxxxxxxxxxxxxxx subid 0xc4
xenv cs2 ok
power supply: ok
dram0 ok (7)
dram1 ok (6)
zboot (0) ok
SIGNED BL

Microsoft IPTV Bootloader, Build (1527)
Built by BM-DELL-131, Aug 22 2006 21:43:55
SIGNED BL

Microsoft IPTV Bootloader, Build (1527)
Built by BM-DELL-131, Aug 22 2006 21:43:55
SIGNED BL

Microsoft IPTV Bootloader, Build (1527)
Built by BM-DELL-131, Aug 22 2006 21:43:55
SIGNED BL

Microsoft IPTV Bootloader, Build (1527)
Built by BM-DELL-131, Aug 22 2006 21:43:55


then i get the error message on the TV screen.

my patch values are as follows (I added some code to re-read them from ram after patching to make sure they were being set).

BT vision Version 1039 found
0x93640DE0: b000010
0x93640F2C: 6000010
Patch applied !
...   now press OK Button on the X300T.
Processor exited debug mode.




is0-mick

Eventually got it booting unsigned code.
I had to patch the loader after it calls checkBLfiles as well, as I was getting a "HALTING" error with just patching the "Image Verified" check.

I also found the BOOT.PRF check counter in the code, and patched that so it is ignored.

I patched the NK.BIN file with the BooterCE.exe you have on here, and it loads fine.
I also altered one of the images to make sure the box was working with altered files :) , also the FTP server works.

The BT vision box does not start up even as a dvb-t, without a subscription.

I am looking at the TV2Client.exe, which has a number of options in the \Microsoft.TV2\TV2SystemConfig.cs file.

        private static Microsoft.TV2.AspectRatioConfig _aspectRatioConfig = null;
        private static TimeSpan _bootstrapRetryMaxWait = new TimeSpan(0, 60, 0);
        private static TimeSpan _bootstrapRetryMinWait = new TimeSpan(0, 10, 0);
        private static OnMsgArrived _compositorStatusDelegate;
        private static TimeSpan _deadstateRestartMaxWait = TimeSpan.Parse(_defaultStrDeadstateRestartMaxWait);
        private static TimeSpan _deadstateRestartMinWait = TimeSpan.Parse(_defaultStrDeadstateRestartMinWait);
        private static string _defaultStrDeadstateRestartMaxWait = "03:00:00";
        private static string _defaultStrDeadstateRestartMinWait = "02:00:00";
        private static bool _inSelfProvisioningMode = false;
        private static TriState _isPAL = TriState.Default;
        private static bool _noccOverride = false;
        private static int _numTuners = -1;
        private static ScreenModeType _screenMode = ScreenModeType.k640x480i;
        public static bool AllowAdultPinForAutoBlock = false;
        public static bool AsyncPipTune = true;
        public static bool BlockOnMissingGuideData = true;
        public static bool BootstrapRequired = true;
        public static byte BurstPercentHD = 10;
        public static byte BurstPercentSD = 20;
        public static bool ClientInitialized = false;
        public static byte ClockStartFrameDelay = 10;
        public static UploadType CrashLogUploadType = UploadType.Local;
        public static int DebugConsolePort = 0;
        public static bool DebugLiveAV = false;
        public static uint DebugSeekBarTimeout = 0xea60;
        public static double DialogTimeoutSeconds = 5.0;
        public static bool DigitalDisplay = false;
        public static bool DisableVideoOnStandBy = false;
        public static string DiskMountPath = null;
        public static uint? DiskReserveSizeInMegabytes = null;
        public static bool DisplayMetadataPrices = false;
        public static bool DoPTSClockCorrection = false;
        public static ushort DServerBurstCompleteAckDelayMS = 0;
        public static ushort DServerBurstCompleteTimeoutMS = 0xea60;
        public static string DvbBw = "8000000";
        public static string DvbMaxFreq = "854000000";
        public static string DvbMinFreq = "470000000";
        public static bool DvbUseNagraTestKit = false;
        public static string DvbVhfBw = "7000000";
        public static string DvbVhfMaxFreq = "230000000";
        public static string DvbVhfMinFreq = "174000000";
        public static bool DvbVhfScan = false;
        public static bool DVREnabled = true;
        public static bool DynamicDVREnabled = true;
        public static int EasCrawlSpeed = 15;
        public static int EasPostCrawlPause = 7;
        public static int EasTextRedisplayInterval = 30;
        public static int EITVPSGracePeriodSecs = 60;
        public static bool EITVPSRespectHardPadding = true;
        public static bool EnableCallLetterSearch = false;
        public static bool EnableMPEG2 = false;
        public static bool EnableRecentPanel = false;
        public static bool EnableVPS = false;
        public static bool EnterButtonForZoom = false;
        public static bool EuroStyleOn = false;
        public static int EventServerPort = 0;
        public static bool FakeNetConnectPermissionRequired = false;
        public static float[] FFWDSpeeds = new float[] { 15f, 60f, 300f };
        public static bool ForceAllTunesAsMulticastOnly = false;
        public static bool ForceDenseGuide = false;
        public static bool ForceDTTScan = false;
        public static bool ForceDvbDisabled = false;
        public static bool ForceExpandedGuide = false;
        public static bool ForceOneDvbTuner = false;
        public static bool FullScreen = false;
        public static bool GuideDataCarouselEnabled = false;
        public static DateTime GuideOriginTime = DateTime.MinValue;
        public static bool HdcpAllowDisable = false;
        public static bool HDMIUnpluggedEventFlag = false;
        public static bool Headless = false;
        public static bool HideChannelOrderNumber = false;
        public static int HTTPPort = 0;
        public static string HTTPRemoter = null;
        public static bool IgnoreServerTimezone = false;
        public static bool IsColorKeyDefaultsEnabled = true;
        private static bool isOnline = false;
        public static uint LastChannelTunedWaitSeconds = 300;
        public static int ListenerPort = 0x15b4;
        public static bool LiveTvEnabled = true;
        public static bool LongDescriptions = false;
        public static bool LowBandwidth = false;
        public static uint MaxBitRateSD = 0x5b8d80;
        public static byte MaxHoleSizeMS = 150;
        public static int MaxVODPosterFlipper = 10;
        public static bool MediaRightsEnabled = true;
        public static bool MhegEnabled = true;
        public static bool MockAV = false;
        public static bool MuteApplicationSoundsDefault = true;
        public static IPAddress NicAddress = IPAddress.Any;
        public static string NodeStatusFilter = "accountid";
        public static bool NoScavengeDvr = false;
        public static bool NoWatchPup = false;
        public static int PageStackSize = 5;
        public static int PipTuneDelayMilliSecs = 0;
        public static bool PowerOn = false;
        public static ScreenModeType PreHDMIHotplugScreenMode;
        public static int PreviousChannel = -1;
        public static int PreviousLiveChannel = -1;
        public static int PurchaseTimeoutMS = 0x186a0;
        public static bool QuickScroll = false;
        public static bool RDPEnabled = true;
        public static bool RelockPConOnChannelChange = false;
        public static int RetryIntervalSecs = 3;
        public static float[] REWSpeeds = new float[] { -15f, -60f, -300f };
        public static short RFRemodChannel = 3;
        private static readonly Microsoft.TV2.ScreenModeInfo[] ScreenModes = new Microsoft.TV2.ScreenModeInfo[] { new Microsoft.TV2.ScreenModeInfo("640x480i", 640, 480, false, false, false), new Microsoft.TV2.ScreenModeInfo("854x480i", 0x356, 480, true, false, false), new Microsoft.TV2.ScreenModeInfo("640x480p", 640, 480, false, false, true), new Microsoft.TV2.ScreenModeInfo("854x480p", 0x356, 480, true, false, true), new Microsoft.TV2.ScreenModeInfo("720x576i", 720, 0x240, false, false, false), new Microsoft.TV2.ScreenModeInfo("768x576i", 0x300, 0x240, false, false, false), new Microsoft.TV2.ScreenModeInfo("1024x576i", 0x400, 0x240, true, false, false), new Microsoft.TV2.ScreenModeInfo("1280x720p", 0x500, 720, true, true, true), new Microsoft.TV2.ScreenModeInfo("1280x720p_1080i", 0x500, 720, true, true, false), new Microsoft.TV2.ScreenModeInfo("1920x1080i", 0x780, 0x438, true, true, false), new Microsoft.TV2.ScreenModeInfo("1920x1080p", 0x780, 0x438, true, true, true) };
        public static int ScreenSaverIdleMinutes = 30;
        public static bool Simulator = false;
        public static bool StandAlone = false;
        public static int StartRecordingGracePeriodSecs = 10;
        public static DateTime SystemStartTime;
        public static bool Test = false;
        public static bool Universe = false;
        public static bool UniverseDemo = false;
        public static bool UniverseRequireValidUniverse = false;
        public static bool UnlockPConInBadState = false;
        public static int VisualPort = 0;
        public static uint VodAssetLoadBatchSize = 40;
        public static bool VodEnabled = true;
        public static bool VODExtraProgramInfo = false;
        public static int VPSInterruptPILMaxDurationSecs = 0x2a30;
        public static bool WriteDenseGuideFiles = false;



I did try setting BootStrapRequired = false; but the box give a "NullReferenceException" on the screen as it starts up.

is0-mick

There also seems some interesting command line switches.


        public static void ParseArgs(string[] args)
        {
            for (int i = 0; i < args.Length; i++)
            {
                switch (args.ToLower())
                {
                    case "-pal":
                    {
                        _isPAL = TriState.True;
                        SetScreenMode(StandardScreenMode, false, true);
                        continue;
                    }
                    case "-pinsize":
                    {
                        uint num2;
                        if (TryWrappers.TryParse(args[++i], out num2) && (num2 > 0))
                        {
                            UserStore.PinSize = (int) num2;
                        }
                        continue;
                    }
                    case "-disablevideoonstandby":
                    {
                        DisableVideoOnStandBy = true;
                        continue;
                    }
                    case "-vodextraprograminfo":
                    {
                        VODExtraProgramInfo = true;
                        continue;
                    }
                    case "-debugseekbartimeout":
                    {
                        uint num3;
                        if (TryWrappers.TryParse(args[++i], out num3))
                        {
                            DebugSeekBarTimeout = num3;
                        }
                        continue;
                    }
                    case "-vodassetloadbatchsize":
                    {
                        uint num4;
                        if (TryWrappers.TryParse(args[++i], out num4))
                        {
                            VodAssetLoadBatchSize = num4;
                        }
                        continue;
                    }
                    case "-enableh4nks":
                    {
                        HdmiManager.Instance().EnableHdmiOnNoKeys = true;
                        continue;
                    }
                    case "-hdcpallowdisable":
                    {
                        HdcpAllowDisable = true;
                        continue;
                    }
                    case "-enablempeg2":
                    {
                        EnableMPEG2 = true;
                        continue;
                    }
                    case "-enablevps":
                    {
                        EnableVPS = true;
                        continue;
                    }
                    case "-celog":
                    {
                        TV2Engine_LaunchApp("oscapture2.exe", "");
                        continue;
                    }
                    case "-remotekeys":
                    {
                        TV2Engine_LaunchApp("tv2remotekeys.exe", "");
                        continue;
                    }
                    case "-clockstartframedelay":
                    {
                        ClockStartFrameDelay = byte.Parse(args[++i]);
                        continue;
                    }
                    case "-burstpercentsd":
                    {
                        BurstPercentSD = byte.Parse(args[++i]);
                        continue;
                    }
                    case "-burstpercenthd":
                    {
                        BurstPercentHD = byte.Parse(args[++i]);
                        continue;
                    }
                    case "-maxbitratesd":
                    {
                        MaxBitRateSD = uint.Parse(args[++i]);
                        continue;
                    }
                    case "-maxholesizems":
                    {
                        MaxHoleSizeMS = byte.Parse(args[++i]);
                        continue;
                    }
                    case "-eurostyleon":
                    {
                        EuroStyleOn = true;
                        continue;
                    }
                    case "-nocc":
                    {
                        _noccOverride = true;
                        continue;
                    }
                    case "-serverauth":
                    {
                        if (++i < args.Length)
                        {
                            if (string.Compare(args, "on", true) != 0)
                            {
                                break;
                            }
                            TV2SecureCore.DisableServerAuth = false;
                        }
                        continue;
                    }
                    case "-diskreserve":
                    {
                        if ((i + 1) < args.Length)
                        {
                            uint num6;
                            if (!TryWrappers.TryParse(args[++i], out num6))
                            {
                                goto Label_05FE;
                            }
                            DiskReserveSizeInMegabytes = new uint?(num6);
                        }
                        continue;
                    }
                    case "-burstcompleteackdelay":
                    {
                        DServerBurstCompleteAckDelayMS = ushort.Parse(args[++i]);
                        continue;
                    }
                    case "-burstcompletetimeout":
                    {
                        DServerBurstCompleteTimeoutMS = ushort.Parse(args[++i]);
                        continue;
                    }
                    case "-enablecalllettersearch":
                    {
                        EnableCallLetterSearch = true;
                        continue;
                    }
                    case "-muteapplicationsoundsdefault":
                    {
                        MuteApplicationSoundsDefault = bool.Parse(args[++i]);
                        continue;
                    }
                    case "-displaymetadataprices":
                    {
                        DisplayMetadataPrices = bool.Parse(args[++i]);
                        continue;
                    }
                    case "-unlockpconinbadstate":
                    {
                        UnlockPConInBadState = bool.Parse(args[++i]);
                        continue;
                    }
                    case "-dialogtimeoutseconds":
                    {
                        DialogTimeoutSeconds = int.Parse(args[++i]);
                        continue;
                    }
                    case "-universe":
                    {
                        Universe = true;
                        continue;
                    }
                    case "-requirevaliduniverse":
                    {
                        UniverseRequireValidUniverse = true;
                        continue;
                    }
                    case "-universedemo":
                    {
                        UniverseDemo = true;
                        continue;
                    }
                    case "-eastextredisplayinterval":
                    {
                        EasTextRedisplayInterval = int.Parse(args[++i]);
                        continue;
                    }
                    case "-eascrawlspeed":
                    {
                        EasCrawlSpeed = int.Parse(args[++i]);
                        continue;
                    }
                    case "-easpostcrawlpause":
                    {
                        EasPostCrawlPause = int.Parse(args[++i]);
                        continue;
                    }
                    case "-disablecolorkeydefaults":
                    {
                        IsColorKeyDefaultsEnabled = false;
                        continue;
                    }
                    case "-allowadultpinforautoblock":
                    {
                        AllowAdultPinForAutoBlock = true;
                        continue;
                    }
                    case "-blockonmissingguidedata":
                    {
                        TryWrappers.TryParse(args[++i], out BlockOnMissingGuideData);
                        continue;
                    }
                    case "-asyncpiptuneon":
                    {
                        AsyncPipTune = true;
                        continue;
                    }
                    case "-asyncpiptuneoff":
                    {
                        AsyncPipTune = false;
                        continue;
                    }
                    case "-lastchanneltunedwaitseconds":
                    {
                        LastChannelTunedWaitSeconds = uint.Parse(args[++i]);
                        continue;
                    }
                    case "-disabledvb":
                    {
                        ForceDvbDisabled = true;
                        continue;
                    }
                    case "-dvbusenagratestkit":
                    {
                        DvbUseNagraTestKit = true;
                        continue;
                    }
                    case "-dvbvhfscan":
                    {
                        DvbVhfScan = true;
                        continue;
                    }
                    case "-dvbminfreq":
                    {
                        DvbMinFreq = args[++i];
                        continue;
                    }
                    case "-dvbmaxfreq":
                    {
                        DvbMaxFreq = args[++i];
                        continue;
                    }
                    case "-dvbbw":
                    {
                        DvbBw = args[++i];
                        continue;
                    }
                    case "-dvbvhfminfreq":
                    {
                        DvbVhfMinFreq = args[++i];
                        continue;
                    }
                    case "-dvbvhfmaxfreq":
                    {
                        DvbVhfMaxFreq = args[++i];
                        continue;
                    }
                    case "-dvbvhfbw":
                    {
                        DvbVhfBw = args[++i];
                        continue;
                    }
                    case "-bootstrapretryminwait":
                    {
                        TimeSpan span;
                        if (TryWrappers.TryParse(args[++i], out span))
                        {
                            _bootstrapRetryMinWait = span;
                        }
                        continue;
                    }
                    case "-boostrapretrymaxwait":
                    {
                        TimeSpan span2;
                        if (TryWrappers.TryParse(args[++i], out span2))
                        {
                            _bootstrapRetryMaxWait = span2;
                        }
                        continue;
                    }
                    case "-enterbuttonforzoom":
                    {
                        EnterButtonForZoom = true;
                        continue;
                    }
                    case "-rfremodchannel":
                    {
                        try
                        {
                            RFRemodChannel = short.Parse(args[++i]);
                        }
                        catch (ArgumentNullException)
                        {
                        }
                        catch (FormatException)
                        {
                        }
                        catch (OverflowException)
                        {
                        }
                        continue;
                    }
                    default:
                    {
                        continue;
                    }
                }
                if (string.Compare(args, "off", true) == 0)
                {
                    TV2SecureCore.DisableServerAuth = true;
                }
                else if (string.Compare(args, "true", true) == 0)
                {
                    TV2SecureCore.DisableServerAuth = false;
                }
                else if (string.Compare(args, "false", true) == 0)
                {
                    TV2SecureCore.DisableServerAuth = true;
                }
                else
                {
                    int num5;
                    if (TryWrappers.TryParse(args, out num5))
                    {
                        TV2SecureCore.DisableServerAuth = num5 == 0;
                    }
                }
                continue;
            Label_05FE:
                DiskReserveSizeInMegabytes = null;
            }
        }

Hoernchen


The BT vision box does not start up even as a dvb-t, without a subscription.

Did you replace the content files as mentioned in the Wiki ? -> http://www.t-hack.com/wiki/index.php/BooterCEreplacement
bringer of linux, conqueror of hdmi, jack of all trades.

is0-mick

Yes, it still gives the same message :(

Problem Setting up.
Please call the helpdesk on....
quoting Error C02


In the Strings.XML file the error seems to be "Client Account Unavailable"
<string id="ClientAccountUnavailableString" value="Problem setting up.&#xD;Please call the Helpdesk on .... quoting Error C02" />

redband

This seems to be related to the certificate (auth-ticket) request that is made by the box.  I got this far using the BT "debug" image that used to be available on their ftp.  The debug image skips the sig checks.  I think I got to the same point you do with the box's original image but with content.ctc, content.sig and content folder from the debug image.

Red

mce2222

I think it will work without a subscription if you use the "-standalone" flag  in combination with another one that I don't remember right now.
but the problem is that you need a local copy of the user settings / channels that are usually fetched from the IPTV server.

if you don't have that then you get NullPointerExceptions because the data is missing.

it should be rather easy to have a modified box with subscription save those needed data to disk.
then boxes without subscription could loaded that from disk instead of the server.

Go Up