Dreambox 7000 - Hints and Tips

This page is not maintained, as I no longer play with this stuff. Sorry for any broken links!

See also: Dreambox 7000 Links. Most of the info below has come from the websites listed there. But I hope I've gathered a useful summary together here....

In this file:

Hardware

Q. What do you get in a DM7000?

A. For full info you can go to the official site but to summarise:

Firmware

Q. What are Enigma, Traveller, Dr. Matrix etc?

A. Enigma is the standard firmware that comes in the box when you buy it from the shop. Enigma is open-source, so you can take the latest source-code from CVS on the internet, and cross-compile it on your PC (see later). The Enigma code is also known as "tuxbox" and runs on other platforms too, such as "dbox2". The "tuxbox" code is under rapid development at the moment; the CVS version changes almost every day. From time to time, the Dream Multimedia team identify a stable version, and release a binary image on their website, which can be downloaded quite simply and flashed into your dreambox. But of course if you like, you can build the latest CVS version for yourself (again, see later).

Quite often, expert coders such as Traveller and Dr. MatriX will take the latest CVS of Enigma, add their own special features, and then release a special binary image that you can flash into your dreambox in place of the official Dream Multimedia image. Some of the special updates from these guys are bugfixes; some are new features which are not yet stable enough to go into the main CVS source tree. Some authors also include "Emu's" - Emulations of smartcard systems (subscriber viewing cards) which make it possible to view encrypted satellite channels if you have access to valid key files. Using key files to gain unauthorised access to pay channels is against the law: it's not a grey area any more, even for foreign channels which won't sell you a genuine viewing card, so for legal reasons I will not discuss this aspect any further. Please, DO NOT SEND ME EMAIL asking questions about Emu's and Keys - I do not know, and in any case I will not answer any questions about pay-TV piracy! I recommend that you steer clear of piracy, as the law is now very clear on the subject, and copyright owners are willing and able to sue for huge damages if they catch you.

Features

Q. What can DREAMBOX do?

A. This is an open-ended question, and personally I have not had time to do more than scratch the surface of the capabilities of this box. The short answer is that it depends how much time and interest you have in finding things out, and whether you enjoy using software that's a little bit "beta" (not completely finished). But as standard (straight out of the box) the DREAMBOX supports:

Q. What can't DREAMBOX do?

A. Well DREAMBOX is very powerful, but it does not have infinite amounts of CPU and RAM resources - that's why it's a small cheap box that doesn't need a fan.

Networking

Q. DREAMBOX has an Ethernet port. What does it do as standard?

A. A couple of things:

R/C Navigation Hints

A couple of remote control functions seem a bit non-obvious, but are quite useful...

Backup/Restore HOWTO

Q. How can we guard against the possibility that the DREAMBOX memory becomes corrupted, destroying our favourite settings?

A1. This post by Basix appeared recently on SatCity:

   Making a Backup of every setting on the dreambox (incl. firmware)
	
	telnet to the box and write the following command after loggin in:

		cat /dev/mtd/3 > /var/tmp/backup.img

	you can download this image to your pc, so you can always switch back to this backup image.


	how to switch back:
		first ftp the file to the dreambox in /var/tmp/
		then telnet to the box and use following commands:

			cd /var/tmp
			eraseall /dev/mtd/3 && cp backup.img /dev/mtd/3
			reboot
A2. This SatCity post by EvilBOFH suggests a less drastic approach...
	good directories to backup

		/var/keys
		/var/scce
		/var/tuxbox/config/enigma

	usally good too

		/var/etc

	good files to backup

		/var/tuxbox/config/satellites.xml

	and if you like me and like to change anything I can... 

		/var/tuxbox/start_enigma

NFS remote disk HOWTO

Q. How can I get Dreambox to use a remote NFS hard drive? This could be better than buying an IDE hard disk and installing it inside DREAMBOX, because it would avoid the noise of a hard disk in the living room.

A. I think this may be supported out-of-the-box with the latest firmware (see Setup / Expert Settings).

For older firmware versions, you need to start the network and mount the NFS drive onto "/hdd". This needs to happen before Enigma is started. Normally, the network is started after Enigma, so you need to bring it up early with ifconfig. Also, please note that directory /hdd/movie must exist on the mounted volume, otherwise the hard-disk-related functions won't work properly.

Warning! The first time you select "DREAM"/"Folder" to see the recordings, dreambox may hang. To prevent this: first save a few seconds of audio or video (press VIDEO then RECORD button). Stop the recording and, when prompted, press the button to view the list of recordings. I think this creates the recording index file recordings.epl. Anyhow, it won't crash once you've done that.

For DREAMBOX images before June 2003, you need to edit /var/tuxbox/start_enigma.

