Plug and Play Plug and Play (PnP) means that you can connect a device or insert a card into your computer and it is automatically recognized and configured to work in your system
Universal Plug and Play (UPnP) Universal Plug and Play (UPnP) extends this simplicity to include the entire network, enabling discovery and control of devices, including networked devices and services, such as network-attached printers, Internet gateways.
1. Universal Plug and Play (UPnP) is a set of networking protocols that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices to seamlessly discover each other's presence on the network and establish functional network services for data sharing, communications, and entertainment. With UPnP A device can dynamical y join a network, obtain an IP address. Convey its capabilities, and learn about the presence and capabilities of other devices. All automatical y; truly enabling zero configuration networks.
Who Defines UPnP?
The Universal Plug and Play Forum defines UPnP Device and Service Descriptions (original y cal ed Device Control Protocols or DCPs) The Universal Plug and Play Forum is a group of companies and individuals across the industry that intend to play a leading role in the authoring of specifications for UPnP devices and services.
Components of a UPnP Network
Devices, Services and Control Points The basic building blocks of a UPnP network are devices, services and control points
Devices A UPnP device is a container of services and nested devices. Different categories of UPnP devices wil be associated with different sets of services and embedded devices Consequently, different working groups wil standardize on the set of services that a particular device type wil provide Al of this information is captured in an XML device description document that the device must host
Services The smal est unit of control in a UPnP network is a service. A service exposes actions and models its state with state variables. Similar to the device description, this information is part of an XML service description standardized by the UPnP forum. A service in a UPnP device consists of a state table, a control server and an event server. o The state table models the state of the service through state variables and updates them when the state changes o The control server receives action requests (such as set_time), executes them, updates the state table and returns responses. o The event server publishes events to interested subscribers anytime the state of the service changes.
Control Points A control point in a UPnP network is a controller capable of discovering and controlling other devices. After discovery, a control point could: Retrieve the device description and get a list of associated services. Retrieve service descriptions for interesting services. Invoke actions to control the service. Subscribe to the service’s event source. Anytime the state of the service changes, the event server wil send an event to the control point.
Protocols Used by UPnP
UPnP leverages many existing, standard protocols. Using these standardized protocols aids in ensuring interoperability between vendor implementations The protocols used to implement UPnP are found in use on the Internet and on local area networks everywhere. This prevalence ensures that there is a large pool of people knowledgeable in implementing and deploying solutions based on these protocols.
TCP/IP The TCP/IP networking protocol stack serves as the base on which the rest of the UPnP protocols are built. UPnP devices can use many of the protocols in the TCP/IP stack including TCP, UDP, IGMP, ARP and IP as wel as TCP/IP services such as DHCP and DNS. Since TCP/IP is one of the most ubiquitous networking protocols, locating or creating an implementation for a UPnP device that is tuned for footprint and/or performance is relatively easy.
HTTP, HTTPU, HTTPMU HTTP, which is hugely responsible for the success of the Internet, is also a core part of UPnP. Al aspects of UPnP build on top of HTTP or its variants. HTTPU (and HTTPMU) are variants of HTTP defined to deliver messages on top of UDP/IP instead of TCP/IP. GENA Generic Event Notification Architecture (GENA) was defined to provide the ability to send and receive notifications using HTTP over TCP/IP and multicast UDP.
SSDP Simple Service Discovery Protocol (SSDP), as the name implies, defines how network services can be discovered on the network. SSDP is built on HTTPU and HTTPMU and defines methods both for a control point to locate resources of interest on the network, and for devices to announce their availability on the network. By defining the use of both search requests and presence announcements, SSDP eliminates the overhead that would be necessary if only one of these mechanisms is used As a result, every control point on the network has complete information on network state while keeping network traffic low. A UPnP control point, upon booting up, can send an SSDP search request (over HTTPMU), to discover devices and services that are available on the network.
SOAP Simple Object Access Protocol (SOAP) defines the use of Extensible Markup Language (XML) and HTTP to execute remote procedure cal s. It is becoming the standard for RPC based communication over the Internet. By making use of the Internet’s existing infrastructure, it can work effectively with firewal s and proxies. Each UPnP control request is a SOAP message that contains the action to invoke along with a set of parameters.
Steps Involved in UPnP Networking
Addressing The foundation for UPnP networking is the TCP/IP protocol suite and the key to this suite is addressing. Each device must have a Dynamic Host Configuration Protocol (DHCP) client and search for a DHCP server when the device is first connected to the network. If a DHCP server is available, the device must use the IP address assigned to it. A device may implement higher layer protocols outside of UPnP that use friendly names for devices In these cases, it becomes necessary to resolve friendly host (device) names to IP address Domain Name Services (DNS) are usual y used for this.
Discovery Once devices are attached to the network and addressed appropriately, discovery can take place. When a device is added to the network, SSDP al ows that device to advertise its services to control points on the network. When a control point is added to the network, SSDP al ows that control point to search for devices of interest on the network. The fundamental exchange in both cases is a discovery message containing a few, essential specifics about the device or one of its services, for example its type, identifier, and a pointer to its XML device description document.
Description After a control point has discovered a device, the control point stil knows very little about the device. For the control point to learn more about the device and its capabilities, or to interact with the device, the control point must retrieve the device's description from the URL provided by the device in the discovery message. The UPnP description for a device is expressed in XML and includes vendor- specific, manufacturer information including the model name and number, serial number, manufacturer name, URLs to vendor-specific Web sites,
Control To control a device, a control point sends an action request to a device's service. To do this, a control point sends a suitable control message to the control URL for the service (provided in the device description). Control messages are also expressed in XML using SOAP. In response to the control message, the service returns action specific values or fault codes
Eventing A UPnP description for a service includes a list of actions the service responds to and a list of variables that model the state of the service at run time. The service publishes updates when these variables change, and a control point may subscribe to receive this information. Event messages contain the names of one of more state variables and the current value of those variables. These messages are also expressed in XML and formatted using GENA.
Presentation If a device has a URL for presentation, then the control point can retrieve a page from this URL, load the page into a browser, and depending on the capabilities of the page, al ow a user to control the device and/or view device status.
The scope of UPnP is large enough to encompass many existing, as wel as new and exciting scenarios including home automation, printing and imaging, audio/video entertainment, kitchen appliances, automobile networks, and proximity networks in public venues.
Universal Plug and Play (UPnP) is a set of networking protocols that permits networked devices Universal Plug and Play is an open initiative to take existing standards, existing technologies and existing knowledge, re-purpose it, and deliver on the promise and opportunity of the networked world. Standards-based, simple enough for the smal est appliances to implement, powerful enough to scale to the global Internet, and based on the proven approach of Internet protocols. Universal Plug and Play is an incremental approach, but an approach that has been proven to work.