News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

H3 version works

Started by woodym, December 04, 2007, 04:54:29

Previous topic - Next topic

woodym

Hello,

i read in many borads h3 dosnt work.
i got one mediamvp h3 and want to play with vompserver. i used Mahlzeit 4.0beta2 and it dosent work. mahlzeit uses 2.6.1 of vompserver. i read i must update to 2.7 to work with h3. i setup a new vdr and try it out. it dosnt work to.  but anybody wrote it's work.
first the actions on mvp...
he gest the dongle.bin.ver
he gets the dongle.bin
the mvp is pingable for 5 seconds.
the led of lan are off after the 5 seconds.

ok,  i sniff the tcp and look about the problems.

the mvp try to get the bootp-info from bootp-port
he try it another one
than he try port 16867 to get the dchp-infos
vompserver answer with the ip and the dongle.bin
mvp gets from vompserver dongle.bin.ver and than dongle.bin

on this point it's look like ok.
than h3 (and i think this is the differnt) send another dchp request (i think class 5-request). but this request only goes to bootp-port.
vompserver isn't bind to this port and the mvp requests many times without answer.
i have change vompserver to listen to 16867 (i'ts a wook ago, i dont know is this the right port) and 67. the changes are simple (i change the server to start to threads with differnt ports).
now vompserver answer to the dhcp-request after transfer the dongle.bin .
but the h3 dosnt work.

at this point i switch bootp off (vompserver) and use dhcp-server.
all are the sam, but answer the dhcp-request (after transfer from dongle.bin) the mvp works.

i anlayse the differnt about the answer from vompserver and dhcp. the only seen differnt is tha dhcp-server sends options with the name-server, rooter and domain-name.

i think h3 uses other boot-firmware and try to set (after transfer dongle.bin) the network-address. only if this sends correct it starts the loaded bin.
i think every one that uses dhcp-server wrot about working h3.

at the moment i dont have time to anlayse the different about the dhcp-requests. the first step is to listen on default bootp-port. the other to
change the response in the right way.

here my changes:
note!!! to use ports <1027 vdr have to run as root. if initialize of port 67 fails the vompserver don't stop, only log this fault.

the changes are:
bootpd.h:
-    int run();
+    int run(int port, int aport);
    int shutdown();

+    int answer_port;
    DatagramSocket ds;

bootpd.c:
-int Bootpd::run()
+int Bootpd::run(int port, int aport)
{
  if (threadIsActive()) return 1;
  log->log("BOOTPD", Log::DEBUG, "Starting bootpd");

+  answer_port=aport;
-  if (!ds.init(16867))
+  if (!ds.init(port))
  {
    log->log("BOOTPD", Log::DEBUG, "DSock init error");
    shutdown();
    return 0;
  }

mvpserver.h
    UDPReplier udpr;
    Bootpd bootpd;
+    Bootpd bootpd67;
    Tftpd tftpd;


mvpserver.c
  bootpd.shutdown();
+  bootpd67.shutdown();
  tftpd.shutdown();


-    if (!bootpd.run())
+    if (!bootpd.run(16867,16868))
    {
      log.log("Main", Log::CRIT, "Could not start Bootpd");
      stop();
      return 0;
    }
+    if (!bootpd67.run(67,68))
+    {
+      log.log("Main", Log::CRIT, "Could not start Bootpd 67");
+    }


woodym

hello,

yes, i have read this. and try this. but it dosn't work.
this topic is the initition to look for the real problem (why it works on one server and not on other).
the real problem is the newle request to dhcp with the wrong (or uncomplete) answer.
it's not a problem if the dhcp is on the same server. i vae try it out with two differnt dhcp-server (software)
on two servers. where the dchp-server runnig dosn't matter. the dchp must run with port 67 (vompserver dosn't)
and the request after loading dongle.bin must answer with the right protokoll. one of the dhcp-server i tryed is
dnsmasq (great dns-cache with dhcp-server build in). this says on log-files the dhcp-request after loading dongle.bin
are class 5-requests.
for a long time ago i have read about dhcp and class-request and i think the request are adition options i have to send.
vompserver have a realy simple dhcp implementation without aditional options about router, dns and domain.

Alpine

Hello,

please don´t change anything in the Vompserver. Which Software are you trying? Mahlzeit 4.0? My MVP are running on Mahlzeit 3.2 and CT VDR 6.0. I have an Netgear WGR 614 v7 with dhcp!!! But i have to stop the servive. I have installed a DHCP-Server on my VDR´s and at this time the MVP is running. Maybe, you can show me your DHCPconf?

Bye

Alpine

woodym

#4
hello,

i have try mahlzeit 3 and mahlzeit4. on mahlzeit4 it's not posible to add dhcpd (apt-get dont'n work; a lot of config files not there). to setup developing-system for mahlzeit is very time-intensiv (i can't find any packages for the old woody-sytem), so i have made a new server based on gentoo with vdr 1.4.7 and vompserver 2.7. the changes i have posted is to give developer of vompserver any idea where the h3 problem is. this can help to build , let me say 2.8 of vompserver. if i have time i try to find the problem myself and post the info about the changes.

to help running vompserver with h3 the posible way are to use external dhcp (means other dhcp, not build in from vompserver).
on one system i have tested dns-masq and it works.
on my created gentoo-system i use Internet Systems Consortium DHCP Server V3.1.0
the config are easy:


option domain-name "mydomain.de";
option domain-name-servers 192.168.1.99;

default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
authoritative;
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.180 192.168.1.185;
  option broadcast-address 192.168.1.255;
  option routers 192.168.1.99;
}

