4 Protocol Examples

A new device is set up and plugged in to the home network for the first time. When it is turned on, the device first sends over port 1900 a UDP multicast message of ssdp:byebye, and then, immediately afterward, a message of ssdp:alive. The ssdp:byebye message is sent just before the ssdp:alive message to ensure cancellation of any previously sent ssdp:alive message.

The following examples could be used for a particular Microsoft Xbox 360 device.

 NOTIFY * HTTP/1.1 
 HOST:239.255.255.250:1900 
 NT:urn:schemas-microsoft-com:nhed:presence:1
 NTS:ssdp:byebye 
 LOCATION:* 
 USN:uuid:00000000-0000-0000-0200-00125A8A0960::urn:schemas-microsoft-
 com:nhed:presence:1
  
  
 NOTIFY * HTTP/1.1 
 HOST:239.255.255.250:1900 
 NT:urn:schemas-microsoft-com:nhed:presence:1
 NTS:ssdp:alive 
 LOCATION:* 
 CACHE-CONTROL:max-age=4 
 AL:<urn:schemas-microsoft-com:nhed:attributes?type=X02&firmwarever=
 5766.0&udn=uuid:10000000-0000-0000-0200-00125A8A0960>
 USN:uuid:00000000-0000-0000-0200-00125A8A0960::urn:schemas-microsoft-
 com:nhed:presence:1
 SERVER:dashboard/1.0 UpnP/1.0 xbox/2.0

Note In these examples, the NT, USN, and AL header values are placeholders to be replaced by application-specific values.

The device continues to resend these messages every 5 seconds until a control point that is listening on the network for this ssdp:alive message responds with the appropriate behavior. The contract between the control point and the device for the expected control point response behavior is outside the scope of this protocol. However, as an example, a device could listen on an agreed-upon TCP port, and when the control point connects to this TCP port (in response to having received a device ssdp:alive message) the device could assume it has been discovered and cease sending the SSDP messages.