KnoppMyth downloads | documentation | HowTo | reporting bugs | links | Recent Changes  
search for in the  

What is a Wiki?

See WikiWikiWeb

If you don't know how to use a wiki see the WikiHowto

ErfurtWiki is maintained by a loosely knit group of developers.

Quick Links

Related sites

Contact

Please submit website bugs in the BugReports

Contribute!

Please file any wishes on UserSuggestions.

Hosted By

Booting a limited MythTV front end on a Hauppauge MediaMVP

These steps will allow you to remote-boot your MediaMVP from your KnoppMyth box, using a modified MediaMVP kernel which, when directed to KnoppMyth's /myth/tv folder, will allow you to browse and select all recorded programs on your MythTV back end. The front end is missing quite a few features (most significantly the inability to watch Live TV from your backend tuners), but it organizes your recorded programs much better than the Hauppauge-supplied software does.

NOTE: The previous instructions on this page described how to compile and install the new MediaMVP kernel from scratch. This is no longer necessary now that recompiled "dongle.bin" files are available at the MVPMC SourceForge page. If you are still interested in setting up the files from scratch you can follow the instructions found at http://mvpmc.sourceforge.net/mvpmc-HOWTO-singlehtml.html to set up your system appropriately.

1. We'll assume you logged in as mythtv user and are in its home directory of /home/mythtv/. Switch to root, create a tftpboot folder at the root directory, and cd into it.

su
mkdir /tftpboot
cd /tftpboot

2. Download the latest "dongle.bin" binary from the MVP Media Center project download page at http://mvpmc.sourceforge.net/idx.php?pg=downloads . Find the URL of the latest dongle, then use wget to get that URL into the tfptboot folder. Then rename the file you get (it will have a name like dongle.bin.mvpmc-20050417) to dongle.bin.mvpmc

mv dongle.bin.mvpmc-20050417 dongle.bin.mvpmc

You can read up about the MVP Media Center project at the same http://mvpmc.sourceforge.net/ . There is also a forum on running Linux on the MediaMVP at http://www.shspvr.com/forum/ (scroll down to find the MediaMVP section)

3. In order to connect to the back end, the /myth/tv directory must be shared via NFS. NFS software is already installed for R5 alpha.

(For R4 ONLY, you should probably install a more recent version of nfs via apt-get, as the version that comes with R4 is reportedly broken. After apt-get update, do a apt-get -t stable install nfs-common nfs-kernel-server to install

To set the proper NFS sharing settings for /myth/tv, edit /etc/exports according to directions listed at http://www.dforsyth.net/mvp/serversetup.html . I used nano as my text editor:

nano /etc/exports

The file may be empty, or it may contain the following

/myth (rw)

Edit this file to read:

/myth/tv *(rw,async,no_root_squash,no_subtree_check)

Save and exit your text editor. You can then start NFS services:

/etc/init.d/nfs-kernel-server start
/etc/init.d/nfs-common start

I was unclear whether this needed to be set to load at startup... when I entered update-rc.d nfs-kernel-server defaults it said the startup links were already there.

4. You now need to set up a tftp server on your MythTV box to let the MediaMVP remotely boot the new kernel. tftp-hpa is included in R5Ax.

Edit the inetd.conf config file:

nano /etc/inetd.conf

Page down to the section on "BOOT" and uncomment the "tftp" line. Edit the line so that the entire line reads:

tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd -s /tftpboot

(all on one line)

Save and exit, then restart inetd services:

/etc/init.d/inetd restart

NOTE: As of R5.5 restart inetd services using /etc/init.d/openbsd-inetd restart

(NOTE: As of R5.5 8/10/2008 do not uncomment this line in inetd.conf. tftpd-hpa run as a dameon needs the file in /etc/defaults/tftpd-hpa edited to read as #Defaults for tftpd-hpa
# If running tftpd-hpa as a daemon change RUN_DAEMON to yes
# and comment out tftpd line in /etc/inetd.conf file.
RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"
Its actually easier than before, but not documented too well. Then restart tftpd-hpa with the following:
/etc/init.d/tftpd-hpa restart
)

5. You now to set up a DHCP server on your MythTV box: the MediaMVP first looks for a DHCP server, then downloads the kernel via tftp from that server. For R5E50 see the comment below about the 'next-server' option. Edit /etc/dhcpd3/dhcpd.conf for R5 (/etc/dhcpd.conf for R4)...

nano /etc/dhcpd3/dhcpd.conf

Your MythTV box will now have to be the only DHCP server on your home network's subnet, so you should read up on how to setup this config file to do what you want. If another DHCP server is running (for instance, on a hardware router), the MediaMVP will likely latch onto the other DHCP server, and try (and fail) to download the new kernel from it.

The following config file does seem to work as my network's sole DHCP server. You should adjust IP numbers depending on your network's internal numbering scheme:

# my config file for dhcpd3 for Debian
# NOTE: I HAD TO COMMENT OUT THE FOLLOWING LINE
# FROM THE SAMPLE CONFIG FILE.
# ddns-update-style none;

# I left these values at default
default-lease-time 600;
max-lease-time 7200;

# basic subnet declaration, my router is at 192.168.1.1
# and this reserves a range of 10 IP numbers for use
# by anything using DHCP to connect to the web.
# I left out my DNS numbers; you should plug in yours,
# or maybe they're not even necessary...
subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.50 192.168.1.60;
option routers 192.168.1.1;
option domain-name-servers xx.xx.xx.xx, xx.xx.xx.xx, xx.xx.xx.xx;
}

