topfield_5100

Topfield 5100PVRc Digital Television Recorder and Linux

Topfield 5100PVRc is a DVB-C receiver and hard drive recorder. It allows user to record two channels simultaneously and (with some limitations) watch a third channel. Recorded shows can be uploaded to computer trough high speed USB 2.0. Recorders (Topfield 5100) functionality can be extended with TAPs, plugins written in C.

Topfield does not provide users a way write plugins themselves, as the compiler gcc_for_tap.zip is no longer available, but luckily there are Free tools in the TAP Project.

Just like all DVB recorders, TF5100PVRc is an expensive toy. Even though it might be the best in the market, it is still expensive and buggy. Moving from analog to digital television has been waste of Finlands resources.

In this text, I describe how I successfully uploaded and downloaded movies to Topfield, and how I installed a TAP plugin.

Topfield 5100pvr-c from behind.

© 2005-2006 Tero Karvinen


Puppy


Download and Compile

$ wget http://voxel.dl.sourceforge.net/sourceforge/puppy/puppy_1.11_src.tar.bz2
$ un puppy*
$ cd puppy_1.11
$ make
[just 10 secs and it's done
$ ./puppy
Usage: ./puppy [-pPqv] [-d <device>] -c <command> [args]

It compiled very easily.


Connect to Recorder

Connecting to recorder works, but must be done as root.

It should be possible make it work as a normal user by checking the permissions of some files under dev, or in the worst case, using a setuid program.

It is easy to get some basic information such as directory listings and amount of free space.

$ ./puppy -c dir ERROR: Can not open /proc/bus/usb/003/003 for
read/write: Permission denied
$ sudo ./puppy -c dir
Password:
d                    0 Wed Jan  1 00:00:00 2003 DataFiles
d                    0 Wed Jan  1 00:00:00 2003 ProgramFiles
d                    0 Wed Jan  1 00:00:00 2003 MP3
$ sudo ./puppy -c dir DataFiles
d                    0 Thu Jan  1 01:59:59 1970 ..
d                    0 Wed Jan  1 00:00:00 2003 KATSO JA POISTA
f            140052480 Mon Oct 24 22:00:00 2005 Uusi Kino: Y�vuoro.rec
d                    0 Wed Jan  1 00:00:00 2003 DOKUMENTIT
f            514295808 Tue Oct 25 12:30:00 2005 Pique-nique 1-2.rec
f            743000064 Tue Oct 25 16:30:00 2005 MOT.rec
[..]

See also: http://www.nslu2-linux.org/wiki/Puppy/PuppyUsage


Upload TAP to Device

Uploading works. Also, TAP (a Topfield plugin) can be installed by uploading it to recorder.

JagsEPG is probably the most popular TAP. It improves electronic program guide and adds 15 minutes after each recording.

Note 2006-04-12: In further investigation, I have found out that Jags _EPG is really annoying in ways that make me wonder if it’s author looks down on users.

Below the md5 check is done to show which version I used for this test, and is not used to verify authenticity of JagsEPG binaries.

Jags EPG
-
"
 http://GoJag.homepage.t-online.de/jagepg27.zip
 MD5 Checksum: 33 73 48 86 c2 d9 da 2d 9f fa 95 00 f4 06 ca 9b (v2.7 Beta 7)
"
http://board.topfield.de/viewtopic.php?t=16459
-
jagsepg$ md5sum *
33734886c2d9da2d9ffa9500f406ca9b  jagepg27.zip
f49e86a4aea841de84bb6532045b146b  jags-epg-manual.pdf
$ jagsepg$ sha1sum *
48fea9de9dd195392c1c8b5efb272474c9404b86  jagepg27.zip
a6ddd4747a214e2e181cc9777028ef0648dafa67  jags-epg-manual.pdf
$ sudo ./puppy -c dir 'ProgramFiles'
Password:
d                    0 Thu Jan  1 01:59:59 1970 ..
$ sudo ./puppy -c mkdir 'ProgramFilesAuto Start'
$ sudo ./puppy -c dir 'ProgramFiles'
d                    0 Thu Jan  1 01:59:59 1970 ..
d                    0 Wed Jan  1 00:00:00 2003 Auto Start
$ ls -l Jags_EPG.tap
-rw-r--r--  1 tee tee 243696 2005-10-25 20:58 Jags_EPG.tap
$ md5sum Jags_EPG.tap
f7c5d04607c43812c17c931537636dda  Jags_EPG.tap
$ sha1sum Jags_EPG.tap
aaf033bc9c9a0d841114c208af3f5ccc422f106f  Jags_EPG.tap
$ sudo ./puppy -v -c put Jags_EPG.tap 'ProgramFilesAuto Start'
Recognised Topfield device at bus=3, device=3
Found a Topfield TF5000PVRt
$ sudo ./puppy -c put Jags_EPG.tap 'ProgramFilesAuto StartJags_EPG.tap'
$ sudo ./puppy -c dir 'ProgramFilesAuto Start'
d                    0 Wed Jan  1 00:00:00 2003 ..
f               243696 Tue Oct 25 20:58:26 2005 Jags_EPG.tap
Shut down topfield (remote control: red shutdown button). Start
topfield. After a while, machine starts. Center, ok button opens
jags EPG.
Works. Tero 2005-10-25t2108.
-
http://GoJag.homepage.t-online.de/jagepg27.zip
MD5 Checksum: 33 73 48 86 c2 d9 da 2d 9f fa 95 00 f4 06 ca 9b (v2.7 Beta 7)
http://www.toppy.org.uk/forum/viewtopic.php?t=497&postdays=0&postorder=asc&start=0


Downloading Movies

Downloading with puppy works after upgrading to software version “2005Sep12” (2005-09-12). Thanks to Mika Fonsén for ideas on fixing the Linux movie download issue.


Upgrade Firmware with Windows Tool


Prequisites

  1. Install Windows XP to a spare computer. Avoid surfing to random websites with the built in browser to avoid infection. It really sucks that Topfield does not support firmware updates from Linux yet.
  2. Download latest firmware from the homepage of Finnish importer. I used Firmware 2005-Sep12, v1.45
$ md5sum TF5100PVRC-Topfield-Sys_12406-Sep122005-v1.45.zip
c8ef327d834bdc4100e61a357ed66400  TF5100PVRC-Topfield-Sys_12406-Sep122005-v1.45.zip
$ ls -l $_
-rw-r--r--  1 tero tero 1752597 2005-12-01 01:19 TF5100PVRC-Topfield-Sys_12406-Sep122005-v1.45.zip
  1. Download Topfield USB Download Tool from the Finnish importers page.
  2. Download and install a PDF viewer to read Topfield documentation


Upgrade Firmware

– Read update instructions (in Finnish) that came with the package – Following the update instructions I did this after some stumbling: 1) shut down Topfield (to ready state) 2) Install the driver, right click tfbulk.inf and choose “install” 3) Connect USB cable 4) Connect USB cable 5) Run TFDN_USB.exe 6) Use “Find” button to select .tfd firmware you downloaded and uncompressed before. 7) Click “Download” (to not so logically upload firmware to Topfield) 8) Start Topfield 9) Wait for some minutes, Topfield’s LCD and TV screen show funny digital clock numbers 10) “End” is shown both on Topfield’s LCD and TV screen 11) Shut down Topfield, disconnect USB 12) Start Topfield, check Menu: Information: IDR Status to see that Software version has updated. Well done, enjoy less buggy Topfield and possibility to download movies to Linux with puppy.


