Device Location (Windows Embedded CE 6.0)
1/6/2010
UPnP is based on a dynamic network architecture that allows devices to join and leave a network at any time. Because of this dynamic architecture, applications acting as UPnP control points cannot rely on specific UPnP devices to be available at any given time. Instead, UPnP control points search the network to find devices that most closely match specified criteria. Applications also wait for device advertisement messages that indicate new devices have been added to the network or that devices are leaving the network.
The following list shows the valid search criteria fields for UPnP devices:
- Device type
- Service type
- Unique device name (UDN)
- All root devices
These fields define the type of information that will exist in the UPnP M-SEARCH Simple Service Discovery Protocol (SSDP) message generated by the API. When a device receives a search request, it compares the provided information with information it maintains in their device description documents. Using this information, it determines if it matches the type of device for which the control point is searching.
The device type and service type searches are typically used to find a class of devices with common characteristics. The unique device name search is used to find a specific device.
To search for devices:
- Instantiate an instance of the IUPnPDeviceFinder interface, as explained in Device Finder Creation.
- Use the methods of the IUPnPDeviceFinder interface to perform the searches using the criteria listed above. For more information about using these methods, see Asynchronous Searching, Synchronous Searching, and Device Collections Returned by Synchronous Searches.
The Control Point API uses the discovery model exposed by the UPnP architecture to locate devices. For more information, see UPnP Discovery.