Difference between revisions of "UPnP"

From OnnoWiki
Jump to navigation Jump to search
(New page: '''Universal Plug and Play''' ('''UPnP''') is a set of networking protocols for primarily residential networks without enterprise class devices that permits networked [[Peripheral devi...)
 
Line 87: Line 87:
 
* [http://www.last100.com/2008/05/27/dlna-certified/ DLNA certified: how your computer, cellphone, games console, media streamer and other devices can play nicely together]
 
* [http://www.last100.com/2008/05/27/dlna-certified/ DLNA certified: how your computer, cellphone, games console, media streamer and other devices can play nicely together]
 
* [http://www.calsoftlabs.com/whitepapers/upnp-devices.html Universal Plug and Play ]
 
* [http://www.calsoftlabs.com/whitepapers/upnp-devices.html Universal Plug and Play ]
 +
* [http://www.repairpartstock.com/ iphone parts]
  
 
=== News ===
 
=== News ===

Revision as of 13:12, 15 November 2012

Universal Plug and Play (UPnP) is a set of networking protocols for primarily residential networks without enterprise class devices 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. The UPnP technology is promoted by the UPnP Forum.

The concept of UPnP is an extension of plug-and-play, a technology for dynamically attaching devices directly to a computer, although UPnP is not directly related to the earlier plug-and-play technology. UPnP devices are "plug-and-play" in that when connected to a network they automatically establish working configurations with other devices.

Overview

The UPnP architecture allows device-to-device networking of personal computers, networked home appliances, consumer electronics devices and wireless devices. It is a distributed, open architecture protocol based on established standards such as the Internet Protocol Suite (TCP/IP), HTTP, XML, and SOAP. UPnP control points are devices which use UPnP protocols to control UPnP devices.

The UPnP architecture supports zero configuration networking. A UPnP compatible device from any vendor can dynamically join a network, obtain an IP address, announce its name, convey its capabilities upon request, and learn about the presence and capabilities of other devices. Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) servers are optional and are only used if they are available on the network. Devices can disconnect from the network automatically without leaving state information.

UPnP was published as a 73-part International Standard, ISO/IEC 29341, in December, 2008.

Other UPnP features include:

Media and device independence
UPnP technology can run on many media that support IP including Ethernet, FireWire, IR (IrDA), home wiring (G.hn) and RF (Bluetooth, Wi-Fi). No special device driver support is necessary; common network protocols are used instead.
User interface (UI) Control
UPnP architecture enables devices to present a user interface through a web browser (see Presentation below).
Operating system and programming language independence
Any operating system and any programming language can be used to build UPnP products. UPnP does not specify or constrain the design of an API for applications running on control points; OS vendors may create APIs that suit their customer's needs.
Programmatic control
UPnP architecture also enables conventional application programmatic control.
Extensibility
Each UPnP product can have device-specific services layered on top of the basic architecture. In addition to combining services defined by UPnP Forum in various ways, vendors can define their own device and service types, and can extend standard devices and services with vendor-defined actions, state variables, data structure elements, and variable values.

Protocol

Addressing

The foundation for UPnP networking is IP addressing. Each device must implement a DHCP client and search for a DHCP server when the device is first connected to the network. If no DHCP server is available, the device must assign itself an address. The process by which a UPnP device assigns itself an address is known within the UPnP Device Architecture as AutoIP. In UPnP Device Architecture Version 1.0, AutoIP is defined within the specification itself; in UPnP Device Architecture Version 1.1, AutoIP references IETF RFC 3927. If during the DHCP transaction, the device obtains a domain name, for example, through a DNS server or via DNS forwarding, the device should use that name in subsequent network operations; otherwise, the device should use its IP address.

Discovery

Given an IP address, the first step in UPnP networking is discovery. The UPnP discovery protocol is known as the Simple Service Discovery Protocol (SSDP). When a device is added to the network, SSDP allows that device to advertise its services to control points on the network. Similarly, when a control point is added to the network, SSDP allows 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 more detailed information.

Description

After a control point has discovered a device, the control point still 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 like the model name and number, serial number, manufacturer name, URLs to vendor-specific web sites, etc. The description also includes a list of any embedded devices or services, as well as URLs for control, eventing, and presentation. For each service, the description includes a list of the commands, or actions, to which the service responds, and parameters, or arguments, for each action; the description for a service also includes a list of variables; these variables model the state of the service at run time, and are described in terms of their data type, range, and event characteristics.

Control

Having retrieved a description of the device, the control point can send actions 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 the Simple Object Access Protocol (SOAP). Much like function calls, the service returns any action-specific values in response to the control message. The effects of the action, if any, are modeled by changes in the variables that describe the run-time state of the service.

Event notification

An additional capability of UPnP networking is event notification, or eventing. The event notification protocol defined in the UPnP Device Architecture is known as General Event Notification Architecture (GENA). 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. The service publishes updates by sending event messages. Event messages contain the names of one or more state variables and the current value of those variables. These messages are also expressed in XML. A special initial event message is sent when a control point first subscribes; this event message contains the names and values for all evented variables and allows the subscriber to initialize its model of the state of the service. To support scenarios with multiple control points, eventing is designed to keep all control points equally informed about the effects of any action. Therefore, all subscribers are sent all event messages, subscribers receive event messages for all "evented" variables that have changed, and event messages are sent no matter why the state variable changed (either in response to a requested action or because the state the service is modeling changed).

Presentation

The final step in UPnP networking is 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 web browser, and depending on the capabilities of the page, allow a user to control the device and/or view device status. The degree to which each of these can be accomplished depends on the specific capabilities of the presentation page and device.

UPnP AV standards

UPnP AV is an audio and video extension of UPnP. On 12 July 2006 the UPnP Forum announced the release of version 2 of the UPnP Audio and Video specifications, with new MediaServer version 2.0 and MediaRenderer version 2.0 classes. These enhancements are created by adding capabilities to the MediaServer and MediaRenderer device classes that allow a higher level of interoperability between MediaServers and MediaRenderers from different manufacturers. Some of the early devices complying with these standards were marketed by Philips under the Streamium brand name.

The UPnP AV standards have been referenced in specifications published by other organizations including Digital Living Network Alliance Networked Device Interoperability Guidelines, International Electrotechnical Commission IEC 62481-1, and Cable Television Laboratories OpenCable Home Networking Protocol.

UPnP AV components

  • UPnP MediaServer DCP - which is the UPnP-server (a 'master' device) that provides media library information and streams media-data (like audio/video/picture/files) to UPnP-clients on the network.
  • UPnP MediaServer ControlPoint - which is the UPnP-client (a 'slave' device) that can auto-detect UPnP-servers on the network to browse and stream media/data-files from them.
  • UPnP MediaRenderer DCP - which is a 'slave' device that can render (play) content.
  • UPnP RenderingControl DCP - control MediaRenderer settings; volume, brightness, RGB, sharpness, and more).
  • UPnP Remote User Interface (RUI) client/server - which sends/receives control-commands between the UPnP-client and UPnP-server over network, (like record, schedule, play, pause, stop, etc.).
  • QoS (Quality of Service) - is an important (but not mandatory) service function for use with UPnP AV (Audio and Video). QoS (Quality of Service) refers to control mechanisms that can provide different priority to different users or data flows, or guarantee a certain level of performance to a data flow in accordance with requests from the application program. Since UPnP AV is mostly to deliver streaming media that is often near real-time or real-time audio/video data which it is critical to be delivered within a specific time or the stream is interrupted. QoS (Quality of Service) guarantees are especially important if the network capacity is limited, for example public networks, like the internet.
    • QoS (Quality of Service) for UPnP consist of Sink Device (client-side/front-end) and Source Device (server-side/back-end) service functions. With classes such as; Traffic Class that indicates the kind of traffic in the traffic stream, (for example, audio or video). Traffic Identifier (TID) which identifies data packets as belonging to a unique traffic stream. Traffic Specification (TSPEC) which contains a set of parameters that define the characteristics of the traffic stream, (for example operating requirement and scheduling). Traffic Stream (TS) which is a unidirectional flow of data that originates at a source device and terminates at one or more sink device(s).

NAT traversal

One solution for NAT traversal, called the Internet Gateway Device Protocol (IGD Protocol), is implemented via UPnP. Many routers and firewalls expose themselves as Internet Gateway Devices, allowing any local UPnP control point to perform a variety of actions, including retrieving the external IP address of the device, enumerate existing port mappings, and add or remove port mappings. By adding a port mapping, a UPnP controller behind the IGD can enable traversal of the IGD from an external address to an internal client.

Future developments

UPnP continues to be actively developed. In the fall of 2008, the UPnP Forum ratified the successor to UPnP 1.0, UPnP 1.1. See for documents describing the published standard.

The DPWS standard was a candidate successor to UPnP, but UPnP 1.1 was selected by the Forum.

The UPnP Internet Gateway Device (IGD) standard has a WANIPConnection service that contains a competing solution known as NAT-PMP, which is an IETF draft introduced by Apple Inc. in 2005. However, NAT-PMP is focused only on NAT traversal. Version 2 of IGD is currently under development; additional details are available from.

See also

Books

  • Golden G. Richard: Service and Device Discovery : Protocols and Programming, McGraw-Hill Professional, ISBN 0-07-137959-2
  • Michael Jeronimo, Jack Weast: UPnP Design by Example: A Software Developer's Guide to Universal Plug and Play, Intel Press, ISBN 0-9717861-1-9

External links

Documentation

News

Software

  • Microsoft Windows supports UPnP since Windows Me. Windows XP and later have NAT Traversal APIs to abstract UPnP functions. UPnP IGD devices show up in Network Connections and in My Network Places (formerly Network Neighborhood) if the IGD Discovery and Control client is installed, and double clicking their icon can initiate a connection to the Internet via the gateway device and show status information. NAT port mappings are also shown and can be set up. In Windows XP, Internet Connection Sharing is integrated with UPnP and has a Quality of Service Packet Scheduler component UPnP and NAT traversal APIs can also be installed on Windows 98 and Windows Me by installing the Windows XP Network Setup Wizard. In Windows Vista and later, UPnP IGD devices appear in Network Explorer (Network namespace in Windows Explorer). NAT port mappings can be set up from the gateway device's Properties -> Settings in Network Explorer. In Windows Vista and Windows 7, PnP-X functions of UPnP compatible devices are discovered upon starting Network Explorer and enumerated in Device Manager (Devices and Printers in Windows 7).
  • Free software for Windows which uses UPnP and the Internet Gateway Device Protocol (IGD) (both described above), to automate port forwarding and NAT traversal. Download the "Installation Package", which is the second download link.
  • Developer Tools for UPnP Technologies is an open source set of stack creation and testing tools.
  • Foo_UPnP, UPnP/DLNA client and server for Foobar2000
  • UPnP Port Works (alias UPnPPW) is a software implementation to configure UPnP IGD devices via commandline and graphical user interface.
  • BRisa BRisa is written in Python for Internet Tablet OS or platforms. It enables to create UPnP devices and services, allowing users to share and search content from UPnP A/V devices. It offers a plugin architecture enabling new services such as Flickr to be added as UPnP services.
  • GUPnP is an object-oriented open source framework for creating UPnP devices and control points, written in C using GObject and libsoup.
  • Portable SDK for UPnP Devices provides an API and open source code for building control points, devices, and bridges compliant with UPnP Device Architecture Specification v1.0 and support operating systems like Linux, *BSD, Solaris and others.
  • Platinum SDK Cross-Platform SDK written in C++ for building UPnP Devices and Control Points.
  • Barracuda UPnP Device and Control Point SDK for embedded devices.
  • Unplug n' Pray Utility to disable unnecessary UPnP servers running on home Windows machines.
  • Coherence is a free DLNA/UPnP framework and toolset written in Python to enable applications access to digital living network resources. As a stand alone application, it can act as a UPnP/DLNA media server, in combination with a supported client as a media renderer. It runs on Linux, *BSD, and Windows.
  • Cling Open Source DLNA/UPnP stack, libraries, and tools for Java and Android developers
  • AdoubleU IntelligentShare UPnP SDK for J2SE / J2ME / MIDP 2.0 Running on Linux/BSD/Windows/Mobile Devices
  • J. River Media Center includes a UPnP server (aka UPnP Device) for its library.
  • MiniUPnP Project includes a UPnP IGD device implementation (i.e. server) and a library and tool to control UPnP IGD devices.
  • Jamcast is a UPnP AV MediaServer software implementation for Windows platforms.
  • iSSDPTester is an iPhone OS App for testing SSDP clients and servers.
  • HUPnP HUPnP is an open source, cross-platform software library for building UPnP devices and control points conforming to the UPnP Device Architecture version 1.1. It is built using C++ and the Qt Framework. HUPnP is accompanied by HUPnPAv, which is an open source, cross-platform software library for building UPnP A/V devices and control points. HUPnPAv is built directly above HUPnP.
  • Gizmoot is an iPhone OS App that acts as a UPnP AV control point for the remote control of UPnP/DLNA media servers and renderers.
  • upnpx is an Open Source UPnP Library written in Cocoa(Objective-C) for building UPnP Devices and Control Points for iOS(iPhone, iPad) and OSX.