t-hack.com

English - X300T / X301T / DIT9719 / KISS KMM / BT Vision / Bluewin TV-Box / V-BOX/ VIP 1216 or similar Hardware => Software => Topic started by: Herman on 22. May 2008, 16:14

Title: location of tv2client
Post by: Herman on 22. May 2008, 16:14
having slowly got my head around the bootup procedure and annoyed iso-mick severely with questions.  I see the next main issue being the fact we cannot modify tv2client at will due to its staus in the nk.bin.  Now i read that older kernels had this file on the hd which got moved some time ago. It seems to me that this would be a good position to start from as, untill a build environment is available (be it fresh code or a recompilable version of decompiled code) we are currently fixed with modifying the existing tv2client, which in kernel, is problematic.
Ideally we could force the whole kernel to load from /hard drive/kernel or similar but for now just tv2client would be an advantage so if anyone has a copy of this 'old' kernel then it would be very usefull

Ive also been musing through the msdn ce pages and found some interesting article regarding a build environment for vs2005 + project builder 5 which ideally would include a 8634 BSP which is not going to happen, however there are articles devoted to porting a 'similar' bsp for a new project which may be usefull
Title: Re: location of tv2client
Post by: mce2222 on 22. May 2008, 20:33
yeah it would be possible to modify a MIPS II BSP to fit the SMP environment, but since we wont get the driver sources, it does not make a big difference if you just use
the unmodified MIPS II BSP.

and if you do not plan to create native applications that you do not need the BSP at all.

I wondered about the tv2client.exe a bit and I think the main problem is that the file from nk.bin has priority over any other file with the same name.
starting another file from the bootce.exe should be possible.

something changed in one of the last firmware releases and due to that, it seems that only programs in the windows folder can be started directly.
but there is definately a way around that, because the tasman.exe is started from within the tv2client.exe and that resides on the HDD.

I will start to look into the WinCE world again after I have installed my modchip ;)
Title: Re: location of tv2client
Post by: is0-mick on 22. May 2008, 20:46
maybe a solution would be to create a dummy tv2client.exe in the NK.BIN which copied an executable into \windows then executed it...

Mick
Title: Re: location of tv2client
Post by: Herman on 22. May 2008, 21:57
so my understanding being native code - bsp required, managed code no bsp ??
if so that helps enormously ! i have been following a guide on setting up vs + pb5 so that vs can debug the client in real time which i believe requires a few debug flags set on the client.
assuming all existing driver calls are consiistent then they should be easily documented from the decompiled source so a 'hello world' type prog should be realistic (at least with my skills !)
Title: Re: location of tv2client
Post by: mce2222 on 22. May 2008, 23:26
it is no problem to deploy and debug c# code in realtime with just Visual Studio
with VS 2005 or VS 2008 you already have the needed option to create a "Smart Device Project"

the bootce.exe that I created already copies the needed tcp debug port files into the windows kernel (although you need to copy them to the harddisk manually first)

the debuging using a TCP connection is a hidden feature in Visual Studio since the regular case would be to use Active Sync as a transport.
not sure if it is already discribed in the WIKI how to set this up.

I haven't used it for several months, so I am off the track right now :( but I know that several guys on this forum have managed to get it to work, so you will
get help if you ask.
Title: Re: location of tv2client
Post by: Hoernchen on 22. May 2008, 23:46
"Decompiling" the replacement BooterCE.exe with Reflector and recompiling it with vs2005 produces a working (exept for the webinterface) BooterCE.exe, so modifying it to automagically delete the original TV2ClientCE.exe in the windows directory and copy the new one to the windows dir instead of trying to start the "new" TVClientCE2.exe in "\Hard Disk\TV2ClientCE\" should be possible.
Title: Re: location of tv2client
Post by: Herman on 23. May 2008, 09:08
thankyou for both those posts :)
I'm not familiar with vs2005 and had stumbled on the fact it can remote debug and havny fully digested the wiki so i shall keep an eye on this.