# you then should give your MediaMVP a fixed IP number,
# and a filename to boot from. Note you will need
# to get the MediaMVP's MAC address from the sticker
# on the bottom of the unit
host MVP {
hardware ethernet 00:0d:fe:00:87:1b;
# For R5E50 I had to add a next-server option here
# next-server ip-of-your-myth-box;
filename "dongle.bin.mvpmc";
fixed-address 192.168.1.40;
}

Save and exit your editor.

Now, turn off any other DHCP servers in your subnet. I had to turn off my broadband router's DHCP server to get the MediaMVP to boot with the new kernel.

Now start up your DHCP server and set it so it starts up whenever your system starts up:

/etc/init.d/dhcp3-server start
update-rc.d dhcp3-server defaults

(Use /etc/init.d/dhcpd for R4)

If you get any errors, it's probably a problem with your /etc/dhcpd3/dhcpd.conf file. You can view the syslog to get some clues as to what's wrong:

more /var/log/syslog

6. One more step. Make sure you're still in the /tftpboot directory and create a new file called dongle.bin.mvpmc.config:

cd /tftpboot
nano dongle.bin.mvpmc.config

Create this file as follows, replacing the IP number with the number of your MythTV back end:

rdate -s $SERVER
mkdir /video
/etc/nfsmount.sh 192.168.1.30:/myth/tv/ /video
/bin/echo "Test Log" >/video/test.log
/bin/mvpmc -M -f /etc/helvR10.fnt -s 192.168.1.30 -a 4:3 -m ntsc -r /video >>/video/test.log &
(this last line should be on a single line)

Save and exit the editor. Note that you'd change "4:3" to "16:9" if you have a widescreen TV, and "ntsc" to "pal" if you're in a PAL region.

7. Now start up the MediaMVP by plugging in its power cable. Assuming all has gone well, you should see the MVP Media Center main menu.

If you have a problem with this setup please check this thread http://mysettopbox.tv/phpBB2/viewtopic.php?t=3151&highlight=dhcp

Rusty Adds - If you get a single line channel entry in "Live TV" it is an indication that the time on your MediaMVP is not synced up to your server. Presuming you have 'rdate -s $SERVER' as above pointing at a valid system, check the /etc/inetd.conf file directly and confirm that the 'time' entries are not commented out. Webmin may even indicate that they are up and running, even when they are commented out. Restart inet.d with the command '/etc/init.d/inetd restart' and reboot your MVP. All should be back in order. -Rusty