Download Movies with Puppy

Note double backslash.

$ sudo ./puppy -c dir
f           3502082048 Mon Nov 28 21:20:00 2005 RAID.rec
$ sudo ./puppy -c get DataFilesRAID.rec raid.rec
  0.18%,  6.18 Mbits/s, 00:00:08 elapsed, 01:15:27 remaining
ctrl-C
$ mplayer raid.rec

Even though I interrupted the transfer manually, mplayer plays the rec file.


Using Toppy as Normal User (non-root)

It is a sin to use the priviledged root-user when not necessary. To connect to Topfield without being root, first check puppy error message to see which file it wants to read and write.

$ ./puppy -c dir
ERROR: Can not open /proc/bus/usb/003/005 for read/write: Permission denied

Your file might be different from mine. Replace “/proc/bus/usb/003/005” below with the file mentioned in puppy error message.

$ sudo groupadd toppy
$ sudo chown root.toppy /proc/bus/usb/003/005
$ sudo chmod g+rw /proc/bus/usb/003/005
$ ls -l /proc/bus/usb/003/005
-rw-rw-r--  1 root toppy 50 2005-12-05 12:50 /proc/bus/usb/003/005

Now all users in group “toppy” can use the device. Let’s add ourselves to that group:

$ sudo gpasswd -a tero toppy
Adding user tero to group toppy

Log out, log in. Group “toppy” must be shown with ‘groups’:

$ groups
tero [..] toppy

If “toppy” is not mentioned in groups, it will not work. You must log off and on for it to work.

Now you should be able to get a directory listing on toppy:

$ ./puppy -c dir
d                    0 Wed Jan  1 00:00:00 2003 DataFiles
d                    0 Wed Jan  1 00:00:00 2003 ProgramFiles
d                    0 Wed Jan  1 00:00:00 2003 MP3

If you got a directory listing (instead of “Permission denied”), well done. You can now access Toppy as a normal user.


Put Puppy in Path

To make puppy run from any directory and without a dot “./puppy”, put it in a folder in your path. In Linux, you don’t usually change the path, but instead put the programs somewhere in your path. If you want it to work for a single user, put it in his $HOME/bin:

$ mkdir -p $HOME/bin
$ cp puppy $HOME/bin/puppy

