| Digital TV based on the DVB-CI relevant international standards is consideredto be a major solution to the digital broadcasting system of China. According to theDVB-CI standards, the host and module (CAM, Conditional Access Module) can beproduced by different manufactures, and be connected through PCMCIA interface. Sothe host must have the ability to work with different modules issued by their producer,and the quality of the host's software will affect the promotion and adoption of thehost.Three parts of host software that are directly relevant to the CI are introduced inthis paper, which are the DVB-CI device driver, the DVB-CI protocol and the hostresources.Firstly, a method to develop device driver in embedded system is introduced inthis paper. It is demonstrated in this method that how to use device driver toencapsulate the complex control of the concrete device so as to provide an abstractdevice to the up-layer software. An example based on STB02500 Set-Top BoxIntegrated Controller and Hardhat Linux system is given in this paper to reveal thegeneral controlling procedure of the CAM. This can be a reference when developingDVB-CI device driver on other platforms.Secondly, the design of the DVB-CI protocol is introduced. In the protocoldesign, function disassemble can reduce the complexity of the protocol and improveits stability. This protocol adopts layer structure and message driven mechanism. Eachprotocol layer includes a task that retrieves message from the message queue,disposes it according to the state of the protocol layer object and changes the state ofthe protocol layer object if necessary. Zero copy technique is used to improve theperformance, timer is adopted to reduce the system resource consumption, portinginterface is admitted to increase the portability, and several macro definitions areincluded to config the DVB-CI protocol.Last, the design of the host resource is desmontrated in this paper. Host resource,which stands for a specified function unit, interacts with the application in the CAMthrough DVB-CI protocol. There are several host resources in the host, each of whichincludes two interfaces. One interface is required by the DVB-CI protocol, the otherinterface is defined according to the host resource's functionality, through which thehost resource can interact with the host's supporting program. Based on this design,the host resource can be managed efficiently in the host resource list and can beextended easily.The host that adopts the DVB-CI device driver, the DVB-CI protocol and thehost resources works well with several modules issued by different manufactures. Thedesign requirements are fulfilled, and the DVB-CI protocol has been ported to otherplatform successfully. |