MediaMCP on MediaMVP H2

DHCP Setup

This is probably overkill because as you'll see later, mvpboot.pl handles most of this now. The only important thing that needs to happen is that your MediaMVP gets a static IP.
dhcpd.conf
ddns-update-style none;
authoritative;
option domain-name "THEDOMAIN.local";
default-lease-time 21600;
max-lease-time 43200;
lease-file-name "/var/lib/dhcp/dhcpd.leases";
allow bootp;
allow booting;

subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option domain-name-servers 192.168.0.20;
option netbios-name-servers 192.168.0.20;
option netbios-node-type 8;
range 192.168.0.102 192.168.0.200;

group {
next-server 192.168.0.112;
host mvp {
hardware ethernet 00:0d:fe:0b:12:b8;
fixed-address 192.168.0.201;
filename "dongle.bin.mvpmc";
option root-path "/home/mvp,rsize=4096,wsize=4096,nolock";
}
}
}


TFTP Setup

This, and the changes in /etc/services are going to start two instances of TFTP. MediaMVP H2 needs this.
/etc/inetd.conf (2 long lines):
tftp dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd -v -v -v -v -v -p -T 10000000 -a 192.168.0.112:16869 -s /tftpboot
tftp2 dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.tftpd -v -v -v -v -v -p -T 10000000 -a 192.168.0.112:69 -s /tftpboot
/etc/services
tftp2 69/tcp
tftp2 69/udp
tftp 16869/tcp
tftp 16869/udp
dongle.bin and dongle.ver :
All the dongle files should go in your tftp share
Get the latest mvpmc dongle.bin.
http://mvpmc.sourceforge.net/idx.php?pg=main
Make the boot image. Run:
dd if=dongle.bin of=dongle.bin.ver bs=1 count=40 skip=52
chmod 777 *
dongle.bin.config:
Setup your config. rdate should point to a valid time, NOT ntp server. nfs mounts your myth share. point mvpmc at your myth server.
rdate -s 192.43.244.18
mkdir /video
/etc/nfsmount.sh 192.168.0.112:/myth/tv/ /video
/bin/echo "Test Log" >/video/test.log
/bin/mvpmc -M -f /etc/helvR10.fnt -s 192.168.0.112 -r /video &


mvpboot.pl

Run this in the backgroup to make H2 booting work.
http://sourceforge.net/mailarchive/forum.php?thread_id=23592043&forum_id=46647
mvpboot.pl:
If the link is dead, copy/paste from here:

--Start Copy/Paste--
#!/usr/bin/perl -w
#
# $Id$
#
# Respond to boot request packets from Hauppauge MediaMVP
#

=head1 NAME

mvpboot - Respond to boot request packets from Hauppauge MediaMVP

=head1 SYNOPSIS

B<mvpboot> B<-i <interface>>? B<-p <pid_file>>?

=head1 DESCRIPTION

I<mvpboot> listens on UDP port 16881 for broadcast messages from
a Hauppauge MediaMVP and fakes a sufficiently convincing reply for the
MediaMVP to start fetching the dongle.bin via TFTP on UDP port 16869.

=head1 OPTIONS

=over 5

=item B<-i> I<interface>

Bind to the specified interface. The hardware address of this interface
will be used in reply packets. Defaults to 'eth0'.

=item B<-p> I<pid_file>

Write the pid of the daemon process to the specified file. Defaults to
'/var/run/mvpboot.pid'.

=back

=head1 VERSION
==%% v0.01 - Initial public release

=head1 AUTHOR

Dan Gardner (dan /at/ chaotica /dot/ org /dot/ uk)

=head1 CREDITS

Based on the work of (dom /at/ suborbital /dot/ org /dot/ uk):

http://www.rst38.org.uk/vdr/mediamvp/protocol.html


=head1 COPYRIGHT

Copyright (C) 2006, Dan Gardner