host mpv1 {
  fixed-address 192.168.1.181;
  hardware ethernet 00:0d:fe:0c:4b:cc;
  filename "dongle.bin";
  server-name "192.168.1.37";
#  allow bootp;
}


to get the hardware ethernet you can use the logfile of dhcpd or get the mac from the mvp (sticker on bottom of mvp). other way is to disable dhcpd, start vompserver with bootp and start mvp. vompserver generates one file with the hardwareaddress in the folder with the vomp.conf. then you can disable the bootp on vomserver and starts the dhcpd with the hardware-adress (mac-adress) set.

the config for vompserver:


#Log file = /var/log/vompserver.log
Server name = GenVdr
#Bootp server enabled = yes
TFTPD server enabled = yes
TFTPD directory = /tftpboot

(!! use TFTPD without D at end... if i post without d the forum crashes)

in dir /tftpboot are
dongle.bin
dongle.bin.ver

dongle.bin.ver are generatet with:
dd if=/tftpboot/dongle.bin of=/tftpboot/dongle.bin.ver bs=1 skip=52 count=40

at the moment i use the tftpd-server build in from vompserver 2.7 it works. i don't know if vompserver 2.6 tftpd works but i think it must because older mvp like h3 works with build in tftpd.

the flow of requests are (simplified):
mvp starts an send broadcast-request to the network (0.0.0.0:67).
the dhcp-server catch this request and look of any configs for the requesting mac.
if any config are defined the dhcpd send one answer to the requesting device (255.255.255.255:68)
the answer holds the defined ip for the device and other information like the ip and file to request the dongle.bin
mvp connect to tftpd (if acticated the build-in from vompserver) and gets the dongle.bin.ver
the mvp gets the dongle.bin and (*) starts the dongle.bin

(*) at this point mvp h3 requests other dhcp-request and gets no answer if dhcp from vompserver are activated. normal dhcp-server answer this correct and dongle.bin can started. with vompserver-dhcp the mvp requests 5 time the dhcp-request and hangs.


hondansx

#5
@woodym
Quoteat this point i switch bootp off (vompserver) and use dhcp-server.

What is the advantage of this patch?
To turn off the builtin bootp service in vomp?

Walter
GA-EP43 | headless | 1xCineS2 Dual | 1xSkystar 2.6D | VDR 1.7.37 
Frontend: 1xRasperry | 1xION3