I breifly looked at reflecktor yesterday but had to admit i wasnt sure how well it was working or if the output was correct.  If booterce does indeed recompile if 90% functionality then i may look at that for job 1 of the day.
Title: Re: location of tv2client
Post by: mce2222 on 23. May 2008, 09:16
isnt there the sourcecode of the booterce.exe on the wiki ?? if not I have to dig it out and will upload it ;)
if there is more interest in developing / improving the booterce.exe and/or some other application we could start to use a subversion repository.
Title: Re: location of tv2client
Post by: Herman on 23. May 2008, 14:11
no, i cant find it (doesnt mean it isnt there...)
certainly sounds a good idea re svn is there is going to be some development on them
Title: Re: location of tv2client
Post by: mce2222 on 24. May 2008, 01:09
I have added the source files to the WIKI

http://www.t-hack.com/wiki/index.php/BooterCEreplacement
Title: Re: location of tv2client
Post by: is0-mick on 24. May 2008, 12:32
thx :)
Title: Re: location of tv2client
Post by: mce2222 on 24. May 2008, 19:30
about the tv2server.exe that is referenced in the booterce source:

that application does not exist yet ... i only added the option to start a second application in parallel.
actually the plan was to extract all the server components from booterce.exe into the tv2server.exe so that you do not have to
modify the nk.bin when you want to add new functionality to the server components.

but that didn't work out yet because the launchapp() mathod does not work any more on randon directories, since last firmware update.
so the external applications need to be started in a different way now.
Title: Re: location of tv2client
Post by: is0-mick on 24. May 2008, 19:44
Ah, that explains it then.

I was hoping that it may have been a server application for dev purposes or show purposes, that would simulate the server that the tv2client logs into.

May be it's possible to write a small application and change the bootstrap url to 127.0.0.1, which would do that?

Thanks for the explanation.

Mick
Title: Re: location of tv2client
Post by: mce2222 on 24. May 2008, 20:33
no need to write an app for that .. you can set the bootstrap url in the tv2config.xml
but the problem is that the encryption protocol that they put on top of http has to be implemented, and I think it also expects a server certificate from a known CA.
so you would also have to modify the sysroot file in the nk.bin
Title: Re: location of tv2client
Post by: is0-mick on 24. May 2008, 21:39
Just thinking about why the applications do not work from outside \windows anymore....

I did try   System.Diagnostics.Process.Start(appPath, null);

but that gave the same result... then I had a thought.
The applications we are trying to start are on DISK, where the normal applications now reside in Ramdisk? .. maybe there is a flag or a file has been changed to dis-allow excute from disk?

I had a quick look through the registry with remote registry viewer but couldnt see anything obvious. If you have an older build you could do a registry compare but I dont think its in there....

Does the x300t have the same behavoiur as the BT box?
Also on the earlier version I have, you could ftp a tv2client2.exe into the windows directory. On the latest built when you try that it copies so far then errors saying insufficient disk space. But there is actually less files in the newer bt build as some of the .NET dll's such as directx have been removed.

Title: Re: location of tv2client
Post by: mce2222 on 24. May 2008, 23:36
yes same behavior on the x300t.

I did a registry compare but could not find anything.

you should take a look at the tv2client.exe ... search for the startup of the tasman.exe
that also resides on the hard disk, and it is startable.

so it is not impossible to start binaries from hard disk... maybe a small trick is needed ?
Title: Re: location of tv2client
Post by: is0-mick on 25. May 2008, 09:58
I copied the tasman startup routine from tv2client, and that does not work either...

What is tasman anyway??

Also I tried launching tasman with the webbrowser, and tv2client2 with the web browser both give file not found.

I tried launching the "dummy" tv2client.exe in harddisk\tv2client and it seemed to run the one in \windows.

So it seems like when you try to execute a program it's ignoring the path and substituting it with \windows
Title: Re: location of tv2client
Post by: mce2222 on 25. May 2008, 13:11
tasman.exe is a modified InternetExplorer 5.x  so when a http url is accessed from the tv2client, it will launch the tasman.exe to open the http page.

I also had the feeling that only programms in the windows folder can be started... there must be a reason for that.