Search code examples
upnp

Upnp Root Device Vs Embedded Device


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.


Solution

  • [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.