Sascha Volkenandt (Logo) Video Disk Recorder Extensions and Scripts
 
 
 
© 2003 Sascha Volkenandt

The MiniVDR inside a Kathrein SAT-Receiver Case


This is my MiniVDR-Streamclient, equipped with a MiniITX EPIA-800 Mainboard and a DXR3-(Hollywood+)Card to serve me as a streaming client for watching TV in my working-room, streamed from the VDR in the living-room. It boots a (so far) 45MB small system via network (using Etherboot). I've used the old front-panel of the device (as you can see) without exchanging any parts of it. Simply the IR-circuit (which now works with LIRC as a standard home-brew receiver) had to be modified a bit, but that shouldn't be hard to accomplish. The two 4-digit led displays are driven by two SAA1064 drivers, which can be connected to the parallel port. They are programmed via i2c, the driver for the parallel-port device can be obtained from the lmsensors i2c-package. The two buttons, which are for CHAN+ and CHAN- are simply connected to two spare ports of the parallel-interface. The IR-circuit has to be connected to a serial port the usual way, but I'll explain all of this in detail later on. I don't know if anyone will ever try exactly this at home, but maybe this can give anyone advice who tries a similar thing, and might even use the plug-in that controls the front-panel as a base for own projects. Please excuse the bad quality of the images, but my digital camera is even far beyond bullshit :-). I didn't put the case under the TV because of the airflow.

[UPDATE 2003-07-13] I have changed the boot process to use pxelinux, which is much faster, and easier to handle than etherboot. I've also shrunk the root filesystem to approx. 10 MB (using busybox instead of GNU fileutils), with no authentication and a minimal telnetd providing a shell on port 21.

Pin No.Purpose9-pin SerialParallelPower Supply
1+5VDC  +5VDC
2I2C SDA Auto LF (14) 
3I2C SCL Init Printer (16) 
4N/C   
5IRDATADCD (1)  
6CHAN- Busy (11) 
7CHAN+ Paper Out (12) 
8GNDGND (5)GND (18-25)GND

So the first thing I had to do was ripping apart the inside of the case. I've removed the whole board including the metal profiles and all remaining screws. The front panel has to be removed, as well (for modifying the IR-circuit). Then I wanted to know exactly how I could (ab)use all functions of the front-panel and used a multimeter to find out the pinout of the front-panel. If you straighten up the flat-cable when the display lies like in the picture, pin one is top-right, pin eight top-left. You can see the purpose and target of each pin in the pinout table. The +5VDC can be taken from the red wire of a normal device power plug. GND is connected to the grounds of the serial, parallel and device power plugs. For modifying the IR-circuit you only need a 4,7µF capacitor and a 4k7 resistor. You need to unsolder the capacitors C254 (the one above the IR-receiver rightmost) and C251 (that's the first one left of the right SAA1064 chip) and solder in the 4,7µF capacitor in place of C251 (minus points to the CHAN-buttons). Then you have to solder in the 4k7 resistor (make sure you get a small one) between the left and middle pins of the IR-receiver (turn the panel around so the receiver remains on the right). Then connect everything to the appropriate plugs for parallel, serial and power. I've used the original socket, unsoldered it from the receiver board and connected it to a short piece of UTP cable. Power is directly connected inside the case, the UTP cable goes to a parallel plug, from which a two-wired cable goes on to a serial plug. Now the front-panel is almost finished, be sure to replace the old switch with an ATX suspend switch.

Next, I've put together all necessary parts into the receiver case. As you can see in the picture, the Mini-ITX board is bottom-left, the DXR3-Board connected to it via a PCI-riser. The top-right of the DXR3-board is supported by the power supply, which is a tiny, 145W MicroATX power supply (be sure to put something isolating between the board and the supporting capacitor), the bottom-right is supported by a short plastic stick. Everything has been put together and fixed using hot-melt adhesive. The front-panel connection cable (not visible in this image) is routed outside next to the ATX-panel and plugged into the appropriate ports. After connecting the front-panel and screwing everything back together, I began creating the boot-image for it.

First, I've compiled together a kernel (I was using 2.4.21-rc6, works very stable here) with all needed drivers compiled into the kernel, because I didn't want to have any modules later, to keep things slim. I've inserted the files and menu entries for the DXR3 drivers, for the primitive parallel port I2C-driver from the lmsensors i2c-package, and finally, the serial driver for the IR-circuit from the LIRC package. You can download my kernel tree and default configuration if you don't want to do things yourself, since the LIRC driver had to be modified slightly to run inside the kernel instead of running as a module.

