The UPnP Media Renderer
UPnP Media Renderer's structure and behaviour
SSDP section (cont'd)
============================================================
Outgoing SSDP search response:
------------------------------------------------------------
HTTP/1.1 200 OK
Content-Type: text/html; charset="utf-8"
Server: Linux/3.18.13+ UPnP/1.0 CyberLinkJava/1.8
Content-Length: 0
Cache-Control: max-age=300
EXT:
Date: Fri, 22 May 2015 14:52:31 GMT
ST: upnp:rootdevice
USN: uuid:c815t14n0::upnp:rootdevice
Location: http://192.168.1.103:4004/description.xml
============================================================
Figure 3: SSDP Search Response message sent by the Media Renderer
Let's see something about the fields contained into the two messages:
- ST (for both requests and responses): is the search target, in this case it is upnp:rootdevice because, as explained before, the Media Renderer consists of a unique root device. So, in this case, the Control Point searches for root devices only
- MX: it's the the maximum time that the device can wait before sending a response
- MAN: defines a namespace, in this case "ssdp:discover"
- HOST: contains an IP address (in this case is multicast) and an UDP port (default is 1900)
- USN: stays for Unique Service Name, in this case it is in the format uuid:DEVICE_UUID::upnp:rootdevice
- LOCATION: contains the URL to the UPnP description of the root device.
Once the Control Point knows the URL to the device's description it's able to retrieve the XML description of the root device and the XML description of its services and finally it subscribes to them.