UPnP principle of operation
UPnP solves a number of problems in the home networking area and therefore allows truly universal "plug and play". The following problems are addressed by UPnP:
Adressing: 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. If no DHCP server is available, the device must use Auto IP to get an address. Discovery: Once devices are attached to the network and addressed appropriately, discovery can take place. When a device is added to the network, UPnP allows that device advertise its services to control points on the network. When a control point is added to the network, SSDP allows that control point to search for devices of interest on the network. 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. Devices may contain other, logical devices and services. 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 websites, and so on Control: After a control point has retrieved a description of the device, the control point has the essentials for device control. To learn more about the service, a control point must retrieve a detailed UPnP description for each service. The description for a service is also expressed in XML and includes a list of the commands,or actions, the service responds to, and parameters or arguments, for each action. 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.