| Universal Plug and Play(UPnP) is a set of networking protocols, which using Simple Service Discovery Protocol(SSDP) to control joining and leaving of the devices, and using Hypertext Transfer Protocol(HTTP) to maintain the application layer communication, using Extensible Markup Language(XML) and Simple Object Access Protocol(SOAP) accomplishing the description of cross-platform serve content and control message, and based on those protocols it builds a set of network services arming at implementing data sharing, communication and interconnect-entertainment among devices. The personal computer, printer and mobile devices could discovery others’presence seamlessly and implements interconnection and inter-control.The software using C++as developing language, and supported by Linux operation system and Intel Atom processor. Analyzing composition of UPnP protocol and specific device demand, a method that implements UPnP device point and server point software in the intelligent STB be proposed. Making use of object-oriented design, the protocol parsing process and device information handle encapsulated into base class, and the different points take charge of instantiating child class, so that the data and code redundancy will be reduced.The server point and device point send SSDP notify data packet or receive SSDP search data packet to join into network, and build service content respectively. According to HTTP request, the server point implements function of browsing and reading local files and directories using Linux system call, and providing the control point browsing and transmitting readable content. The device point implements the function of receiving control information from control point and parsing the XML-serialized form data, then delivers the data to terminal playing software. |