When I tried booting the kernel via network, I had to get an appropriate PXE-image for the Mini-ITX network adapter, since the standard boot rom can't load a full linux kernel. You can get that image from Rom-O-Matic. You have to select your NIC, and customize the image so it boots the kernel via NFS instead of TFTP. Then, tell your NFS-Server to supply that image to this client.

[UPDATE 2003-07-13] For PXELINUX, you just have to get a current SYSLINUX

The section in my dhcpd.conf looks like this:

host dxr {
  hardware ethernet 00:40:63:c0:59:fb;
  fixed-address 192.168.1.102;
  filename "boot/pxelinux.0";
  }
Then, activate TFTP and NFS on the server providing the boot-images. The NIC will try to obtain an address via DHCP first, then download the supplied boot-image via TFTP. Put the image from Rom-O-Matic into a subdirectory (which is called "boot" here) somewhere you can point tftpd to.

[UPDATE 2003-07-13] You just need TFTP for reading the PXE-image and kernel, but you'll need nfs for the root device anyway. Place pxelinux.0, contained in the SYSLINUX package, into a subdirectory somewhere you can point tftpd to.

The entry in inetd.conf looks like this:

tftp  dgram  udp  wait  root  /usr/sbin/in.tftpd  in.tftpd -s /var/lib/dhcp
The image is placed in /var/lib/dhcp/boot/dxr.img. This makes the standard boot rom load the advanced one (from Rom-O-Matic) via TFTP, which then again tries to fetch /boot/dxr3.img, this time via NFS because you told it to do so by customising it. This NFS-Export really is /boot, and the file dxr.img placed inside is the kernel that machine is supposed to boot. To tell the kernel where to get a root filesystem, you have to install Etherboot and execute
mknbi-linux --ip=rom --rootdir=/var/lib/dhcp/boot/nfsroot bzImage > dxr.img
where the rootdir parameter is to be replaced with your (NFS-mountable) system root for that machine.

[UPDATE 2003-07-13] Just place the bzImage file from the real kernel image into the directory where you've put pxelinux.0. Next, create a subdir pxelinux.cfg in there, and place a file called "default" inside, containing the following. Adjust the nfsroot-parameter according to your setup.

default vdr
prompt 1
label vdr
  kernel vmlinuz
  append ip=::::::bootp root=/dev/nfs nfsroot=/var/lib/dhcp/boot/nfsroot,rsize=8192,wsize=8192

Next, I have assembled the root-directory, which is basically a stripped-down copy of the SuSE 8.2 running on my master VDR, with the boot-concept replaced by a slim one starting loopback networking and network in runlevel 3 and additionally LIRC and VDR in runlevel 5. You can download the root of my system, too. Currently there's only a debug-version installed in /usr/vdr, but I'll install a full-featured ElchiAIO version, soon. Of course you'll have to put irrecord into /usr/bin of that root, and learn a new remote control if you don't use the same one as me (which is a Universal Remote Control and I don't remember what kind of device it is programmed for).

[UPDATE 2003-07-13] I've also replaced the fileutils with busybox, stripped down the bootprocess even more, and removing unneeded libraries, leaving a minimal system without authentication starting VDR and a minimal telnetd which provides an unsecured shell on port 21.

Last, I've written the PlugIn controlling the I2C-chips and the buttons. I won't describe how it works in detail, now. If you want to use it either directly or as a base for an own project, look into the source code. The right display shows the current channel, while the left one shows the volume for a short time after it has been changed, or "----" in case volume is muted. You can download that plug-in as well, of course.


Version Downloads
File Description Download
linux-2.4.21-rc6-sv Kernel with LIRC, I2C and DXR3 linux-2.4.21-rc6-sv.tar.bz2
netroot-minivdr-2 10MB Root for NFS with LIRC and VDR netroot-minivdr-2.tar.bz2
netroot-minivdr 45MB Root for NFS with LIRC and VDR netroot-minivdr.tar.bz2
vdr-kathreinlcd-0.0.1 PlugIn to control the front-panel vdr-kathreinlcd-0.0.1.tgz