Dreambox 7000 - Hints and Tips v.3

Networking

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

A. A couple of things:

  • TELNET server. You can telnet into the box if you want to control Linux directly. default username=root, password=dreambox.
    Note: To change the root password, just telnet in and use the unix "passwd" command. In images from June 2003 onwards, this command writes back to the flash memory so the command will last until the next flash erase, not just the next reboot ;-)
  • FTP server. You can FTP into the box if you want to send files to or from the DREAMBOX flash "disk" (and hard disk if fitted). default username=root, password=dreambox.
  • SAMBA server. You can access the DREAMBOX flash "disk" (and hard disk if fitted) from a Windows PC using the standard file sharing in the Windows file explorer. (open \\192.168.0.42 or whatever)
  • WEB server. Open up a web browser to http://192.168.0.42 (or whatever address you've given your Dreambox) and follow the prompts. It's a little incomplete so far, but already you can get status from the box, and listen to an audio stream as MP2 (click on "apid" in top right hand corner). Interestingly, you can listen to a different radio station over TCP/IP to that which is playing on the box itself! But, of course the radio stations must be on the same transponder mux.
  • NFS client. Dreambox contains an NFS client, which lets you "mount" remote disk drives if you have an NFS server somewhere on your local area network. This allows hard disk recording without the noise of a hard disk in your living room! More about NFS later...
  • Firmware Updates. e.g. with DreamUp and DreamUpLAN (see download links on my Dreambox links page).
  • Audio/Video Streaming. There are lots of links on this on the Internet (see Links on my Dreambox links page). VLC (VideoLanClient) lets you watch satellite TV over the LAN at your computer. It may also be possible to watch multi-region DVDs on your TV, accessed from a networked drive over NFS, but some work would be needed to confirm this ;-)
  • Backup/Restore. See below.

R/C Navigation Hints

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

  • When watching TV or Radio, you can press any of the keys at bottom left - "TV", "RADIO", "TEXT" to bring up the list of TV channels, RADIO channels and DISK RECORDINGS.
  • Provided that "Other bouquet selection keys" is NOT ticked in "Settings/Remote Control Setup", then whenever a channel list is displayed:
    • BLUE toggles between USER/FAVOURITES and the full list.
    • GREEN toggles between a channel list display that is 1, 2 or 3 columns wide.
    • RED allows a channel to be deleted, or added to one of your FAVOURITES categories.
  • When scanning transponders, you may notice that Astra 2x @ 28.2E and Eurobird @ 28.5E are listed as seperate satellites, but you can include them both in your satellite list, giving them the same DiSeqC LNB number.

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

0 comments: