Complete information about UPnP and DLNA
- Universal Plug and Play (UPnP) Architecture overview
- UPnP AV architecture
- UPnP AV Components
- What is DLNA?
The concept of UPnP is an extension of plug-and-play, which is technology for dynamically attaching devices to each other without the need of physical device configuration or user intervention. The UPnP architecture allows device-to-device networking of electronic devices such as mobile devices, personal computers, Smart TVs and other type of home networked devices. It involves a lot of standards and technologies such as the Internet Protocol Suite (TCP/IP), HTTP, XML, and SOAP. The UPnP is based on client-server concept where UPnP control points (clients) are searching for UPnP servers (devices), which provide different standard services. The UPnP specification is divided into six phases:
This point is related to device IP address assignment. In order to be a part of the networking, a device must have an unique IP address assigned. This can be achieved using a lookup into Dynamic Host Configuration Protocol (DHCP) server or assign an IP address using AutoIP.
After device addressing, the next step into UPnP networking is device discovery. The UPnP discovery protocol is known as the SSSDP (Simple Service Discovery Protocol). The device advertise its services to the network using SSSDP alive messages. When a control point is added to the network it can actively search for devices of interest on the network or listen passively to the SSSDP alive messages. he fundamental exchange 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 (network location) to more detailed information.
When device is discovered by a control point, the control point knows very little about this device. In order to gain more information about the device and its capabilities, the control point must retrieve the device's description from the location (URL) provided by the device in the discovery message. The UPnP Device Description is expressed in XML, which includes information like vendor, model name, serial number, URL, etc. One of the most important information provided by device description XML is a list of supported services and their URLs for control and events listening.
In order to interact with discovered device, the control point sends suitable control messages for invoking actions on services. These control messages are expressed in XML format using the Simple Object Access Protocol (SOAP).
A control point may register itself at a service to be informed for any device state changes. This event notification protocol is known as General Event Notification Architecture (GENA). The service sends events notifications to all registered control points at any change of a state variable. Event messages are under XML format and contain the names of one or more state variables and the current value of those variables.
A device may provide an adapted user interface (UI) using an Uniform Resource Location (URL) in ordered to provide control for itself. So a control point may connect to this URL and use it to display a specific HTML page in a web browser and depending on the capabilities of the page to allow user to view device status and control its services.
The UPnP AV architecture is an audio and video extension of UPnP and it is trying to define a standard for interaction between multimedia devices. This standard extension is supported by variaty of devices such as TVs, VCRs, CD/DVD players/jukeboxes, settop boxes, stereos systems, MP3 players, still image cameras, personal computers and so on.
The main goals of UPnP AV Architecture can be defined as following:
- To support arbitrary transfer protocols and content formats.
- To enable the AV content to flow directly between devices without any intervention from the control point.
- To enable control points to remain independent of any particular transfer protocol and content format. This allows control points to transparently support new protocols and formats.
- Scalability, i.e. support of devices with very low resources, especially memory and processing-power as well as full-featured devices.
- Synchronized playback to multiple rendering devices.
- Access Control, Content Protection, and Digital Rights Management
Normally in UPnP scenario the involved devices do not not interact directly with each another. The coordination between the devices is performed by the control point and not the devices themselves. The control point coordinates and synchronize the communication between devices in order to provide synchronized end-user effect. The most of AV scenario involve exchange of media content between devices. The AV control point uses UPnP to configure and setup the involved devices, but the media data is exchanged using out of bound non UPnP connection. So the control point is not directly involved during the content transfer.
In the UPnP AV architecture, there are three main components:
- the control point
- MediaServer (DMS) - the source of the media content
- MesiaRenderer (DMR) - the sink of the content
The Digital Living Network Alliance (DLNA) is an industry wide standard for sharing media content between devices. It is founded by a group of organisations some of which consumer electronics manufacturers, which desired to create a standart enabling all DLNA devices to exchange media over a home network. Nowadays many multimedia devices such as TVs, Phones, Hi-Fi systems, MP3 players, Network Attached Storages (NAS), etc are compatable with this standard and many users can take advantage of DLNA capabilities. Users having DLNA compatable devies are able to remotely control them and watch their favourite photos, movies and also to listen favourite songs, while sitting comfortably in their sofa.
The relation between UPnP and DLNA is that the DLNA is delivered from UPnP in order to normalize media interoperability. The DLNA puts some additional restrictions such as media formats and adding some additional features such as DRM.
Note that in most cases adding DLNA support to existing devices is impossible. The existing electronic products either have a build-in DLNA capabilities or don't support it at all. Ofcourse this is not true for devices such as personal computers, smart phones and other devices like these, since they allow installation of additional software applications to extend their ability.
A video DLNA explination:
One of the most common DLNA Devices are:
- Digital Media Controller (DMC) - discovers Digital Media Servers (DMS) in the network and instruct digital media renderers (DMR) to play the content. Similar to UPnP AV, the content transfer is using an out-of-bound connection out of the DMC.
- Digital Media Server (DMS) - this is the source of media content and makes it available to networked digital media players (DMP) and digital media renderers (DMR). As examples for such devices are PersonalComputers and network-attached storage (NAS).
- Digital Media Renderer (DMR) - play content as instructed by a digital media controller (DMC). Such devices are Smart TVs, audio players, video displays, etc.