Amino 103/110 DHCP configuration
avr 24th, 2008 by Prune

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 cable, by a network based system. This have two advantages, and only one drawbacks :
- It is netwok based and you are not limited with the number of channel
- You can also watch TV on your desktop or laptop computer, no need to have a TV
- It is nework based, so you need a real good network
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… $$$$
Then we had a buch of Anevia Flamingo/Sunbird to stream TV channels from satellite or internal broadcasts. These appliances are pretty cool, not that expensive, and almost reliable. I’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.
Finaly, we installed VLC player on every desktop, with a SAP server for broadcasting channel lists.
The last part was giving a Set Top Box (STB) to every people using a TV (almost journalists).
The first choice was Amino STB. 
This is once again small and easy to use. At first….
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 “web” interface with a infra-red keyboard.
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.
This is, of course, not the best solution.
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.
You just have to start a dhcp server, plug-in the Amino, get it’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.
Why do we set static IP’s ? Because our multicast network for TV is not connected to the rest of the network and have no server (DHCP) on it.
This solution have 2 main drawbacks :
- the IP is static, we have to increase it every time we setup a new Amino, and remember it
- The channel list is also static
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’s location or state.
We had last week a “stolen” 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’t. We were not looking for the right one. One amino was really stolen….
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.
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.
First, compile ISC DHCPD. This ain’t so hard, but the damn awfull ISC documentation won’t help you much. See my other post on DHCPD failover if you need this.
Change the configuration to add you IPs pool and the special Amino options :
# 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";
}This needs explanations :
Options are just the list of possible option you will use, and theire type
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.
The option AMINO.homepage should define a web page the amino can reach.
For the pool, still in the dhcpd.conf file :
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";
}
}
}The failover line is to use only if you use failover. Everything else is self-explanatory.
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… but that’s another story. I even don’t know if the Amino can handle that
So here we go :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>TV Portal</title>
<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">
</p>
<p>
<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>
</p>
</body>
</html>Once again this is pretty simple :
- Create a json table. id is the id channel, nom is the name of the channel, uri is the URL and logo is the html path for the channel’s logo.
- use a for loop to add a ASTB.SetChannel line for each channel
ASTB.SetChannel(channelID, channelURL), like : ASTB.SetChannel(1,igmp://239.1.1.1:1234) - use another loop to create a pretty page with channel’s logo
And there you go.
Please, comment ![]()
This is great information… thanks. Have you tried getting the Amino box to tune different programs within a multi-program transport stream? I only seem to be able to get it to grab the first program.
Thanks!
I’m sorry I did not try this configuration. Anevia’s don’t know how to do this and I don’t have a VLC host to try this.
How do you achieve this ?
Multi-program transport streams are often generated by satellite receivers and MPEG grooming devices. However, I got word from Amino that they don’t officially support this. :o(
I did find documentation that claims you can manually force the audio and video PID to be used, and have successfully tuned a different program video with this method, but have been unable to get any audio.
Example: igmp://239.0.1.1:1001;videopid=123;pcrpid=123;audiopid=124;ac3=yes
This gives video but no audio. Maybe that will be helpful to someone else in the future.
Thanks anyways! :o)
Hello,
I have to update my Amino.
Its current version is Nov 30 1999!!!
Can you send me newest firmware.
I would be very grateful.
I dont even have a vi (editor) function, so it is imposible to configure via telnet.
Best regards
Blaz
Hello, I have an Aminet125, but i search since 6 month to upgrade my STB;
I Have the 0.12.4_fresco and 0.12.4_opera firmware, but create the STBremoteconf it’s very difficult for me.
Have you crate it ? Can you help Me ??
Tantal, I don’t have any firmware to give.
Damien, I’ll try to have a look at the STBremoteconf and see if I can provide one.
Ok
Thanks, if you want, I have the documentation of the STBremoteConf, and the last firmware (fresco and opera).
It’s possible to upgrade aminet by an over solution???
I’m guessing that the Aminet boots up Linux and then starts up an executable which is some form of browser (, Opera, Espial, etc.). I’m guessing that the browser is fired up in a similar way that any application can be fired up under Linux, so is it possible to have any application (that can render to the screen) start instead of the browser? Is it straightforward when putting a new image onto an Aminet?
Thanks for any feedback in advance.
Yes, you are right.
The browser is called “fresco”. You can flash with others, like opera.
You can also changed the “starting image”, displayed while it boots.
Then, i don’t know where to change the browser, but it shouldn’t be hard to find.
Finaly, you will find a way to compile applications compatible with the amino architecture. I never tried this.