If you have root and want to make puppy available to all users, put it into /usr/local/bin/.


Browsing Directory Hierarchy on Topfield

User interface of Toppy still leaves a lot to hope for. Can’t find your mp3 songs on Topfield? Open archive (in remote control, there is a tiny text “Archive” below the button. You can jump between top level directories with quick reverse “«” and quick forward “»” buttons. To see your mp3’s, press “archive”, then “»“. You can play a whole folder (if you have folders under /MP3) by choosing the folder and pressing play.


Graphical File Transfer Tool

Guppy is a graphical file transfer tool for Topfield. It is a wrapper for puppy, written in python.

First, I put puppy in my path. Then I downloaded the guppy tarball, uncompressed it and run guppy. Below, md5sum is used just to show which version I used.

$ wget http://savannah.nongnu.org/download/guppy/guppy-0.0.5.tar.gz
$ md5sum guppy-0.0.5.tar.gz
c5a8974095d12628c083d74c300bd6cf  guppy-0.0.5.tar.gz
$ ls -l guppy-0.0.5.tar.gz
-rw-r--r--  1 tero tero 35865 2005-12-05 12:52 guppy-0.0.5.tar.gz
$ tar -zxvf guppy-0.0.5.tar.gz
$ cd guppy-0.0.5/guppy
$ ./guppy

guppy-screenshot-small.jpg After a couple of seconds, a graphical window opens.

I did not bother to figure out how the python “setup.py” worked, and I have allways wondered if those scripts are made to keep all non-pythonists away. If you have trouble running guppy, first try that puppy works – guppy is simply a GUI wrapper for that.


Troubleshooting


Resetting Topfield and puppy

If Topfield gives you trouble, use remote control to shut it down to ready state, then start it again.

If puppy want’s to do it the hard way, erase it’s state:

$ sudo rm -rf /tmp/puppy


“Old version” of Jags EPG

Jags EPG has various timeboms in it.

JagsEPG 2.7 d breaks Toppy

Jag writes on a forum on 2005-12-31: Die meisten v2.7er Versionen sind inzwischen abgelaufen und zeigen nur noch die Meldung “Old version!” Bitte installiert die aktuelle Version! Die Version 2.7d ist bis zum 12. Juli 2006 lauffähig, die Versionen 2.7(a-c) Final sind bis zum 12. April 2006 lauffähig!

I did not understand much of it, but after some testing I think it says in German: please install the included files to make your Topfield unusable.

 $ wget http://people.freenet.de/GoJag/jagepg27.zip
 $ unzip jagepg27.zip
 $ strings Jags_EPG.tap |grep -i expire
 Jag's EPG: This version expire on 12. July!
 $ md5sum Jags_EPG.tap
 bbe3188857b4e440b55bb4699c4eeb06  Jags_EPG.tap
 $ sudo ./puppy -c put Jags_EPG.tap "ProgramFilesAuto StartJags_EPG.tap"
 $ sudo ./puppy -c reboot

After installing it, keys get stuck. For example, pressing “OK” for channel list makes it blink continuously.

I could get Topfield working again by disconnecting AC power, then after connecting power back

 $ sudo ./puppy -c delete "ProgramFilesAuto StartJags_EPG.tap"
 $ sudo ./puppy -c reboot

I have only tested this on one box, I hope Jags_EPG does not break your box. Anyway, I am not happy with Jags_EPG.

No Fix for Hard Timer

Note: As of 2006-04-12, the technique below does not seem to fix the time bomb. There seemed to be a file with empty name in “ProgramFilesAuto Start”, but even removing and recreating the whole folder did not make Jags_EPG work. If you know any open source TAP similar to Jags_EPG, drop me a line.

In further investigation, it seems that 2006-04-12 is a hard time bomb, the time is hard coded into the Jags_EPG.tap binary:

$ strings Jags_EPG.tap |grep 12|grep Apr
Jag's EPG: This version expire on 12. April!

Old Fix for Soft Time Bomb

Jags EPG has a time bomb: one day it decides it’s too old and refuses to start. When booting Topfield, text: “Old version!” is shown on inside a red box. Guide and OkList buttons don’t open Jags EPG anymore. Closed source software is so full of .. features like this.

JagEPG.tap seems to modify itself, as we can see by comparing the tap on Topfield to the original on computer:

$ diff Jags_EPG.tap ../Jags_EPG.tap
Binary files Jags_EPG.tap and ../Jags_EPG.tap differ

If you write a Free program to replace Jags EPG, drop me a line.

Fix by just uploading the same version again.

$ sudo ./puppy -c put Jags_EPG.tap 'ProgramFilesAuto StartJags_EPG.tap'
$ sudo ./puppy -c reboot
TF5000PVRt should now reboot

Now Jags EPG has forgotten when it was installed and will work again.


See also



Posted in Old Site | Tagged , , , , | Comments Off on topfield_5100

Comments are closed.