UPnP™ Architecture Overview
The UPnP architecture is a set of
open standards and technologies for transparently connecting appliances, PCs, and services by extending
the Plug and Play concept to support networks and peer-to-peer discovery, configuration
and control. The UPnP Forum is committed to device interoperability in a number of areas and
has established working groups for Home Automation and Security, Internet Gateways,
Imaging and Printing, Audio/Video, Mobile Devices and Appliances.
The UPnP architecture is based on simple, open protocols such as those defined by the
Internet Engineering Task Force (IETF) that have a proven track record of enabling real-world
multiple-vendor interoperation. TCP/IP has been implemented by many vendors on many diverse computing
platforms, yet these implementations are able to communicate reliably and without a massive
multiple-vendor test effort. When browsing the Web using HTTP, users move seamlessly between
different server operating systems and different Web server implementations without any
client-side code or configuration changes. The Internet itself, in spite of its huge size,
is not managed by any single authority. Wire protocols are proven technology. The UPnP
architecture uses the Internet open protocol model. Device vendors in the UPnP architecture
are not constrained to implement any single vendor's technology, and are assured that they will
interoperate with the largest number of other vendors' products.
The UPnP architecture's focus on explicit open wire protocols means that it is
language and operating system neutral. The advantages of this approach to developers are
obvious; the choice of language and operating system gives them the flexibility to choose
the best platform for their device and still be confident that their products will be able
to interact with other UPnP devices, regardless of platform. For example,
it is possible for a developer using Windows to interact with services on non-Windows
devices by invoking Windows-based APIs, object models, or even XML-enabled data-driven
programming using familiar languages and tools, regardless of the UPnP
implementation on the device providing the service.
UPnP Components
The UPnP architecture has five components, Discovery, Description, Control, Eventing, and Presentation.
The first component of UPnP networking is Discovery. When a device is added to the network,
the UPnP discovery protocol allows that device to advertise its services to control points on
the network. Similarly, when a control point is added to the network, the UPnP discovery protocol
allows that control point to search for devices of interest on the network. The message that is
exchanged in both cases is a discovery message containing a few, essential specifics about the
device or its services, such as the device type, identifier, and a pointer to more detailed
information. The UPnP discovery protocol is based on the Simple Service Discovery Protocol (SSDP).
The second component of UPnP networking is Description. After a control point has discovered
a device, the control point needs to find out more 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 using the URL provided by the device in the discovery message.
The URL points to a UPnP description document that is expressed in XML and includes vendor-specific
information such as the model name and number, serial number, manufacturer name, URLs to vendor-specific
Web sites and URLs for control, eventing, and presentation.
Devices may contain other logical devices, as well as services. The UPnP description document
includes a list of other embedded devices and a description of the available services. For each
service, the description includes a list of the actions that the service responds to and the arguments
for each action. The description for a service also includes a list of variables that reflect the
state of the device. These variables are described in terms of their data type, range, and event
characteristics.
The third component of UPnP networking is Control. After a control point has retrieved the
description of the device, the control point can initiate actions to the device. To do this, a
control point sends a suitable control message to the control URL for the service. Control
messages are expressed in XML using the Simple Object Access Protocol (SOAP). Control actions
are like function calls, and the device service will return any action-specific values in response
to the control message. The effects of the action will also be reflected by changes in the variables
that describe the run-time state of the device.
The fourth component of UPnP networking is Eventing. The UPnP description document for a device
service includes a list of variables that reflect the state of the device. The device publishes updates
when these variables change, and a control point may subscribe to receive this information. The
subscriptions are established using the General Event Notification Architecture (GENA). The device
publishes updates by sending event messages. Event messages contain the names of one of more state
variables and the current value of those variables. These messages are expressed in XML and sent
using HTTP. A special initial event message is sent when a control point first subscribes. This
initial 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 state of
the device. This means that all subscribers are sent all event messages, and subscribers receive event
messages for all evented variables that have changed.
The fifth component of UPnP networking is Presentation. The Presentation capabilities of a device
allow HTML-based management of the device by the end user using a standard Web browser. A control point
can determine the entry Presentation URL from the device description document, retrieve the entry page
from the URL, load the page into a browser, and start the user management of the device.
An additional component of UPnP networking is the application layer. The capabilities of a device are
defined by specific device and services templates that provide the framework for the Description, Control and
Eventing network components. A device vendor can prepare these templates by themselves or work with other
vendors within the UPnP Forum to prepare industry standard device and service templates. Current
UPnP Working Committees that have prepared standard template definitions include the Internet Gateway,
Printing and Imaging, and Audio/Visual Working Committees.
|