3

I'm currently adding UPnP support into an application. It will act as a Media Server, Control Point and Media Renderer. My question is should the Media Server and Media Renderer be implemented as 2 separate devices or one root device with 1 embedded device?

If the latter then which is the root device? Also is the UUID the same for the root and embedded device or is it unique per root/embedded device?

Ideally I just want to advertise one device that does everything but I'm not sure if that's allowed or not. I looked at a few devices on my network but none have embedded devices in them which made me wonder if there is a single device specification that does everything?
Thanks for any direction here.

Oli
  • 2,996
  • 3
  • 28
  • 50

2 Answers2

5

[Any references below are to docs present in the bundle from http://upnp.org/resources/upnpresources.zip ]

You can't combine your media server and renderer into a single UPnP device. UPnP-av-MediaRenderer-v3-Device-20101231.pdf & UPnP-av-MediaServer-v4-Device-20101231.pdf define specific device types for server and renderer (see section 3 of each doc) so you'll need separate UPnP devices.

I think you can however embed one (either) device in the other. Section 2.2 (Device Model) of each of the above docs says that renderer and server devices respectively can be either root or embedded.

If you decide to use embedded devices, I believe that each device should have its own UUID. I can't find a definitive reference for this but it seems to be strongly implied in section 2.3 (device description) of the v1.1 architecture document. Its also what I do in the UPnP stack I maintain and I haven't found this to cause any problems.

All that said, you'll only really need to worry about any of this if you want other programs to use your server or renderer as a standard UPnP device, independently of your combined server + renderer + control point. If you don't care about third party use of server or renderer, you're free to do whatever works for your product. So, you could implement as much or little of the UPnP specs as is convenient.

simonc
  • 41,632
  • 12
  • 85
  • 103
  • Thanks Simon-That's really useful. I presume by your answer, in your own stack you have separate root devices. I think this may be the best route for me. – Oli Oct 19 '12 at 23:35
1

You can advertise 2 different devices (MediaServer and MediaRenderer) each with their own device description XML file URL. Each device would have it's own UUID.

Other UPnP devices are interested in different devices and services. A DLNA TV will search for MedServer devices. A ControlPoint will search for both MediaServer and MediaRenderer devices.

A ControlPoint does not advertise itself as a device or offer services, so doesn't have a device description XML file or service XML files.

Using embedded UPnP devices doesn't seem to be widely used and so might be incompatible with other UPnP control point implementations out there.

simonc
  • 41,632
  • 12
  • 85
  • 103
  • Can you supply a reference for the 32 device limit please? Also, should "UPnP device implementations" in the last paragraph be "UPnP control point implementations"? Devices will neither know nor care what other devices are on the network. – simonc Nov 06 '14 at 20:54
  • The 32 is a typo, should read 2 meaning that I recommend advertising a MediaServer device and a MediaRenderer device. Sorry for the confusion. ControlPoint and DLNA DMP (TV that acts as a MediaRenderer and searches for MediaServers) may not support embedded UPnP AV devices. – colin bergin Nov 07 '14 at 21:36
  • Thanks for the explanation. I've taken the liberty of editing your answer to update these points. – simonc Nov 08 '14 at 08:18