For DREAMBOX images after June 2003, the /var/tuxbox/start_enigma script is no longer used. Instead, if you look at /etc/init.d/rcS you can see how startup works now. So, if you want to customize startup, from June 2003 onwards you need to create a shell script called /var/etc/init .

Here is my copy of /var/etc/init :

	#!/bin/sh

	# first start the Ethernet interface
	# (Otherwise enigma will start it itself, but too late)
	# NOTE: Remove "mtu 1400" if your network runs with normal MTU (1500).
	ifconfig eth0 192.168.0.7 netmask 255.255.255.0 mtu 1400 up
	sleep 5

	# mount the NFS drive to /hdd
	mount -t nfs -o wsize=4096,rsize=4096,nolock 192.168.0.4:/usr/dreambox /hdd
	sleep 5

	# ** make sure movie directory exists, otherwise enigma HDD features fail **
	# NOTE: Selecting "DREAM"/"Folder" will CRASH unless you first make one recording!
	mkdir /hdd/movie

	# set UK timezone
	export TZ=GMT0BST,M3.5.0/2,M10.5.3/3

	# shut down unwanted network services (give them a chance to start first)
	(sleep 60; killall -9 smbd)&
	(sleep 90; killall -9 nmbd)&

	# Think about starting NTPD here, as the box has no non-volatile clock
	# so otherwise we depend on transponder time.

	# Start enigma from the flash memory...
	/bin/enigma

	# or, start enigma from the hard disk...
	# (this file fires up enigma in a chroot jail so that everything
	# happens from the disk, not the flash memory)
	# /var/tuxbox/start_new_enigma

	# remove .enimga file used by /etc/init.d/rcS
	rm /tmp/.enimga

	# if enigma crashes on boot, we want a few minutes to get in with telnet and fix it.
	sleep 120

	# reboot so that timed recordings still happen if process crashes
	/sbin/reboot
For some reason, you need to do a *cold* boot for this to take effect (see below).

Cold Boot HOWTO

Q. I changed something. Now DREAMBOX won't reboot... Help!

A1. If the problem is minor, you can make DREAMBOX do a cold boot by holding in all three buttons on the front panel until it shows signs of life (Orange display lights up).

A2. If you can TELNET to Dreambox but the TV GUI doesn't run... Check that the NFS mount (or HDD drive) is working. Try deleting /hdd/movie/recordings.epl (which may be corrupt). You might want to move any valued recordings to /hdd/movie.old (say). Then reboot.

A3. If the problem is really bad (failed firmware update), first you should try holding all three buttons in until "FLASH ERASE" appears. That has always worked for me, but apparently it can sometimes fail. If the bootloader is malfunctioning it's not possible to re-program the dreambox by serial or network. If it's a software problem only, apparently it's possible to program the flash by using the Jtag interface (inside the dreambox). Try looking at the Dream Multimedia website, or the messageboards for more info.

CVS Source Build HOWTO

Q. "Use the source, Luke!". How can I do that?

A. Not for the faint-hearted, or those who pay by the minute for internet access...

UPDATE: The hints below are incomplete and out-of-date. I did get the source to build but it didn't run. I suggest you use this as a starting point, but Google for the latest info.

I assume you have Linux on your PC, right? OK, so first we must use CVS to fetch the latest source from the developer's configuration control archive in Germany. For CVS to work through a firewall, you might have to open up TCP port 2401 outbound.

		mkdir $HOME/tuxbox-cvs
		cd    $HOME/tuxbox-cvs

		cvs -d:pserver:anonymous@cvs.tuxbox.org:/cvs/tuxbox login
		(when prompted for a password, just hit Enter/Return)

		cvs -d:pserver:anonymous@cvs.tuxbox.org:/cvs/tuxbox -z9 co -r rel_1_0_0 . 
The CVS fetch will take at least an hour on a dialup connection. By the way, the "space dot" at the end is required!!
NOTE! The CVS repository URL has changed! It's no longer on BerlioS.

You may at this point want to check the installation notes the source tree, as it will tell you what the pre-requisite tools are (see $HOME/tuxbox-cvs/cdk/doc/INSTALL.en or INSTALL.de). My RedHat 9.0 system seemed to have them all anyway.

Now for the hard part! Actually building it...
		mkdir $HOME/dbox2
		cd    $HOME/tuxbox-cvs/cdk
		./autogen.sh
		./configure --prefix=$HOME/dbox2 --with-cvsdir=$HOME/tuxbox-cvs --enable-maintainer-mode 
		make all extra
This will take several hours the first time, even on a fast Pentium 4, as it has to download and build the cross-compilation toolkit before it can actually start building things.

