IPTV recording
Since a few months I have a fiber optic connection to my home, the so called Zeewolde op Glasvezel project. I bought one Amino Aminet130m settopbox (STB) from the service provider XMS. This are the steps I took to get the iptv running on my mythtv media pc. See also my IPTV Router page, where I describe the steps to take to setup a dd-wrt based router, so you can use your STB together with your windows or linux htpc.
Getting an ip-address on my linux machine
When connecting my mythtv media pc directly to the digital tv ethernet port of the Genexis modem, I would not get a ip-addres through DHCP. The settopbox is getting an ip-address without issues, so there must be something different. To see which data packets are send between the STB and the modem, I used an PC Engines Alix board. This is a small headless linux device. It has 3 ethernet ports and a compactflashcard socket. I’m using OpenWRT (x86, ext2 version), so I have a small linux device which I can use. I’m using all three ethernet ports. eth0 is connected to the STB. eth1 is connected to the second networkport (also eth1) of the mythtv media pc. And eth2 is connected to the Genexis modem on the digital TV port M2. In OpenWRT I’ve setup a bridge br-dtv with the devices eth0, eth1 and eth2. In sysctl I’ve setup proxyarp for all ethernet ports. Now the listening can begin!
When running wireshark on the mythtv media pc, listening on eth1, I could see the dhcp request from the STB to the fiber network. The DHCP request contains some extra information that is used on the DHCP servers of the supplier, so they know when to return an ip-address and when not. Before we can try a modified DHCP request from the mythtv media pc, I need to change the mac address of the eth1 of the mythtv media pc. I’m using fedora 12, so I could easily use the following configuration in /etc/sysconfig/network-scripts/ifcfg-eth1
# nVidia Corporation MCP55 Ethernet DEVICE=eth1 BOOTPROTO=dhcp HWADDR=00:1f:c6:xx:xx:xx MACADDR=00:02:02:xx:xx:xx ONBOOT=yes NM_CONTROLLED=no TYPE=Ethernet IPV6INIT=no
I’ve changed the last 6 bytes of the original mac address of the networkcard and of the new mac address to xx. The HWADDR has the original mac address of eth1, MACADDR must be the same as the mac address of your aminet130m device.
If I look at the DHCP request from the STB, I see the following dhcp options in the request:
- 53 DHCP Message Type = DHCP Discover
- 57 Maximum DHCP Message Size = 548
- 50 Requested IP Address = 10.252.x.x
- 51 IP Address Lease Time = infinity
- 55 Parameter Request List
- 1 Subnet
- 2 Time Offset
- 3 Router
- 6 Domain Name Server
- 12 Host Name
- 15 Domain Name
- 17 Root Path
- 23 Default IP Time-to-Live
- 28 Broadcast Address
- 29 Perform Mask Discovery
- 31 Perform Router Discovery
- 33 Static Route
- 40 Network Information Service Domain
- 41 Network Information Service Servers
- 42 Network Time Protocol Servers
- 43 Vendor-Specific Information
- 43 Vendor-Specific Information = 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73 (x03 x09aminet130x04x05fisys)
- 60 Vendor Class Identifier = Aminoaminet130fisys
- 61 Client Identifier = 00:02:02:xx:xx:xx (max address of your aminet130m)
Next we have to alter the dhcp request from the linux pc and add make it look like the dhcp request of the Amino STB.I’ve entered the following content to /etc/dhclient-eth1.conf to create a dhcp request from the linux pc that looks the same as the aminet130m:
request subnet-mask, time-offset, routers, domain-name-servers, host-name, domain-name, root-path, default-ip-ttl, broadcast-address, perform-mask-discovery, router-discovery, static-routes, nis-domain, nis-servers, ntp-servers, vendor-encapsulated-options; send dhcp-max-message-size 548; send vendor-encapsulated-options 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73; send vendor-class-identifier "Aminoaminet130fisys"; send dhcp-client-identifier 01:00:02:02:xx:xx:xx; supersede domain-name-servers 208.67.222.222, 208.67.220.220; supersede static-routes 82.139.121.0 10.252.160.1;
Again, I’ve changed the last 6 bytes of the mac-address of the aminet130m to xx. So fill in the mac-address from your own amino aminet130m. The Vendor encapsulated options looks like some kind of serial number, but it isn’t, it just is almost the same as the vendor class identifier. When converted to ASCII you get: “x03 x09 aminet130 x04 x05 fisys”. I also added two supersede commands to keep my linux box still using the opendns dns servers, and add a static route for all non-multicast servers used on the XMS network (e.g. webserver with STB menu config). This way I can still use my default gateway on eth0 to my local network and internet, and still access the XMS servers from the linux pc.
Some extra settings for routing is needed, so I’ve also entered some info in /etc/sysconfig/route-eth1
ADDRESS0=224.0.0.0 NETMASK0=240.0.0.0
This route can not be added to the supersede dhcp config, because you have to enter an gateway ip-address in the dhcp config. The 224.0.0.0/6 range is the multicast range, and therefore does not have a gateway ip-address.
Your routing table should look something like this:
[root@htpc ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 82.139.121.0 10.252.160.1 255.255.255.0 UG 0 0 0 eth1 10.84.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.252.160.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1 224.0.0.0 0.0.0.0 240.0.0.0 U 0 0 0 eth1 0.0.0.0 10.84.100.254 0.0.0.0 UG 0 0 0 eth0
With these changes (spoofing mac address) and adding the vendor information to the dhcp request, my linux pc gets an ip-address as if it was a Amino STB. In this dhcp ack there is again a vendor specific field. the content of the field is an url for the STB to load it’s menu and the current timezone. In my case:
http://w.zt6.nl/ Europe/Amsterdam
More information will come…

Entries (RSS)
Nice howto, just a pity that it isn’t finished
I would really like to see how you got this al working, and I think there are many more people who want a save and working solution for watching tv on a HTPC and on the original STB as well. You can also mail me if you want to share some “raw” instructions..
I know.. I would really like to have some more time to put some more info here. I don’t have any “raw” instructions at the moment. I only have my htpc running with a working config for the last months. (and recording about 3 or 4 shows a week, some of them in 1080p format) But the most difficult parts of the setup are already on this page. When you have this running, then you only need to create a m3u file with the channels (See http://www.mythtv.org/wiki/SureWest_IPTV for an example). The url’s for the channels can be extracted from http://w.zt6.nl page (only accessible through the dtv network). Then place this m3u file into /var/www/html (Mythbackend loads this file through http). Then add a new IPTV recorder into mythsetup. During this setup you enter the http://localhost/iptv.m3u as the m3u file location. (Don’t forget to have apache running). Somewhere in the mythsetup you also have an option to scan for channels, use it. (It will be done within 1 second… It only loads the channels into the database, and does not check the url’s). And your done.. It should work. If you want to record multiple streams, just add a few more IPTV recorders.
Nice how-to, it works for me thanks. The only problem is the routing of XMS. When I insert the cable for my normal internet, I loose the XMS streams. I can’t figure it out with the how-to. Can you please explain me how the routing works?
Many thanks in advance.
Steve
@Steve
if you have a system with 2 interfaces, 1 to your internet and 1 to your XMS IPTV network, you need to add a route for multicast to route to your XMS IPTV network.
This is because the only default gateway on your system is the one to your internet, so multicast is send there too.
I think the route you need to add is (On Windows):
“route add -p 224.0.0.0 MASK 240.0.0.0 10.x.x.x”
10.x.x.x should be the IP you have configured on the interface connecting to you IPTV network.
the -p is to make the route permanent so it survives a system reboot, so I suggest you test this without -p first.
I don’t know what the commandline version is in Linux.
Thanks for the reply Thasaidon. But that was not the problem, I routed the multicast range. The only problem, with Ubuntu atleast, was the reverse packet filter. These should be turned off for all eth devices.
http://www.tolaris.com/2009/07/13/disabling-reverse-path-filtering-in-complex-networks/
It now works as a charm.
Thanks a lot
I have two network cards in my htpc. One is setup with DHCP for the dtv vlan. The other one has a static ip-address inside my own private network. That’s why I don’t have any problems with a second dhcp on eth0 (private network with gateway router to internet) which is overwriting the dhcp setting from eth1 (dtv vlan). But runing both dhcp should still work, if you correctly setup the /etc/dhclient-eth0.conf and /etc/dhclient-eth1.conf to only use the settings frrom both networks, that you really want to use. By using a /etc/sysconfig/route-eth1 (as mentioned in my page above), you don’t need to add the multicast route anymore, because it is automatically setup, when eth1 comes up. But I don’t know if all this works the same on Ubuntu.
On my system rp_filter is still active (=1) and it works. When your have no connection (switch/hub or forwarding router) between the dtv vlan, and the internet vlan, you don’t need to disable the rp_filter.
Okay, thanks for your advice. It seems that ubuntu is slightly different in configuring dhcp and routes compared to fedora. Could you post the output of the command “route”. This way I can make sure that I’ve configured the routes correctly.
Sure, no problem.
eth0 is my private lan with ip range 10.84.100.0/24, using 10.84.100.254 as default gateway (my asus router with connection to internet)
Hmm. seems that the output of the routing table in this comment is not really readable, so I will move it into the page above.
thanks! this helped me!
Hi Robert,
Just the info I was looking for. It helped my a lot! Since I’m running Ubuntu, things are slightly different. When I have worked them out, I will post the config for Ubuntu (if you like). At the moment I have some issues in getting the routes (automatically) right. “supersede static-routes” does not seem to do anything ?!?
Hi Hugo,
The supersede static-routes works very well with my fedora installation. If this doesn’t work maybe you can try to add the following in your /etc/sysconfig/network-scripts/route-eth1:
ADDRESS1=82.139.121.0NETMASK1=255.255.255.0
GATEWAY1=10.252.160.1
Or, when Ubuntu uses the new layout (which you can also use in Fedora), add a line
82.139.121.0/24 via 10.252.160.1If you have any info about how to set it up in Ubuntu, send me an e-mail and I can included the info on the page here.
To parse the index page into an m3u:
grep igmp index.xhtml|tr ‘n’ ‘ ‘|sed ‘s/c:”/n”/g’ |cut -d, -f1,4|grep igmp|sed ‘s/”//g’ |sed ‘s/h:igmp:///udp://@/’|perl -e ‘print “#EXTM3Un”; my $nr=1; while() { my($ch,$addr)=split /,/; print “#EXTINF:0,$nr – $nr $chn$addr”; $nr++;} ‘|sed ‘s/;audio.*//’ > playlist.m3u
those are spaces, not tabs by the way…
Thanks all, I hope I can get my own HTPC working when my connection is activated in two weeks. I’ll keep you posted.
I tried to implement this on a pfsense box.
The dhclient_opt1.conf file now looks like this:
interface “re2″ {
timeout 60;
retry 1;
select-timeout 0;
initial-interval 1;
request subnet-mask, time-offset, routers, domain-name-servers, host-name, domain-name, root-path, default-ip-ttl, broadcast-address, perform-mask-discovery, router-discovery, static-routes, nis-domain, nis-servers, ntp-servers, vendor-encapsulated-options;
send dhcp-max-message-size 548;
send vendor-encapsulated-options 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73;
send vendor-class-identifier “Aminoaminet130fisys”;
send dhcp-client-identifier “Aminoaminet130fisys”;
send host-name “Aminoaminet130fisys”;
script “/sbin/dhclient-script”;
}
(dhclient_opt.conf is the file pfsense uses and “re2″ is the correct interface)
I cloned the MAC address from my amino 130m box into the re2 interface.
A capture shows:
21:11:31.273709 00:02:02:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0×0800), length 370: (tos 0×10, ttl 16, id 0, offset 0, flags [none], proto UDP (17), length 356)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:02:02:xx:xx:xx, length 328, xid 0xebd7b55f, secs 39, Flags [none] (0×0000)
Client-Ethernet-Address 00:02:02:xx:xx:xx
Vendor-rfc1048 Extensions
Magic Cookie 0×63825363
DHCP-Message Option 53, length 1: Discover
MSZ Option 57, length 2: 548
Client-ID Option 61, length 19: hardware-type 65, 6d:69:6e:6f:61:6d:69:6e:65:74:31:33:30:66:69:73:79:73
Hostname Option 12, length 19: “Aminoaminet130fisys”
Vendor-Option Option 43, length 18: 3.9.97.109.105.110.101.116.49.51.48.4.5.102.105.115.121.115
Parameter-Request Option 55, length 16:
Subnet-Mask, Time-Zone, Default-Gateway, Domain-Name-Server
Hostname, Domain-Name, RP, TTL
BR, MD, Router-Discovery, Static-Route
YD, YS, NTP, Vendor-Option
But I don’t get an IP address on the pfsense re2 interface.
Any idea what goes wrong?
Oops, can you remove my MAC address from my previous message?
(it’s in the captured Client-Ethernet-Address)
In addition, I get some error back from the DHCP server, at the end it says:
Unknown option (21), length: 4, value: 0×1000000
Unknown option (65004), length: 0, value: 0×0
A lot of options are not really neccesary. See also my page http://www.robmir.nl/robert/mythtv/iptv-router/
Here you will see that I only had to add the vendor-encapsulated-options on a dd-wrt router to get an ip-address.
But looking at your config, and comparing it to my config (on the top of this page), Maybe some options you give can break the dhcp request. For example: dhcp-client-identifier. You have entered the value “Aminoaminet130fisys”, but the original aminet device places the mac-address in this field. Maybe this is causing the dhcp server to not send a correct reply??
I went back to only setting the MAC address and the hostname (aminet13 this time), so no extra’s added tot the dhclient.conf file.
Sadly, the dhcp server answers with:
1:09:56.479758 00:0e:00:00:00:01 > 01:00:5e:00:00:0d, ethertype IPv4 (0×0800), length 72: (tos 0xc0, ttl 1, id 48887, offset 0, flags [none], proto PIM (103), length 58)
10.252.32.1 > 224.0.0.13: PIMv2, length 38
Hello, cksum 0xa1bd (correct)
Hold Time Option (1), length 2, Value: 1m45s
0×0000: 0069
Generation ID Option (20), length 4, Value: 0x8f08af97
0×0000: 8f08 af97
DR Priority Option (19), length 4, Value: 1
0×0000: 0000 0001
State Refresh Capability Option (21), length 4, Value: v1
0×0000: 0100 0000
Unknown Option (65004), length 0, Value:
My dhclient file now only has:
interface “re2″ {
timeout 60;
retry 1;
select-timeout 0;
initial-interval 1;
send vendor-class-identifier “Aminoaminet130fisys”;
send dhcp-client-identifier “aminet13″;
send host-name “aminet13″;
script “/sbin/dhclient-script”;
}
Any idea where I should start looking?
Specifically loose the dhcp-client-identifier and supply the vendor-encapsulated-options.
Use following config:
interface “re2″ {timeout 60;
retry 1;
select-timeout 0;
initial-interval 1;
send vendor-encapsulated-options 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73;
script “/sbin/dhclient-script”;
}
Sorry, needed to add this to my previous post:
I got this dhcp response either with or without the vendor-class-identifier / dhcp-client-identifier.
(so even with only the hostname)
dhclient file is now:
interface “re2″ {
timeout 60;
retry 1;
select-timeout 0;
initial-interval 1;
send vendor-encapsulated-options 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73;
script “/sbin/dhclient-script”;
}
Still the response ends with:
Unknown Option (65004), length 0, Value:
Discovered that I cannot send the vendor-class-identifier.
When I manually start dhclient, I get:
/var/etc/dhclient_opt1.conf line 11: no option named vendor-class-identifier
Does this have a different name under freebsd or is there a way to create this option?
According to http://www.freebsd.org/cgi/man.cgi?query=dhcp-options&sektion=5&apropos=0&manpath=FreeBSD+8.1-RELEASE
It should also be possible to use options that are not yet supported by dhclient in a way like:
option option-60 code 60 = string;
send option-60 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73;
Yes, found that but it also does not accept the declaration of the option (fails on the first word “option”).
It says that it is “Expecting a statement”.
As far as I understand, “option” is used on the server and “send” is used on the client.
But using “send option-60 …” results in “no option named option-60″.
Also when you place the “option option-60… ” line above the “interface…” line.
And the “send option…” line inside the “interface” block.?
yep, tried that too.
If I put the option option-60 … line on top, I get:
line 1: expecting a statement.
Then it even chokes on the “interface” line:
line 2: semicolon expected.
Which is probably because of the failing line 1.
My mistake.. vendor-class-identifier is option 43, not 60.
But still this is gonna be difficult with pfsense. Your also not the only one looking to add the vendor-class-identifier.
See also http://forum.pfsense.org/index.php/topic,21097.0.html
One of the persons on that page is also someone from Holland with XMS or Lijbrandt…
I’ve tried to do it with option 43 (and within that option 60) but that doesn’t help either. That will send an option 43 with an option 60 inside, which is differtent from a “real” option 60.
But… I looked inside the /sbin/dhclient file and found its internal list of options. An interesting part is:
..
dhcp-message
dhcp-max-message-size
dhcp-renewal-time
dhcp-rebinding-time
dhcp-class-identifier
dhcp-client-identifier
option-62
option-63
..
As you can see, counting back from 63, 62, the “dhcp-class-identifier” must be option-60.
When I enter that one in the dhclient.conf file, it generates no error. Sadly, it also doesn’t generate an outgoing option-60 so far.
I did some killing and restarting and…. I got an IP address on pfSense from Lijbrandt!
My dhclient now contains:
select-timeout 4294967295;
send dhcp-max-message-size 548;
send dhcp-lease-time 0;
request subnet-mask, time-offset, routers, domain-name-servers, host-name, domain-name, root-path, default-ip-ttl, broadcast-address, perform-mask-discovery, router-discovery, static-routes, nis-domain, nis-servers, ntp-servers, vendor-encapsulated-options;
send vendor-encapsulated-options 03:0a:61:6d:69:6e:65:74:31:33:30:6d:04:05:66:69:73:79:73;
send dhcp-client-identifier 01:00:02:02:xx:xx:xx;
send dhcp-class-identifier “Aminoaminet130mfisys”;
send host-name “”;
Congrats!
Thnx for posting your ‘working’ config for pfsense!
I see that I made one little mistake, it should be:
select-timeout 0;
send dhcp-lease-time 4294967295;
I can now open an UDP stream with VLC on the LAN.
Thank YOU for all the help!
Hi Robert,
I’m currently trying something a little bit different. I’ve a server with 3 nic’s, and I’m trying to let this server route internet and IPTV to my internal network. I used http://thuis.oversoft.nl/iptv/howto.txt as an example, but can’t seem to get it working, maybe you have an idea?
I’ve eth0 for internet, eth1 for iptv, and eth2 for my internal network. When I only connect the cables to eth1 and eth2 (so internet is disconnected) and remove the up route del default line from the eth1 config in /etc/network/interfaces, my iptv is working on the server. But as soons as I connect all interfaces I can’t even get iptv working on the server.
I think something is wrong in the routing, do you have a clue what could be wrong? This is my current output of the route command:
92.254.97.0 * 255.255.255.0 U 0 0 0 eth0
10.5.5.0 * 255.255.255.0 U 0 0 0 eth2
10.252.40.0 * 255.255.252.0 U 0 0 0 eth1
224.0.0.0 * 240.0.0.0 U 0 0 0 eth1
default 1-97-92.ftth.xm 0.0.0.0 UG 0 0 0 eth0
Hi Rens,
Here’s my route table of my vyatta. This router is connected to internet (eth0), iptv (eth1) and my local network (eth2).
When running the command “route -n” you will get all ip-addresses without dns lookup.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 92.254.96.1 0.0.0.0 UG 0 0 0 eth0
10.89.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.252.40.0 0.0.0.0 255.255.252.0 U 0 0 0 eth1
82.139.121.0 10.252.40.1 255.255.255.0 UG 0 0 0 eth1
92.254.96.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
I think you forgot to setup the 82.139.121.0/24 route.
Hi Robert,
I’m a real newbie in linux but have tried to follow your steps but I’am having trouble getting this to work.
I’m using ubuntu and have ip-tv from lijbrandt. I’ve managed to get the proper dhcp packet from the STB using an old speedtouch router and wireshark. I put it in a dhclient-eth1.conf file in /etc:
request subnet-mask, time-offset, routers,
domain-name, domain-name-servers, domain-search,
root-path, interface-mtu,
static-routes, default-ip-ttl, router-discovery, perform-mask-discovery,
ntp-servers, vendor-encapsulated-options;
send dhcp-max-message-size 576;
send vendor-encapsulated-options 03:0a:61:6d:69:6e:65:74:31:33:30:6d:04:05:66:69:73:79:73;
send vendor-class-identifier “Aminoaminet130mfisys”;
send dhcp-client-identifier 01:00:02:02:31:ce:53;
supersede domain-name-servers 188.142.0.6, 188.142.0.22;
supersede static-route 82.139.121.0 xxx.xxx.xxx.xx;
I am not sure about the ip addresses in the static route. What is the 82.139.121.0 address and what should i put in the second address?
my interfaces file in etc/network file looks like this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.1
auto eth1
iface eth1 inet dhcp
I don really know how to configure the extra routing as /etc/sysconfig/route-eth1 is something of fedora and not of ubuntu???
In wireshark on eth1 is see igmp packets from souce 10.60.137.4 to 224.0.0.1
after a while dhcp packets destination 255.255.255.255 and they do not have the additional options as specified in the dhclient-eth1.conf file.
It looks like the setting is completely ignored. It’s probably the routing table as I haven’t been able to get any routing configured with eth1.
Any ideas would be greatly appreciated.
Thanks, Ronald
Hi Robert,
With your DHCP information I got the streaming of XMS video content sort-of working on Mythbuntu. For most digital XMS channels the video appears OK the first time but as I switch channels the video very often does not come up.
A black screen appears with an error message ‘Error opening jump program file buffer’.
Another strange thing is that at that time the network still seems busy with the previous stream ? For some strange reason the BBC channels and the TV5 channel show a black screen and eventually an error message. So I am not able to get these channels at all but what the difference is with the other channels escapes me.
Strange is though that using mplayer on the bbc stream the video appears flawlessly. So maybe the internal MythTv player is at fault ?
I am using Mythbuntu 64 bits, version 11.04 and the Freebox Mythtv capture card on the XMS network. Do you maybe have a hint of finding the problem ?
Hi Ronald,
In order to get the DHCP working using Ubuntu I did 2 things:
1 – I placed the following content in the etcdhcpdhclient.conf file:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
request subnet-mask, time-offset, routers, domain-name-servers, host-name, domain-name,
root-path, default-ip-ttl, broadcast-address, perform-mask-discovery, router-discovery,
static-routes, nis-domain, nis-servers, ntp-servers, vendor-encapsulated-options;
send dhcp-max-message-size 548;
send vendor-encapsulated-options 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73;
send vendor-class-identifier “Aminoaminet130fisys”;
send dhcp-client-identifier 01:00:02:02:XX:XX:XX;
-> Note that you have to change the XX part to the MAC address of your Amino.
-> No routing etc. is needed so I disabled the supersede stuff.
2 – In the Ubuntu network tool (upper screen bar, click on network icon at the top right of the screen, then select ‘Edit connections’)
Click on ‘Auto eth0′ and the ‘Edit’ button. Now fill in the ‘Cloned MAC address’ the MAC address of your Amino.
Make sure you are using DHCP.
So after you enable your network with the network tool you should see that you get an ip address. You can check this with the ifconfig command running it as root. You should see a ‘inet addr’ entry that does not start with ’192′ but probably starts with ’10′.
With this setup I can get video however I still have erratic behaviour of the video. If I switch channels then sometimes I get an error message ‘Error opening jump program file buffer’. Some channels I can not watch at all, for example all BBC channels. I do not know why.
If you find a solutions for this or do not experience this problem then please share your experience with me.
Regards,
Rob
Hi Rob,
I have two nics so i setup the dhclient.conf file with a ststic ip for eth0 and dhcp for eth1. This is working and I am getting an IP address now on my second nic (eth1) 10.249.17.113 with a subnet mask 255.255.252.0. My routing table looks like this:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
10.249.16.0 0.0.0.0 255.255.252.0 U 1 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
224.0.0.0 0.0.0.0 240.0.0.0 U 0 0 0 eth1
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
It looks like this should do the trick, however I am not getting any stream in vlc, which I start with vlc rtp://10.249.17.113
Als adding the port 8200 results in RTP flow stopped. I feel I am pretty close but I am not sure where to look now.
Any help would be appreciated.
Regards Ronald
Hi Ronald,
I think that your url for the vlc is not right. If you are also using XMS as your provider then the following should work:
vlc UDP://233.81.233.161:10294
This should give you NEDERLAND 1.
In the user interface of VLC you can select the stream with the given UDP url. I am not sure of how to tell VLC to use device eth1 in your case.
In Mythtv you need to set up the ‘Freebox’ capturing card using mythtv-setup. Also setup a file ‘iptv.m3u’ in the directory ‘/var/www/html’ if you are using Ubuntu and set the URL in the Freebox capturing card to ‘http://localhost/html/iptv.m3u’. I can send you this file if you give me your email address.
Regards,
Rob
Hi robert,
I’ve had some time to play with it again and now I am getting a stream on udp://@224.0.251.1:8002. This is Nederland 1 but the picture looks like it is scrambled. I think this is the WBA KPN stream. On your suggested UDP://233.81.233.161:10294 i get no response.
any ideas?
regards Ronald
Hi Ronald,
What ISP do you have? When i try to view the 224.0.251.1:8002 I get a timeout, so I think you don’t have IPTV from glasmedia, but from KPN. I don’t know if KPN is scrambling the streams. The other stream (233.81.223.161:10294) is working for me (tested with mplayer).
Hi Robert, i like your discovery
. I understand everything but the only thing that i cant find on my IPTV network is the url for the STB to load it’s menu and the current time zone. With wireshark i got everything except of that. So because i am not on XMS provider where can i see what is url for the STB to load it’s menu and the current timezone for my provider? Thank allot.
John,
You should look inside the DHCP ACK package with wireshark. There should be a field for vendor specific information, and (at least on my connection), I see a url and the datetime zone.
I forgot to mention that i am using Aminet 125
Hi,
Has anyone tried this with Amino 140? I’ve successfully captured all the packets when the box connects and also when it is streaming but I’m unable to get a stream working on my ubuntu box. I’ve been able to get an IP-address though.
It seems like the Amino 140 is doing some sort of a handshake before it starts streaming, most of it done through HTTP.
Anyone know more about this?
Thanks.
- H
Hello,
I have the same issue as Hjalti. Since two months i’ve got Fibre Optic in my home and i’m wathcing TV with an AMino 140 STB. I also have a laptop with Ubuntu on it, two NIC’s: WLAN1 and ETH0. I managed to get an IP adres and I also have an .m3u file.
When i start VLC player and open the m3u file, I only get a black screen, nothing more. I know my routing is correct because i can reach the site: http://w.zt6.nl/
Any help will be appreciated
Josh
Hi,
I’ve got an Amino 130m, spoofed its mac address on a mythbuntu machine, updated my routing so I can obtain index.xhtml (wget http://w.zt6.nl/tvmenu/index.xhtml.gz works fine). This is where I’m stuck.
VLC can’t play any of the streams in index.xhtml (I tried igmp://, rtp://, udp:// and variations like udp://@). Could this be a routing issue? This is my route table:
robert@mythbuntu-backend:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.100.1.254 0.0.0.0 UG 100 0 0 eth0
10.30.96.0 * 255.255.248.0 U 0 0 0 eth1
10.100.0.0 * 255.255.0.0 U 0 0 0 eth0
82.139.121.0 10.30.96.1 255.255.255.0 UG 0 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth0
224.0.0.0 * 240.0.0.0 U 0 0 0 eth1
(10.100.0.0/16 is my internal lan)
Any thoughts? I seem to be close to the solution…
Thanks!
Rober.t
Hi Robert,
Routing looks ok. Maybe it’s a firewall issue? For example, I can watch NL1 HD by running:
vlc udp://@224.1.3.1:12110Maybe you can use wireshark on eth1 to see if the multicast join is correctly send out.
Although I have seen a ubuntu notebook a few months back, which also had problems with playing a multicast stream in vlc. Maybe you need some additional settings, extra software, or a different video player or different version of vlc. I don’t know Ubuntu, but when using fedora, I can watch the streams with vlc and xine, but mplayer is not working for me.
Maybe this can help also: http://ubuntuforums.org/showthread.php?t=988949
Regards,
Robert
Hi Robert (this is confusing
),
I did a sniff, and noticed that when I try to view a stream, I do send out an igmp join, but it doesn’t result in the stream.
[code]
source destination protocol length info
10.30.98.xx 224.1.3.1 IGMP 46 V2 Membership Report / Join group 224.1.3.1
[/code]
I’m pretty sure I’m not running a firewall in ubuntu (certainly didn’t install/configure one). I’ll go through the thread you mention, hopefully it can shed some more light.
If you have any other ideas, please let me know!
Hi other Robert
The wireshark info looks ok.
I know in fedora you have a standard firewall even without setting one up. You can see if there are any firewall rules with
sudo iptables -LAnd maybe try xine
xine udp://224.1.3.1:12110The url I gave as an example are for XMS. I don’t know if you have the same ISP and the same iptv sources. In the index.xhtml there are a few if statements for 2 or 3 different iptv sources (at least for glashart and KPN), so you have to try several urls with both vlc and xine.
Regards,
Robert
Hi Roberts,
I am using Mythtv for XMS on Ubuntu 10.10. I am testing with 11.10 but couldn’t get it working until I changed the/etc/sysctl.conf:
net.ipv4.conf.default.rp_filter=0
net.ipv4.conf.all.rp_filter=0
You need to reboot after this change
Regards
Rob
Getting pretty confusing now (2 x Robert, 1 x Rob
Hmm. strange. On fedora I only see the default.rp_filter = 1 in the /etc/sysctl.conf. But looking at /proc/sys/net/ipv4/conf/all/rp_filter, that one is 0.
And it works for me.
But I have seen an other site, which also reported you must change the rp_filter on ubuntu to 0 to get multicast working.
Regards,
Robert
Xine won’t play a stream either. I’ll just fire up another VM. Maybe it’s something mythbuntu specific…
Then again, I’ll probably go for Ubuntu Server or Debian. I’ll update you when I’ve got it running.
Hi guys,
Thanks for sharing your thoughts about this.
Still on the same VM, I made the changes to /etc/sysctl.conf, after which I did a reboot, but still no luck.
I tried many streams, but I’ve decided to fix my tests on udp://244.1.3.1:12110, as that one’s definitely in my index.xhtml.
Hope I can get this to work someday soon… it’s really bugging me!
This is just too bizar!
Hopefully this makes sense to you guys.
If I try to open a stream in vlc, nothing happens. But, “sudo ifdown eth1″ followed by “sudo ifup eth1″ starts the playback! Playback continues for about a minute, until it stalls. After taking the interface down and back up again, it starts playing again.
Could this be a buffer overrun or something?
Update:
“sudo ethtool -S eth1 | grep mcast” confirms I receive multicast packets after reenabling the interface. When the video stalls, the ethtool counter also stops incrementing.
Weer een update.
“ethtool -S eth1 | grep multicast” op m’n xenserver blijft wel oplopen!
Nu nog uitvogelen waarom dat dan niet bij m’n VM binnenkomt…
Oh no, it was my routing table after all!
This is what it should be:
robert@mythbuntu-backend:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.100.1.254 0.0.0.0 UG 100 0 0 eth0
10.30.96.0 * 255.255.248.0 U 0 0 0 eth1
10.100.0.0 * 255.255.0.0 U 0 0 0 eth0
82.139.121.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 1000 0 0 eth0
224.0.0.0 * 240.0.0.0 U 0 0 0 eth1
The corresponding lines in /etc/network/interfaces should be
up route add -net 224.0.0.0/4 eth1
Mystery solved! Now on to mythbackend
Thanks guys!
Is it just me or…
I don’t see any changes in your routing table for the 224.0.0.0/4 destination. The only changes I see is the 82.139.121.0/24 destination. But that one is not needed for playing the multicast streams.
But more important: It works
Haha, you’re right, that one didn’t change… odd… Anyway, I’m so happy I finally got it to work.
I can live w/ this minor mystery
[...] fellow (Robert) has done all the hard work already (figuring out what to set and not to set) and shared it online. Now the problem is, he used Fedora and it seems to differ in pretty much all key points when it [...]
Hi Robert,
Great blog!
I am living in Zeewolde as well and use Tweak. With vlc udp://@224.1.3.1:12110 I can watch NL 1.
I can’t seem to find useful channel info though. http://w.zt6.nl/ in Firefox gives me something that looks like the user interface for the Amino. If I do a wget w.zt6.nl/tvmenu/indexs.xhtml.gz I only get 289 bytes; after expansion I can see that this is “tvmenu v7.11″ but that is about it. Any idea what I am doing wrong?
After more reading found out that you need to wget w.zt6.nl/tvmenu/code.js.gz and get the channel info out of that file.
I’m still at the very early stages of setting this up and think something may be wrong with either the hardware installation or my subscription. I would like to know if the link LED of the digital tv ethernet port on the Genexis modem should be on and if any DHCP packet/response should reach a pc connected to the port while being unspoofed.
Also, the Genexis modem used here has three status leds, M1, M2 and M3, should any other than M1 be on for digital tv to work?
Hi Freek,
Sorry for my late response, I missed your message.
ON my genexis modem, I only see the M1 light on. The M2 and M3 are off. (I think they don’t relate to the rj45 sockets)
If you connect your PC to the second rj45 port on the modem, then you will _NOT_ get any dhcp reply if you don’t make any changes. The most important are (1) Spoof you mac address with a amino MAC address. (2) You have to send in the dhcp request the vendor specific information with a type of amino device.
Hi Robert,
Nice posts and thanks for the info. I wanted another information and that was relating to how to read the vendor-encapsulated-option in the dhclient-script file. I see that the information is present in the $new_vendor_encapsulated_option. What my question pertains to is if there is any standard way of parsing the info contained in this ? I read about the $INP() function but when i use it in my dhclient-script, it gives an error. Can anyone help me with this?
Hi Rishabh,
Sorry for the late reply, your comment was marked as spam, along with 500 other comments
The vendor encapsulated option is mostly just ascii encoded.
You supply the hex values: 03:09:61:6d:69:6e:65:74:31:33:30:04:05:66:69:73:79:73;
When you print this as normal ascii you get: x03x09aminet130x04x05fisys
At least with my Amino 130
I’m not sure what the \x03 means, but the next value is \x09. That gives the lenght of the string following that byte “aminet130″ = 9 bytes long.
The you have a \x04, followed by \x05. That says that the next string is 5 bytes long “fisys”.
I assume that the \x03 and \x04 give some information about the content of the string. Propably the dhcp server in the iptv network knows that the string following \x03 is the stb type.
If you can sniff the network traphic with wireshark, you can easily see the contents in human readable form of the vendor encapsulated option.
I hope this helps?