Provides an SSDP server implementation aiming to be fully standards compliant.

Configuration Variables

  • 0 (default)

  • 1: Output details of all requests. Warning: This can produce a lot of output!


UPnP standard to follow.

  • 1.0: (default)

  • 1.1: Incomplete

  • 2.0: Incomplete

Versions 1.1 and 2.0 require BOOTID.UPNP.ORG and CONFIGID.UPNP.ORG fields which are not currently implemented.

Key points from UPnP 2.0 specification

I’m choosing to avoid the issue of ‘multi-homed’ devices, where both IPv4 and IPv6 are being used, and probably also WiFi+Ethernet combinations. Basically whenever multiple IP stacks are involved.

Search request

M-SEARCH: “Please tell me about yourselves, but don’t all shout at once.”

   Search for all devices and services.

   Search for root devices only.

   Search for a particular device.

   Search for any device of this type.

   Search for any service of this type.

Period characters in <domain> are always substituted with hyphens (RFC 2141).

Not clear on how to handle version numbers at present. The specs. say only minor versions are backward compatible, which why perhaps we only see major numbers in interface definitions. e.g. Basic:1 not Basic:1.0.

Search reponse

Any device responding to a unicast M-SEARCH should respond within 1 second.

In response to an M-SEARCH request, if ST header in request was:

   Respond 3+2d+k times for a root device with d embedded devices and s embedded services
   but only k distinct service types.
   Value for ST header must be the same as for the NT header in NOTIFY messages with ssdp:alive.

   Respond once for root device.

   Respond once for each matching device, root or embedded.

   Respond once for each matching device, root or embedded.
   Should specify the version of the device type contained in the M-SEARCH request.

   Respond once for each matching service type.
   Should specify the version of the service type contained in the M-SEARCH request.


The LOCATION field is for the device description or enclosing device in the case of a service.

This implies that we never respond with a service description, which makes sense:

  • The device description provides key information about its services

  • The service description contains action lists or state variable tables

Only the device description is required to learn about services, whilst the service description is only required if the Control Point needs to interact with that service.

Points arising

So we need a filter which then gets passed through the device stack. Each response must be sent on a schedule, not all together, so we’ll need to set up a timer. We’ll also need to track state something like the DescriptionStream. Actually, what we can do is create an enumerator which iterates through the entire device stack. That will take out the complexity from here and DescriptionStream. We’ll need an additional Item tag so we can differentiate. This can either be a virtual method or we could use a union with all the different Item types plus a separate tag field. That could also contain the search filter information as input.

Move all this stuff into an SsdpResponder class?


Used by

Environment Variables