Inside Set Top Box
Tuesday, January 5, 2010 12:05Update: This article has been published in India’s leading Electronics magazine “Electronics For You (EFY)” january’2010 edition.
With the advent of Digital Television, Set Top Box (STB) has become the buzzword. The transmission of television signals has gone digital whereas most of the TV’s at home are still analog. So, an STB converts the digital signal to analog signal so as to enable a viewer to watch content on television. An STB is not merely a digital to analog signal convertor, but, it provides a host of services to enhance television viewing experience. For example, it provides an Electronic Program Guide to keep track all the content or a viewer can record/rewind/pause a program as per his needs.
In this article, Let us dive deep into the Set Top Box Hardware architecture.
Figure 1: various hardware components inside an STB
The STB consists, mainly of, following components.
- Antenna: The antenna is not essentially a part of a Set Top Box as it resides outside an STB, generally, outside the house of the television viewer. The antenna contains Low Noise Blocks (LNB) which receives the signal from the satellite with a frequency of approximately 12 GHz and performs a down conversion to a frequency range of 950 – 1450 Mhz. Then, the signal is passed on to the ‘Front End’ inside the set top box.
- Power Supply: Similar to every other device, even an STB needs a power supply to run itself. The power supply provides the voltage to run various peripherals inside an STB. In some cases, this power supply can be used to give power to mechanized antennas to align themselves in various directions to receive different signals.
- Front Panel: A front panel is a small micro controller based hardware peripheral inside the Set Top box which takes of the user input and interacts directly with the main CPU control (processor). It contains an IR receiver to listen to Remote Control input. Also, it is directly linked to some input buttons or keys visible on the outside frame of an STB.
- Front End: It is also known as NIM (Network Interface Module). Front End is the peripheral device which interacts with the antenna to receive the down converted signal and give it to “digital decoder” in the form of a Transport Stream. Basically, Front End contains two major components, namely, a Tuner and a Demodulator. The Tuner listens to the signal from the antenna and passes it on to demodulator for getting the Transport stream. Among the different types of NIMs are Satellite QPSK, Cable QAM, Terrestrial COFDM and 8-VSB, and telco ADSL.
- Digital Decoder: A Digital decoder receives the Transport Stream given by the demodulator inside the Front End and then, demultiplexes & decompresses the requested video by the user. It then, converts the digital stream to analog signal to be given to RF port. The task of the demultiplxer or a demux is to separate all the data streams packaged together by the HeadEnd in the specified format. The data contains audio, video and DVB (Digital Video Broadcasting) specified data like SI/PSI tables. After the demuxing, decompression is done by the specified decoder in specified formats like MPEG-2 or MPEG-4. The specific data or information is given to CPU for processing for advanced features and memory storage and to be used in graphics.
- CPU (Processor): Just as in a regular PC, The processor inside the CPU takes care of interactions of all the hardware peripherals and software modules inside a Set Top Box. The processor takes care of managing the RTOS (Real Time Operating System). The processor also takes of the memory devices and other forms of digital Storage like hard disks or flash drives.
- Digital Storage: Digital Storage is another optional component inside a Set Top Box. It is needed for persistent storage for any kind of data including audio/video. It communicates with the processor and is controlled by the STB software modules and storage drivers. Genreally, it is a hard disk which acts as a digital storage media inside an STB.
- CA Module: The CA (Conditional Access) module can be called as the most important component of a Set Top Box. This module virtually forms the lifeline of all the leading Set Top Box solution providers. This peripheral called ICAM(Integrated Conditional Access Module) is placed before the Demultiplexer and is used for descrambling the encrypted signal and also, provides a smart card interface for various security features.
- Return Path: This is an optional component in an STB. A return path is used by an STB to communicate back with the HeadEnd and send data packets. The return path can be present in various forms like a PSTN line connection, a cable modem in case of Cable STBs or an Ethernet jack in IP Set Top box using ADSL broadband modems. For Example: A return path becomes a necessary component if a user needs to purchase PPV (Pay per view) events directly from the set top box using credit cards.
- Other Peripherals: There are other various optional peripherals present inside a Set Top Box. For example: an RS-232 port, a USB port, Wi-Fi enablers, Bluetooth devices. These peripherals are used inside a Set Top box for enhanced interactivity with the consumer and provide better user experience. Basically, These components or peripherals can be used for creating advanced features like File sharing and plugging in external devices.
Figure 2: An Example of a Set Top Box Hardware
As you must have understood the roles and responsibilities of various hardware modules inside an STB, Let’s move on to the next level, where we’ll go through the flow of data between these various hardware devices resulting in tuning to a particular channel.
Figure 3: Flow control between various STB hardware components
Basically, the tuner receives the modulated digital transmission from the antenna and passes it on to the demodulator. This demodulator takes into account the type of demodulation (For example: QPSK ) and FEC (Forward Error Correction), in turn, giving out a Transport Stream. A Transport Stream is a digital stream of bytes known as data packets. According to DVB standards, a Transport Stream is of the size of 188 bytes. This Transport Stream goes to the demux to separate out the content in the form of Audio / Video PES (Packetized Elementary Stream) and Data Packets known as Sections as per DVB standards. PES. PES is a mechanism to carry A/V elementary streams in packet format inside an MPEG-2 transport stream. Sections are the data packets containing information regarding the A/V content and other metadata. Once the Demux does its job, A/V is given to MPEG-2/MPEG-4 decoder which gives the output to the RF port to display the video on television. The data packets are given to the processor used by the STB software to enable the viewing experience. This data can be persistent or kept in RAM as per needs and performance reasons. Any kind of user request, be it tuning or a purchase goes through CPU. In between, the most important functionality of descrambling is performed by a descrambler embedded inside the ICAM part of the chipset. In some variants of an STB, a descrambler can be a part of a decoder or it can exist independently. The descrambler takes care of decrypting the encrypted Transport Stream using the Control Word technique. Generally, these descramblers and Control Word algorithms are closely guarded secrets with CA solution providers to prevent the hackers from decrypting the signal. These are developed in conjunction with chipset vendors in a very secured environment.
Moving on further, let’s discuss some of the memory types used inside a Set Top Box. Set Top Box contains various memory types for different role plays.
- DRAM (Dynamic Random Access Memory) is used to store all the software needs and volatile working area like static variables.
- Video DRAM is used in an STB for storing the decoded video image that is being output to television or video recorder.
- NVRAM (Non Volatile Random Access Memory) is needed for persistent memory needs for the Set Top Box. Generally, STB configurations are written into NVRAM to keep the settings persistent during power cycles and provide consistent user experience. There are two types of NVRAMs used inside a Set Top Box, namely, EEPROM (Electrically Erasable Progammable Read Only Memory) and FLASH. EEPROM is phasing out slowly as it is very expensive to perform frequent read and writes where as FLASH uses batch mode for read & write enhancing the life of NVRAM. Also, Flash can be used for storing parts of code segment for software performance reasons.
- ROM / OTP (Read only Memory / One Time Programmable): As the name suggests, this is the memory which is written on to once in a lifetime of Set Top Box. Basically, it contains some crucial software pieces like Boot Loader and other security related code. The boot loader enables the Set Top Box to check the integrity of the software and let the STB work only if it contains authentic software. This is one of the key memory areas which protect the STB from hackers to write illegal software into the box.
As mentioned earlier, the most important part in a Set Top Box design is ICAM or conditional access module. Basically, this module is responsible for viewer’s access to content available on air. It maintains all the transactions and performs validations to check the entitlement of the viewer to selected programme. ICAM module consists of ECM (Entitlement Control Message)& EMM(Entitlement management message) acquisition and management, descrambler and smart card interface. ECM & EMM’s are the way of communication used by broadcaster to an STB. Smart card Interface provides access to secured information like passwords, Parental Lock information, Purchase Information and all other kinds of transactional details. The most important part is the descrambler which uses the secure ‘Control Word (CW)’ to descramble the video. CW is the key to enable the video to be decoded. The input Transport Stream is given to Descrambler as an input which has a specific parity. Depending on this parity, a respective Control Word is generated and used to descramble the video. The descrambling is done in hardware due to performance and security reasons. Doing it in hardware does not expose the CW beyond the silicon and it does it much faster without even stopping the input Transport Stream.
In a nutshell, Set Top Box hardware architecture is very similar to architectures of any recorders and replay devices like DVD players. But the significance lies in its security model and the enhanced interactivity of the viewer enabling him to perform various actions during live video and also, pay only for the content he/she watches.
Quote of the Day:"Too bad drinking scotch isn't a paying job or Kenny's dad would be a millionare!" -- Cartman












