UPnP Library for .Net [closed]
Asked Answered
B

4

7

I'm trying to play around with UPnP. Specifically, I'm trying to browse the content library of a PS3 Media Server.

I tried upnp.dll (a COM library that ships with windows) and found it easy to use. I can discover devices and look at their services pretty easily, however it throws an exception when trying to access the services of the media server (other devices, like my router and windows media player, work fine). A bit of searching around the net revealed that upnp.dll is not well implemented and other people have the same problem and found no solutions.

So I've looked for an alternative and found Mono.Upnp. It looks promising but I just can't get it to work, at all.

I saw mentions of Intel's UPnP SDK but this seems to be deprecated and I can't find a downloadable package.

I'm at a loss. Is there no alternative to upnp.dll ?

Bunkmate answered 26/11, 2009 at 1:45 Comment(0)
B
5

I decided to bite the bullet and just roll my own. It's not that hard. Simple udp + xml + soap.

This link was very helpful to me:
http://www.upnp.org/download/UPnP_Device_Architecture_Generic_20000710.ppt

For the specifics of a media server's content directory, see: http://www.upnp.org/standardizeddcps/documents/ContentDirectory1.0.pdf

The Mono.Upnp source was also helpful.

I have no plans to make this open source as it won't be a complete implementation (I'm doing the strict minimum for my project).

Bunkmate answered 30/11, 2009 at 5:0 Comment(1)
SO is there to help others. This answer doesn't help anybody. It surely shouldn't be accepted.Attach
S
5

You could also consider ohNet. It is BSD licensed and has ports for Windows, Linux, iOS, Android and Mac and language bindings for C++, C#, Java, JavaScript and C.

(I should note that I've been involved in ohNet's development)

Susquehanna answered 13/9, 2011 at 13:44 Comment(3)
Thank you very much! ohNet is really the best of UPnP implementations for me. You saved me much time by your answer. Thank you again!Solicitous
Dead link :-( ...Tamishatamma
@nashwan Thanks for spotting this. Now corrected.Susquehanna
S
2

About the Intel UPnP SDK, it was recently updated and renamed to Developer Tools For UPnP. Most notable changes are it now includes source code for all the tools and the code generator, the source is under the Apache 2.0 license, and IPv6 support was added in several places.

See blog post 1 and blog post 2 by Intel's Ylian Saint-hilaire.

Shouse answered 8/12, 2009 at 21:54 Comment(0)
B
1

It might be worth browsing the relevant part of MediaPortal source code. Inparticular, the UPnP project may be useful.

Brock answered 26/11, 2009 at 3:26 Comment(2)
Thanks. It's pretty interesting, but the code is MASSIVE, with components scattered across multiple projects. I'm having a hard time making sense of it all. I'm not sure if it would be possible to extract to UPnP components in a usable fashion.Bunkmate
I guess you could ask the developers about feasibility. By the way, did you see this #333579 from a similar SO question.Brock

© 2022 - 2024 — McMap. All rights reserved.