This work is licensed under the GNU General Public License version 2.
For the full license information, please visit http://www.gnu.org/copyleft/gpl.html

=cut

use strict;
use warnings;

use File::Basename;
use Getopt::Std;
use IO::Socket::INET;
use Net::Interface qw(mac_bin2hex);
use POSIX qw(setsid);
use Sys::Syslog qw(:DEFAULT setlogsock);

my ($pid, $pidfile);

my %opts;
getopts('i:p:', \%opts);
$opts{i} ||= 'eth0';
$opts{p} ||= '/var/run/mvpboot.pid';

# seq, id1, id2, hwaddr, client_addr, client_port, guiserv_addr, guiserv_port,
onserv_addr, conserv_port, serv_addr, serv_port
my $PACK_TEMPLATE = '@0N @4H4 @6H4 @8H12 @16N @20n @24N @28n @32N @36n @44N @48n @51x';
my $MVP_PORT = 16881;
my $PACKET_SIZE = 52;

sub log_die {
syslog 'crit', @_;
die @_;
}

my $if = Net::Interface->new($opts{i}) or die "$!\n";
my $ifaddr = scalar($if->address) or die "No IP address found for ".$opts{i}."\n";
my $local_addr = net2quad($ifaddr);
my $local_hwaddr = unpack('H*', scalar $if->hwaddress);

daemonise($opts{p});

my $socket = IO::Socket::INET->new(
LocalPort? => $MVP_PORT,
Proto => 'udp',
) or log_die "Failed to bind socket: $!\n";

syslog 'info', "MediaMVP UDP listener running on $local_addr:$MVP_PORT
".mac_bin2hex(scalar $if->hwaddress).")";

my $data;
while (1) {
(my $paddr = recv($socket, $data, $PACKET_SIZE, 0)) or log_die "recv: $!";
my ($port, $iaddr) = sockaddr_in($paddr);
my $host = net2quad($iaddr);
if (length($data) != $PACKET_SIZE) {
syslog 'info', "invalid packet from $host:$port";
next;
}

my @pkt = unpack($PACK_TEMPLATE, $data);
syslog 'info', "got mvpboot request packet from $host:$port ("
.decode_packet(@pkt).")";
my ($reply_addr, $reply_port) = (int2quad($pkt4?), $pkt5?);
syslog 'info', "client hwaddr: $pkt3? ip: $reply_addr port: $reply_port";

$pkt3? = $local_hwaddr;
@pkt1,2? = @pkt2,1?; # swap ids
$pkt5? = 2048; # client port
my @ports = (5906, 6337, 16886);
for (my $off = 6; $off <= 10; $off += 2) {
@pkt$off, $off+1? = (quad2int($local_addr), shift @ports);
}
$data = pack($PACK_TEMPLATE, @pkt);
syslog 'info', "sending mvpboot reply packet to $host:$reply_port ("
.decode_packet(@pkt).")";

my $reply_socket = IO::Socket::INET->new(
LocalAddr? => $local_addr,
PeerAddr? => $reply_addr,
PeerPort? => $reply_port,
Proto => 'udp',
) or log_die "Failed to bind reply socket: $!\n";
(my $sent_bytes = $reply_socket->send($data)) or log_die "send: $!";
syslog 'info', "Failed to send $PACKET_SIZE bytes" unless $sent_bytes $PACKET_SIZE;==
}

sub net2quad {
return join('.', unpack('C4', $_0?));
}

sub int2quad {
return net2quad(pack('N', $_0?));
}

sub quad2int {
my @bytes = split(/\./,$_0?);
return undef unless @bytes 4 && ! grep {!(/\d+$/ && $_ < 256)} @bytes;==
return unpack("N", pack("C4",@bytes));
}

sub decode_packet {
my @fields = qw(seq id1 id2 hwaddr client_addr client_port guiserv_addr guiserv_port
onserv_addr conserv_port serv_addr serv_port);
return join ' ', map { shift(@fields)."=$_" } @_;
}

