<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Prune&#039;s Blog &#187; IPTV</title>
	<atom:link href="http://www.lecentre.net/blog/archives/category/web/iptv/feed" rel="self" type="application/rss+xml" />
	<link>http://www.lecentre.net/blog</link>
	<description>Internet, UNIX, Video, Leisure...</description>
	<lastBuildDate>Thu, 19 Jan 2012 20:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Amino Aminet A125 serial cable schematis</title>
		<link>http://www.lecentre.net/blog/archives/1305</link>
		<comments>http://www.lecentre.net/blog/archives/1305#comments</comments>
		<pubDate>Fri, 26 Aug 2011 19:02:19 +0000</pubDate>
		<dc:creator>Prune</dc:creator>
				<category><![CDATA[IPTV]]></category>

		<guid isPermaLink="false">http://www.lecentre.net/blog/?p=1305</guid>
		<description><![CDATA[Thanks to Sudhir this is the schematics and the file to create the PCB. As he explain, the A125 (maybe others) are in 3.3v levels, which is not TTL compatible (and is also different from a RS-232 serial cable !!! don&#8217;t use a serial cable directly on it as it have a +_15v signal amplitude [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to Sudhir this is the schematics and the file to create the PCB.</p>
<p>As he explain, the A125 (maybe others) are in 3.3v levels, which is not TTL compatible (and is also different from a RS-232 serial cable !!! don&#8217;t use a serial cable directly on it as it have a +_15v signal amplitude which may destroy your Amino. Actualy I did this without destroying it&#8230; but still&#8230;.).</p>
<p>Again, use this at your own risk&#8230; we are not responsible.</p>
<p><a href="http://www.lecentre.net/blog/wp-content/uploads/2011/08/RS232LC3P-Ver1-schematic.png"><img class="aligncenter size-full wp-image-1306" title="RS232LC3P-Ver1-schematic" src="http://www.lecentre.net/blog/wp-content/uploads/2011/08/RS232LC3P-Ver1-schematic.png" alt="" width="1202" height="716" /></a></p>
<p><a href="http://www.lecentre.net/blog/wp-content/uploads/2011/08/RS232LC3P-Ver1.cmp_.png"><img class="aligncenter size-full wp-image-1307" title="RS232LC3P-Ver1.cmp" src="http://www.lecentre.net/blog/wp-content/uploads/2011/08/RS232LC3P-Ver1.cmp_.png" alt="" width="271" height="195" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lecentre.net/blog/archives/1305/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flashing an Amino Set Top Box</title>
		<link>http://www.lecentre.net/blog/archives/694</link>
		<comments>http://www.lecentre.net/blog/archives/694#comments</comments>
		<pubDate>Tue, 24 Feb 2009 21:18:39 +0000</pubDate>
		<dc:creator>Prune</dc:creator>
				<category><![CDATA[IPTV]]></category>
		<category><![CDATA[Non classé]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://www.lecentre.net/blog/?p=694</guid>
		<description><![CDATA[Amino company and resellers are really quiet about all the possibilities of the product. I made a post some time ago about configuring the Amino to boot with DHCP and get the config through this or through DHCP. This post was really popular and people began to ask me for firmware and informations on how [...]]]></description>
			<content:encoded><![CDATA[<p>Amino company and resellers are really quiet about all the possibilities of the product.<br />
I made a post some time ago about configuring the Amino to boot with DHCP and get the config through this or through DHCP.<br />
This post was really popular and people began to ask me for firmware and informations on how to upgrade. Of course, I can&#8217;t provide anything like firmware. My reseller here is France is OK to sell it for 10€ for 4 Amino stb&#8230; Or you can find it somewhere on Internet. Please, don&#8217;t ask for it, I don&#8217;t have the latest nor the Opera firmware.</p>
<p><span id="more-694"></span>My last reseller sent me the 110 firmware while I had some dead STB. This is what I will use for this tutoriel.</p>
<p>So, the firmware comes as a tar file. Mine is <em>A110-0.15.1-fresco-ami_wm-euro-subs.tar</em> .</p>
<p>First, you need to create some directories. Please, note I&#8217;m actualy doing this on a PC running Ubuntu 7.10. The ~ stands for your home directory. It can be anything else you want, just change the paths accordinately. Of course, you don&#8217;t need to install things in /usr/local AT ALL, which is a really bad way to do things anyway.</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span>  ~</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">mkdir</span> amino</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> amino</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">mkdir</span> keys releases releases<span class="sy0">/</span>A110 images</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> releases<span class="sy0">/</span>A110</div>
</li>
</ol>
</div>
</div>
<p>Now you can untar your image. Mine is just a .tar but yours could be a .tgz or .tar.gz. Then use option zxvf instead of xvf :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">tar</span> xvf ..<span class="sy0">/</span>..<span class="sy0">/</span>..<span class="sy0">/</span>A110-0.15.1-fresco-ami_wm-euro-subs.tar</div>
</li>
</ol>
</div>
</div>
<p>This will create a directory <em>0.15.1-A110-fresco-ami_wm-subs-1</em>. Go into it :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> 0.15.1-A110-fresco-ami_wm-subs-<span class="nu0">1</span></div>
</li>
</ol>
</div>
</div>
<p>You can now create and sign the two files you need for an upgrade : a bootstrap and an image.</p>
<h1>The bootstrap</h1>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> bootstrap</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">export</span> <span class="re2">CUSTOMER_KEY</span>=<span class="sy0">`</span><span class="kw3">pwd</span><span class="sy0">`/</span>..<span class="sy0">/</span>utils<span class="sy0">/</span>keys<span class="sy0">/</span>amino<span class="sy0">/</span>KEY.private</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">export</span> <span class="re2">PATH</span>=<span class="re1">$PATH</span>:<span class="sy0">`</span><span class="kw3">pwd</span><span class="sy0">`/</span>..<span class="sy0">/</span>utils</div>
</li>
<li class="li1">
<div class="de1">.<span class="sy0">/</span>signbootstrap</div>
</li>
</ol>
</div>
</div>
<p>The password is &laquo;&nbsp;<em>markskey</em>&laquo;&nbsp;. You will get a OK message and a new file : <em>bootstrap.signed</em></p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">Please enter passphrase <span class="kw1">for</span> <span class="sy0">/</span>home<span class="sy0">/</span>prune<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-<span class="nu0">1</span><span class="sy0">/</span>utils<span class="sy0">/</span>keys<span class="sy0">/</span>amino<span class="sy0">/</span>KEY.private: Signed image written to <span class="st_h">&#8216;bootstrap.signed&#8217;</span></div>
</li>
<li class="li1">
<div class="de1">Multicast bootstrap image signed successfully: bootstrap.signed</div>
</li>
</ol>
</div>
</div>
<p>Copy this new file to the image directory :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">cp</span> bootstrap.signed ~<span class="sy0">/</span>amino<span class="sy0">/</span>images</div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> ..</div>
</li>
</ol>
</div>
</div>
<h1>The BONUS</h1>
<p>Before we create the signed image of the real OS, I will show you how you can customize the boot procedure.<br />
In the upgradeimage/imagecomponents directory lies all the files that will be packaged in the OS. Of course you can add few files. Don&#8217;t oversize the image or it won&#8217;t be able to be used.<br />
Inside this directory you will find a splash.gif image file.<br />
<img class="alignleft size-full wp-image-695" title="splash" src="http://www.lecentre.net/blog/wp-content/uploads/2009/02/splash.gif" alt="splash" width="251" height="83" /><br />
You can replace it by any GIF image. Don&#8217;t use an image bigger than the TV resolution, around 720&#215;480. Replace the image but keep the same name ! Also, I think you have a limited number of possible colors, and the first color (?) will also be used for the backgroud around the image (can you confirm that ?)<br />
So, have fun, change files, pre-program you amino by changing the config files&#8230; play around <img src='http://www.lecentre.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>The OS Image</h1>
<p>If you have closed your terminal, re-set the CUSTOMER_KEY and PATH variables as above.<br />
Now create and sign the image. As suggested, if you are making an Opera firmware upgrade, une -z for compressing the image</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1">.<span class="sy0">/</span>signupgradeimage <span class="re5">-z</span> 0</div>
</li>
<li class="li1">
<div class="de1">Amino signupgradeimage Version : 1.42 $</div>
</li>
<li class="li1">
<div class="de1">Using DI of 0</div>
</li>
<li class="li1">
<div class="de1">Please enter passphrase <span class="kw1">for</span> <span class="sy0">/</span>home<span class="sy0">/</span>prune<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-1<span class="sy0">/</span>utils<span class="sy0">/</span>keys<span class="sy0">/</span>amino<span class="sy0">/</span>KEY.private:</div>
</li>
<li class="li1">
<div class="de1">0</div>
</li>
<li class="li1">
<div class="de1">Generating flash contents list</div>
</li>
<li class="li1">
<div class="de1">&#8230;.</div>
</li>
<li class="li1">
<div class="de1">FS created with packetsize of 4096</div>
</li>
<li class="li1">
<div class="de1">Warning: FS created using default values <span class="br0">&#91;</span><span class="re2">serialNumber</span>=1, <span class="re2">dirsPerCycle</span>=128<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">cp</span> mc2.mcfs ~<span class="sy0">/</span>amino<span class="sy0">/</span>images<span class="sy0">/</span></div>
</li>
</ol>
</div>
</div>
<h1>The DHCP Server</h1>
<p>Yes, you will need one&#8230; But you already have my previous post on this : <a title="amino DHCP" href="http://www.lecentre.net/blog/archives/119" target="_blank">http://www.lecentre.net/blog/archives/119<br />
</a>See my config below as I finaly found out that my first config was &laquo;&nbsp;<em>wrong</em>&laquo;&nbsp;</p>
<h1>The Multicast Server</h1>
<p>This server can be anything&#8230; the one provided with the image or anyone, like VLC (yes, the video player&#8230;).<br />
Go in the server directory and edit the</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> ~<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-1<span class="sy0">/</span>server</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">vi</span> mcastbootd.conf</div>
</li>
</ol>
</div>
</div>
<p>Match the <em>&lt;mcast address&gt;</em> and <em>&lt;port number&gt;</em> with the ones from the DHCPD config file :<br />
Here is my file :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span>Server<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re2">LogLevel</span>=4</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">MulticastTTL</span>=1</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span>Image bootstrap.signed<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re2">MulticastIPAddress</span>=239.255.230.52</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">MulticastUDPPort</span>=11111</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">FileName</span>=bootstrap.signed</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">Description</span>=Linux bootstrap image</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">ImageType</span>=1</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">SerialNumber</span>=1</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">PacketSize</span>=1456</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">CycleTime</span>=0</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#91;</span>Filesystem mc2<span class="br0">&#93;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re2">MulticastIPAddress</span>=239.255.230.53</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">MulticastUDPPort</span>=11111</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">ImageName</span>=mc2</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">Description</span>=upgrade filesystem</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">SerialNumber</span>=2</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">DirsPerCycle</span>=128</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">DataRate</span>=256</div>
</li>
<li class="li1">
<div class="de1"><span class="re2">CycleTime</span>=<span class="nu0">0</span></div>
</li>
</ol>
</div>
</div>
<h1>Start the upgrade</h1>
<p>Now you are ready to start. Go in the image directory and start the multicast software :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">cd</span> ~<span class="sy0">/</span>amino<span class="sy0">/</span>images</div>
</li>
<li class="li1">
<div class="de1">~<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-1<span class="sy0">/</span>server<span class="sy0">/</span>mcastbootd -D  <span class="re5">-C</span> ~<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-<span class="nu0">1</span><span class="sy0">/</span>server<span class="sy0">/</span>mcastbootd.conf</div>
</li>
<li class="li1">
<div class="de1"><span class="nu0">16</span>:04:<span class="nu0">12.788281</span> <span class="sy0">/</span>home<span class="sy0">/</span>prune<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-<span class="nu0">1</span><span class="sy0">/</span>server<span class="sy0">/</span>mcastbootd: Multicast boot<span class="sy0">/</span>FS server daemon version 0.01.00</div>
</li>
<li class="li1">
<div class="de1"><span class="nu0">16</span>:04:<span class="nu0">12.788591</span> <span class="sy0">/</span>home<span class="sy0">/</span>prune<span class="sy0">/</span>amino<span class="sy0">/</span>releases<span class="sy0">/</span>A110<span class="sy0">/</span>0.15.1-A110-fresco-ami_wm-subs-<span class="nu0">1</span><span class="sy0">/</span>server<span class="sy0">/</span>mcastbootd version 0.01.00 started</div>
</li>
<li class="li1">
<div class="de1"><span class="nu0">16</span>:04:<span class="nu0">12.792805</span> 239.255.230.52:<span class="nu0">11111</span> transmission of boot image <span class="st_h">&#8216;bootstrap.signed&#8217;</span> enabled</div>
</li>
<li class="li1">
<div class="de1"><span class="nu0">16</span>:04:<span class="nu0">12.796833</span> 239.255.230.53:<span class="nu0">11111</span> transmission of <span class="st_h">&#8216;mc2&#8242;</span> enabled</div>
</li>
<li class="li1">
<div class="de1"><span class="nu0">16</span>:04:<span class="nu0">12.796895</span> 239.255.230.53:<span class="nu0">11111</span> transmission of filesystem <span class="st_h">&#8216;mc2&#8242;</span> commenced</div>
</li>
<li class="li1">
<div class="de1"><span class="nu0">16</span>:04:<span class="nu0">12.817127</span> 239.255.230.52:<span class="nu0">11111</span> transmission of boot image <span class="st_h">&#8216;bootstrap.signed&#8217;</span> commenced</div>
</li>
<li class="li1">
<div class="de1">&#8230;.</div>
</li>
</ol>
</div>
</div>
<p>You can now plug in your set top box and see the magic&#8230;<br />
Or not&#8230; <img src='http://www.lecentre.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I just found out that the DHCP config file may not be right, depending on your Amni revision. While the original Vendor-Name is &laquo;&nbsp;aminoAMINET110mboot&nbsp;&raquo;, this can change.<br />
The solution I found was to trace the IP (bootP) packets on the lan and see what is going on. I use tcpdump for that.<br />
This is also the point where I will describe my setup :<br />
My host have 2 network card. Eth0 is connected to the local LAN and is using a dhcp client to get an IP. I&#8217;m connecting to it using SSH from my Mac, where I write this blog post at the same time.<br />
The other network card, eth1, is connected to a switch where I plus the set top box. As the multicast packets of the mcastbootd only goes out by the first interface, eth0, I had to use a special command to configure eth1, so the multicast goes on it. Here is the whole config command.<br />
Of course, if you are local on the host and have only one ethernet card, you won&#8217;t have to do this :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">ifconfig</span> eth1 10.20.0.2 netmask 255.255.252.0 up</div>
</li>
<li class="li1">
<div class="de1">route add <span class="re5">-net</span> 224.0.0.0 netmask 240.0.0.0 dev eth1</div>
</li>
</ol>
</div>
</div>
<p>The IP 10.20.0.2 is just part of the DHCP range I set up but outside the pool.<br />
Then, to get the &laquo;&nbsp;vendor name&nbsp;&raquo; used by the set top box to ask for bootp/dhcp, I used tcpdump on eth1, then plugged in the amino and power it. Here is the result :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"> tcpdump <span class="re5">-s</span> 1024 <span class="re5">-x</span> <span class="re5">-i</span> eth1 <span class="re5">-vv</span> host not 239.255.230.52 and host not 239.255.230.53</div>
</li>
<li class="li1">
<div class="de1">tcpdump: listening on eth1, link-type EN10MB <span class="br0">&#40;</span>Ethernet<span class="br0">&#41;</span>, capture <span class="kw2">size</span> 1024 bytes</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">15:44:20.598588 IP <span class="br0">&#40;</span>tos 0&#215;0, ttl  64, <span class="kw2">id</span> 1, offset 0, flags <span class="br0">&#91;</span>none<span class="br0">&#93;</span>, proto: UDP <span class="br0">&#40;</span>17<span class="br0">&#41;</span>, length: 328<span class="br0">&#41;</span> 0.0.0.0.bootpc <span class="sy0">&amp;</span>gt; 255.255.255.255.bootps: <span class="br0">&#91;</span>udp <span class="kw2">sum</span> ok<span class="br0">&#93;</span> BOOTP<span class="sy0">/</span>DHCP, Request from 00:00:00:00:00:00 <span class="br0">&#40;</span>oui Unknown<span class="br0">&#41;</span>, length <span class="nu0">300</span>, xid 0x167eb0e7, Flags <span class="br0">&#91;</span> none <span class="br0">&#93;</span> <span class="br0">&#40;</span>0&#215;0000<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">          Client-Ethernet-Address 00:00:00:00:00:00 <span class="br0">&#40;</span>oui Unknown<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">          Vendor-rfc1048 Extensions</div>
</li>
<li class="li1">
<div class="de1">            Magic Cookie 0&#215;33333333</div>
</li>
<li class="li1">
<div class="de1">            DHCP-Message Option <span class="nu0">53</span>, length <span class="nu0">1</span>: Discover</div>
</li>
<li class="li1">
<div class="de1">            Vendor-Class Option <span class="nu0">60</span>, length <span class="nu0">26</span>: <span class="st0">&quot;insecureAMINET11xmboot1.32&quot;</span></div>
</li>
<li class="li1">
<div class="de1">            Vendor-Option Option <span class="nu0">43</span>, length <span class="nu0">24</span>: 2.2.2.22.22.22.22.22.22.22.120.2.2.222.22.222.222.222.2.2.22.22.22.52</div>
</li>
</ol>
</div>
</div>
<p>What is all this mess ?<br />
In fact, you don&#8217;t care !<br />
The only important part is <strong>Vendor-Class Option 60, length 26: &laquo;&nbsp;insecureAMINET11xmboot1.32&#8243;</strong>. This is what you have to set in your dhcpd.conf so it will find the amino, give it the IP and params so it can find the broadcast server.<br />
So, here is my dhcpd.conf file, right from the Ubuntu dhcpd.conf + amino specials :</p>
<div class="codesnip-container" >
<div class="bash codesnip" style="font-family:monospace;">
<ol>
<li class="li1">
<div class="de1"><span class="co0"># cat /etc/dhcp3/dhcpd.conf  | grep -v \#</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">ddns-update-style none;</div>
</li>
<li class="li1">
<div class="de1">option domain-name <span class="st0">&quot;example.org&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">option domain-name-servers ns1.example.org, ns2.example.org;</div>
</li>
<li class="li1">
<div class="de1">default-lease-time <span class="nu0">600</span>;</div>
</li>
<li class="li1">
<div class="de1">max-lease-time <span class="nu0">7200</span>;</div>
</li>
<li class="li1">
<div class="de1">log-facility local7;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">option space AMINO;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.address &nbsp; &nbsp;code 1 = ip-address;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.port &nbsp; &nbsp; &nbsp; code 2 = integer <span class="nu0">16</span>;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.product &nbsp; &nbsp;code 3 = text;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.option &nbsp; &nbsp; code 4 = text;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.version &nbsp; &nbsp;code 5 = text;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.middleware code 6 = ip-address;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.mw_port &nbsp; &nbsp;code 7 = integer <span class="nu0">16</span>;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.homepage &nbsp; code 8 = text;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.dindex &nbsp; &nbsp; code 9 = integer <span class="nu0">32</span>;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.dindex_min code 10 = integer <span class="nu0">32</span>;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.dindex_page &nbsp; &nbsp; &nbsp; &nbsp;code 11 = text;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">class <span class="st0">&quot;AmiNET110 all&quot;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">match <span class="kw1">if</span> <span class="br0">&#40;</span>option vendor-class-identifier=<span class="st0">&quot;Aminoaminet110fisys&quot;</span><span class="br0">&#41;</span> or</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#40;</span><span class="br0">&#40;</span>substring<span class="br0">&#40;</span> option vendor-encapsulated-options, <span class="nu0">2</span>, <span class="nu0">9</span><span class="br0">&#41;</span>=<span class="st0">&quot;aminet110&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">and <span class="br0">&#40;</span>substring<span class="br0">&#40;</span>option vendor-encapsulated-options, <span class="nu0">13</span>, <span class="nu0">5</span><span class="br0">&#41;</span>=<span class="st0">&quot;fisys&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">vendor-option-space AMINO;</div>
</li>
<li class="li1">
<div class="de1">option AMINO.homepage <span class="st0">&quot;http://tv.portal.com/tv.html&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">class <span class="st0">&quot;AmiNET110 mboot&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; match <span class="kw1">if</span> <span class="br0">&#40;</span>option vendor-class-identifier=<span class="st0">&quot;insecureAMINET11xmboot1.32&quot;</span><span class="br0">&#41;</span> or</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#40;</span><span class="br0">&#40;</span>substring<span class="br0">&#40;</span> option vendor-encapsulated-options, <span class="nu0">2</span>, <span class="nu0">9</span><span class="br0">&#41;</span>=<span class="st0">&quot;AMINET110&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and <span class="br0">&#40;</span>substring<span class="br0">&#40;</span>option vendor-encapsulated-options, <span class="nu0">13</span>, <span class="nu0">5</span><span class="br0">&#41;</span>=<span class="st0">&quot;mboot&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; vendor-option-space AMINO;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; option AMINO.address 239.255.230.52;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; option AMINO.port <span class="nu0">11111</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">class <span class="st0">&quot;AmiNET110 upgrd&quot;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; match <span class="kw1">if</span> <span class="br0">&#40;</span>option vendor-class-identifier=<span class="st0">&quot;insecureAMINET11xupgrd1.32&quot;</span><span class="br0">&#41;</span> or</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#40;</span><span class="br0">&#40;</span>substring<span class="br0">&#40;</span> option vendor-encapsulated-options,<span class="nu0">2</span>,<span class="nu0">9</span><span class="br0">&#41;</span>=<span class="st0">&quot;aminet110&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; and <span class="br0">&#40;</span>substring<span class="br0">&#40;</span> option vendor-encapsulated-options,<span class="nu0">13</span>,<span class="nu0">5</span><span class="br0">&#41;</span>=<span class="st0">&quot;upgrd&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>; </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; vendor-option-space AMINO;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; option AMINO.address 239.255.230.53;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; option AMINO.port <span class="nu0">11111</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span> </div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">shared-network IPTV <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">subnet 10.20.0.0 netmask 255.255.252.0 <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">option subnet-mask 255.255.252.0;</div>
</li>
<li class="li1">
<div class="de1">option domain-name <span class="st0">&quot;mydomain.net&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">option domain-name-servers 10.16.12.10;</div>
</li>
<li class="li1">
<div class="de1">option routers 10.20.3.254;</div>
</li>
<li class="li1">
<div class="de1">option broadcast-address 10.20.3.255;</div>
</li>
<li class="li1">
<div class="de1">option ntp-servers 10.16.12.22;</div>
</li>
<li class="li1">
<div class="de1">pool <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">range 10.20.2.70 10.20.2.250;</div>
</li>
<li class="li1">
<div class="de1">allow members of <span class="st0">&quot;all&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">allow members of <span class="st0">&quot;AmiNET110 upgrd&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">allow members of <span class="st0">&quot;AmiNET110 all&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">allow members of <span class="st0">&quot;AmiNET110 mboot&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
</div>
<p>Now, restart dhcpd server, plug the amino and power it&#8230; and VOILA !!<br />
I hope this is clear enough for you. Please comment if you need more details. Just remember it&#8217;s now 22:00 and I started all this at 19:00, so please don&#8217;t ask too newbie questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lecentre.net/blog/archives/694/feed</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
		<item>
		<title>Amino 103/110 DHCP configuration</title>
		<link>http://www.lecentre.net/blog/archives/119</link>
		<comments>http://www.lecentre.net/blog/archives/119#comments</comments>
		<pubDate>Thu, 24 Apr 2008 08:57:56 +0000</pubDate>
		<dc:creator>Prune</dc:creator>
				<category><![CDATA[IPTV]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://www.lecentre.net/blog/?p=119</guid>
		<description><![CDATA[Know what a Set-Top-Box is ? By this time everybody should know. This little box you plug to your TV so you can see video channels or VoD (Video On Demand) streamed from another computer or from your ISP. We had a project at work about replacing TV in almost every office, connected to coaxial [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-281" title="amino_banner" src="http://www.lecentre.net/blog/wp-content/uploads/2008/04/amino_banner.gif" alt="" width="500" height="52" /></p>
<p>Know what a Set-Top-Box is ? By this time everybody should know. This little box you plug to your TV so you can see video channels or VoD (Video On Demand) streamed from another computer or from your ISP.</p>
<p>We had a project at work about replacing TV in almost every office, connected to coaxial cable, by a network based system. This have two advantages, and only one drawbacks :</p>
<ul>
<li>It is netwok based and you are not limited with the number of channel</li>
<li>You can also watch TV on your desktop or laptop computer, no need to have a TV</li>
<li>It is nework based, so you need a real good network</li>
</ul>
<p><span id="more-119"></span><br />
As you understand, the last point is the bad side of the change. For my company it was a pain as ethernet cables had to be changed&#8230; $$$$</p>
<p>Then we had a buch of Anevia <a title="http://www.anevia.com/dvb-gateway.fr.php" href="http://www.anevia.com/dvb-gateway.fr.php" target="_blank">Flamingo</a>/<a title="http://www.anevia.com/encoding-server.fr.php" href="http://www.anevia.com/encoding-server.fr.php" target="_blank">Sunbird</a> to stream TV channels from satellite or internal broadcasts. These appliances are pretty cool, not that expensive, and almost reliable.  I&#8217;m waiting for the new firmware so we will have access t new features, as SNMP for monitoring. This way we have almost 50 TV channels from all around the world.</p>
<p>Finaly, we installed VLC player on every desktop, with a SAP server for broadcasting channel lists.<br />
The last part was giving a  Set Top Box (STB) to every people using a TV (almost journalists).</p>
<p>The first choice was Amino STB. <a href="http://www.aminocom.com/"><img src="http://www.lecentre.net/blog/wp-content/uploads/2007/10/a103remote2.jpg" alt="Amino 103" /></a></p>
<p>This is once again small and easy to use. At first&#8230;.<br />
Where it comes tricky is when you have to configure  100 of these at the same time. For that you have multiple choices : tftp, multicast tool, telnet or using the &laquo;&nbsp;web&nbsp;&raquo; interface with a infra-red keyboard.</p>
<p>One thing you can do is power up your 100 Amino and use the IR keyboard. Then the IR commands will reach every STB and they all be configured identicaly at the same time.</p>
<p>This is, of course, not the best solution.</p>
<p>Another solution we had since then was using a home made Python script to change the config (mainly the IP config and the channel list) of one Amino at the time.<br />
You just have to start a dhcp server, plug-in the Amino, get it&#8217;s IP from the DHCP lease and start the script with the IP in parameter. The script then connect with telnet (Login : root, Pass : root2root by default) and update the conf files (located in /mnt/nv) to set a static IP and the list of channels.<br />
Why do we set static IP&#8217;s ? Because our multicast network for TV is not connected to the rest of the network and have no server (DHCP) on it.</p>
<p>This solution have 2 main drawbacks :</p>
<ol>
<li>the IP is static, we have to increase it every time we setup a new Amino, and remember it</li>
<li>The channel list is also static</li>
</ol>
<p>This is really a pain if you want to upgrade something once the amino is on production. This solution still have a benefit : knowing the IP enables you to search for it&#8217;s location or state.<br />
We had last week a &laquo;&nbsp;stolen&nbsp;&raquo; Amino. We quickly found that the IP of the amino was still present on the network and been able to get it back. In fact, I think we didn&#8217;t. We were not looking for the right one. One amino was really stolen&#8230;.</p>
<p>While we heard it was possible to configure the Amino with a DHCP server plus a web page, we had no documentation on how to do this. I found few things on Internet, like dhcpd.conf files, but none of them was working.<br />
I finaly got one working fine  with ISC DHCPD server  (v4). And this is the purpose of this article. You will see this is pretty easy when you have the right information.</p>
<p>First, compile ISC DHCPD. This ain&#8217;t so hard, but the damn awfull ISC documentation won&#8217;t help you much. See my other post on DHCPD failover if you need this.</p>
<p>Change the configuration to add you IPs pool and the special Amino options :</p>
<pre lang="shell"># options for amino set-top-box
option space AMINO;
option AMINO.address    code 1 = ip-address;
option AMINO.port       code 2 = integer 16;
option AMINO.product    code 3 = text;
option AMINO.option     code 4 = text;
option AMINO.version    code 5 = text;
option AMINO.middleware code 6 = ip-address;
option AMINO.mw_port    code 7 = integer 16;
option AMINO.homepage   code 8 = text;
option AMINO.dindex     code 9 = integer 32;
option AMINO.dindex_min code 10 = integer 32;
option AMINO.dindex_page        code 11 = text;

# declaration des groupes de set top box amino 110
class "AmiNET110 all" {
# match if (option vendor-class-identifier="insecureAmiNET11xmboot1.32") or
# (option vendor-class-identifier="Aminoaminet110fisys");

match if (option vendor-class-identifier="Aminoaminet110fisys") or
((substring( option vendor-encapsulated-options, 2, 9)="aminet110")
and (substring(option vendor-encapsulated-options, 13, 5)="fisys"));

vendor-option-space AMINO;
option AMINO.homepage "http://172.16.12.41/portal/tv.html";
}</pre>
<p>This needs explanations :</p>
<p>Options are just the list of possible option you will use, and theire type<br />
the Match part is used to tell the DHCP to give the option only if the client is an Amino. Depending on your Amino flash it may not claim himself as Aminoaminet110fisys. Just use a tcpdump like application to trace that. If you have 103, you may change this also. You will find a sample dhcpd conf on the VLC forum.</p>
<p>The option AMINO.homepage should define a web page the amino can reach.</p>
<p>For the pool, still in the dhcpd.conf file :</p>
<pre lang="shell">shared-network IPTV {
subnet 172.20.0.0 netmask 255.255.252.0 {
option subnet-mask 255.255.252.0;
option domain-name "groupertl.net";
option domain-name-servers 172.16.12.10;
option routers 172.20.3.254;
option broadcast-address 172.20.3.255;
option ntp-servers 172.16.12.22;
pool {
failover peer "dhcp-failover";
deny dynamic bootp clients;
range 172.20.2.70 172.20.2.250;
allow members of "AmiNET110 all";
}
}
}</pre>
<p>The failover line is to use only if you use failover. Everything else is self-explanatory.</p>
<p>Then comes the tricky part. The HTTP web page giving the channels list. I finaly chose to use a dynamic generation of the page using a json table. This will change as soon as we have a Django provisionning tool for that, which will generate a static page when needed. Our dev team will also try to add overlay, channel name, programs&#8230; but that&#8217;s another story. I even don&#8217;t know if the Amino can handle that <img src='http://www.lecentre.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So here we go :</p>
<pre lang="html">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>

<aminoattr WITH_CHANNELS="yes" notoolbars noborder/>

<script language="javascript"> 
ASTB.WithChannels(true) ; 
VideoDisplay.SetAspect(2);

ASTB.SetChannel(0,"http://172.16.12.41/portal/tv.html") ; 

var json = { "channels": [
        {id: "1", nom: "TF1", uri: "igmp://239.1.1.1:1234", logo: "images/channels/tf1.gif"},
        {id: "2", nom: "France 2", uri: "igmp://239.1.1.2:1234", logo: "images/channels/fr2.gif"},
        {id: "3", nom: "France 3", uri: "igmp://239.1.1.3:1234", logo: "images/channels/fr3.gif"},
        ]};

for(i=0; i < json.channels.length; i++) {
        ASTB.SetChannel(json.channels[i].id, json.channels[i].uri ) ;
        }

ASTB.SaveChannels(); 

</script> 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
<p align="center">
<img src="images/logo1.gif" title="Logo" width="50px">



<TABLE BORDER="0">
<script>
cnt=0;
for(i=0; i < json.channels.length; i++) {
        if (cnt == 0) {
                document.write("<TR>");
                }
        cnt++;
        document.write("<TD><strong>" + json.channels[i].id + "</strong> - <a href= " + json.channels[i].uri+ " border=0 ><img src=" + json.channels[i].logo + " title=" + json.channels[i].nom + " border=0> - " + json.cha
nnels[i].nom + "</a></TD>"); 

        if (cnt == 3) {
                document.write("</TR>");
                cnt = 0;
                }
        }
</script>

</TABLE>


</body>
</html>
</pre>
<p>Once again this is pretty simple :</p>
<ul>
<li> Create a json table. <strong>id</strong> is the id channel, <strong>nom</strong> is the name of the channel, <strong>uri</strong> is the URL and <strong>logo</strong> is the html path for the channel's logo.</li>
<li>use a for loop to add a ASTB.SetChannel line for each channel<br />
ASTB.SetChannel(channelID, channelURL), like : ASTB.SetChannel(1,igmp://239.1.1.1:1234)</li>
<li>use another loop to create a pretty page with channel's logo</li>
</ul>
<p>And there you go.</p>
<p>Please, comment <img src='http://www.lecentre.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lecentre.net/blog/archives/119/feed</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
	</channel>
</rss>