Darryl Coleman says:
January 5th, 2010 at 12:30 pm
Thanks for posting the article, was certainly a great read!
How can I check whether my LCD monitor is digital or analog signal? | hdtvazon.com says:
January 10th, 2010 at 3:41 pm
[...] Inside Set Top Box [...]
Bill Smitson says:
January 12th, 2010 at 5:11 am
I must say this is a great article i enjoyed reading it keep the good work
hetal says:
February 8th, 2010 at 1:26 am
can u please give me some advice to use usb port in airtel digital tv’s stb. Please can u tell me that what it is for? And how can i use it.
Thank you.
Satyen says:
April 2nd, 2010 at 7:10 am
My understanding is that the encryption key is stored in Smart Card and h/w is quite generic. If so, isn’t it possible to have my own STB in which I can use service provider’s Smart Card? Primary reason to think of this is that many service providers do not provide DVR functionality so trying to find my way out
Anurag says:
April 18th, 2010 at 6:46 am
nice article….. but it worked for c-band only. have u tried it on ku-band on which most commercial favourite signals are coded. n how about interfacing a remote control in it.
tell me 1 more thing, if it goes personal mail me ….how much u earn from tthis weblog without ads on it ?
Amit Goel says:
April 19th, 2010 at 8:47 am
@hetal - USB ports are provided for future use. I don;t think they are still usable. they exist for connectivity to external devices like HDD, flash drives etc.
@Satyen - smart card logic is properietary. there is a whole Conditional access module build in the STB. Also, STB hardware is generic but software works on type of hardware. it is not like PC where anything can be installed or un-installed. by the way, both Tata Sky and Airtel are providing DVR services and more more will follow this year…
@Anurag - that was definitely personal, so, no comments
Nikunj says:
May 14th, 2010 at 12:48 am
The dth oprator download the softwere by antenna and fix it in set top box whenever they wont …..
now if i dont want to download the new softwere what shold i do?
Kellye Davisson says:
May 16th, 2010 at 8:47 am
Hi,just found your Blog when i google something and wonder what web hosting do you use for your blog,the speed is more faster than my website, i really want to know it.will back to check it out,many thanks!
Hoopz says:
May 17th, 2010 at 2:30 pm
Mmm, don’t quite agree on ‘The CA (Conditional Access) module can be called as the most important component of a Set Top Box’ taking into account it is optional. What about FTA (free-to-air) boxes?
Ashish says:
June 30th, 2010 at 1:03 pm
Can we convert one set of box from one Vendor to another.
Amit Goel says:
June 30th, 2010 at 1:28 pm
@Ashish…
Technically, you can.. but currently, Vendors are not allowing this.
Arup Basak says:
July 5th, 2010 at 10:53 am
My DTH machine has an RS232 port. It supports software upgrade also. In the “Setup System” menu, There is a menu called “System update”, on that there are three options,
1.Transfer type: “IRD TO IRD”
2. Transfer State: “Master” or “Slave”
3. Transfer Mode: “Software” or “Data”
pressing OK shows, “Host machine is ready, press menu key to exit.”
I want to read/write the software in the EEPROM and/or change brand name etc…. Can it be done by “IC prog, universal serial device programmer” ? I generally use the software to reprogram 24c08 TV memory chips. Thanks for your help in advance. Please notify me about your reply via email also.
Arup Basak says:
July 11th, 2010 at 2:36 pm
NO REPLY !!! I have DTH machine(the free one of DD direct+). changing it’s name will not violate any rules, as it is free resource. tell me the way to do it.IF YOU KNOW IT
Amit Goel says:
July 12th, 2010 at 10:47 am
@Arup - First thing, if you ask a question and do not get an answer for some time, still “Be Polite” ..
Now, about your question, if you already have RS 232 port enabled on your box, their is a whole lot of stuff you can do. But your question points towards that you wish to hack the image and change it according to what you need and I don’t help in that as it is not legal. So, you can consider that I don’t know about it. google the net and you’ll find thousand ways to do it.
Zooey Deschanel Katy Perry says:
November 16th, 2010 at 8:06 am
I tried to post a comment earlier, although it hasn’t shown up. I imagine your spam filter may be broken?
Anibal Server says:
December 26th, 2010 at 12:41 am
Hey brah! I really liked that post http://www.testthisblogtoseeifitworks.com/ . Please keep me informed if you submit any more.
Dionna Baque says:
December 30th, 2010 at 10:50 am
Simply curious must you happen to knew a single thing else about the huge blogengine update that is coming up quickly? I’m making an attempt to succeed in out to over site owners to discover out what they know outcome Google hasn’t listed everything new on it for awhile.
Menji Dobp says:
April 20th, 2011 at 6:58 pm
How would an Android STB or Media Player architecture description look like? What are the advisable ARM speed, Flash and RAM sizes, etc? How does Android read CA and DRM?
Cori Doorley says:
July 14th, 2011 at 2:47 pm
I believe this internet site holds some very good info for everyone : D.
Neha says:
August 20th, 2011 at 5:20 pm
thnx …its really helpful
can u help me?
I want to know the processors used in set top box, any companies set top box wud do, just give me the name of processor and if possible some more information about it..
thnx again
S Madhavan says:
June 18th, 2012 at 12:31 pm
I have DishTV(Zee network) STB. Recently I encounter a problem with my STB. Everytime I switch off my STB and make it ON, I need to ‘re-install’ all the channels. Once tuned (everytime) the channels are clear and no issue, until STB is powered OFF.
Does that mean, EEPROM / FLASH malfuntion ?
What do I need get my problem solved ?
Thanks.
S Madhavan
ajit says:
July 1st, 2012 at 9:57 pm
I have a generic satellite receiver. It used to pick up all european satellites in europe and middle east and watch the free to air channels. But in India i am unable to lock on to even insat (though it appears in the list of satellite information which is pre-fed into the receiver).
Also can i buy a Tata Sky or any other DTH operator smart card to insert into the front smart card slots? No one seems to be advertising for sale of these cards alone without the set top box.
Thanks
Ajit
Amit Goel says:
July 1st, 2012 at 10:18 pm
@Ajit
no you cannot buy just the smart cards.. also u cannot view the signal because the signal is scrambled.. i am not sure if these signals are available in clear on insat.. may be u can check on these channels websites for tuning parameters.
Absolutv says:
August 19th, 2012 at 2:59 pm
Hi, th CA module is not placed before the multiexer. Ts needs to be demuxed before the descrambling can take place.
madhavan says:
September 26th, 2012 at 11:27 am
Dear sir,
Nice article. I appreciate. I need a clarification.
I have DIshTV (india) set-top-box (KOAN model). It worked nicely the past five years. Recently (couple of months back) a problem started. Whenever it is powered ON, it asks for re-scanning of all the channels. Once done, it works finely until it’s powered off. Every time it is switched ON (electrical power), it looses previous version of scanned channels and asks for ‘re-scanning / re-installation’ of the channels again.
Could that mean, some memory of battery to be replaced ?