sub daemonise {
my ($file) = @_;
defined(my $p = fork) or die "Can't fork: $!";
exit 0 if $p;
my $fh;
if (-e $file) {
open $fh, '<', $file or die "Can't open pid file $file: $!\n";
my $oldpid = <$fh>;
close $fh;
die "mvpboot already running with pid $oldpid\n" if kill(0, $oldpid);
warn "Removing pid file for defunct server process $oldpid.\n";
die "Can't unlink pid file $file" unless -w $file and unlink $file;
}
$pid = $$;
$pidfile = $file;
umask 022;
open $fh, '>', $file or die "Can't create pid file $file: $!\n";
print $fh $pid;
close $fh;
$SIG{INT} = \&cleanup;
$SIG{TERM} = \&cleanup;
$SIG{HUP} = \&cleanup;
setsid();
open STDIN, '/dev/null';
open STDOUT, '>>/dev/null';
open STDERR, '>>/dev/null';
chdir '/';
umask 0;
$ENV{PATH} = '';
setlogsock('unix');
openlog(basename($0), 'pid,cons', 'daemon');
return;
}

sub cleanup {
unlink $pidfile if defined $pid and $$ $pid;==
closelog();
exit 0;
}

--End Copy/Paste--
To get this perl script to work in R5C7

sources.list
http://www.debian.org/mirror/list - testing main
Run:
apt-get install initrd-tools gcc
perl -MCPAN -e shell
install Net::Interface
add mvpboot.pl to startup/leave running


NFS Setup

/etc/exports
/myth/tv *(rw,async,no_root_squash,no_subtree_check)
Run:
/etc/init.d/nfs-kernel-server start
/etc/init.d/nfs-common start
update-rc.d nfs-kernel-server defaults
update-rc.d nfs-common defaults



UpdatedPages

· HowTo last changed on Thu Sep 2 01:33:37 2010
· LinuxTips last changed on Wed Sep 1 08:31:37 2010
· RepairingMythConvergDB last changed on Wed Sep 1 01:56:32 2010
· KnoppMythWiki last changed on Sun Aug 29 14:22:57 2010
· Links last changed on Sat Aug 28 14:11:13 2010
· R5A12DvdRipping last changed on Fri Aug 27 22:24:09 2010
· KnoppMythInstall last changed on Thu Aug 26 02:30:11 2010
· HVR950HowTo last changed on Mon Aug 23 11:00:20 2010
· TinnyAudioPVR150 last changed on Mon Aug 23 01:14:01 2010
· MythVodkaHowTo last changed on Mon Aug 23 00:48:53 2010
· x11vncHowTo last changed on Tue Aug 17 08:20:17 2010
· PickingComponents last changed on Tue Aug 17 08:19:41 2010
· MediaMVP_LinuxHOWTO last changed on Tue Aug 17 08:17:10 2010
· webminhowto last changed on Tue Aug 17 08:11:10 2010
· MythTVBurn_Scripts_HowTo last changed on Mon Aug 16 15:44:19 2010
· TVOverScanHowto last changed on Wed Aug 4 04:12:50 2010
· EditThisPage last changed on Wed Aug 4 04:10:39 2010
· R5.5/R6.x Differences Table and Equivalent Commands last changed on Wed Aug 4 00:27:20 2010
· TroubleShooting last changed on Tue Aug 3 20:00:33 2010
· Media_Center_Edition_Remote_Control last changed on Tue Aug 3 08:19:13 2010
· kworld115HowTo last changed on Tue Aug 3 08:12:26 2010
· WhatRemoteYouUse last changed on Sun Aug 1 11:51:11 2010
· WhatCardYouUse last changed on Sun Aug 1 11:50:25 2010
· HardwareAcceleratedVideo last changed on Tue Jul 27 09:15:10 2010
· DisklessFrontend last changed on Tue Jul 27 09:13:29 2010
· CompileMythTVFromSVN last changed on Tue Jul 27 07:39:28 2010
sitemap |