NOTE: if your firewall does not allow outbound passive FTP, you will need to edit $HOME/tuxbox-cvs/cdk/rules-archive.pl and rub out the "--passive-ftp" switch.

If you don't have linux then you might want to follow these hints for building a virtual linux PC inside Windows. click here but really I think if you're that interested, then you should install the latest SUSE Linux as a dual-boot option on your Windows PC.

To update your CVS tree later on, change into $HOME/tuxbox-cvs and utter:

		cvs -z9 update -dP 
Then change into the cdk subdirectory, and repeat the autogen, configure and make all commands.

To test your new image, it's probably safer to run from an IDE or NFS disk rather than flashing code into memory straight away. http://dreambox.gamesquad.nl/nw_enigma.html describes the process. You should go to gamesquad.nl and read that page! But I will quote his description here, just in case that page vanishes:-

   Bij following this procedure it is possible to run a newer version of enigma with ORIGINAL images.
    I have tested this with release 1.02 and beta1.04a images. This procedure assumes that you are 
    using /hdd/new_root for installation directory.

    * Download script prepare.sh. and ftp to /hdd/tmp. The purpose of this script is to 
      simplify the installation of the new enigma. You only need to run this scripts once. 
      If you later on download a newer enigma you can just unpack it over the old one.
      The script prepare.sh does the following:
          o copy /bin /sbin /lib /etc /var to /hdd/new_root.
          o Create startup script for starting new enigma: /var/tuxbox/start_new_enigma
    * Run script
          o sh /var/tmp/prepare.sh
    * Download latest enigma and ftp to /var/tmp
    * unpack enigma_date_.tar.gz in /hdd/new_root
          o cd /hdd/new_root
          o gzip -dc /var/tmp/enigma_date_.tar.gz | tar xf -
    * replace in /var/tuxbox/start_enigma the line
          o /bin/enigma
    * by
          o /var/tuxbox/start_new_enigma

   That is all, you only need to reboot. Do you want, at a later time, to run a newer 
   enigma you don't need to run prepare.sh just do the unpack commands.

   I made a safty fallback into my start_new_enigma script. If enigma crashes within
    2 minutes, my script will wait a while before doing the /sbin/halt. 
    So it is possible in the case that enigma crashes to change the 
    /var/tuxbox/start_enigma script again to the original state via telnet.
     To make sure that you can telnet to your DB I suggest to configure the network 
     interface before starting enigma. This can be done by adding the following 
     line in start_enigma before starting enigma:

   	/sbin/ifconfig eth0 192.168.29.150 netmask 255.255.255.0 up

   Don't forget to replace IP and Netmask with your values.

Note: this is not quite true for images later than June 2003. The file /var/tuxbox/start_enigma is no longer called by default. Startup now uses /etc/init.d/rcS which in turn calls /var/etc/init (if you create it).

Script prepare.sh does this:
	#! /bin/sh

	[ -z "$NEW_ROOT" ] && NEW_ROOT=/hdd/new_root

	[ -d "$NEW_ROOT" ] && {
	echo "Directory: $NEW_ROOT bestaat al, exit"
	exit 1
	}

	mkdir -p $NEW_ROOT || {
	echo "Cannot create directory: $NEW_ROOT"
	exit 1
	}

	mkdir -p $NEW_ROOT/dev
	mkdir -p $NEW_ROOT/proc
	mkdir -p $NEW_ROOT/hdd/movie
	mkdir -p $NEW_ROOT/share/locale

	cd / && tar cf - bin sbin etc lib var | ( cd $NEW_ROOT && tar xpf - )
	cp /share/locale/locales $NEW_ROOT/share/locale/locales
	grep ^catalog /.version >$NEW_ROOT/.version

	cat <<END >/var/tuxbox/start_new_enigma
	#! /bin/sh

	touch /var/tmp/wait
	( sleep 120 ; rm -f /var/tmp/wait ) &

	[ -d $NEW_ROOT/proc -a ! -r $NEW_ROOT/proc/1 ]  && mount -t proc $NEW_ROOT/proc $NEW_ROOT/proc
	[ -d $NEW_ROOT/dev -a ! -r $NEW_ROOT/dev/zero ] && mount -t devfs $NEW_ROOT/dev $NEW_ROOT/dev

	/hdd/new_root/emu/prepare_emu.sh

	[ -x "$NEW_ROOT/bin/chroot" ] && $NEW_ROOT/bin/chroot $NEW_ROOT /bin/enigma

	umount $NEW_ROOT/proc
	umount $NEW_ROOT/dev

	while [ -f /var/tmp/wait ]
	do
	echo "Waiting for /var/tmp/wait to dissapear"
	sleep 1
	done

	END

	chmod +x /var/tuxbox/start_new_enigma

See Also

Other pages on my site:-