Hardware Reference
In-Depth Information
Networking Addressing
As covered in the Addressing section of Chapter 1, the network works best with dynamic IP addresses, distributed by
DHCP. All UPnP devices use DHCP to determine its local address, and so the (short) time investment in preparing
such a network is considered very worthwhile. In those cases in which such a service is not available, UPnP should fall
back to a link-local address, which may not be in your intended range. (It will always be on a private intranet address,
but can be a different one to the rest of your set-up, as the 169.254/16 range is preferred, meaning that the devices
will not be visible.)
With routers providing this functionality out of the box, even casual dabblers in HA can be sure of a hassle-free
UPnP experience. Naturally, when the UPnP device is a software device, the IP is provided by the host machine.
Discovery
In the same way that other services, such as Bluetooth, are able to discover compatible devices on its network, this
works through the Simple Service Discovery Protocol (SSDP) and behaves like DHCP or DNS. Consequently, port
1900 is awash with traffic looking for these devices. It is unlikely that you would want (or need) discovery services
outside of your local intranet, so there is no need to open this port to the wider world. Also, because this is a multicast
request, you won't be able to use it over wifi because, by default, most wifi routers disable multicast.
Description
This is an XML file, returned over HTTP, describing the device as a whole. It doesn't control the device itself, but it
explains how to do so. An example of this file would be as follows:
<?xml version="1.0" encoding="utf-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:BinaryLight:1</deviceType>
<friendlyName>Kitchen Lights</friendlyName>
<manufacturer>OpenedHand</manufacturer>
<modelName>Virtual Light</modelName>
<UDN>uuid:cc93d8e6-6b8b-4f60-87ca-228c36b5b0e8</UDN>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:SwitchPower:1</serviceType>
<serviceId>urn:upnp-org:serviceId:SwitchPower:1</serviceId>
<SCPDURL>/SwitchPower1.xml</SCPDURL>
<controlURL>/SwitchPower/Control</controlURL>
<eventSubURL>/SwitchPower/Event</eventSubURL>
</service>
</serviceList>
</device>
</root>
(from http://developer.gnome.org/gupnp/unstable/server-tutorial.html )
Search WWH ::




Custom Search