Difference between revisions of "Sasktel IPTV"

From MythTV Official Wiki
Jump to: navigation, search
(Updated the DNS override to the right way to do it.)
(Major update - A complete howto on what to sniff for and how to interpret it.)
Line 1: Line 1:
This isn't a definitive guide, just what I did to get Sasktel IPTV working on my box.
+
== How to get up and running on Sasktel IPTV ==
 +
This isn't a definitive guide, just what I did to get Sasktel [[IPTV]] working on my box.
 
I'm running KnoppMyth (So that's Debian, then).
 
I'm running KnoppMyth (So that's Debian, then).
You will need:
+
=== You will need ===
 
* (At least 1 "Spare") Sasktel Max box (Motorola VIP1200P)
 
* (At least 1 "Spare") Sasktel Max box (Motorola VIP1200P)
 
* Second network card
 
* Second network card
  
 
Note: The network information given by DHCP from the DSLAM for your second network card will not be internet routable. For each MAC address, it appears the DSLAM will only allocate 2 video streams. If you want to record more than 2 at once, you'll need 3 network cards (More than 4, 4 network cards, and so on).
 
Note: The network information given by DHCP from the DSLAM for your second network card will not be internet routable. For each MAC address, it appears the DSLAM will only allocate 2 video streams. If you want to record more than 2 at once, you'll need 3 network cards (More than 4, 4 network cards, and so on).
 
+
=== Configuring MAC addresses ===
 
Take the MAC address (00:21:80:xx:yy:zz) from the underside of your spare box, and set the second network card's MAC to match it. You can do this in /etc/network/interfaces like so:
 
Take the MAC address (00:21:80:xx:yy:zz) from the underside of your spare box, and set the second network card's MAC to match it. You can do this in /etc/network/interfaces like so:
 
<pre>
 
<pre>
Line 29: Line 30:
 
         up route add -net 224.0.0.0/4 eth1
 
         up route add -net 224.0.0.0/4 eth1
 
</pre>
 
</pre>
 +
=== Configuring DHClient ===
 
Before you can bring up eth1 however, you also need to do a little fakery with dhclient. Note, the MAC address is used here again, in a few places. Set /etc/dhcp3/dhclient.conf like this:
 
Before you can bring up eth1 however, you also need to do a little fakery with dhclient. Note, the MAC address is used here again, in a few places. Set /etc/dhcp3/dhclient.conf like this:
 
<pre>
 
<pre>
Line 55: Line 57:
  
 
This should be enough to fool the DSLAM into thinking you're second network card is a VIP1200P box, and when you bring up eth1 you should get a private address in the 10.110.x.x range. If you do, congratulations!
 
This should be enough to fool the DSLAM into thinking you're second network card is a VIP1200P box, and when you bring up eth1 you should get a private address in the 10.110.x.x range. If you do, congratulations!
 
+
=== Channels list ===
 
