UPnP Technology and Test Tools

Universal Plug and Play (UPnP) is a set of networking protocols that permits networked devices, such as personal computers, printers, gateways, servers and mobile devices to seamlessly discover each other’s presence on the network and establish functional network services for data sharing, communications, and entertainment. UPnP is intended primarily for residential networks. No special device driver support is necessary, common network protocols are used (TCP/IP, HTTP, XML, SOAP). UPnP uses UDP port 1900 and TCP port 2869.

The UPnP technology is promoted by the UPnP Forum. Formed in October 1999, the UPnP Forum is an industry initiative of more than 1000 leading companies in computing, printing, networking, consumer electronics and home appliances. A huge library of UPnP resources is available at the website of the UPnP Forum.

UPnP was published as an international standard, ISO/IEC 29341, in December 2008.

The foundation for UPnP networking is IP addressing, either by DHCP or by AutoIP (zero configuration networking). The next step in UPnP networking is discovery, based on the Simple Service Discovery Protocol (SSDP).¬†SSDP allows a device to advertise its services to control points, for example to media servers (Serviio) on the network. The next step is to learn more about the discovered device and its capabilities by retrieving the device’s XML description from the URL provided by the device in the discovery message. Now the control point can send actions to a device’s service using the Simple Object Access Protocol (SOAP).

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). The final step in UPnP networking is presentation, usually by providing an URL of a webpage loaded in a browser.

UPnP AV is an audio and video extension of UPnP, referenced in specifications published by other organizations, including the Digital Living Network Alliance (DLNA).

Problems with UPnP are lack of authentication and vulnerabilities with the risk that UPnP devices can be accessed and/or manipulated by malicious web sites.

A complete set of open source tools for creating and testing UPnP solutions is provided by Intel. They include Device Spy, a generic control point, and Device Builder, a code generation tool. In all, there are 11 tools in this package that range from low-level debugging to full reference tools :

  • Device Spy
  • Device Sniffer
  • Network Light
  • Device Builder
  • Device Relay
  • Device Validator
  • Service Author
  • AV Media Controller
  • AV Media Server
  • AV Media Renderer
  • AV Wizard

Network Light is a software model of an UPnP device to show the basic functions of the UPnP protocol. The light can be switched on/off or dimmed. The following snaps show how

network_light

UPnP Network Light OFF / ON / DIMMED

UPnP Device Spy Tool

UPnP Device Spy Tool

setLoadLevelTarget

UPnP Device Spy Tool : Invoke action DIM 50%

UPnP Device Spy Tool : Invoke action ON

UPnP Device Spy Tool : Invoke action ON

UPnP Device Sniffer Tool

UPnP Device Sniffer Tool

Another UPnP test tool, called UPnP Inspector, has been developed by Coherence. The Inspector is an UPnP Device and Service analyzer, and a debugging tool, based on the Coherence DLNA/UPnP framework. It is loosely modeled after the Intel UPnP Device Spy and Device Validator.

UPnP Inspector

UPnP Inspector

UPnP Inspector logs

UPnP Inspector logs

UPnP Inspector action

UPnP Inspector action

UPnP Inspector details

UPnP Inspector details