Now you need an m3u file to tune the network recorder to. This one is all the channels I could find today (20-Dec-2008), without the HD, french, PPV, VOD or DV channels included (As I don't have the HD package at the moment, PPV/VOD doesn't work with this system, and DV (Described Video) is kinda surplus to requirements). It also has XMLTV IDs for mc2xml (http://mc2xml.110mb.com/)
 
Now you need an m3u file to tune the network recorder to. This one is all the channels I could find today (20-Dec-2008), without the HD, french, PPV, VOD or DV channels included (As I don't have the HD package at the moment, PPV/VOD doesn't work with this system, and DV (Described Video) is kinda surplus to requirements). It also has XMLTV IDs for mc2xml (http://mc2xml.110mb.com/)
 
<pre>
 
<pre>
Line 495: Line 497:
 
udp://239.255.0.151:9420
 
udp://239.255.0.151:9420
 
</pre>
 
</pre>
 +
=== Notes for MythFillDB and mc2xml ===
 
If you are using mc2xml, please note that MythFillDB will try and create the "Missing" channels on import, unless you cull them from mc2xml's output. You can do this with a channels file. As I had the list of XMLTV IDs I have available already to hand (I used OpenOffice Calc to compile the above m3u), I put just the XMLTV IDs in the channels file, which makes mc2xml export only those channels. The initial filldatabase run took 3 hours (! AMD Sempron 1800+, 512MB RAM). I'll be checking my logs on Monday to see how long the next run took.
 
If you are using mc2xml, please note that MythFillDB will try and create the "Missing" channels on import, unless you cull them from mc2xml's output. You can do this with a channels file. As I had the list of XMLTV IDs I have available already to hand (I used OpenOffice Calc to compile the above m3u), I put just the XMLTV IDs in the channels file, which makes mc2xml export only those channels. The initial filldatabase run took 3 hours (! AMD Sempron 1800+, 512MB RAM). I'll be checking my logs on Monday to see how long the next run took.
  
 
With that set up, you should be all set. Enjoy watching your Sasktel Max!
 
With that set up, you should be all set. Enjoy watching your Sasktel Max!
 +
== How I worked this out ==
 +
I'm certain others on other IPTV systems are interested in how I got this info, so here's the basics.
 +
=== You will need ===
 +
* a PC
 +
* a hub<br>An external switch may also work, but the built-in switch in the 2wire box will not work, as it does VLAN seperation.
 +
* a (spare) Set-Top Box<br>You cannot have two connections sharing the same MAC, and the boxes have to be registered before the DSLAM will give out IP allocations. Don't try guessing a new MAC.
 +
=== How to start ===
 +
* Get the PC up and running, with as little software running as possible, and with [http://www.wireshark.org/ Wireshark] capturing packets. The more network activity on your PC, the more pages of packets you'll have to scroll through to find the ones you need.
 +
* Plug in the STB to the power. Literally, plug in the power cord. After about a second you'll see a lot of traffic in Wireshark's window.
 +
* Leave Wireshark capturing packets until the STB boots to the menu. It may reboot twice before getting there, be patient.
 +
* Once the STB is sitting at the menu, you can stop the capture.
 +
 +
Wireshark (should) now have a log of the STB coming up, requesting an initial IP address, downloading it's bootloader over multicast, rebooting and loading the firmware from multicast. You will need to go back through the list of captured packets until you see the most recent DHCP/BOOTP request. Expand it to get all the details of every item sent in the DHCP request. These are the details you will need to add to your DHClient configuration.
 +
=== Finding the channels ===
 +
* Start a new capture in Wireshark
 +
* Grab the remote and tune the STB to a channel
 +
* * At this point, you will see the IGMP join request, followed quickly be a whole mass of UDP packets, coming from a private IP source, and headed to a multicast ip. These are the IPTV stream for that channel.
 +
* Pick a UDP packet (It shouldn't matter which one, they'll all be to and from the same location), and note down it's DESTINATION IP address and DESTINATION port.
 +
* * It's possible that Wireshark will try and be helpful supply the port's name for you in the packet listing. If you click on a packet, however, it will give you the number in the "User Datagram Protocol" header.
 +
* * For the first channel, open VLC, and choose "Media -> Open Network". Protocol UDP, address is the destination IP address, and port is the destination port. You should see on your computer screen the same as the feed from your STB. If so, congratulations.
 +
* Also note down the channel number and name. This will help later when it comes time to map your XMLTV IDs
 +
* Tune to the next channel, lather, rinse and repeat.
 +
 +
This process may take a while to complete, going through every channel, but by the end you should have a complete channel to IP/Port map.
 +
=== Building the M3U ===
 +
So, now you've got your list of IPs, ports, channel numbers and names. You might be wondering how to make them a nice M3U file. Well, here's how I did it.
 +
 +
I knew I would have to do some manipulation of these details, so I originally noted them down in OpenOffice Calc. Once I had them there, it was a fairly simple step to join them into an (almost) M3U style:
 +
{| border=1 cellpadding=3 cellspacing=0
 +
| '''XMLTV ID'''
 +
| '''Ch #'''
 +
| '''Ch Name'''
 +
| '''IP'''
 +
| '''Port'''
 +
| '''Code'''
 +
|-
 +
| I3.28458539.microsoft.com
 +
| 3
 +
| CBC
 +
| 239.255.0.3
 +
| 9400
 +
| =CONCATENATE("#EXTINF:0,";B1;" - ";C1;"~#EXTMYTHTV:xmltvid=";A1;"~udp://";D1;":";E1)
 +
|}
 +
The last cell there is the one that does most of the magic. For this example, it comes out to
 +
<pre>#EXTINF:0,3 - CBC~#EXTMYTHTV:xmltvid=I3.28458539.microsoft.com~udp://239.255.0.3:9400</pre>
 +
But it still needs an M3U header, and to be split on those ~'s. So, that column gets fed into notepad (To ensure the values, and not the contents were copies), and has an M3U header prepended to it (#EXTM3U). Then it gets thrown into nano on my linux box, saved, and processed with a little sed:
 +
<pre>sed 's/~/\n/g' notquiteanm3ufile.txt >channels.m3u</pre>
 +
This gives you a nice, concise M3U file that you can use with Myth to your heart's content.
 +
== Conclusion ==
 +
This isn't a definitive guide. There is no guarantee this will work with your IPTV setup, but (for now) it is working fine for me. If you do manage to get IPTV working with your provider, please feel free to update this page, or make a new one for your provider. Hopefully, working together on this, we can make Myth an IPTV box to be reckoned with!

Revision as of 01:41, 20 January 2009

How to get up and running on Sasktel IPTV

This isn't a definitive guide, just what I did to get Sasktel IPTV working on my box. I'm running KnoppMyth (So that's Debian, then).

You will need

  • (At least 1 "Spare") Sasktel Max box (Motorola VIP1200P)
  • Second network card

Note: The network information given by DHCP from the DSLAM for your second network card will not be internet routable. For each MAC address, it appears the DSLAM will only allocate 2 video streams. If you want to record more than 2 at once, you'll need 3 network cards (More than 4, 4 network cards, and so on).

Configuring MAC addresses

Take the MAC address (00:21:80:xx:yy:zz) from the underside of your spare box, and set the second network card's MAC to match it. You can do this in /etc/network/interfaces like so:

# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
# automatically added when upgrading
auto lo eth0 eth1
iface lo inet loopback

iface eth0 inet dhcp

iface eth1 inet dhcp
        # Set up the hardware (MAC) address
        hwaddress ether 00:21:80:xx:yy:zz

        # Ensure IGMP is v2 and rp_filter is OFF
        pre-up echo 2 >/proc/sys/net/ipv4/conf/eth1/force_igmp_version
        pre-up echo 0 >/proc/sys/net/ipv4/conf/eth1/rp_filter

        # Ensure multicast requests are routed to this interface
        up route add -net 224.0.0.0/4 eth1

Configuring DHClient

Before you can bring up eth1 however, you also need to do a little fakery with dhclient. Note, the MAC address is used here again, in a few places. Set /etc/dhcp3/dhclient.conf like this:

interface "eth1" {
   # Note, no "routers" in this request. The default gateway for the IPTV 
   # connection won't route internet traffic. So if we don't ask for one,
   # we don't lose our 'net access
   request subnet-mask, broadcast-address, time-offset, domain-name, host-name;

   # The DNS server given to us is wrong, and will not look up any sites.
   # override this with one we know is good (In this case, the gateway address
   # for eth0.
   supersede domain-name-servers 192.168.1.254;

   # Hello Mr. DSLAM, I am a VIP1200 box
   send host-name "CED002180xxyyzz";
   # See my shiny Motorola-assigned hostname?
   send dhcp-client-identifier 01:00:21:80:xx:yy:zz;
   # See my pretty Motorola-assigned MAC address?
   send vendor-class-identifier "MotoVIP1200P_sasktel-6.2.0.011";
   # And see my sasktel firmware provided ID string?
   # Please can I have a 10.110 range IP address?
   # I'm really not faking this!
}

This should be enough to fool the DSLAM into thinking you're second network card is a VIP1200P box, and when you bring up eth1 you should get a private address in the 10.110.x.x range. If you do, congratulations!

Channels list

Now you need an m3u file to tune the network recorder to. This one is all the channels I could find today (20-Dec-2008), without the HD, french, PPV, VOD or DV channels included (As I don't have the HD package at the moment, PPV/VOD doesn't work with this system, and DV (Described Video) is kinda surplus to requirements). It also has XMLTV IDs for mc2xml (http://mc2xml.110mb.com/)

#EXTM3U
#EXTINF:0,3 - CBC
#EXTMYTHTV:xmltvid=I3.28458539.microsoft.com
udp://239.255.0.3:9400
#EXTINF:0,4 - CTV
#EXTMYTHTV:xmltvid=I4.28459580.microsoft.com
udp://239.255.0.4:9400
#EXTINF:0,5 - Global
#EXTMYTHTV:xmltvid=I5.28459765.microsoft.com
udp://239.255.0.5:9400
#EXTINF:0,6 - ABC Boston
#EXTMYTHTV:xmltvid=I6.28458824.microsoft.com
udp://239.255.0.6:9400
#EXTINF:0,7 - CBS Minnesota
#EXTMYTHTV:xmltvid=I7.28455843.microsoft.com
udp://239.255.0.7:9400
#EXTINF:0,8 - Fox Boston
#EXTMYTHTV:xmltvid=I8.28457928.microsoft.com
udp://239.255.0.8:9400
#EXTINF:0,9 - NBC Boston
#EXTMYTHTV:xmltvid=I9.28459673.microsoft.com
udp://239.255.0.9:9400
#EXTINF:0,10 - PBS Boston
#EXTMYTHTV:xmltvid=I10.28461423.microsoft.com
udp://239.255.0.10:9400
#EXTINF:0,11 - YTV
#EXTMYTHTV:xmltvid=I11.28460441.microsoft.com
udp://239.255.0.11:9400
#EXTINF:0,12 - MuchMusic
#EXTMYTHTV:xmltvid=I12.28456499.microsoft.com
udp://239.255.0.12:9400
#EXTINF:0,13 - MuchMoreMusic
#EXTMYTHTV:xmltvid=I13.28457250.microsoft.com
udp://239.255.0.13:9400
#EXTINF:0,14 - CMT
#EXTMYTHTV:xmltvid=I14.28460371.microsoft.com
udp://239.255.0.14:9400
#EXTINF:0,15 - CBC Newsworld
#EXTMYTHTV:xmltvid=I15.28455738.microsoft.com
udp://239.255.0.15:9400
#EXTINF:0,16 - CTV Newsnet
#EXTMYTHTV:xmltvid=I16.28458698.microsoft.com
udp://239.255.0.16:9400
#EXTINF:0,17 - Weather
#EXTMYTHTV:xmltvid=I17.28455336.microsoft.com
udp://239.255.0.17:9400
#EXTINF:0,18 - CPAC
#EXTMYTHTV:xmltvid=I18.28458483.microsoft.com
udp://239.255.0.18:9400
#EXTINF:0,19 - Saskatchewan Communications Network
#EXTMYTHTV:xmltvid=I19.28459312.microsoft.com
udp://239.255.0.19:9400
#EXTINF:0,20 - Saskatchewan Legislative
#EXTMYTHTV:xmltvid=I20.28456553.microsoft.com
udp://239.255.0.20:9400
#EXTINF:0,21 - The Shopping Channel
#EXTMYTHTV:xmltvid=I21.28459398.microsoft.com
udp://239.255.0.21:9400
#EXTINF:0,22 - APTN
#EXTMYTHTV:xmltvid=I22.186366589.microsoft.com
udp://239.255.0.22:9400
#EXTINF:0,23 - Vision TV
#EXTMYTHTV:xmltvid=I23.28460613.microsoft.com
udp://239.255.0.23:9400
#EXTINF:0,24 - Sportsnet
#EXTMYTHTV:xmltvid=I24.28459211.microsoft.com
udp://239.255.0.102:9411
#EXTINF:0,25 - MTV Canada
#EXTMYTHTV:xmltvid=I25.28455319.microsoft.com
udp://239.255.0.54:9404
#EXTINF:0,26 - ABC Seattle
#EXTMYTHTV:xmltvid=I26.28456971.microsoft.com
udp://239.255.0.26:9400
#EXTINF:0,27 - CBS Seattle
#EXTMYTHTV:xmltvid=I27.28457170.microsoft.com
udp://239.255.0.27:9400
#EXTINF:0,28 - Fox Seattle
#EXTMYTHTV:xmltvid=I28.28455559.microsoft.com
udp://239.255.0.28:9400
#EXTINF:0,29 - NBC Seattle
#EXTMYTHTV:xmltvid=I29.28456415.microsoft.com
udp://239.255.0.29:9400
#EXTINF:0,30 - CTV NTV
#EXTMYTHTV:xmltvid=I30.28458772.microsoft.com
udp://239.255.0.179:9430
#EXTINF:0,31 - CityTV Toronto
#EXTMYTHTV:xmltvid=I31.28459169.microsoft.com
udp://239.255.0.181:9430
#EXTINF:0,32 - CTV Toronto
#EXTMYTHTV:xmltvid=I32.28461361.microsoft.com
udp://239.255.0.182:9430
#EXTINF:0,33 - E!
#EXTMYTHTV:xmltvid=I33.28456189.microsoft.com
udp://239.255.0.183:9430
#EXTINF:0,34 - CityTV Edmonton
#EXTMYTHTV:xmltvid=I34.28457140.microsoft.com
udp://239.255.0.180:9430
#EXTINF:0,35 - CTV Calgary
#EXTMYTHTV:xmltvid=I35.28456112.microsoft.com
udp://239.255.0.184:9430
#EXTINF:0,36 - Global Calgary
#EXTMYTHTV:xmltvid=I36.28459235.microsoft.com
udp://239.255.0.185:9430
#EXTINF:0,37 - CTV Vancouver
#EXTMYTHTV:xmltvid=I37.28456705.microsoft.com
udp://239.255.0.186:9430
#EXTINF:0,38 - Global Vancouver
#EXTMYTHTV:xmltvid=I38.28455659.microsoft.com
udp://239.255.0.187:9430
#EXTINF:0,39 - CBC Toronto
#EXTMYTHTV:xmltvid=I39.28456889.microsoft.com
udp://239.255.0.188:9430
#EXTINF:0,40 - CBC Vancouver
#EXTMYTHTV:xmltvid=I40.28457577.microsoft.com
udp://239.255.0.189:9430
#EXTINF:0,45 - GameTV Canada
#EXTMYTHTV:xmltvid=I45.44810812.microsoft.com
udp://239.255.0.177:9400
#EXTINF:0,46 - TeleToon Retro
#EXTMYTHTV:xmltvid=I46.182539345.microsoft.com
udp://239.255.0.76:9406
#EXTINF:0,50 - CNN
#EXTMYTHTV:xmltvid=I50.28456220.microsoft.com
udp://239.255.0.30:9402
#EXTINF:0,51 - Discovery
#EXTMYTHTV:xmltvid=I51.28456203.microsoft.com
udp://239.255.0.31:9402
#EXTINF:0,52 - Viva
#EXTMYTHTV:xmltvid=I52.28455384.microsoft.com
udp://239.255.0.32:9402
#EXTINF:0,53 - BNN
#EXTMYTHTV:xmltvid=I53.28455955.microsoft.com
udp://239.255.0.33:9402
#EXTINF:0,54 - CNBC
#EXTMYTHTV:xmltvid=I54.28458683.microsoft.com
udp://239.255.0.34:9402
#EXTINF:0,55 - History
#EXTMYTHTV:xmltvid=I55.49803426.microsoft.com
udp://239.255.0.35:9402
#EXTINF:0,56 - G4 TechTV
#EXTMYTHTV:xmltvid=I56.28457891.microsoft.com
udp://239.255.0.36:9402
#EXTINF:0,57 - Headline
#EXTMYTHTV:xmltvid=I57.28460808.microsoft.com
udp://239.255.0.37:9402
#EXTINF:0,60 - Discovery Civilization
#EXTMYTHTV:xmltvid=I60.28455952.microsoft.com
udp://239.255.0.40:9403
#EXTINF:0,61 - Discovery Health
#EXTMYTHTV:xmltvid=I61.28459178.microsoft.com
udp://239.255.0.41:9403
#EXTINF:0,62 - National Geographic
#EXTMYTHTV:xmltvid=I62.28458168.microsoft.com
udp://239.255.0.42:9403
#EXTINF:0,63 - Book TV
#EXTMYTHTV:xmltvid=I63.28458741.microsoft.com
udp://239.255.0.43:9403
#EXTINF:0,64 - Fox News
#EXTMYTHTV:xmltvid=I64.28455736.microsoft.com
udp://239.255.0.44:9403
#EXTINF:0,65 - Bold
#EXTMYTHTV:xmltvid=I65.28460896.microsoft.com
udp://239.255.0.45:9403
#EXTINF:0,66 - BBC World
#EXTMYTHTV:xmltvid=I66.28459255.microsoft.com
udp://239.255.0.46:9403
#EXTINF:0,67 - iChannel
#EXTMYTHTV:xmltvid=I67.28455761.microsoft.com
udp://239.255.0.85:9408
#EXTINF:0,68 - MSNBC
#EXTMYTHTV:xmltvid=I68.28458060.microsoft.com
udp://239.255.0.48:9403
#EXTINF:0,70 - A&E
#EXTMYTHTV:xmltvid=I70.28456698.microsoft.com
udp://239.255.0.50:9404
#EXTINF:0,71 - TLC
#EXTMYTHTV:xmltvid=I71.28460900.microsoft.com
udp://239.255.0.51:9404
#EXTINF:0,72 - Space
#EXTMYTHTV:xmltvid=I72.28459903.microsoft.com
udp://239.255.0.52:9404
#EXTINF:0,73 - Bravo
#EXTMYTHTV:xmltvid=I73.28460645.microsoft.com
udp://239.255.0.53:9404
#EXTINF:0,74 - Comedy
#EXTMYTHTV:xmltvid=I74.28456122.microsoft.com
udp://239.255.0.112:9412
#EXTINF:0,75 - Showcase
#EXTMYTHTV:xmltvid=I75.28460947.microsoft.com
udp://239.255.0.55:9404
#EXTINF:0,76 - Star!
#EXTMYTHTV:xmltvid=I76.28461384.microsoft.com
udp://239.255.0.56:9404
#EXTINF:0,80 - Showcase Action
#EXTMYTHTV:xmltvid=I80.28459853.microsoft.com
udp://239.255.0.60:9405
#EXTINF:0,81 - Showcase Diva
#EXTMYTHTV:xmltvid=I81.28455697.microsoft.com
udp://239.255.0.61:9405
#EXTINF:0,82 - Biography
#EXTMYTHTV:xmltvid=I82.28461456.microsoft.com
udp://239.255.0.62:9405
#EXTINF:0,83 - Scream
#EXTMYTHTV:xmltvid=I83.28460648.microsoft.com
udp://239.255.0.63:9405
#EXTINF:0,84 - MovieTime
#EXTMYTHTV:xmltvid=I84.28459978.microsoft.com
udp://239.255.0.64:9405
#EXTINF:0,85 - Mystery
#EXTMYTHTV:xmltvid=I85.28457276.microsoft.com
udp://239.255.0.65:9405
#EXTINF:0,86 - Documentary
#EXTMYTHTV:xmltvid=I86.28456686.microsoft.com
udp://239.255.0.66:9405
#EXTINF:0,87 - Silver Screen Classics
#EXTMYTHTV:xmltvid=I87.28460098.microsoft.com
udp://239.255.0.67:9405
#EXTINF:0,90 - TeleToon Pacific
#EXTMYTHTV:xmltvid=I90.28458140.microsoft.com
udp://239.255.0.70:9406
#EXTINF:0,91 - Treehouse
#EXTMYTHTV:xmltvid=I91.28459924.microsoft.com
udp://239.255.0.71:9406
#EXTINF:0,92 - Discovery Kids
#EXTMYTHTV:xmltvid=I92.28458654.microsoft.com
udp://239.255.0.72:9406
#EXTINF:0,93 - Animal Planet
#EXTMYTHTV:xmltvid=I93.28456066.microsoft.com
udp://239.255.0.73:9406
#EXTINF:0,94 - BBC Kids
#EXTMYTHTV:xmltvid=I94.28455564.microsoft.com
udp://239.255.0.74:9406
#EXTINF:0,95 - TeleToon Canada
#EXTMYTHTV:xmltvid=I95.28457429.microsoft.com
udp://239.255.0.75:9406
#EXTINF:0,100 - W
#EXTMYTHTV:xmltvid=I100.28457228.microsoft.com
udp://239.255.0.80:9408
#EXTINF:0,101 - Slice
#EXTMYTHTV:xmltvid=I101.28456261.microsoft.com
udp://239.255.0.81:9408
#EXTINF:0,102 - HGTV
#EXTMYTHTV:xmltvid=I102.28458490.microsoft.com
udp://239.255.0.82:9408
#EXTINF:0,103 - Food
#EXTMYTHTV:xmltvid=I103.28460416.microsoft.com
udp://239.255.0.83:9408
#EXTINF:0,104 - Travel
#EXTMYTHTV:xmltvid=I104.28457498.microsoft.com
udp://239.255.0.84:9408
#EXTINF:0,105 - Fine Living
#EXTMYTHTV:xmltvid=I105.38878236.microsoft.com
udp://239.255.0.88:9408
#EXTINF:0,106 - One
#EXTMYTHTV:xmltvid=I106.28456481.microsoft.com
udp://239.255.0.86:9408
#EXTINF:0,107 - Fashion
#EXTMYTHTV:xmltvid=I107.28458091.microsoft.com
udp://239.255.0.87:9408
#EXTINF:0,108 - OutTV
#EXTMYTHTV:xmltvid=I108.28459141.microsoft.com
udp://239.255.0.153:9422
#EXTINF:0,110 - TSN
#EXTMYTHTV:xmltvid=I110.28457190.microsoft.com
udp://239.255.0.90:9410
#EXTINF:0,111 - Score
#EXTMYTHTV:xmltvid=I111.28458181.microsoft.com
udp://239.255.0.91:9410
#EXTINF:0,112 - ESPN Classic
#EXTMYTHTV:xmltvid=I112.28456873.microsoft.com
udp://239.255.0.104:9411
#EXTINF:0,113 - Speed
#EXTMYTHTV:xmltvid=I113.28460753.microsoft.com
udp://239.255.0.93:9410
#EXTINF:0,114 - The Golf Channel
#EXTMYTHTV:xmltvid=I114.28461444.microsoft.com
udp://239.255.0.94:9410
#EXTINF:0,115 - TSN2
#EXTMYTHTV:xmltvid=I115.196875757.microsoft.com
udp://239.255.0.96:9410
#EXTINF:0,116 - RDS
#EXTMYTHTV:xmltvid=I116.28458177.microsoft.com
udp://239.255.0.135:9414
#EXTINF:0,117 - NFL Network
#EXTMYTHTV:xmltvid=I117.28459693.microsoft.com
udp://239.255.0.107:9410
#EXTINF:0,120 - Sportsnet East
#EXTMYTHTV:xmltvid=I120.28458042.microsoft.com
udp://239.255.0.97:9411
#EXTINF:0,121 - Sportsnet Ontario
#EXTMYTHTV:xmltvid=I121.28455739.microsoft.com
udp://239.255.0.98:9411
#EXTINF:0,122 - Sportsnet Pacific
#EXTMYTHTV:xmltvid=I122.28457580.microsoft.com
udp://239.255.0.99:9411
#EXTINF:0,123 - NHL
#EXTMYTHTV:xmltvid=I123.28459221.microsoft.com
udp://239.255.0.100:9411
#EXTINF:0,124 - Raptors
#EXTMYTHTV:xmltvid=I124.28460517.microsoft.com
udp://239.255.0.101:9411
#EXTINF:0,126 - Fox Sports World
#EXTMYTHTV:xmltvid=I126.28455753.microsoft.com
udp://239.255.0.103:9411
#EXTINF:0,128 - OLN
#EXTMYTHTV:xmltvid=I128.28458148.microsoft.com
udp://239.255.0.95:9410
#EXTINF:0,130 - Family
#EXTMYTHTV:xmltvid=I130.28455607.microsoft.com
udp://239.255.0.110:9412
#EXTINF:0,131 - Peachtree TV
#EXTMYTHTV:xmltvid=I131.28456270.microsoft.com
udp://239.255.0.111:9412
#EXTINF:0,132 - TCM
#EXTMYTHTV:xmltvid=I132.44982598.microsoft.com
udp://239.255.0.118:9412
#EXTINF:0,133 - Playhouse Disney
#EXTMYTHTV:xmltvid=I133.183308806.microsoft.com
udp://239.255.0.119:9412
#EXTINF:0,134 - Spike TV
#EXTMYTHTV:xmltvid=I134.28459181.microsoft.com
udp://239.255.0.114:9412
#EXTINF:0,135 - TVTropolis
#EXTMYTHTV:xmltvid=I135.28458952.microsoft.com
udp://239.255.0.115:9412
#EXTINF:0,136 - Deja View
#EXTMYTHTV:xmltvid=I136.28459228.microsoft.com
udp://239.255.0.116:9412
#EXTINF:0,137 - GSN
#EXTMYTHTV:xmltvid=I137.28455658.microsoft.com
udp://239.255.0.117:9412
#EXTINF:0,140 - MTV2 Canada
#EXTMYTHTV:xmltvid=I140.28455706.microsoft.com
udp://239.255.0.120:9413
#EXTINF:0,141 - Tele Latino Network
#EXTMYTHTV:xmltvid=I141.28458322.microsoft.com
udp://239.255.0.106:9411
#EXTINF:0,142 - TV Land
#EXTMYTHTV:xmltvid=I142.28458961.microsoft.com
udp://239.255.0.122:9413
#EXTINF:0,143 - Drive-In Classics
#EXTMYTHTV:xmltvid=I143.28461235.microsoft.com
udp://239.255.0.123:9413
#EXTINF:0,144 - IFC
#EXTMYTHTV:xmltvid=I144.28461104.microsoft.com
udp://239.255.0.124:9413
#EXTINF:0,145 - BBC Canada
#EXTMYTHTV:xmltvid=I145.28459619.microsoft.com
udp://239.255.0.125:9413
#EXTINF:0,147 - Movie OLA
#EXTMYTHTV:xmltvid=I147.28457287.microsoft.com
udp://239.255.0.127:9413
#EXTINF:0,148 - BET
#EXTMYTHTV:xmltvid=I148.28459874.microsoft.com
udp://239.255.0.128:9413
#EXTINF:0,150 - PunchMuch
#EXTMYTHTV:xmltvid=I150.28459152.microsoft.com
udp://239.255.0.170:9432
#EXTINF:0,151 - MuchVibe
#EXTMYTHTV:xmltvid=I151.28461469.microsoft.com
udp://239.255.0.121:9413
#EXTINF:0,152 - MuchLoud
#EXTMYTHTV:xmltvid=I152.28458828.microsoft.com
udp://239.255.0.126:9413
#EXTINF:0,153 - Much More Retro
#EXTMYTHTV:xmltvid=I153.27743382.microsoft.com
udp://239.255.0.171:9432
#EXTINF:0,154 - BPM:TV
#EXTMYTHTV:xmltvid=I154.28460942.microsoft.com
udp://239.255.0.168:9432
#EXTINF:0,160 - Goal TV
#EXTMYTHTV:xmltvid=I160.46989943.microsoft.com
udp://239.255.0.169:9400
#EXTINF:0,161 - WFN
#EXTMYTHTV:xmltvid=I161.45291146.microsoft.com
udp://239.255.0.77:9400
#EXTINF:0,162 - Bite TV
#EXTMYTHTV:xmltvid=I162.41755629.microsoft.com
udp://239.255.0.58:9404
#EXTINF:0,163 - Fight
#EXTMYTHTV:xmltvid=I163.44730460.microsoft.com
udp://239.255.0.79:9434
#EXTINF:0,164 - Wild TV
#EXTMYTHTV:xmltvid=I164.40556875.microsoft.com
udp://239.255.0.155:9428
#EXTINF:0,165 - Men TV
#EXTMYTHTV:xmltvid=I165.28459968.microsoft.com
udp://239.255.0.57:9404
#EXTINF:0,166 - Court TV
#EXTMYTHTV:xmltvid=I166.28458596.microsoft.com
udp://239.255.0.113:9412
#EXTINF:0,200 - Movie Central 1
#EXTMYTHTV:xmltvid=I200.28458562.microsoft.com
udp://239.255.0.145:9418
#EXTINF:0,201 - Movie Central 2
#EXTMYTHTV:xmltvid=I201.28459751.microsoft.com
udp://239.255.0.150:9418
#EXTINF:0,202 - Movie Central 3
#EXTMYTHTV:xmltvid=I202.28459561.microsoft.com
udp://239.255.0.149:9418
#EXTINF:0,203 - HBO Canada
#EXTMYTHTV:xmltvid=I203.199599993.microsoft.com
udp://239.255.0.146:9418
#EXTINF:0,204 - Movie Central Encore 1
#EXTMYTHTV:xmltvid=I204.28461427.microsoft.com
udp://239.255.0.147:9418
#EXTINF:0,205 - Movie Central Encore 2
#EXTMYTHTV:xmltvid=I205.28457586.microsoft.com
udp://239.255.0.148:9418
#EXTINF:0,210 - Super Channel 1
#EXTMYTHTV:xmltvid=I210.183048304.microsoft.com
udp://239.255.0.164:9456
#EXTINF:0,211 - Super Channel 2
#EXTMYTHTV:xmltvid=I211.183048301.microsoft.com
udp://239.255.0.165:9456
#EXTINF:0,212 - Super Channel 3
#EXTMYTHTV:xmltvid=I212.183048300.microsoft.com
udp://239.255.0.166:9456
#EXTINF:0,213 - Super Channel 4
#EXTMYTHTV:xmltvid=I213.183048303.microsoft.com
udp://239.255.0.167:9456
#EXTINF:0,220 - WPIX New York
#EXTMYTHTV:xmltvid=I220.28458748.microsoft.com
udp://239.255.0.140:9416
#EXTINF:0,221 - WGN Chicago
#EXTMYTHTV:xmltvid=I221.28461042.microsoft.com
udp://239.255.0.141:9416
#EXTINF:0,222 - KTLA Los Angeles
#EXTMYTHTV:xmltvid=I222.28460688.microsoft.com
udp://239.255.0.142:9416
#EXTINF:0,223 - WSBK Boston
#EXTMYTHTV:xmltvid=I223.28458619.microsoft.com
udp://239.255.0.143:9416
#EXTINF:0,241 - Sex TV
#EXTMYTHTV:xmltvid=I241.28457777.microsoft.com
udp://239.255.0.151:9420

Notes for MythFillDB and mc2xml

If you are using mc2xml, please note that MythFillDB will try and create the "Missing" channels on import, unless you cull them from mc2xml's output. You can do this with a channels file. As I had the list of XMLTV IDs I have available already to hand (I used OpenOffice Calc to compile the above m3u), I put just the XMLTV IDs in the channels file, which makes mc2xml export only those channels. The initial filldatabase run took 3 hours (! AMD Sempron 1800+, 512MB RAM). I'll be checking my logs on Monday to see how long the next run took.

With that set up, you should be all set. Enjoy watching your Sasktel Max!

How I worked this out

I'm certain others on other IPTV systems are interested in how I got this info, so here's the basics.

You will need

  • a PC
  • a hub
    An external switch may also work, but the built-in switch in the 2wire box will not work, as it does VLAN seperation.
  • a (spare) Set-Top Box
    You cannot have two connections sharing the same MAC, and the boxes have to be registered before the DSLAM will give out IP allocations. Don't try guessing a new MAC.

How to start

  • Get the PC up and running, with as little software running as possible, and with Wireshark capturing packets. The more network activity on your PC, the more pages of packets you'll have to scroll through to find the ones you need.
  • Plug in the STB to the power. Literally, plug in the power cord. After about a second you'll see a lot of traffic in Wireshark's window.
  • Leave Wireshark capturing packets until the STB boots to the menu. It may reboot twice before getting there, be patient.
  • Once the STB is sitting at the menu, you can stop the capture.

Wireshark (should) now have a log of the STB coming up, requesting an initial IP address, downloading it's bootloader over multicast, rebooting and loading the firmware from multicast. You will need to go back through the list of captured packets until you see the most recent DHCP/BOOTP request. Expand it to get all the details of every item sent in the DHCP request. These are the details you will need to add to your DHClient configuration.

Finding the channels

  • Start a new capture in Wireshark
  • Grab the remote and tune the STB to a channel
  • * At this point, you will see the IGMP join request, followed quickly be a whole mass of UDP packets, coming from a private IP source, and headed to a multicast ip. These are the IPTV stream for that channel.
  • Pick a UDP packet (It shouldn't matter which one, they'll all be to and from the same location), and note down it's DESTINATION IP address and DESTINATION port.
  • * It's possible that Wireshark will try and be helpful supply the port's name for you in the packet listing. If you click on a packet, however, it will give you the number in the "User Datagram Protocol" header.
  • * For the first channel, open VLC, and choose "Media -> Open Network". Protocol UDP, address is the destination IP address, and port is the destination port. You should see on your computer screen the same as the feed from your STB. If so, congratulations.
  • Also note down the channel number and name. This will help later when it comes time to map your XMLTV IDs
  • Tune to the next channel, lather, rinse and repeat.

This process may take a while to complete, going through every channel, but by the end you should have a complete channel to IP/Port map.

Building the M3U

So, now you've got your list of IPs, ports, channel numbers and names. You might be wondering how to make them a nice M3U file. Well, here's how I did it.

I knew I would have to do some manipulation of these details, so I originally noted them down in OpenOffice Calc. Once I had them there, it was a fairly simple step to join them into an (almost) M3U style:

XMLTV ID Ch # Ch Name IP Port Code
I3.28458539.microsoft.com 3 CBC 239.255.0.3 9400 =CONCATENATE("#EXTINF:0,";B1;" - ";C1;"~#EXTMYTHTV:xmltvid=";A1;"~udp://";D1;":";E1)

The last cell there is the one that does most of the magic. For this example, it comes out to

#EXTINF:0,3 - CBC~#EXTMYTHTV:xmltvid=I3.28458539.microsoft.com~udp://239.255.0.3:9400

But it still needs an M3U header, and to be split on those ~'s. So, that column gets fed into notepad (To ensure the values, and not the contents were copies), and has an M3U header prepended to it (#EXTM3U). Then it gets thrown into nano on my linux box, saved, and processed with a little sed:

sed 's/~/\n/g' notquiteanm3ufile.txt >channels.m3u

This gives you a nice, concise M3U file that you can use with Myth to your heart's content.

Conclusion

This isn't a definitive guide. There is no guarantee this will work with your IPTV setup, but (for now) it is working fine for me. If you do manage to get IPTV working with your provider, please feel free to update this page, or make a new one for your provider. Hopefully, working together on this, we can make Myth an IPTV box to be reckoned with!